Changeset 9586 in orxonox.OLD for branches/proxy/src/lib/network/monitor
- Timestamp:
- Jul 28, 2006, 10:53:46 PM (18 years ago)
- Location:
- branches/proxy/src/lib/network/monitor
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/network/monitor/network_monitor.cc
r9560 r9586 176 176 177 177 178 179 /** 180 * removes a node from the network monitor 181 * @param pInfo the node to remove 182 */ 183 void NetworkMonitor::removeNode(PeerInfo* pInfo) 184 { 185 this->removeNode(this->localNode, pInfo); 186 } 187 188 189 /** 190 * removes the network node 191 * @param node the network node where the PeerInfo node is connected to 192 * @param pInfo the PeerInfo to remove 193 */ 194 void NetworkMonitor::removeNode(NetworkNode* node, PeerInfo* pInfo) 195 { 196 if( node == NULL || pInfo == NULL) 197 return; 198 199 if( pInfo->isClient()) 200 node->removeClient(pInfo); 201 else if( pInfo->isProxyServerActive()) 202 node->removeActiveProxyServer(pInfo); 203 else if( pInfo->isMasterServer()) 204 node->removeMasterServer(pInfo); 205 } 206 207 178 208 /** 179 209 * @returns the proxy server of the first choice -
branches/proxy/src/lib/network/monitor/network_monitor.h
r9584 r9586 50 50 inline void addMasterServer(NetworkNode* node, PeerInfo* pInfo) { node->addMasterServer(pInfo); } 51 51 52 void removeNode(PeerInfo* pInfo); 53 void removeNode(NetworkNode* node, PeerInfo* pInfo); 54 52 55 inline void removeClient(NetworkNode* node, PeerInfo* pInfo) { node->removeClient(pInfo); } 53 56 inline void removeActiveProxyServer(NetworkNode* node, PeerInfo* pInfo) { node->removeActiveProxyServer(pInfo); } … … 76 79 77 80 inline const std::list<NetworkNode*>& getNodeList() const { return this->nodeList; }; 81 /** @param userId of the searched node @returns the PeerInfo of the userId peer */ 78 82 inline PeerInfo* getPeerByUserId( int userId) { return this->localNode->getPeerByUserId(userId); } 83 79 84 80 85 void toggleGUI();
Note: See TracChangeset
for help on using the changeset viewer.