diff options
Diffstat (limited to 'src/connectionhandler.h')
-rw-r--r-- | src/connectionhandler.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/connectionhandler.h b/src/connectionhandler.h index ab01dc2..cf93e6a 100644 --- a/src/connectionhandler.h +++ b/src/connectionhandler.h @@ -30,10 +30,28 @@ #include <map> #include <SDL_net.h> +#define IN_BUFFER_SIZE 8192 + + // Forward declaration class ListenThreadData; /** + * Data related to a connected client. This includes the buffer for incoming + * messages and the related socket. + */ +class ClientData +{ + public: + ClientData(); + + TCPsocket sock; /**< The socket used for communication */ + + int inp; /**< The amount of data in the in buffer */ + char in[IN_BUFFER_SIZE]; /**< The in buffer for incoming messages */ +}; + +/** * This class represents the connection handler interface. The connection * handler will respond to connect/reconnect/disconnect events and handle * incoming messages, passing them on to registered message handlers. |