Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 10, 2008, 4:28:26 PM (16 years ago)
Author:
chpeter
Message:

added fct pri- and pubRemoveClient to help remove Info in lists when client is gone

Location:
code/branches/presentation/src/network
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation/src/network/TrafficControl.cc

    r2382 r2387  
    398398    }
    399399  }
    400 
     400 
     401  void TrafficControl::priRemoveClient(int clientID)
     402  {
     403    assert(clientListTemp_.find(clientID) != clientListTemp_.end() );
     404    assert(clientListPerm_.find(clientID) != clientListPerm_.end() );
     405    clientListTemp_.erase(clientListTemp_.find(clientID));
     406    clientListPerm_.erase(clientListPerm_.find(clientID));
     407  }
     408  void TrafficControl::pubRemoveClient(int clientID)
     409  {
     410    priRemoveClient(clientID);
     411  }
    401412
    402413/*
  • code/branches/presentation/src/network/TrafficControl.h

    r2382 r2387  
    141141    void evaluateList(unsigned int clientID, std::list<obj> *list);//done   
    142142    void ack(unsigned int clientID, unsigned int gamestateID);  // this function gets called when the server receives an ack from the client
    143 
     143    void priRemoveClient(int clientID);
     144 
    144145  protected:
    145146    static TrafficControl *instance_;
     
    165166    void printList(std::list<obj> *list, unsigned int clientID);
    166167    void fixCreatorDependencies(std::list<obj>::iterator it, std::list<obj> *list, unsigned int clientID);
     168    void pubRemoveClient(int clientID);
    167169};
    168170
Note: See TracChangeset for help on using the changeset viewer.