Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 28, 2010, 4:46:42 PM (14 years ago)
Author:
scheusso
Message:

again some structural changes in network to increase modularity/encapsulation
precondition for fixing client-disconnect bug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/network6/src/libraries/network/ClientConnection.cc

    r7801 r7823  
    103103      if( enet_host_service(this->host_, &event, NETWORK_CLIENT_WAIT_TIME)>=0 && event.type == ENET_EVENT_TYPE_CONNECT )
    104104      {
     105        // manually add server to list of peers
     106        /*incomingEvent inEvent = */Connection::preprocessConnectEvent(event);
     107//         addPeer(inEvent.peerID);
     108        // start communication thread
    105109        this->established_=true;
    106110        Connection::startCommunicationThread();
     
    148152    assert( this->server_ );
    149153    assert( packet );
    150     return Connection::addPacket( packet, this->server_, channelID );
     154//     return Connection::addPacket( packet, NETWORK_PEER_ID_SERVER, channelID );
     155    // HACK: actually there should be a way to do this using addPacket and the correct peerID
     156    return Connection::broadcastPacket(packet, channelID);
    151157  }
    152158
    153   void ClientConnection::addPeer(ENetEvent* event)
     159  void ClientConnection::addPeer(uint32_t peerID)
    154160  {
    155161    assert(0);
    156162  }
    157   void ClientConnection::removePeer(ENetEvent* event)
     163  void ClientConnection::removePeer(uint32_t peerID)
    158164  {
    159165    this->established_=false;
Note: See TracChangeset for help on using the changeset viewer.