Changeset 9461 in orxonox.OLD for branches/proxy/src/lib/network/udp_server_socket.cc
- Timestamp:
- Jul 25, 2006, 5:39:49 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/network/udp_server_socket.cc
r9460 r9461 269 269 int newConn = 0; 270 270 271 // iterate through all newly received packets and assign them to the users packet buffer 271 272 for ( res = SDLNet_UDP_Recv( socket, packet ); res == 1; res = SDLNet_UDP_Recv( socket, packet ) ) 272 273 { … … 277 278 continue; 278 279 279 for ( userId =0; userId < (int)userList.size(); userId++ ) 280 if ( userList[userId].addr.host == packet->address.host && userList[userId].addr.port == packet->address.port && userList[userId].randomByte == ( packet->data[0] & 0xFC ) ) 280 // search the user id this backet belongs to 281 for ( userId = 0; userId < (int)userList.size(); userId++ ) 282 { 283 if ( userList[userId].addr.host == packet->address.host && 284 userList[userId].addr.port == packet->address.port && 285 userList[userId].randomByte == ( packet->data[0] & 0xFC ) ) 281 286 break; 282 287 } 288 289 // is it a new packet initializing a new connecion? 283 290 if ( userId >= (int)userList.size() ) 284 291 { … … 302 309 } 303 310 304 //add new packet to packetbuffer 305 311 312 // add new packet to packetbuffer 306 313 NetworkPacket networkPacket; 307 314 networkPacket.length = packet->len;
Note: See TracChangeset
for help on using the changeset viewer.