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:
Vadim Zeitlin
2008-11-25 13:33:07 +00:00
parent 44c87b7d15
commit f0fbbe2364
8 changed files with 174 additions and 149 deletions

View File

@@ -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.