summaryrefslogtreecommitdiff
path: root/include/inspsocket.h
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-09-11 00:15:28 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-09-11 00:15:28 +0000
commitbd6158e7b044f853be0b493c0ccbfc7a5c05082e (patch)
tree07e1ab488b2ff8b91cf4b5942e54d8ec4e38f240 /include/inspsocket.h
parenta363c6f2bebc02ab553ee96b0e9e865e4f93e2d8 (diff)
Remove WaitingForWriteEvent, it seems to do *nothing* except confuse things. Also, don't close socket on http if FlushWriteBuf doesn't write it all in one go, in fact, don't try FlushWriteBuf at all - use the sockets default of waiting to be told it's safe to write data.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10509 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/inspsocket.h')
-rw-r--r--include/inspsocket.h25
1 files changed, 15 insertions, 10 deletions
diff --git a/include/inspsocket.h b/include/inspsocket.h
index f61bf133d..c3b24ad8f 100644
--- a/include/inspsocket.h
+++ b/include/inspsocket.h
@@ -159,6 +159,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 +177,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 +251,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