]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/socketengine.h
Allow fast sid reuse by erasing fake users from UserManager::uuidlist when the netspl...
[user/henk/code/inspircd.git] / include / socketengine.h
index 305d389d4bac610e33dd83789b99c95afd7d63ae..895457b89191034666b11ba9bcc89dce367c4882 100644 (file)
@@ -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.