Changeset 2965 for code/branches/netp2/src/network/ConnectionManager.cc
- Timestamp:
- May 11, 2009, 1:42:10 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/netp2/src/network/ConnectionManager.cc
r2953 r2965 71 71 assert(instance_==0); 72 72 instance_=this; 73 quit =false;73 quit_=false; 74 74 bindAddress = new ENetAddress(); 75 75 bindAddress->host = ENET_HOST_ANY; … … 80 80 assert(instance_==0); 81 81 instance_=this; 82 quit =false;82 quit_=false; 83 83 bindAddress = new ENetAddress(); 84 84 bindAddress->host = ENET_HOST_ANY; … … 89 89 assert(instance_==0); 90 90 instance_=this; 91 quit =false;91 quit_=false; 92 92 bindAddress = new ENetAddress(); 93 93 enet_address_set_host (bindAddress, address.c_str()); … … 98 98 assert(instance_==0); 99 99 instance_=this; 100 quit =false;100 quit_=false; 101 101 bindAddress = new ENetAddress(); 102 102 enet_address_set_host (bindAddress, address); … … 105 105 106 106 ConnectionManager::~ConnectionManager(){ 107 if(!quit )107 if(!quit_) 108 108 quitListener(); 109 109 instance_=0; … … 129 129 130 130 bool ConnectionManager::quitListener() { 131 quit =true;131 quit_=true; 132 132 receiverThread_->join(); 133 133 return true; … … 185 185 if(server==NULL){ 186 186 // add some error handling here ========================== 187 quit =true;187 quit_=true; 188 188 return; 189 189 } 190 190 191 191 event = new ENetEvent; 192 while(!quit )192 while(!quit_) 193 193 { 194 194 { //mutex scope … … 196 196 if(enet_host_service(server, event, NETWORK_WAIT_TIMEOUT)<0){ 197 197 // we should never reach this point 198 quit=true; 198 printf("ConnectionManager: ENet returned with an error\n"); 199 quit_=true; 199 200 continue; 200 201 printf("waaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaahhhhhhhhhhhhhhhh");
Note: See TracChangeset
for help on using the changeset viewer.