2012-09-02 11:38:28 -04:00
|
|
|
|
|
|
|
// ProtoProxy.cpp
|
|
|
|
|
|
|
|
// Implements the main app entrypoint
|
|
|
|
|
|
|
|
#include "Globals.h"
|
|
|
|
#include "Server.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int main(int argc, char ** argv)
|
|
|
|
{
|
2012-10-20 17:52:34 -04:00
|
|
|
int ListenPort = (argc > 1) ? atoi(argv[1]) : 25564;
|
|
|
|
int ConnectPort = (argc > 2) ? atoi(argv[2]) : 25565;
|
2012-09-02 11:38:28 -04:00
|
|
|
cServer Server;
|
2012-10-20 17:52:34 -04:00
|
|
|
int res = Server.Init(ListenPort, ConnectPort);
|
2012-09-02 11:38:28 -04:00
|
|
|
if (res != 0)
|
|
|
|
{
|
|
|
|
printf("Server initialization failed: %d", res);
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
|
|
|
Server.Run();
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|