- Timestamp:
- Nov 24, 2010, 11:12:30 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/masterserver/src/libraries/network/WANDiscovery.cc
r7667 r7672 43 43 WANDiscovery::WANDiscovery() 44 44 { 45 COUT(0) << "WANDiscovery created.\n"; 46 /* create master server communications object */ 47 //this->msc = MasterServerComm(); 45 COUT(4) << "Creating WANDiscovery.\n"; 48 46 49 47 /* initialize it and see if it worked */ 50 48 if( msc.initialize() ) 51 COUT( 0) << "Error: could not initialize master server communications!\n";49 COUT(2) << "Error: could not initialize master server communications!\n"; 52 50 53 51 /* connect and see if it worked */ 54 52 if( msc.connect( MS_ADDRESS, 1234 ) ) 55 COUT( 0) << "Error: could not connect to master server!\n";53 COUT(2) << "Error: could not connect to master server!\n"; 56 54 57 COUT( 0) << "Initialization of WANDiscovery complete.\n";55 COUT(4) << "Initialization of WANDiscovery complete.\n"; 58 56 } 59 57 … … 92 90 else if( !strncmp( (char*)ev->packet->data, MSPROTO_SERVERLIST_END, 93 91 MSPROTO_SERVERLIST_END_LEN ) ) 94 { return 1; } 92 { 93 /* this is the only case where 1 should be returned, 94 * as 1 is used to signal that we're done receiving 95 * the list 96 */ 97 return 1; 98 } 95 99 96 100 /* done handling, return all ok code 0 */ … … 106 110 this->msc.sendRequest( MSPROTO_CLIENT " " MSPROTO_REQ_LIST ); 107 111 108 /* deal with replies */ 112 /* poll for replies */ 113 /* TODO add some timeout here so we don't wait indefinitely */ 109 114 while( !((this->msc).pollForReply( rhandler )) ) 110 115 /* nothing */;
Note: See TracChangeset
for help on using the changeset viewer.