Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 11, 2009, 1:42:10 PM (15 years ago)
Author:
scheusso
Message:

some fixes (bidirectional variables, …), some changes (client tickrate, connection handling)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/netp2/src/network/ConnectionManager.cc

    r2953 r2965  
    7171    assert(instance_==0);
    7272    instance_=this;
    73     quit=false;
     73    quit_=false;
    7474    bindAddress = new ENetAddress();
    7575    bindAddress->host = ENET_HOST_ANY;
     
    8080    assert(instance_==0);
    8181    instance_=this;
    82     quit=false;
     82    quit_=false;
    8383    bindAddress = new ENetAddress();
    8484    bindAddress->host = ENET_HOST_ANY;
     
    8989    assert(instance_==0);
    9090    instance_=this;
    91     quit=false;
     91    quit_=false;
    9292    bindAddress = new ENetAddress();
    9393    enet_address_set_host (bindAddress, address.c_str());
     
    9898    assert(instance_==0);
    9999    instance_=this;
    100     quit=false;
     100    quit_=false;
    101101    bindAddress = new ENetAddress();
    102102    enet_address_set_host (bindAddress, address);
     
    105105
    106106  ConnectionManager::~ConnectionManager(){
    107     if(!quit)
     107    if(!quit_)
    108108      quitListener();
    109109    instance_=0;
     
    129129
    130130  bool ConnectionManager::quitListener() {
    131     quit=true;
     131    quit_=true;
    132132    receiverThread_->join();
    133133    return true;
     
    185185    if(server==NULL){
    186186      // add some error handling here ==========================
    187       quit=true;
     187      quit_=true;
    188188      return;
    189189    }
    190190
    191191    event = new ENetEvent;
    192     while(!quit)
     192    while(!quit_)
    193193    {
    194194      { //mutex scope
     
    196196        if(enet_host_service(server, event, NETWORK_WAIT_TIMEOUT)<0){
    197197          // we should never reach this point
    198           quit=true;
     198          printf("ConnectionManager: ENet returned with an error\n");
     199          quit_=true;
    199200          continue;
    200201          printf("waaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaahhhhhhhhhhhhhhhh");
Note: See TracChangeset for help on using the changeset viewer.