Changeset 1499 for code/branches/network/src/network/Server.cc
- Timestamp:
- Jun 1, 2008, 1:44:44 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network/src/network/Server.cc
r1494 r1499 130 130 ENetPacket *packet = packet_gen.chatMessage(msg.c_str()); 131 131 //std::cout <<"adding packets" << std::endl; 132 if(connection->addPacketAll(packet)) 133 //std::cout <<"added packets" << std::endl; 134 return connection->sendPackets(); 135 else 136 return false; 132 return connection->addPacketAll(packet); 137 133 } 138 134 … … 145 141 ENetPacket *packet = packet_gen.chatMessage(msg); 146 142 COUT(4) <<"Server: adding Packets" << std::endl; 147 connection->addPacketAll(packet); 148 //std::cout <<"added packets" << std::endl; 149 if (connection->sendPackets()){ 150 COUT(4) << "Server: Sucessfully" << std::endl; 151 return true; 152 } 153 return false; 143 return connection->addPacketAll(packet); 154 144 } 155 145 … … 184 174 if(!event) 185 175 continue; 176 assert(event->type != ENET_EVENT_TYPE_NONE); 186 177 switch( event->type ) { 187 178 case ENET_EVENT_TYPE_CONNECT: … … 265 256 delete gs; 266 257 } 267 if(added) {258 /*if(added) { 268 259 //std::cout << "send gamestates from server.cc in sendGameState" << std::endl; 269 260 return connection->sendPackets(); 270 } 271 COUT(5) << "Server: had no gamestates to send" << std::endl;272 return false;261 }*/ 262 //COUT(5) << "Server: had no gamestates to send" << std::endl; 263 return true; 273 264 } 274 265
Note: See TracChangeset
for help on using the changeset viewer.