Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 17, 2008, 2:35:51 PM (16 years ago)
Author:
rgrieder
Message:

merged network branch into new network2 branch (from trunk)

File:
1 edited

Legend:

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

    r1062 r1098  
    8787
    8888  ENetPacket *ClientConnection::getPacket() {
    89     ENetAddress address;
     89    ENetAddress address; //sems that address is not needed
    9090    return getPacket(address);
    9191  }
     
    162162      case ENET_EVENT_TYPE_CONNECT:
    163163      case ENET_EVENT_TYPE_RECEIVE:
    164         COUT(5) << "receiver-Thread: got new packet" << std::endl;
    165         processData(&event);
     164        COUT(5) << "Cl.Con: receiver-Thread while loop: got new packet" << std::endl;
     165        if ( !processData(&event) ) COUT(2) << "Current packet was not pushed to packetBuffer -> ev ongoing SegFault" << std::endl;
    166166        break;
    167167      case ENET_EVENT_TYPE_DISCONNECT:
     
    203203  bool ClientConnection::establishConnection() {
    204204    ENetEvent event;
    205     // connect to peer
     205    // connect to peer (server is type ENetPeer*)
    206206    server = enet_host_connect(client, &serverAddress, NETWORK_CLIENT_CHANNELS);
    207207    if(server==NULL)
     
    218218
    219219  bool ClientConnection::processData(ENetEvent *event) {
    220     COUT(5) << "got packet, pushing to queue" << std::endl;
     220    COUT(5) << "Cl.Con: got packet, pushing to queue" << std::endl;
    221221    // just add packet to the buffer
    222222    // this can be extended with some preprocessing
Note: See TracChangeset for help on using the changeset viewer.