From 4ec65c6231df9fcb38210f9b885cdf73b72cc176 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Sun, 9 Feb 2014 17:17:04 +0100 Subject: Call DelFd() and SetFd(-1) from SocketEngine::Close(EventHandler*) --- include/socketengine.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'include/socketengine.h') 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. -- cgit v1.3.1-10-gc9f91