You might be better off just sending udp packets on your own for the dummy packets to open ports...<br><br><br><div class="gmail_quote">On Mon, Jan 5, 2009 at 10:24 AM, M. Rijks <span dir="ltr">&lt;<a href="mailto:enet@forge.dds.nl">enet@forge.dds.nl</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi everyone,<br>&nbsp; <br>
I&#39;m happy to have found Enet as it provides the perfect mix of advantages between UDP and<br>
TCP. I&#39;m currently in planning stages of developing a client-server multiplayer library<br>
on top of it. Now, in most smaller-scale multiplayer games one of the clients is usually<br>
also the server. The problem with hosting the game these days however are firewall/NAT<br>
routers - you need to fiddle with port forwarding to host a game. Connecting usually<br>
isn&#39;t a problem as outgoing connections usually get a port forwarded automatically.<br>
<br>
A popular technique to circumvent these is NAT hole punching. The server first connects<br>
to a publically available session server. This outgoing message makes a firewall/NAT<br>
router open up an external port for the game server. Other clients connect to the session<br>
server, which then passes the external IP and port of the game server, so that the<br>
clients can then connect directly to the game server. It is a nice technique that usually<br>
solves much of the hosting issues for people behind a NAT router, as they don&#39;t even need<br>
to know their public IP and port. There is little stress on the session server as it only<br>
acts as a helper.<br>
<br>
Let&#39;s assume that I will create my own public session server, preferably using Enet as<br>
well (I&#39;d like to keep track of a number of session statistics that might be of interest<br>
to clients before joining). How would I go about setting this up? Naturally, it&#39;s no<br>
problem for a client to have two outgoing connections (one to the session server and one<br>
to the game server) but for the game server it&#39;s different - as far as I can see you&#39;re<br>
either connecting as a client or waiting for connections as a server, but I need to do<br>
both - if I set up two hosts it&#39;s going to use more than one port, making the connection<br>
fail.<br>
<br>
<br>
Any suggestions welcome, thanks in advance,<br>
<br>
- Martin<br>
<br>
_______________________________________________<br>
ENet-discuss mailing list<br>
<a href="mailto:ENet-discuss@cubik.org" target="_blank">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>
</blockquote></div><br>