- // enable or disable notifications for socket input/output events but only
- // if m_use_events is true; do nothing otherwise
- virtual void EnableEvents()
- {
- if ( m_use_events )
- DoEnableEvents(true);
- }
-
- void DisableEvents()
- {
- if ( m_use_events )
- DoEnableEvents(false);
- }
-
- // really enable or disable socket input/output events, regardless of
- // m_use_events value
- void DoEnableEvents(bool enable);
-
-
- // enable or disable events for the given event if m_use_events; do nothing
- // otherwise
- //
- // notice that these functions also update m_detected: EnableEvent() clears
- // the corresponding bit in it and DisableEvent() sets it
- void EnableEvent(wxSocketNotify event);
- void DisableEvent(wxSocketNotify event);
-
-
- wxSocketError Input_Timeout();
- wxSocketError Output_Timeout();
- int Recv_Stream(void *buffer, int size);
- int Recv_Dgram(void *buffer, int size);
- int Send_Stream(const void *buffer, int size);
- int Send_Dgram(const void *buffer, int size);
+ // enable or disable notifications for socket input/output events
+ void EnableEvents(int flags = wxSOCKET_INPUT_FLAG | wxSOCKET_OUTPUT_FLAG)
+ { DoEnableEvents(flags, true); }
+ void DisableEvents(int flags = wxSOCKET_INPUT_FLAG | wxSOCKET_OUTPUT_FLAG)
+ { DoEnableEvents(flags, false); }