[ENet-discuss] NAT punch through

Daniel Frith danfrith at gmail.com
Mon May 14 16:36:16 PDT 2007


Hi,

I'm sure this has been asked lots but I can't seem to find any mailing
list archives. So here goes.

I think I just about understand how NAT punching works: Both peers
connect to a master server, which decides to pair them, and tells each
the other's IP and port (from the ENetAddress). They then start
sending packets to each other until the NAT box opens up.

But I'm not sure how this would be done in ENet, what with it's
enet_host_connect function, I'm not sure how I go about sending these
random packets to open the NAT box, or even how to identify when it
has opened.

So ya, any comments or even links to any posts in the archives would
be most helpful.

Thanks :)

P.S. Just as I finished writing this I've discovered the socket
functions, e.g. enet_socket_create. Are these what I'm looking for?
How do I use them?


More information about the ENet-discuss mailing list