summaryrefslogtreecommitdiffstats
path: root/src/Net/Connection.cpp
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2008-06-26 16:39:25 +0200
committerMatthias Schiffer <matthias@gamezock.de>2008-06-26 16:39:25 +0200
commitea9fe3ef923000a7bfa4d7afc306669d5442e0fc (patch)
treefc549e40acbee781282478fc9c8e351507e99a9f /src/Net/Connection.cpp
parent91bdac7f768e538a2e25b04347b747b1902e3159 (diff)
downloadmad-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.cpp6
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;
+}
+
}
}