factory.setGamerType(RLGamer.class);
GameManager.setGamerFactory(factory);
try
{
ConnectionManager manager = new ConnectionManager(port,new RequestHandlerFactory());
manager.start();
if (!daemonMode)
{
// Wait for input to kill the program
System.in.read();
manager.shutdown();
}
else
{
manager.join();
}
// All done.
System.exit(0);
}