Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 16, 2007, 11:31:17 PM (16 years ago)
Author:
scheusso
Message:

-implemented class ClientConnection:

  • implements the network part of a client (analog to ConnectionManager for the server)
  • again there is a receiver-Thread and a buffer
  • (hopefully) clean disconnection and wait for connection

-extended dummyclient (dummyclient2.cc) to use new ClientConnection class
-make target client builds now dummyclient2
-adjusted the Makefile

File:
1 edited

Legend:

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

    r213 r217  
    5252    cout << "Connection to " << str << " failed." << endl;
    5353    //puts("Connection to localhost:5555 failed.");
     54    exit(EXIT_FAILURE);
    5455  }
    5556
     
    5960        // extend the packet and append the string foo to it
    6061        // send packet to peer on channel id 0
    61     enet_peer_send(peer, 1, pck.chatMessage("test"));
     62    enet_peer_send(peer, 1, pck.chatMessage("test2"));
    6263        // keep the timeout very small for low delay
    6364    if(enet_host_service(client, &event, 1)==0){
     
    6667      cout << "failed sending" << endl;
    6768    }
     69    usleep(1000000);
    6870  }
    6971
Note: See TracChangeset for help on using the changeset viewer.