Mailing List
Home
Forum Home
MUD Dev - Discussion of MUD system design, development, and implementation
Mac Game - Mac game development
Rivers of MUD - a Diku and Merc based multiuser dungeon
SMAUG
Subjects
Getting UDP through NAT/firewalls/whatever for a game
Getting UDP through NAT/firewalls/whatever for a game
QuickTime errors
Python script as stand alone MUD server
Various sound problems
Fragment Shaders & GL TEXTURE RECTANGLE EXT
Timers and global variables
Re: Language and platform for Text MUD server
Apparent acquisition of Yantis (mysupersales) by IDE
HID keyboard
Getting UDP through NAT/firewalls/whatever for a game
Microsoft Sparkle
Director MX
Congratulations Horizons
Yet more problems fullscreen mode
Apple Dev Kitchen Them 's tasty vittles, Maw!
NSOpenGLContext, Pbuffers, and drawables
More DCR "theft " naughtiness
dynamic sprite creation and imaging lingo
Re: Find stuff in Flash array?
Effects of skill imbalances?
QuickTime errors
Rom 2 4/Quickmud Enhancement/Bug fix
Working with XML files/CFURL
smooth scrolling/subpixel tweening
RE: (Ron help me?) Flash text
Flash Racing
MudDev FAQ 2
Browser based games
Installing GLUT
Special character in Flash XML
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
Getting UDP through NAT/firewalls/whatever for a game.

Getting UDP through NAT/firewalls/whatever for a game.

2004-01-07       - By MacFirst

 Back
Reply:     1     2     3     4     5     6     7     8     9     10     >>  

In the game I'm writing, the client opens a TCP socket to the server,
the server sends (TCP) a "send me a UDP packet with this magic number,
so I know it's you", then the client sends "here's a UDP packet with
your magic number" packet.

...Which seems like a screwy dance, but all the Google info I can find
tells me that's really the only "official" way for a server to find out
a client's UDP port to receive stuff.

So far, so good: the server can now identify UDP packets coming from
user X.

My problem is that, from behind certain NAT routers, firewalls and
whatnot, the client cannot RECEIVE UDP packets from the server.  Btw,
this works in a lot of places (my house, friends' offices, various
open-airpot coffee shops), but not in a lot of others (i.e., another
friend's house, another open-airpot at the mall, everywhere on the Apple
campus), so I'm assuming it's something to do with the weird
IP-masquerade/NAT thingamabob.

(I just started learning network innards recently, so forgive me if I
misuse some of the technical terms ;)

So my question is: what do I need to do so that my server can know what
port to send UDP packets *TO*, so that the client can receive them under
a wider variety of circumstances?

Thanks!

(NOTE: MS spelling dictionary recognizes "thingamabob" as a word!)

   --- Someone else helped a little by posting... ---

> In article <Misc-3A0BE2.09155007012004@(protected)>,
> Miss Elaine Eos  <Misc@*your-shoes*PlayNaked.com> wrote:
> >So my question is: what do I need to do so that my server can know what
> >port to send UDP packets *TO*, so that the client can receive them under
> >a wider variety of circumstances?

> If the client initiates the connection, try having the server send
> them right back to (its version of) the client's address. This'll
> require the client to send/receive on the same port, but that
> shouldn't be much of a problem.

It turns out that this is what works "most of the time", "under normal
circumstances."  But it doesn't seem to work the rest of the time -- that
is, for 50% of my potential players.

50% is too high for me, so I'm trying to fix it.

Various routers change the port number along the way, so it's not a simple
matter of setting it to some number.  I don't think.  Maybe there's a trick
to it that I'm not getting -- but that's what the question is all about.
__ ____ ____ ____ ____ ____ ____ ____ ____ ____
mac-games-dev mailing list | mac-games-dev@(protected)
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/mac
-games-dev
Do not post admin requests to the list. They will be ignored.



Earn $52 per hosting referral at Lunarpages.