Exemplo n.º 1
0
/***********************************************************
close connection
***********************************************************/
void GameClient::CloseConnection()
{
	if(!m_connected)
		return;

	m_disconnecting = true;

	ZCom_Disconnect( m_zoi_id, NULL );

	// process until everything has been sent
	while(m_connected)
	{
		ZCom_processInput( eZCom_NoBlock );
		ZCom_processOutput();
		ZoidCom::Sleep(10);
	}


	//clean up everything
	m_maps_objects.clear();
	m_actors.clear();


	m_disconnecting = false;
}
Exemplo n.º 2
0
Client::~Client()
{
    ZCom_disconnectAll(NULL);
    printf("Disconnecting Client\n");
    double start_time = al_current_time();
    while(al_current_time()-start_time < 1)
    {
        ZCom_processInput();
        ZCom_processOutput();
    }
}
Exemplo n.º 3
0
/***********************************************************
close connection
***********************************************************/
void MainServerClient::CloseConnection()
{
	if(!m_connected)
		return;

	ZCom_Disconnect( m_zoi_id, NULL );

	// process until everything has been sent
	while(m_connected)
	{
		ZCom_processInput( eZCom_NoBlock );
		ZCom_processOutput();
		ZoidCom::Sleep(10);
	}
}