Changeset 7295 for code/branches/ipv6/src/libraries
- Timestamp:
- Aug 31, 2010, 6:13:21 PM (14 years ago)
- Location:
- code/branches/ipv6/src/libraries/network
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/ipv6/src/libraries/network/ClientInformation.cc
r6417 r7295 216 216 ClientInformation *temp = head_; 217 217 while(temp!=0){ 218 if( temp->getPeer()->address.host==peer->address.host && temp->getPeer()->address.port==peer->address.port)218 if(!memcmp(& temp->getPeer()->address, & peer->address, sizeof(peer->address))) 219 219 break; 220 220 temp = temp->next(); … … 250 250 ClientInformation *temp = head_; 251 251 while(temp!=0){ 252 if( temp->getPeer()->address.host==address->host && temp->getPeer()->address.port == address->port)252 if(!memcmp(& temp->getPeer()->address, address, sizeof(*address))) 253 253 break; 254 254 temp = temp->next(); -
code/branches/ipv6/src/libraries/network/LANDiscoverable.cc
r7294 r7295 64 64 if( bActive ) 65 65 { 66 ENetAddress bindAddress = { ENET_HOST_ANY, LAN_DISCOVERY_PORT }; 66 ENetAddress bindAddress; 67 memset(& bindAddress, 0, sizeof(ENetAddress)); 68 bindAddress.host = ENET_HOST_ANY; 69 bindAddress.port = LAN_DISCOVERY_PORT; 67 70 assert( this->host_ == 0 ); 68 71 this->host_ = enet_host_create( &bindAddress, 10, 0, 0, 0 ); -
code/branches/ipv6/src/libraries/network/LANDiscovery.cc
r7294 r7295 67 67 case ENET_EVENT_TYPE_CONNECT: 68 68 { 69 COUT(0) << "connect from server: " << event.peer->address.host << endl;69 //COUT(0) << "connect from server: " << event.peer->address.host << endl; FIXME 70 70 ENetPacket* packet = enet_packet_create(LAN_DISCOVERY_MESSAGE, strlen(LAN_DISCOVERY_MESSAGE)+1, ENET_PACKET_FLAG_RELIABLE); 71 71 enet_peer_send(event.peer, 0, packet); -
code/branches/ipv6/src/libraries/network/ServerConnection.cc
r7294 r7295 44 44 { 45 45 this->bindAddress_ = new ENetAddress(); 46 memset(this->bindAddress_, 0, sizeof(ENetAddress)); 46 47 this->bindAddress_->host = ENET_HOST_ANY; 47 48 this->bindAddress_->port = NETWORK_PORT;
Note: See TracChangeset
for help on using the changeset viewer.