Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9280 in orxonox.OLD for branches


Ignore:
Timestamp:
Jul 13, 2006, 11:03:53 PM (18 years ago)
Author:
patrick
Message:

networkmonitor partly integrated in framework

Location:
branches/proxy/src/lib/network
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/lib/network/monitor/network_monitor.cc

    r9279 r9280  
    123123void NetworkMonitor::process()
    124124{
     125  this->playerNumber = 0;
    125126  std::list<NetworkNode*>::iterator it = this->nodeList.begin();
    126127  for(; it != this->nodeList.end(); it++)
    127128  {
    128 
     129    this->playerNumber += (*it)->getPlayerNumber();
    129130  }
    130131}
  • branches/proxy/src/lib/network/monitor/network_monitor.h

    r9279 r9280  
    4242    inline void removeMasterServer(NetworkNode* node, PeerInfo* pInfo) { node->removeMasterServer(pInfo); }
    4343
     44    /** @returns the total number of players in this game (including all proxy servers etc)*/
     45    inline int getPlayerNumber() { return this->playerNumber; }
     46
    4447
    4548    void showGUI();
  • branches/proxy/src/lib/network/network_stream.cc

    r9279 r9280  
    266266  cleanUpOldSyncList();
    267267  handleHandshakes();
     268
     269  // update the network monitor
     270  this->networkMonitor->process();
    268271
    269272  // order of up/downstream is important!!!!
Note: See TracChangeset for help on using the changeset viewer.