You could also add a small library such as miniupnpc alongside ENet.<br><br><div class="gmail_quote">On Fri, Jan 21, 2011 at 4:26 AM, Jay Sprenkle <span dir="ltr"><<a href="mailto:jsprenkle@gmail.com">jsprenkle@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Thanks very much for the response. <br>Why five packets? A few extra to insure delivery?<div><div></div><div class="h5">
<br><br><div class="gmail_quote">On Thu, Jan 20, 2011 at 7:43 PM, Philip Bennefall <span dir="ltr"><<a href="mailto:philip@blastbay.com" target="_blank">philip@blastbay.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">





<div bgcolor="#ffffff">
<div><font face="Arial" size="2">Hello there,</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">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:2px solid rgb(0, 0, 0);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><div></div><div>
  <div style="font:10pt arial">----- Original Message ----- </div>
  <div style="font:10pt arial;background:none repeat scroll 0% 0% rgb(228, 228, 228)"><b>From:</b> 
  <a title="jsprenkle@gmail.com" href="mailto:jsprenkle@gmail.com" target="_blank">Jay 
  Sprenkle</a> </div>
  <div style="font:10pt arial"><b>To:</b> <a title="enet-discuss@cubik.org" href="mailto:enet-discuss@cubik.org" target="_blank">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" target="_blank">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>
</div></div></blockquote></div></blockquote></div><br>
</div></div><br>_______________________________________________<br>
ENet-discuss mailing list<br>
<a href="mailto:ENet-discuss@cubik.org">ENet-discuss@cubik.org</a><br>
<a href="http://lists.cubik.org/mailman/listinfo/enet-discuss" target="_blank">http://lists.cubik.org/mailman/listinfo/enet-discuss</a><br>
<br></blockquote></div><br>