#include "serverBase.h"

int main(int argc, char** argv)
{
   unsigned portNumber = 12943;
   if(argc >= 2)
   {
      portNumber = atoi(argv[1]);
   }
   try
   {
      asio::io_service io_service;
      asio::ip::tcp::endpoint endpoint(asio::ip::tcp::v4(), portNumber);
      TCPServer server(io_service, endpoint);
      io_service.run();
   }
   catch (std::exception& e)
   {
      std::cerr << e.what() << std::endl;
   }

   return 0;
}
