X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/87c0312a66f57b1d167e1f9454a80fe4b7b28e0b..ac52d2b0fc5d688fd882c54a60592c9c9ce61a29:/src/common/socket.cpp diff --git a/src/common/socket.cpp b/src/common/socket.cpp index a1e3be8456..2487fddcfb 100644 --- a/src/common/socket.cpp +++ b/src/common/socket.cpp @@ -210,6 +210,15 @@ GSocketBase::~GSocketBase() GSocketManager::Get()->Destroy_Socket(static_cast(this)); } +void GSocketBase::Close() +{ + if ( m_fd != INVALID_SOCKET ) + { + GSocketManager::Get()->Close_Socket(static_cast(this)); + m_fd = INVALID_SOCKET; + } +} + /* GSocket_Shutdown: * Disallow further read/write operations on this socket, close * the fd and disable all callbacks.