summaryrefslogtreecommitdiffstats
path: root/src/Net/Connection.cpp
diff options
context:
space:
mode:
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;
+}
+
}
}