I am at the beginning of writing an simple mmo server for demo game. I am using UDP protocol (UdpClient) but I wonder, how other servers are working?:
I have tested connecting 50 clients who send "Ping" message and server has to reply with "Pong". It takes about 10 seconds (on localhost) for the 50th "Pong" to send (in the mean time, server is supposed to send ping to 1st player as well so queue can be prolonged to hours which is absurd)
Other servers use 1) i.e. listen from any client with one Socket (of which I assume there is one per UdpClient) . Furthermore:
Doing the above on localhost with 50 clients sending ping and receiving a pong that is only a few bytes should take less than 1ms, assuming some other process is not maxing out the processors.