]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/socket.cpp
include wx/msw/private.h to fix PCH-less compilation
[wxWidgets.git] / src / common / socket.cpp
index a1e3be8456dcbdea27514589f88cb5139abd0593..2487fddcfb76b08aa7408bf97d807a8975cd4609 100644 (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.