Changeset 1098 for code/branches/network2/src/network/ClientConnection.cc
- Timestamp:
- Apr 17, 2008, 2:35:51 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network2/src/network/ClientConnection.cc
r1062 r1098 87 87 88 88 ENetPacket *ClientConnection::getPacket() { 89 ENetAddress address; 89 ENetAddress address; //sems that address is not needed 90 90 return getPacket(address); 91 91 } … … 162 162 case ENET_EVENT_TYPE_CONNECT: 163 163 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; 166 166 break; 167 167 case ENET_EVENT_TYPE_DISCONNECT: … … 203 203 bool ClientConnection::establishConnection() { 204 204 ENetEvent event; 205 // connect to peer 205 // connect to peer (server is type ENetPeer*) 206 206 server = enet_host_connect(client, &serverAddress, NETWORK_CLIENT_CHANNELS); 207 207 if(server==NULL) … … 218 218 219 219 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; 221 221 // just add packet to the buffer 222 222 // this can be extended with some preprocessing
Note: See TracChangeset
for help on using the changeset viewer.