Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9656 in orxonox.OLD for trunk/src/lib/network/network_manager.cc


Ignore:
Timestamp:
Aug 4, 2006, 11:01:28 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the proxy bache back with no conflicts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/network/network_manager.cc

    r9494 r9656  
    3131#include "network_log.h"
    3232#include "network_game_manager.h"
     33#include "proxy/proxy_control.h"
    3334
    3435
     
    3738
    3839SHELL_COMMAND(debug, NetworkManager, debug);
     40SHELL_COMMAND(redirTest, NetworkManager, setRedirectionTest);
     41
    3942
    4043
     
    111114  // create the network stream
    112115  this->networkStream = new NetworkStream(NET_MASTER_SERVER);
    113   this->networkStream->createServer( port, port + 1);
     116  this->networkStream->createServer( port, port + 1, port + 2);
    114117
    115118  // start the network game manager
    116119  this->networkStream->createNetworkGameManager();
     120
     121  // init the proxy control center
     122  ProxyControl::getInstance();
    117123
    118124  PRINTF(0)("Created Network Master Server\n");
     
    138144
    139145  // then start the server
    140   this->networkStream->createServer( port, port +1);
    141 
     146  this->networkStream->createServer( port, port + 1, port + 2);
    142147
    143148  // and to the other proxy servers also, this would be very nice if its works
    144 
    145 
    146   // start the network game manager
    147   //this->networkStream->createNetworkGameManager();
    148 
     149  /* put it here....*/
     150
     151  // init the proxy control center
     152  ProxyControl::getInstance();
    149153
    150154  PRINTF(0)("Created Network Proxy Server\n");
     
    168172  this->networkStream->connectToMasterServer( name, port);
    169173
     174
    170175  // and start the handshake
    171176  this->networkStream->startHandshake();
     177  // create the proxy control
     178  ProxyControl::getInstance();
    172179
    173180  PRINTF(0)("Created Network Client\n");
    174181  return 1;
     182}
     183
     184
     185/**
     186 * reconnects this client to another server
     187 * @param address new server address
     188 */
     189void NetworkManager::reconnectToServer(IP address)
     190{
     191  PRINTF(0)("Rec. reconnection command\n");
     192  this->networkStream->reconnectToServer(address);
    175193}
    176194
     
    216234  PRINT(0)("===========================================\n");
    217235}
     236
     237
     238void NetworkManager::setRedirectionTest()
     239{
     240  this->networkStream->setRedirectionTest();
     241}
     242
Note: See TracChangeset for help on using the changeset viewer.