src/Engine.cc
changeset 381 9b35bc329d23
parent 380 d193dd1d8a7e
child 389 e74c1820fbd2
equal deleted inserted replaced
380:d193dd1d8a7e 381:9b35bc329d23
    16     // create the graphics
    16     // create the graphics
    17     graphics = new Graphics(*this, game_state);
    17     graphics = new Graphics(*this, game_state);
    18 }
    18 }
    19 
    19 
    20 void Engine::setupNetworkServer (const std::string &listen_port) {
    20 void Engine::setupNetworkServer (const std::string &listen_port) {
       
    21     NetworkEndpoint listen_addr(listen_port);
       
    22 
    21     // create the server
    23     // create the server
    22     net_server = new NetworkServer(game_state, listen_port);
    24     net_server = new NetworkServer(game_state, listen_addr);
    23 }
    25 }
    24 
    26 
    25 void Engine::setupNetworkClient (const std::string &connect_host, const std::string &connect_port) {
    27 void Engine::setupNetworkClient (const std::string &connect_host, const std::string &connect_port) {
    26     // connect_to
    28     // connect_to
    27     NetworkAddress connect_addr(connect_host, connect_port);
    29     NetworkEndpoint connect_addr(connect_host, connect_port);
    28 
    30 
    29     // create the client
    31     // create the client
    30     net_client = new NetworkClient(*this, game_state, connect_addr);
    32     net_client = new NetworkClient(*this, game_state, connect_addr);
    31 }
    33 }
    32 
    34