void TcpServer::UserOnNewTcpConnection(::TcpConnection* connection) { MS_TRACE(); // Allow just MaxTcpConnectionsPerServer. if (GetNumConnections() > MaxTcpConnectionsPerServer) connection->Destroy(); }
/******************************** Destructor *********************************/ CUT_HTTPServer::~CUT_HTTPServer(){ // Shut down the accept thread StopAccept(); // Wait for threads to shutdown m_bShutDown = TRUE; while(GetNumConnections()) Sleep(50); }
/*************************************** Destructor ****************************************/ CUT_SMTPServer::~CUT_SMTPServer(){ m_bShutDown = TRUE; while(GetNumConnections()) Sleep(50); }