Hello Guest

DatagramChannel NAT traversal

  • 1 Replies
DatagramChannel NAT traversal
« on: March 23, 2006, 18:16:41 »
I've asked similar things like this before, but I'm having a really hard time finding information on this one. I'm trying to figure out how to handle NATs when using UDP (datagramchannel) networking. I can send a packet to a server, but when the server sends a response back to InetSocketAddress from which it received the packet, the client NAT never lets it through. I've found a few NATs that do work, but just as many that don't. Is there a trick to this?

P.S. TCP works fine (since it's a server/client connected channel), but I really must use UDP (as it's a fast-paced action game).

Re: DatagramChannel NAT traversal
« Reply #1 on: March 10, 2007, 17:44:55 »
Do you assign your packet's destination port to the source port of the previous received packet?

Edit: ah sorry didn't notice this way posted a year ago
« Last Edit: March 10, 2007, 17:50:18 by Betalord »