* and use the InspSocket constructors to establish connections
* and bindings.
*/
-class InspSocket
+class InspSocket : public Extensible
{
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:
*/
virtual bool OnDataReady();
+ virtual bool OnWriteReady();
+
/**
* When an outbound connection fails, and the
* attempt times out, you will receive this event.
*/
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.
*/