Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Jul 27, 2006, 10:44:28 AM (19 years ago)
Author:
bensch
Message:

merged the proxy back

File:
1 edited

Legend:

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

    r9406 r9494  
    101101/**
    102102 *  creates a new NetworkStream of server type
    103  * @param port: number of the TCP port
     103 * @param clientPort: number of the TCP/UDP port for client connections
     104 * @param proxyPort: number of the TCP/UDP port for proxy connections
    104105 */
    105106int NetworkManager::createMasterServer(unsigned int port)
     
    110111  // create the network stream
    111112  this->networkStream = new NetworkStream(NET_MASTER_SERVER);
    112   this->networkStream->createServer( port);
     113  this->networkStream->createServer( port, port + 1);
    113114
    114115  // start the network game manager
     
    129130  NetworkSettings::getInstance()->loadData();
    130131
    131   // create the network stream
    132   this->networkStream = new NetworkStream(NET_PROXY_SERVER_ACTIVE);
    133   this->networkStream->createServer( port);
    134   // and connect to the master server for synchronization
    135 //   this->networkStream->connectToMasterServer(NetworkSettings::getInstance()->getMasterAddr());
    136   // and to the other proxy servers
    137 
     132  // create the network stream af
     133  this->networkStream = new NetworkStream(NET_PROXY_SERVER_ACTIVE );
     134  // first connect to the master server for synchronization
     135  this->networkStream->connectToMasterServer(NetworkSettings::getInstance()->getMasterAddr().ipString(), 10000);
     136  // start the handshake with the master server
     137  this->networkStream->startHandshake(NET_ID_MASTER_SERVER);
     138
     139  // then start the server
     140  this->networkStream->createServer( port, port +1);
     141
     142
     143  // and to the other proxy servers also, this would be very nice if its works
    138144
    139145
    140146  // start the network game manager
    141   this->networkStream->createNetworkGameManager();
     147  //this->networkStream->createNetworkGameManager();
    142148
    143149
     
    165171  this->networkStream->startHandshake();
    166172
    167   PRINTF(0)("Created Network Client");
     173  PRINTF(0)("Created Network Client\n");
    168174  return 1;
    169175}
Note: See TracChangeset for help on using the changeset viewer.