Changeset 1233
- Timestamp:
- May 5, 2008, 11:14:45 AM (17 years ago)
- Location:
- code/branches/network3/src/network
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network3/src/network/Client.cc
r1232 r1233 116 116 Synchronisable::setClient(true); 117 117 isConnected=client_connection.createConnection(); 118 /*if(isConnected){119 COUT( 2) << "sending connectrequest" << std::endl;118 if(isConnected){ 119 COUT(4) << "sending connectrequest" << std::endl; 120 120 client_connection.addPacket(pck_gen.generateConnectRequest()); 121 121 client_connection.sendPackets(); 122 122 }else 123 COUT( 2) << "could not create connection" << std::endl;*/123 COUT(1) << "could not create connection" << std::endl; 124 124 return isConnected; 125 125 } -
code/branches/network3/src/network/ConnectionManager.cc
r1232 r1233 184 184 addClient(&event); 185 185 //this is a workaround to ensure thread safety 186 if(!addFakeConnectRequest(&event))187 COUT(3) << "Problem pushing fakeconnectRequest to queue" << std::endl; 186 /*if(!addFakeConnectRequest(&event)) 187 COUT(3) << "Problem pushing fakeconnectRequest to queue" << std::endl;*/ 188 188 COUT(5) << "Con.Man: connection event has occured" << std::endl; 189 189 break; -
code/branches/network3/src/network/GameStateManager.cc
r1232 r1233 101 101 //Server::sendGameState? 102 102 int gID = head_->findClient(clientID)->getGamestateID(); 103 COUT(4) << "G.St.Man: popgamestate: sending gstate_id: " << id_ << " diffed from: " << gID << " (not diffed yet)" <<std::endl;103 COUT(4) << "G.St.Man: popgamestate: sending gstate_id: " << id_ << " diffed from: " << gID << std::endl; 104 104 // COUT(3) << "gamestatemap: " << &gameStateMap << std::endl; 105 105 //chose wheather the next gamestate is the first or not -
code/branches/network3/src/network/PacketDecoder.cc
r1232 r1233 181 181 if(currentState->compsize==0) 182 182 COUT(2) << "PacketDecoder: compsize is 0" << std::endl; 183 currentState->data = (unsigned char*)(malloc( currentState->compsize )); 183 // currentState->data = (unsigned char*)(malloc( currentState->compsize )); 184 currentState->data = new unsigned char[currentState->compsize]; 184 185 if(currentState->data==NULL) 185 186 COUT(2) << "PacketDecoder: Gamestatepacket-decoder: memory leak" << std::endl; … … 198 199 cid->id = ((classid *)(packet->data))->id; 199 200 cid->clid = ((classid *)(packet->data))->clid; 200 cid->message = (const char *)malloc(cid->length); 201 // cid->message = (const char *)malloc(cid->length); 202 cid->message = new char[cid->length]; 201 203 void *data = (void *)cid->message; 202 204 memcpy(data, (const void*)(packet->data+3*sizeof(int)), cid->length);
Note: See TracChangeset
for help on using the changeset viewer.