X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Fsocketengine.h;h=895457b89191034666b11ba9bcc89dce367c4882;hb=984db9e30147952f67be1a8f23b381e88ea79634;hp=305d389d4bac610e33dd83789b99c95afd7d63ae;hpb=efe77ba63b1e519fc4d563bd9b599277c4bd96e5;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/socketengine.h b/include/socketengine.h index 305d389d4..895457b89 100644 --- a/include/socketengine.h +++ b/include/socketengine.h @@ -346,8 +346,10 @@ public: */ static void ChangeEventMask(EventHandler* eh, int event_mask); - /** Returns the highest file descriptor you may store in the socket engine - * @return The maximum fd value + /** Returns the number of file descriptors reported by the system this program may use + * when it was started. + * @return If positive, the number of file descriptors that the system reported that we + * may use. Otherwise (<= 0) this number could not be determined. */ static int GetMaxFds() { return MAX_DESCRIPTORS; } @@ -409,12 +411,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.