Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9284 in orxonox.OLD for branches/proxy/src/lib/network/monitor


Ignore:
Timestamp:
Jul 14, 2006, 10:32:02 AM (18 years ago)
Author:
patrick
Message:

peerinfos are now gettable from outside

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

Legend:

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

    r9283 r9284  
    4040  this->networkStream = networkStream;
    4141  this->playerNumber = 0;
    42   this->localNode = new NetworkNode();
     42  this->localNode = new NetworkNode( this->networkStream->getPeerInfo());
    4343
    4444  this->setSynchronized(false);
  • branches/proxy/src/lib/network/monitor/network_node.cc

    r9277 r9284  
    1616#include "network_node.h"
    1717
    18 
    1918#include "debug.h"
    2019
     
    2322 * constructor
    2423 */
    25 NetworkNode::NetworkNode()
     24NetworkNode::NetworkNode(PeerInfo* pInfo)
    2625{
    2726  this->playerNumber = 0;
    28   this->nodeType = NET_CLIENT;
     27  this->peerInfo = pInfo;
    2928}
    3029
  • branches/proxy/src/lib/network/monitor/network_node.h

    r9279 r9284  
    99#include "base_object.h"
    1010#include "synchronizeable.h"
     11#include "peer_info.h"
    1112
    1213#include <list>
    1314
    14 class PeerInfo;
    1515
    1616//!< a class representing a node in the network (this can be a MASTER_SERVER, PROXY_SERVER or a CLIENT
     
    1818{
    1919  public:
    20     NetworkNode();
     20    NetworkNode(PeerInfo* pInfo);
    2121    ~NetworkNode();
    2222
     
    3333    inline int getPlayerNumber() { return this->playerNumber; }
    3434    /** @returns the node type of this node */
    35     inline int getNodeType() { return this->nodeType; }
     35    inline int getNodeType() { return this->peerInfo->nodeType; }
    3636
    3737
    3838  private:
    39     int                          nodeType;                     //!< the type of the node
    4039    int                          playerNumber;                 //!< localy direct connected player number
     40    PeerInfo*                    peerInfo;                     //!< the peer informationa about this node
    4141
    4242    /* network nodes directly connected to this node */
Note: See TracChangeset for help on using the changeset viewer.