[OT] Handling multiple UDP clients through NAT

Steve smorrey at gmail.com
Tue Feb 6 13:56:56 MST 2007

Well the reason for using UDP is to see if I could do it using UDP.
Since UDP uses individual datagrams for communications in much the
same way as the mail system works, it makes a whole lot more sense to
me, to use UDP because in my design, my players don't technically need
to have a "connection".
UDP also has lower overhead compared to TCP which allows me to handle
many more clients than would be possible using TCP.


On 2/4/07, Levi Pearson <levi at cold.org> wrote:
> Steve <smorrey at gmail.com> writes:
> > Hello again everyone,
> > While designing my new MUD server I ran into a design problem that I'm
> > hoping someone here has had experience with.
> >
> > Specifically, I currently keep track of clients in a hashmap, with the
> > hash being comprised of their IP address and port.
> >
> > This works very well until multiple clients who are NAT'd try to connect.
> >
> Solution: Use TCP.  Keeping track of connections is what it was
> designed for, and fortunately pretty much all network hardware is
> designed to work with TCP connections, so you don't have to hack your
> way around them.
> Why did you choose to use UDP in the first place?  If you must use
> UDP, just arrange for a unique key for each client to be created when
> they authenticate with the server, and tag all subsequent packets with
> that id.  Untagged packets that are not attempts to log in can be
> dropped, and tagged packets can be properly routed to wherever they
> need to go.
> But I strongly suggest you just use TCP.
>                 --Levi
> /*
> PLUG: http://plug.org, #utah on irc.freenode.net
> Unsubscribe: http://plug.org/mailman/options/plug
> Don't fear the penguin.
> */

More information about the PLUG mailing list