Hello,

At 17:32 24/05/2012, you wrote:
> peerID should be deducted from packet's sender IP & Port which are in
> ENetHost::receivedAddress .

Bear in mind that a senders port can change if they're behind a NAT. Some
NATs will move the port that they're using for your UDP datagrams around,
they know nothing of the 'connection' that you have between two peers and so
it's quite valid for them to send every single datagram out on a different
port if they wanted to - they don't, but I've certainly seen peers move from
one port to another mid connection. Without a peer ID there's no way for you
to keep the connection open if this happens.

Does the UDP packet's header contain the port of the Router or the initial sender port ? I'd guess the later, as when you send some packet back to that send, you always send to the same port. Also, I never really noticed that problem with my games, so hopefully it doesn't happen often. Anyway, I'll do a loose bind then, ie: if there's no perfect IP / Port match, I'd do only a IP match, that should be ok in my case.

Thanks for the warning !
_______________________________________________
ENet-discuss mailing list
[email protected]
http://lists.cubik.org/mailman/listinfo/enet-discuss

Reply via email to