Network Ports - which to use?

Blitz3D Forums/Blitz3D Programming/Network Ports - which to use?

Matty(Posted 2009) [#1]
Hello,

I've been working on implementing network multiplayer play in my game found here:

http://blitzbasic.com/Community/posts.php?topic=82258

Currently I've tested it with 2 clients connected to a server using Port 80, and it works fine, neither the clients nor server have access to the internet.

Should I be using a different port and if so which ones should I be using?

It's quite a bit of fun in multiplayer, although I'm yet to test it with more than 2 players connected to the server.


ZJP(Posted 2009) [#2]
Official UPD port. Which to use?. Game port, like Quake for example.
http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers

JP


Matty(Posted 2009) [#3]
There is a lot to choose from on that list. I think I only need to use 1 but would it interfere with anything if I stick with 80? Is there anything I need to be wary of?


Guy Fawkes(Posted 2009) [#4]
yes, port 80 is http. that's the port that allows u to host websites.


dynaman(Posted 2009) [#5]
> Is there anything I need to be wary of?

Plenty. I think any port above 1024 is free for use, but I may have the wrong number there.

Even then, the user may have some other software using the same port and want to switch, so allow the user to modify the port in an ini file or something as well.


Rroff(Posted 2009) [#6]
Doesn't really matter what port(s) you use aslong as its above 1024... however I usually advocate using something in the 20000 to 29999 range for game stuff.


ZJP(Posted 2009) [#7]
I suggest to use a game port like
2056/UDP Civilization 4 multiplayer
2302/UDP ArmA multiplayer (default for game)
2303/UDP ArmA multiplayer (default for server reporting) (default port for game +1)
8501/UDP Duke Nukem 3D—default
10308 Lock-on: Modarn Air Combat
10480 SWAT 4 Dedicated Server
30000 Pokemon Netbattle
etc etc..

No pb if you do not play its games at the same time

JP


Matty(Posted 2009) [#8]
I'll change it then from port 80 to something above 20000.
However - what is the worst that could happen if I continued to use port 80?


KillerX(Posted 2009) [#9]
if your using internet explorer, one of the two could crash.


xlsior(Posted 2009) [#10]
There is a lot to choose from on that list. I think I only need to use 1 but would it interfere with anything if I stick with 80? Is there anything I need to be wary of?


Port 80 is HTTP, but is also used as a fall-back port by some other programs like Skype.

I actually tried to install Apache (webserver) on my PC a while back, but it initially failed because Skype was already listening on port 80 in the background.


Matty(Posted 2009) [#11]
Thanks,
I've changed it to one of the other ports now that should be fine (outside the 0-1024 range).