diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2008-06-27 03:19:56 +0200 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2008-06-27 03:19:56 +0200 |
commit | f5377412a89b2a7f422decd771dc8de49a5498fc (patch) | |
tree | bda661debda3c324189240f3a68cca7a9f4e316b /src/Core/ConnectionManager.h | |
parent | ea9fe3ef923000a7bfa4d7afc306669d5442e0fc (diff) | |
download | mad-f5377412a89b2a7f422decd771dc8de49a5498fc.tar mad-f5377412a89b2a7f422decd771dc8de49a5498fc.zip |
Einfaches Polling implementiert
Diffstat (limited to 'src/Core/ConnectionManager.h')
-rw-r--r-- | src/Core/ConnectionManager.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Core/ConnectionManager.h b/src/Core/ConnectionManager.h index 49c9398..b68919c 100644 --- a/src/Core/ConnectionManager.h +++ b/src/Core/ConnectionManager.h @@ -50,14 +50,17 @@ class ConnectionManager { void refreshPollfds(); - void daemonReceiveHandler(const Net::Connection*, const Net::Packet &packet) const; - void clientReceiveHandler(const Net::Connection*, const Net::Packet &packet) const; + void daemonReceiveHandler(const Net::Connection *connection, const Net::Packet &packet); + void clientReceiveHandler(const Net::Connection *connection, const Net::Packet &packet); public: ConnectionManager(); virtual ~ConnectionManager(); - void wait(int timeout); + void wait(int timeout) { + poll(pollfds.data(), pollfds.size(), timeout); + } + void run(); }; |