X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Finspsocket.h;h=f945c4f9ddba6a40e739ff95da7fcc7b24482a51;hb=7a7fb7167c0e96509523c378e776cf38418cd4e5;hp=f0f0e1484d833a12764cdae769a6ff9654584b19;hpb=d48f72b989212fd7f607e651632cfa53f1f2f51f;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/inspsocket.h b/include/inspsocket.h index f0f0e1484..f945c4f9d 100644 --- a/include/inspsocket.h +++ b/include/inspsocket.h @@ -139,12 +139,6 @@ class CoreExport BufferedSocket : public EventHandler */ BufferedSocketState state; - /** - * This value is true if the - * socket has timed out. - */ - bool timeout; - /** * The IP address being connected * to stored in string form for @@ -159,6 +153,7 @@ class CoreExport BufferedSocket : public EventHandler socklen_t length; /** Flushes the write buffer + * @returns true if the writing failed, false if it was successful */ bool FlushWriteBuffer(); @@ -176,12 +171,6 @@ class CoreExport BufferedSocket : public EventHandler */ bool ClosePending; - /** Set to true when we're waiting for a write event. - * If this is true and a write event comes in, we - * call the write instead of the read method. - */ - bool WaitingForWriteEvent; - /** * Bind to an address * @param ip IP to bind to @@ -256,13 +245,23 @@ class CoreExport BufferedSocket : public EventHandler /** * When it is ok to write to the socket, and a * write event was requested, this method is - * triggered. Within this method you should call + * triggered. + * + * Within this method you should call * write() or send() etc, to send data to the - * other end of the socket. Further write events - * will not be triggered unless you call WantWrite(). + * other end of the socket. + * + * Further write events will not be triggered + * unless you call WantWrite(). + * + * The default behaviour of this method is to + * flush the write buffer, respecting the IO + * hooking modules. + * + * XXX: this used to be virtual, ask us if you need it to be so. * @return false to close the socket */ - virtual bool OnWriteReady(); + bool OnWriteReady(); /** * When an outbound connection fails, and the @@ -335,13 +334,6 @@ class CoreExport BufferedSocket : public EventHandler */ bool Poll(); - /** - * This method returns the socket's file descriptor - * as assigned by the operating system, or -1 - * if no descriptor has been assigned. - */ - int GetFd(); - /** * This method causes the socket to close, and may * also be triggered by other methods such as OnTimeout