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.
*/
void GSocketBase::SetTimeout(unsigned long millis)
{
-#ifdef __WXMSW__
m_timeout.tv_sec = (millis / 1000);
m_timeout.tv_usec = (millis % 1000) * 1000;
-#else
- m_timeout = millis;
-#endif
}
void GSocketBase::NotifyOnStateChange(GSocketEvent event)