don't remove/add back the socket to the list of inputs monitored by the event loop all the time but just leave it there until the socket is destroyed; this should be beneficial from performance point of view (although hard to measure) and also makes the code simpler
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57610 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -52,12 +52,7 @@ public:
|
||||
private:
|
||||
virtual void DoClose()
|
||||
{
|
||||
wxSocketManager * const manager = wxSocketManager::Get();
|
||||
if ( manager )
|
||||
{
|
||||
manager->Uninstall_Callback(this, wxSOCKET_INPUT);
|
||||
manager->Uninstall_Callback(this, wxSOCKET_OUTPUT);
|
||||
}
|
||||
DisableEvents();
|
||||
|
||||
close(m_fd);
|
||||
}
|
||||
@@ -78,10 +73,6 @@ private:
|
||||
void DoEnableEvents(bool enable);
|
||||
|
||||
|
||||
// enable or disable events for the given event
|
||||
void EnableEvent(wxSocketNotify event);
|
||||
void DisableEvent(wxSocketNotify event);
|
||||
|
||||
int Recv_Stream(void *buffer, int size);
|
||||
int Recv_Dgram(void *buffer, int size);
|
||||
int Send_Stream(const void *buffer, int size);
|
||||
|
Reference in New Issue
Block a user