Beispiel #1
0
int main(int argc, char *argv[]) {
	int portno;
	std::string hostname;

    if (argc < 3) {
		//fprintf(stderr,"usage %s hostname port\n", argv[0]);

		portno = PORTNUM;
		hostname = DEFHOST;
    } else {
    	portno = atoi(argv[2]);
    	hostname = argv[1];
    }

    try
	{
		SClient myMonitor(hostname, portno);
		myMonitor.socketInit();
		myMonitor.clientRun();
	}
	catch (SClientError err)
	{
		std::cout <<  "ERROR " << err.what() << "\n";
	}
//	catch (...)
//	{
//		std::cout << "UNKNOWN ERROR!" << "\n";
//	}

    return 0;
}
Beispiel #2
0
void BattleMonitor::onLogic()
{
	myIsDone = myMonitor(myBattle);
}