1. #include "server.h"
  2.  
  3. #include <cstdlib>
  4. #include <iostream>
  5. #include <boost/bind.hpp>
  6. #include <boost/asio.hpp>
  7.  
  8. using namespace std;
  9. using boost::asio::ip::tcp;
  10.  
  11.  
  12. int main(int argc, char* argv[])
  13. {
  14.     try
  15.     {
  16.         if (argc != 2)
  17.         {
  18.             std::cerr << "Usage: ProxyServer <port>\n";
  19.             return 1;
  20.         }
  21.  
  22.         boost::asio::io_service io_service;
  23.         server s(io_service, atoi(argv[1]));
  24.         io_service.run();
  25.     }
  26.     catch (std::exception& e)
  27.     {
  28.         std::cerr << "Exception: " << e.what() << "\n";
  29.     }
  30.  
  31.     return 0;
  32. }