trying to resolve GSocketManager API mess: the meaning of Install/Uninstall_Callback() and Enable/Disable_Events() has diverged in different ports and didn't make any sense any more; merge them in a single function (with still differing semantics though); also added Close_Socket()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56964 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -210,6 +210,15 @@ GSocketBase::~GSocketBase()
|
||||
GSocketManager::Get()->Destroy_Socket(static_cast<GSocket *>(this));
|
||||
}
|
||||
|
||||
void GSocketBase::Close()
|
||||
{
|
||||
if ( m_fd != INVALID_SOCKET )
|
||||
{
|
||||
GSocketManager::Get()->Close_Socket(static_cast<GSocket *>(this));
|
||||
m_fd = INVALID_SOCKET;
|
||||
}
|
||||
}
|
||||
|
||||
/* GSocket_Shutdown:
|
||||
* Disallow further read/write operations on this socket, close
|
||||
* the fd and disable all callbacks.
|
||||
|
Reference in New Issue
Block a user