diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-07-07 00:18:14 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-07-07 00:18:14 +0000 |
commit | 13153694df045d24217658077c7d223d269504b5 (patch) | |
tree | dac5e22f0c86deca0aa485be17640bc2e58ca137 /include/inspsocket.h | |
parent | 7e709ca6554dfb530521ecbe6943d8578392d46b (diff) |
Added InspSocket::WantWrite(), InspSocket::OnWriteReady() and private data methods to make it work.
See the XXX'ed section for a bit of minor craq
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4120 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/inspsocket.h')
-rw-r--r-- | include/inspsocket.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/inspsocket.h b/include/inspsocket.h index 6994e1647..9858f0432 100644 --- a/include/inspsocket.h +++ b/include/inspsocket.h @@ -156,6 +156,12 @@ protected: */ 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; + bool BindAddr(); public: @@ -224,6 +230,8 @@ public: */ virtual bool OnDataReady(); + virtual bool OnWriteReady(); + /** * When an outbound connection fails, and the * attempt times out, you will receive this event. @@ -299,6 +307,13 @@ public: void SetState(InspSocketState s); /** + * Call this to receive the next write event + * that comes along for this fd to the OnWriteReady + * method. + */ + void WantWrite(); + + /** * Returns the current socket state. */ InspSocketState GetState(); |