Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 12, 2008, 7:40:47 PM (16 years ago)
Author:
scheusso
Message:

merged network branch back to trunk

File:
1 edited

Legend:

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

    r1856 r1907  
    8181  boost::recursive_mutex ConnectionManager::enet_mutex;
    8282
    83 //   ConnectionManager::ConnectionManager(ClientInformation *head) : receiverThread_(0) {
    84 //     assert(instance_==0);
    85 //     instance_=this;
    86 //     quit=false;
    87 //     bindAddress.host = ENET_HOST_ANY;
    88 //     bindAddress.port = NETWORK_PORT;
    89 //   }
    90 
    9183  ConnectionManager::ConnectionManager(int port){
    9284    assert(instance_==0);
     
    114106
    115107  ConnectionManager::~ConnectionManager(){
    116     instance_=0;
    117108    if(!quit)
    118109      quitListener();
    119   }
    120 
    121   /*ENetPacket *ConnectionManager::getPacket(ENetAddress &address) {
    122     if(!buffer.isEmpty())
    123       return buffer.pop(address);
    124     else
    125       return NULL;
    126   }*/
    127 /**
    128 This function only pops the first element in PacketBuffer (first in first out)
    129 used by processQueue in Server.cc
    130 */
    131   /*ENetPacket *ConnectionManager::getPacket(int &clientID) {
    132     ENetAddress address;
    133     ENetPacket *packet=getPacket(address);
    134     ClientInformation *temp =head_->findClient(&address);
    135     if(!temp)
    136       return NULL;
    137     clientID=temp->getID();
    138     return packet;
    139   }*/
     110    instance_=0;
     111  }
     112
    140113
    141114  ENetEvent *ConnectionManager::getEvent(){
     
    164137  }
    165138
    166 //   bool ConnectionManager::addPacket(Packet::Packet *packet){
    167 //     ClientInformation *temp = instance_->head_->findClient(packet->getClientID());
    168 //     if(!temp){
    169 //       COUT(3) << "C.Man: addPacket findClient failed" << std::endl;
    170 //       return false;
    171 //     }
    172 //     ENetPacket *packet = new ENetPacket;
    173 //     //  TODO: finish implementation
    174 //   }
    175 //
    176139
    177140  bool ConnectionManager::addPacket(ENetPacket *packet, ENetPeer *peer) {
     
    373336    orxonox::ObjectList<orxonox::SpaceShip>::iterator it;
    374337    for(it = orxonox::ObjectList<orxonox::SpaceShip>::begin(); it; ++it){
    375       if(it->objectID!=id)
     338      if(it->getObjectID()!=id)
    376339        continue;
    377340      delete *it;
Note: See TracChangeset for help on using the changeset viewer.