[ENet-discuss] NAT punch through

Lee Salzman lsalzman1 at cox.net
Wed May 16 18:46:14 PDT 2007


Yeah, just play with the socket functions. they're not terribly 
documented at this point because they're only used as an interface for 
ENet to implement itself. At some point I will make them a more 
"official" part of the interface.

The best reference for using them is to just look at unix.c, and then 
look at the corresponding man pages for the involved unix sockets 
functions when it's not entirely obvious what they do.

Lee

Daniel Frith wrote:
> 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?
> _______________________________________________
> ENet-discuss mailing list
> ENet-discuss at cubik.org
> http://lists.cubik.org/mailman/listinfo/enet-discuss
> 



More information about the ENet-discuss mailing list