Changeset 9286 in orxonox.OLD for branches/proxy/src
- Timestamp:
- Jul 14, 2006, 10:59:33 AM (18 years ago)
- Location:
- branches/proxy/src/lib/network
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/network/monitor/network_monitor.cc
r9285 r9286 155 155 this->playerNumber += (*it)->getPlayerNumber(); 156 156 } 157 158 this->debug(); 157 159 } 158 160 159 161 /** 162 * prints out the debug informations 163 */ 160 164 void NetworkMonitor::debug() 161 165 { 162 166 PRINTF(0)("================================= Network Monitor ========\n"); 167 PRINTF(0)(" I am: %s\n", this->localNode->getPeerInfo()->getNodeTypeString().c_str()); 163 168 PRINTF(0)(" Total count of network nodes: %i\n", this->playerNumber); 164 169 PRINTF(0)("==========================================================\n"); 170 // PRINTF(0)(" Currently got %i"); 165 171 } 166 172 -
branches/proxy/src/lib/network/monitor/network_node.h
r9284 r9286 34 34 /** @returns the node type of this node */ 35 35 inline int getNodeType() { return this->peerInfo->nodeType; } 36 /** @returns the peer info of this node */ 37 inline PeerInfo* getPeerInfo() { return this->peerInfo; } 36 38 37 39 -
branches/proxy/src/lib/network/network_stream.cc
r9285 r9286 235 235 if( this->networkMonitor == NULL) 236 236 this->networkMonitor = new NetworkMonitor(this); 237 // and let it process some data 238 this->networkMonitor->process(); 237 239 238 240 -
branches/proxy/src/lib/network/peer_info.cc
r9282 r9286 50 50 this->connectionMonitor = NULL; 51 51 } 52 53 54 std::string PeerInfo::getNodeTypeString() 55 { 56 switch( this->nodeType) 57 { 58 case NET_CLIENT: 59 return std::string("client"); 60 case NET_PROXY_SERVER: 61 return std::string("proxy server"); 62 case NET_MASTER_SERVER: 63 return std::string("master server"); 64 } 65 66 return std::string("node is uninit"); 67 } -
branches/proxy/src/lib/network/peer_info.h
r9282 r9286 11 11 #include "monitor/connection_monitor.h" 12 12 13 #include <string> 13 14 14 15 //!< this structure contains informations about the network node … … 25 26 inline bool isClient() { return this->nodeType == NET_CLIENT; } 26 27 28 std::string getNodeTypeString(); 29 27 30 28 31 public: 29 32 int userId; 30 33 int nodeType; 31 // bool isMasterServer;32 // bool isProxyServer;33 // bool isClient;34 34 NetworkSocket * socket; 35 35 Handshake * handshake;
Note: See TracChangeset
for help on using the changeset viewer.