diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2008-06-26 16:39:25 +0200 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2008-06-26 16:39:25 +0200 |
commit | ea9fe3ef923000a7bfa4d7afc306669d5442e0fc (patch) | |
tree | fc549e40acbee781282478fc9c8e351507e99a9f /src/Net/Connection.cpp | |
parent | 91bdac7f768e538a2e25b04347b747b1902e3159 (diff) | |
download | mad-ea9fe3ef923000a7bfa4d7afc306669d5442e0fc.tar mad-ea9fe3ef923000a7bfa4d7afc306669d5442e0fc.zip |
ConnectionManager f?r den Kern hinzugef?gt
Diffstat (limited to 'src/Net/Connection.cpp')
-rw-r--r-- | src/Net/Connection.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Net/Connection.cpp b/src/Net/Connection.cpp index e7be313..4e3fee4 100644 --- a/src/Net/Connection.cpp +++ b/src/Net/Connection.cpp @@ -168,5 +168,11 @@ void Connection::disconnect() { state = DISCONNECTED; } +struct pollfd Connection::getPollfd() const { + struct pollfd fd = {sock, (receiveComplete() ? 0 : POLLIN) | (sendQueueEmpty() ? 0 : POLLOUT), 0}; + + return fd; +} + } } |