Hello there,

In my implementation I simply open a UDP socket directly, send about 5 packets 
with a small interval between each, and close the socket again. Then, ENet 
kicks in and attempts a connection. The ENet socket wrapper functions are more 
convenient, but obviously the result will be exactly the same so it just 
depends on your taste.

  Kind regards,

  Philip Bennefall
  ----- Original Message ----- 
  From: Jay Sprenkle 
  To: Discussion of the ENet library 
  Sent: Friday, January 21, 2011 2:36 AM
  Subject: [ENet-discuss] ENet and NAT hole punching


  Good evening,

  I'm interested in making my ENet powered application able to do NAT hole 
punching.

  After looking through the NAT hole punching RFC it looks fairly simple 
(section 2.3 here).
  What is needed is a way to send a single packet to a specific address and 
port number.
  The content of the packet isn't important since it will be discarded anyway. 
It's just used to get the NAT to remember the address.

  If I read the source correctly I could simply open a connection and let it 
fail.
  Is there any way to send this packet without going through all the overhead?

  Perhaps just call enet_socket_send() directly?

  Thanks

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

Reply via email to