aboutsummaryrefslogtreecommitdiffstats
path: root/src/event/SocketMonitor.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-01-06 18:02:57 +0100
committerMax Kellermann <max@duempel.org>2014-01-06 18:26:55 +0100
commit793962c5b86cd063036a2d28907b0b33012483e1 (patch)
tree39531d85b0ab2bf480f74c74da788e566991ee25 /src/event/SocketMonitor.hxx
parent0d20130d07d69bb8ac4392af8f2ed25e5ea0bbad (diff)
downloadmpd-793962c5b86cd063036a2d28907b0b33012483e1.tar.gz
mpd-793962c5b86cd063036a2d28907b0b33012483e1.tar.xz
mpd-793962c5b86cd063036a2d28907b0b33012483e1.zip
event/SocketMonitor: don't close the socket automatically
Users now have to call Close() explicitly. This simplifies using the class, as most users have automatic socket management already, and Steal() had to be used often.
Diffstat (limited to '')
-rw-r--r--src/event/SocketMonitor.hxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/event/SocketMonitor.hxx b/src/event/SocketMonitor.hxx
index 3a84dc094..d0fcf1b57 100644
--- a/src/event/SocketMonitor.hxx
+++ b/src/event/SocketMonitor.hxx
@@ -44,6 +44,9 @@ class EventLoop;
* #EventLoop will invoke virtual method OnSocketReady() as soon as
* any of the subscribed events are ready.
*
+ * This class does not feel responsible for closing the socket. Call
+ * Close() to do it manually.
+ *
* This class is not thread-safe, all methods must be called from the
* thread that runs the #EventLoop, except where explicitly documented
* as thread-safe.
@@ -91,7 +94,7 @@ public:
/**
* "Steal" the socket descriptor. This abandons the socket
- * and puts the responsibility for closing it to the caller.
+ * and returns it.
*/
int Steal();