Changeset 9644 in orxonox.OLD for branches/proxy/src/lib
- Timestamp:
- Jul 31, 2006, 11:09:20 AM (18 years ago)
- Location:
- branches/proxy/src/lib/network
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/network/monitor/network_stats_widget.cc
r9642 r9644 45 45 { 46 46 this->init(); 47 if (peerInfo == NULL) 48 { 49 this->setName("INVALID"); 50 return; 51 } 47 52 this->setName(peerInfo->getNodeTypeString() + "ID: " + MultiType(peerInfo->userId).getString()); 48 53 this->setIP(peerInfo->ip); … … 213 218 this->pack(&this->_thisHost); 214 219 220 this->pack(&this->_serverBox); 221 215 222 this->pack(&this->_upstreamText); 216 223 this->pack(&this->_downstreamText); 217 224 218 219 this->pack(&this->_serverBox);220 221 222 this->_refreshButton.setLabel("refresh");223 this->_refreshButton.released.connect(this, &NetworkStatsWidget::rebuild);224 this->pack(&this->_refreshButton);225 225 226 226 this->rebuild(); … … 238 238 { 239 239 this->_proxies.push_back(new NodeWidget(node)); 240 this->pack(this->_proxies.back() , &this->_refreshButton);240 this->pack(this->_proxies.back()); 241 241 this->_proxies.back()->show(); 242 242 } … … 292 292 293 293 void NetworkStatsWidget::clearProxies() 294 { 295 } 294 {} 296 295 297 296 … … 304 303 } 305 304 306 307 std::list<NetworkNode*>::const_iterator it = this->_monitor->getNodeList().begin(); 308 for(; it != this->_monitor->getNodeList().end(); it++) 309 { 305 const NetworkNode* node = this->_monitor->getLocalNode(); 306 if (node == NULL) 307 { 308 printf("NO NODE\n"); 309 return; 310 } 311 std::list<NetworkNode*>::const_iterator it; 312 313 std::list<NetworkNode*> list = node->getMasterServers(); 314 for(it = list.begin(); it != list.end(); it++) 310 315 this->addNode(*it); 311 } 312 313 316 317 list = node->getActiveProxyServers(); 318 for(it = list.begin(); it != list.end(); it++) 319 this->addNode(*it); 320 321 list = node->getPassiveProxyServers(); 322 for(it = list.begin(); it != list.end(); it++) 323 this->addNode(*it); 324 325 list = node->getClients(); 326 for(it = list.begin(); it != list.end(); it++) 327 this->addNode(*it); 314 328 315 329 } -
branches/proxy/src/lib/network/monitor/network_stats_widget.h
r9642 r9644 126 126 127 127 128 OrxGui::GLGuiPushButton _refreshButton;129 130 128 static NetworkStatsWidget* _statsWidget; 131 129 -
branches/proxy/src/lib/network/peer_info.cc
r9642 r9644 69 69 const std::string PeerInfo::nodeNames[] = 70 70 { 71 72 71 "master server", 73 72 "proxy server active",
Note: See TracChangeset
for help on using the changeset viewer.