Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9583 in orxonox.OLD


Ignore:
Timestamp:
Jul 28, 2006, 10:07:15 PM (18 years ago)
Author:
patrick
Message:

integration of the networkmonitor into the shared network data, using the new getPeerByUserId

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

Legend:

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

    r9494 r9583  
    7676
    7777    inline const std::list<NetworkNode*>& getNodeList() const { return this->nodeList; };
     78    inline PeerInfo* getPeerByUserId( int userId) { this->localNode->getPeerByUserId(userId); }
    7879
    7980    void toggleGUI();
  • branches/proxy/src/lib/network/monitor/network_node.cc

    r9582 r9583  
    154154 * @return the peer info of this node NULL if nothing found
    155155 */
    156 PeerInfo* NetworkNode::getNodeByUserId( int userId)
     156PeerInfo* NetworkNode::getPeerByUserId( int userId)
    157157{
    158158  // look through the master server lists
  • branches/proxy/src/lib/network/monitor/network_node.h

    r9582 r9583  
    4646    inline std::list<PeerInfo*> getClient() const { return this->clientList; }
    4747
    48     PeerInfo* getNodeByUserId( int userId);
     48    PeerInfo* getPeerByUserId( int userId);
    4949
    5050    /** @returns the number of players */
  • branches/proxy/src/lib/network/network_stream.cc

    r9576 r9583  
    302302  // create the network monitor after all the init work and before there is any connection handlings
    303303  if( this->networkMonitor == NULL)
     304  {
    304305    this->networkMonitor = new NetworkMonitor(this);
     306    SharedNetworkData::getInstance()->setNetworkMonitor( this->networkMonitor);
     307  }
    305308
    306309
  • branches/proxy/src/lib/network/proxy/proxy_control.cc

    r9582 r9583  
    8989  assert( Converter::intToByteArray( userId, data, INTSIZE ) == INTSIZE );
    9090  // and the ip as an int
    91 
     91  PeerInfo* pInfo = SharedNetworkData::getInstance()->getNetworkMonitor()->getPeerByUserId(userId);
    9292  assert( Converter::intToByteArray( userId, data, INTSIZE ) == INTSIZE );
    9393
  • branches/proxy/src/lib/network/shared_network_data.h

    r9494 r9583  
    1616
    1717class Synchronizeable;
     18class NetworkMonitor;
    1819
    1920
     
    6465    inline void setDefaultSyncStream(NetworkStream* defaultSyncStream) { this->defaultSyncStream = defaultSyncStream; }
    6566
     67    /** @returns the network monitor reference */
     68    inline NetworkMonitor* getNetworkMonitor() { return this->networkMonitor; }
     69    /** @param networkMonitor sets the NetworkMonitor reference */
     70    inline void setNetworkMonitor( NetworkMonitor* networkMonitor) { this->networkMonitor = networkMonitor; }
     71
    6672
    6773  private:
     
    7581    int                             hostID;                  //!< The Host-ID of the Manager
    7682    NetworkStream*                  defaultSyncStream;       //!< default synchronize NetworkStream
     83    NetworkMonitor*                 networkMonitor;          //!< reference to the NetworkMonitor
    7784
    7885    static SharedNetworkData*       singletonRef;            //!< Pointer to the only instance of this Class
Note: See TracChangeset for help on using the changeset viewer.