diff options
Diffstat (limited to 'src/connectionhandler.h')
-rw-r--r-- | src/connectionhandler.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/connectionhandler.h b/src/connectionhandler.h index bc5f0965..ab01dc2c 100644 --- a/src/connectionhandler.h +++ b/src/connectionhandler.h @@ -28,6 +28,10 @@ #include "netcomputer.h" #include "packet.h" #include <map> +#include <SDL_net.h> + +// Forward declaration +class ListenThreadData; /** * This class represents the connection handler interface. The connection @@ -43,6 +47,13 @@ class ConnectionHandler ConnectionHandler(); /** + * Starts listening to the server socket. It accepts new connections + * and receives data from connected clients. All computers are + * disconnected when listening stops. + */ + void startListen(ListenThreadData *ltd); + + /** * Called when a computer connects to a network session. */ void computerConnected(NetComputer *computer); @@ -72,6 +83,7 @@ class ConnectionHandler private: std::map<unsigned int, MessageHandler*> handlers; + std::map<NetComputer*, TCPsocket> clients; }; #endif |