remove m_use_events from Unix wxSocket implementation, we always need asynchronous socket notifications now (and this was always the case under Windows anyhow), even if we don't always generate wx events corresponding to them

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57569 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-12-26 20:20:46 +00:00
parent f521bae665
commit 22185a1f15
4 changed files with 13 additions and 59 deletions

View File

@@ -26,7 +26,6 @@ public:
m_fds[0] =
m_fds[1] = -1;
m_use_events = false;
m_enabledCallbacks = 0;
}
@@ -35,8 +34,6 @@ public:
int Read(void *buffer, int size);
int Write(const void *buffer, int size);
//attach or detach from main loop
void Notify(bool flag);
// wxFDIOHandler methods
virtual void OnReadWaiting();
@@ -73,27 +70,16 @@ private:
EnableEvents();
}
// 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);
// enable or disable notifications for socket input/output events
void EnableEvents() { DoEnableEvents(true); }
void DisableEvents() { DoEnableEvents(false);
}
void DisableEvents()
{
if ( m_use_events )
DoEnableEvents(false);
}
// really enable or disable socket input/output events, regardless of
// m_use_events value
// really enable or disable socket input/output events
void DoEnableEvents(bool enable);
// enable or disable events for the given event if m_use_events; do nothing
// otherwise
// enable or disable events for the given event
//
// notice that these functions also update m_detected: EnableEvent() clears
// the corresponding bit in it and DisableEvent() sets it
@@ -107,9 +93,6 @@ private:
protected:
// true if socket should fire events
bool m_use_events;
// descriptors for input and output event notification channels associated
// with the socket
int m_fds[2];