🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

How do I choose a suitable network port?

Started by
4 comments, last by FVector4 22 years, 8 months ago
As the subject title says. How does one go about choosing a suitable network port on which to run the game. Are there preferred port ranges? Any help would ne most usefull. Cheers.
Advertisement
Well, you more-or-less pick it out of your !@$. It''s best to avoid well known ports, in case someone wants to run you''re game and a server of that type on the same machine. 21, 80, 113, 27960 would all be bad choices (ftp, http, identd, quake3).

Make it so the server admin can set what port it uses, and pick a default. Pick something on the high-end, over 16384 and you should be fine. There is a reserved block for people to randomly use, but it doesn''t matter too much if you can change what port it''s on.



Magmai Kai Holmlor
- Not For Rent
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
You might find this interesting: http://www.ec11.dial.pipex.com/port-num.htm. As MKH said, just don''t use the same port as another common network service.
ReactOS - an Open-source operating system compatible with Windows NT apps and drivers
I figured that you just randomly picked a number out of hat. Exclude any popular ones and a way you go.

Cheers all

This is something I wrote way back in the day when I was first learning Java. I lovingly named it Port Bitch.



"If consquences dictate our course of action, it doesn''t matter what''s right, it''s only wrong if you get caught."
- Tool

"There is no reason good should not triumph at least as often as evil. The triumph of anything is a matter of organization. If there are such things as angels, I hope that they're organized along the lines of the mafia." -Kurt Vonnegut
Nobody will really bother unless you use a low port number (especially don''t use <1024, as these ports are reserved for root / admin on many systems).

Officially, a list of port numbers is maintained by the IANA - http://www.iana.org/

cu,
Prefect

One line of sourcecode says more than a thousand words.
Widelands - laid back, free software strategy

This topic is closed to new replies.

Advertisement