Exemple #1
0
	void TcpServer::UserOnNewTcpConnection(::TcpConnection* connection)
	{
		MS_TRACE();

		// Allow just MaxTcpConnectionsPerServer.
		if (GetNumConnections() > MaxTcpConnectionsPerServer)
			connection->Destroy();
	}
Exemple #2
0
/********************************
Destructor
*********************************/
CUT_HTTPServer::~CUT_HTTPServer(){

    // Shut down the accept thread
    StopAccept();

	// Wait for threads to shutdown
    m_bShutDown = TRUE;
    while(GetNumConnections())
	    Sleep(50);
}
Exemple #3
0
/***************************************
Destructor
****************************************/
CUT_SMTPServer::~CUT_SMTPServer(){
    m_bShutDown = TRUE;
    while(GetNumConnections())
	    Sleep(50);

}