aboutsummaryrefslogtreecommitdiffstats
path: root/src/event
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/event/MultiSocketMonitor.cxx9
-rw-r--r--src/event/MultiSocketMonitor.hxx5
2 files changed, 14 insertions, 0 deletions
diff --git a/src/event/MultiSocketMonitor.cxx b/src/event/MultiSocketMonitor.cxx
index f22b0a022..5ef8b98af 100644
--- a/src/event/MultiSocketMonitor.cxx
+++ b/src/event/MultiSocketMonitor.cxx
@@ -19,6 +19,7 @@
#include "config.h"
#include "MultiSocketMonitor.hxx"
+#include "Loop.hxx"
#include <algorithm>
@@ -35,6 +36,14 @@ MultiSocketMonitor::~MultiSocketMonitor()
// TODO
}
+void
+MultiSocketMonitor::ClearSocketList()
+{
+ assert(GetEventLoop().IsInsideOrNull());
+
+ fds.clear();
+}
+
#ifndef WIN32
void
diff --git a/src/event/MultiSocketMonitor.hxx b/src/event/MultiSocketMonitor.hxx
index 963745be1..150f7baad 100644
--- a/src/event/MultiSocketMonitor.hxx
+++ b/src/event/MultiSocketMonitor.hxx
@@ -126,6 +126,11 @@ public:
}
/**
+ * Remove all sockets.
+ */
+ void ClearSocketList();
+
+ /**
* 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