Showing the port to user yes/no, and coping with server attack?

Is there any risk involved in showing to user what port is being used
for game traffic? I’d like to just pass the port number as a parameter, which would
expose it to anybody who looked at the page source.
I assume somebody who wanted to crash a system would be able to find it out the port
pretty quickly anyway, and then spam the server to hell…
Any ways to control that possibility?

I’m building a simple system which would let in x amount of players, and put the
rest in a holding pattern or queue, and only allowing them to check the line every 1 minute
while the room is full.

Assume the server does crash for whatever reason, guess I would have to write another program that would check if the server
is running and reboot it? Or is this all overkill in the prevention zone…

Anyone connected could find out the servers IP and port number by doing “netstat -n” in a windows command prompt, I’m sure there is similar for other OS’s. Writing a separate program that starts the server thread, and also restarts it if it ever dies, should be fairly easy.

It sounds like your main concern is people who would crash the server to to jump the queue, if so maybe you could store the in game and waiting lists in some kind of persistent storage on the server like a file or database.

Coping with professional quality spam-flood attacks is a difficult subject, but to a first order approximation, it’s only a problem in an alternate universe where you are already incredibly popular and well known.

At the amateur “pissed off user” or “broken client” level, all your server has to do is refuse unwanted connections based on simple criteria such as the number of connections from one IP.