Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 12, 2008, 12:15:30 PM (16 years ago)
Author:
scheusso
Message:

Lots of changes:
Some fixes/hacks in objects
Changes in Gamestates and bugfixes
Removed some asserts

File:
1 edited

Legend:

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

    r1834 r1901  
    8080  boost::recursive_mutex ConnectionManager::enet_mutex;
    8181
    82 //   ConnectionManager::ConnectionManager(ClientInformation *head) : receiverThread_(0) {
    83 //     assert(instance_==0);
    84 //     instance_=this;
    85 //     quit=false;
    86 //     bindAddress.host = ENET_HOST_ANY;
    87 //     bindAddress.port = NETWORK_PORT;
    88 //   }
    89 
    9082  ConnectionManager::ConnectionManager(int port){
    9183    assert(instance_==0);
     
    113105
    114106  ConnectionManager::~ConnectionManager(){
    115     instance_=0;
    116107    if(!quit)
    117108      quitListener();
    118   }
    119 
    120   /*ENetPacket *ConnectionManager::getPacket(ENetAddress &address) {
    121     if(!buffer.isEmpty())
    122       return buffer.pop(address);
    123     else
    124       return NULL;
    125   }*/
    126 /**
    127 This function only pops the first element in PacketBuffer (first in first out)
    128 used by processQueue in Server.cc
    129 */
    130   /*ENetPacket *ConnectionManager::getPacket(int &clientID) {
    131     ENetAddress address;
    132     ENetPacket *packet=getPacket(address);
    133     ClientInformation *temp =head_->findClient(&address);
    134     if(!temp)
    135       return NULL;
    136     clientID=temp->getID();
    137     return packet;
    138   }*/
     109    instance_=0;
     110  }
     111
    139112
    140113  ENetEvent *ConnectionManager::getEvent(){
     
    163136  }
    164137
    165 //   bool ConnectionManager::addPacket(Packet::Packet *packet){
    166 //     ClientInformation *temp = instance_->head_->findClient(packet->getClientID());
    167 //     if(!temp){
    168 //       COUT(3) << "C.Man: addPacket findClient failed" << std::endl;
    169 //       return false;
    170 //     }
    171 //     ENetPacket *packet = new ENetPacket;
    172 //     //  TODO: finish implementation
    173 //   }
    174 //
    175138
    176139  bool ConnectionManager::addPacket(ENetPacket *packet, ENetPeer *peer) {
Note: See TracChangeset for help on using the changeset viewer.