Example #1
0
void CW32SocketServer::OnClientSocketClosed(stClientSocket* pSocket, DWORD dwErrorCode)
{
	if ( !pSocket )
		return;

	CSocketPool* pPool = pSocket->pPool;

	// fire an event to all subscribers
	int nCount = m_arrSinks.GetSize();
	for ( int i = 0; i < nCount; i++ )
	{
		m_arrSinks.GetAt(i)->OnDisconnect(pSocket->s, dwErrorCode);
	}

	pPool->RemoveSocket(pSocket);
	if ( pPool->GetSocketCount() == 0 )
	{
		DestroyPool(pPool);
	}
	m_dwActiveConnections--;
}
Example #2
0
CEntityPool::~CEntityPool()
{
	DestroyPool();
}
BufferManager_Generic_c::~BufferManager_Generic_c(void)
{
	while (ListOfBufferPools != NULL)
		DestroyPool(ListOfBufferPools);
	OS_TerminateMutex(&Lock);
}