aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-01-06 08:59:27 +0100
committerMax Kellermann <max@duempel.org>2014-01-06 08:59:27 +0100
commita9e604d51df1f30e5423cdb2e5b99cefa2369082 (patch)
tree9bce3f7a6230812661af0b5ae7af856d3545cebc /src
parente599b86424014d469874f67594112e0a7160a336 (diff)
downloadmpd-a9e604d51df1f30e5423cdb2e5b99cefa2369082.tar.gz
mpd-a9e604d51df1f30e5423cdb2e5b99cefa2369082.tar.xz
mpd-a9e604d51df1f30e5423cdb2e5b99cefa2369082.zip
event/MultiSocketMonitor: API documentation
Diffstat (limited to 'src')
-rw-r--r--src/event/MultiSocketMonitor.hxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/event/MultiSocketMonitor.hxx b/src/event/MultiSocketMonitor.hxx
index 6c76d667f..d6ad3b177 100644
--- a/src/event/MultiSocketMonitor.hxx
+++ b/src/event/MultiSocketMonitor.hxx
@@ -112,6 +112,10 @@ public:
using IdleMonitor::GetEventLoop;
public:
+ /**
+ * Invalidate the socket list. A call to PrepareSockets() is
+ * scheduled which will then update the list.
+ */
void InvalidateSockets() {
refresh = true;
IdleMonitor::Schedule();
@@ -121,6 +125,12 @@ public:
fds.emplace_front(*this, fd, events);
}
+ /**
+ * Update the known sockets by invoking the given function for
+ * each one; its return value is the events bit mask. A
+ * return value of 0 means the socket will be removed from the
+ * list.
+ */
template<typename E>
void UpdateSocketList(E &&e) {
for (auto prev = fds.before_begin(), end = fds.end(),