BOOL CUdpServer::Stop() { if(!CheckStoping()) return FALSE; CloseListenSocket(); ::WaitWithMessageLoop(150); WaitForDetectorThreadEnd(); DisconnectClientSocket(); WaitForClientSocketClose(); WaitForWorkerThreadEnd(); ReleaseClientSocket(); FireServerShutdown(); ReleaseFreeSocket(); ReleaseFreeBuffer(); CloseCompletePort(); Reset(); return TRUE; }
BOOL CTcpServer::Stop() { if(!CheckStoping()) return FALSE; CloseListenSocket(); WaitForAcceptSocketClose(); DisconnectClientSocket(); WaitForClientSocketClose(); WaitForWorkerThreadEnd(); ReleaseClientSocket(); FireShutdown(); ReleaseFreeSocket(); ReleaseFreeBuffer(); CloseCompletePort(); Reset(); return TRUE; }
BOOL CTcpAgent::Stop() { if(!CheckStoping()) return FALSE; ::WaitWithMessageLoop(150); DisconnectClientSocket(); WaitForClientSocketClose(); WaitForWorkerThreadEnd(); ReleaseClientSocket(); FireAgentShutdown(); ReleaseFreeSocket(); ReleaseFreeBuffer(); CloseCompletePort(); Reset(); return TRUE; }