diff options
Diffstat (limited to 'types.h')
-rw-r--r-- | types.h | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -22,6 +22,8 @@ #define FALSE (0) typedef struct _server_t_ server_t; +typedef struct _epoll_client_t_ epoll_client_t; +typedef struct _epoll_server_t_ epoll_server_t; /** * General epoll struct, to be implemented by every epoll struct. @@ -44,7 +46,7 @@ typedef struct { /** * epoll struct for a client we're serving. */ -typedef struct { +struct _epoll_client_t_ { void (*callback)(void *data, int haveIn, int haveOut, int doCleanup); int fd; // @@ -56,15 +58,16 @@ typedef struct { size_t sbPos, sbFill, sbLen; SSL *ssl; // NULL if not encrypted char *sendBuffer; // Dynamically allocated, might or might not get huge + epoll_server_t *fixedServer; // If client performed explicit bind, tie to server connection // Recv buffer (client's request) size_t rbPos; char readBuffer[REQLEN]; // Static, queries > 4000 bytes simply not supported -} epoll_client_t; +}; /** * epoll struct for a connection to AD. */ -typedef struct { +struct _epoll_server_t_ { void (*callback)(void *data, int haveIn, int haveOut, int doCleanup); int fd; // @@ -72,6 +75,7 @@ typedef struct { size_t sbPos, sbFill, sbLen; SSL *ssl; // NULL if not encrypted char *sendBuffer; // Dynamically allocated, might or might not get huge + epoll_client_t *fixedClient; // If client performed explicit bind, this is the client belonging to this connection // Recv buffer (server's response) size_t rbPos; char readBuffer[MAXMSGLEN]; @@ -82,7 +86,7 @@ typedef struct { BOOL writeBlocked; // An SSL_write returned WANT_*, so we must not reallocate the current send buffer time_t lastActive; server_t *serverData; -} epoll_server_t; +}; /** * Configuration data for an ADS we're proxying. |