diff options
Diffstat (limited to 'src/Core/ConnectionManager.h')
-rw-r--r-- | src/Core/ConnectionManager.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/Core/ConnectionManager.h b/src/Core/ConnectionManager.h index 608ec27..c7fe669 100644 --- a/src/Core/ConnectionManager.h +++ b/src/Core/ConnectionManager.h @@ -24,6 +24,7 @@ #include <vector> #include <map> #include <poll.h> +#include <Common/RequestManager.h> namespace Mad { @@ -41,27 +42,27 @@ class ConnectionManager { // Prevent shallow copy ConnectionManager(const ConnectionManager &o); ConnectionManager& operator=(const ConnectionManager &o); - + + Common::RequestManager requestManager; + std::list<Net::Listener*> listeners; - + std::list<Net::ServerConnection*> daemonConnections; std::list<Net::ServerConnection*> clientConnections; - + std::vector<struct pollfd> pollfds; std::map<int,const short*> pollfdMap; - + void refreshPollfds(); - - void receiveHandler(Net::Connection *connection, const Net::Packet &packet); - + public: ConnectionManager(); virtual ~ConnectionManager(); - + bool wait(int timeout) { return (poll(pollfds.data(), pollfds.size(), timeout) > 0); } - + void run(); }; |