예제 #1
0
파일: Server.cpp 프로젝트: knarf0/mmo
void Server::update()
{
	checkNewConnections();
	checkDisconnections();
	receivePackets();
	game.update(clients);
}
예제 #2
0
bool Bridge::ioListen()
{
	if (select(initReadSet(readset, connected_ifaces, main_socket), &readset, NULL, NULL, NULL) == FAILURE) //read up to max socket for activity
	{
		cerr << "Select failed" << endl;
		exit(1);
	}
	if (checkExitServer()) return false;
	checkNewConnections();
	checkNewMessages();
	return true;
}