<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.23091">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2 face=Arial>Hello there,</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>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.</FONT></DIV>
<BLOCKQUOTE 
style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial"> </DIV>
  <DIV style="FONT: 10pt arial">Kind regards,</DIV>
  <DIV style="FONT: 10pt arial"> </DIV>
  <DIV style="FONT: 10pt arial">Philip Bennefall</DIV>
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="FONT: 10pt arial; BACKGROUND: #e4e4e4; font-color: black"><B>From:</B> 
  <A title=jsprenkle@gmail.com href="mailto:jsprenkle@gmail.com">Jay 
  Sprenkle</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=enet-discuss@cubik.org 
  href="mailto:enet-discuss@cubik.org">Discussion of the ENet library</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Friday, January 21, 2011 2:36 
  AM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> [ENet-discuss] ENet and NAT hole 
  punching</DIV>
  <DIV><BR></DIV>Good evening,<BR><BR>I'm interested in making my ENet powered 
  application able to do NAT hole punching.<BR><BR>After looking through the NAT 
  hole punching RFC it looks fairly simple (section 2.3 <A 
  href="http://pdos.csail.mit.edu/%7Ebaford/nat/draft-ford-natp2p-00.txt">here</A>).<BR>What 
  is needed is a way to send a single packet to a specific address and port 
  number.<BR>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.<BR><BR>If I read the source correctly I could simply open a 
  connection and let it fail.<BR>Is there any way to send this packet without 
  going through all the overhead?<BR><BR>Perhaps just call enet_socket_send() 
  directly?<BR><BR>Thanks<BR><BR></BLOCKQUOTE></BODY></HTML>