our sockets are always non-blocking anyhow so throw away all the code dealing with checking if they're blocking; also merge Unix/Win32 versions of connect() and accept() handling as they were almost identical except for the different checking of the return value which was factored out into a platform-specific GetLastError() function
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57600 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -29,11 +29,12 @@ public:
|
||||
m_enabledCallbacks = 0;
|
||||
}
|
||||
|
||||
virtual void Shutdown();
|
||||
virtual wxSocketImpl *WaitConnection(wxSocketBase& wxsocket);
|
||||
virtual wxSocketError GetLastError() const;
|
||||
|
||||
int Read(void *buffer, int size);
|
||||
int Write(const void *buffer, int size);
|
||||
virtual void Shutdown();
|
||||
|
||||
virtual int Read(void *buffer, int size);
|
||||
virtual int Write(const void *buffer, int size);
|
||||
|
||||
// wxFDIOHandler methods
|
||||
virtual void OnReadWaiting();
|
||||
@@ -49,7 +50,6 @@ public:
|
||||
int GetEnabledCallbacks() const { return m_enabledCallbacks; }
|
||||
|
||||
private:
|
||||
virtual wxSocketError DoHandleConnect(int ret);
|
||||
virtual void DoClose()
|
||||
{
|
||||
wxSocketManager * const manager = wxSocketManager::Get();
|
||||
@@ -151,7 +151,7 @@ protected:
|
||||
|
||||
case wxSOCKET_CONNECTION:
|
||||
// FIXME: explain this?
|
||||
return socket->m_server ? FD_INPUT : FD_OUTPUT;
|
||||
return socket->IsServer() ? FD_INPUT : FD_OUTPUT;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user