summaryrefslogtreecommitdiff
path: root/include/socketengine.h
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-02-09 17:17:04 +0100
committerAttila Molnar <attilamolnar@hush.com>2014-02-09 17:17:04 +0100
commit4ec65c6231df9fcb38210f9b885cdf73b72cc176 (patch)
tree97bb3a6c46634b2b00c3edaacdb86867a5023423 /include/socketengine.h
parent080bb7c0b3d4cc3fcd06d04621ae4780ebbf3f2c (diff)
Call DelFd() and SetFd(-1) from SocketEngine::Close(EventHandler*)
Diffstat (limited to 'include/socketengine.h')
-rw-r--r--include/socketengine.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/include/socketengine.h b/include/socketengine.h
index 305d389d4..3a15e98c1 100644
--- a/include/socketengine.h
+++ b/include/socketengine.h
@@ -409,12 +409,11 @@ public:
*/
static int Accept(EventHandler* fd, sockaddr *addr, socklen_t *addrlen);
- /** Abstraction for BSD sockets close(2).
- * This function should emulate its namesake system call exactly.
- * @param fd This version of the call takes an EventHandler instead of a bare file descriptor.
- * @return This method should return exactly the same values as the system call it emulates.
+ /** Close the underlying fd of an event handler, remove it from the socket engine and set the fd to -1.
+ * @param eh The EventHandler to close.
+ * @return 0 on success, a negative value on error
*/
- static int Close(EventHandler* fd);
+ static int Close(EventHandler* eh);
/** Abstraction for BSD sockets close(2).
* This function should emulate its namesake system call exactly.