diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-06-12 12:32:14 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-06-12 12:32:14 +0000 |
commit | 9fa9cb8fa13049fa4ba28d31159b4e1a0c6c0432 (patch) | |
tree | 5a766717b6af2be67b1475ae2b520e1918599dc1 /src/connectionhandler.h | |
parent | 7a8b2b11e989e474dceb30330852174d877b1601 (diff) | |
download | manaserv-9fa9cb8fa13049fa4ba28d31159b4e1a0c6c0432.tar.gz manaserv-9fa9cb8fa13049fa4ba28d31159b4e1a0c6c0432.tar.xz manaserv-9fa9cb8fa13049fa4ba28d31159b4e1a0c6c0432.zip |
Some cleanups mostly in account class formatting.
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. |