Well, id still consider myself new to networking but here is my opinion.
Since your making a MMO I really don't think thats going to scale to well as more and more players connect (it looks like ur using a thread or two per client). You will end up with 1/2 threads per connection on the server (500 connections may equal 1000 threads or more!).
Do this instead:
- each client can have a download/upload buffer (just large array of bytes)
- forget about the 250ms messaging timer
Here is my attempt at explaining in detail:
In a game I am soon making I will only allocate a thread to a client when the client first connects, in this thread the server/client communicate and verify each other in a non-asynchronous/blocking way), after that is successful the client is added to the list of players and the newly created thread then terminates (as I said though required client information is added to the list of clients - including the tcp (or UDP IP/port) connection.
The primary server thread which does the updating of the world (main game loop) iterates through each client and updates accordingly, before that happens however the server also checks all clients for any available data to be processed, collects the data and processes it using a prefixed length messaging algorithm. The client download buffer is also used here for processing the messages if they come in small bits at a time. If a successful message has been received which involves a movement of a player's position and is then process upon... all other players/connected clients have their upload buffer added to indicating that a player has moved. At the end of the game loop the server then iterates over all clients once again and clears out all buffers by uploading the data.
Edit: also make it so data is only sent by the client when a player actually moves and handle that accordingly, even if the player spams left/right that's really only a maximum 24 bytes per message - and you cant really prevent denial of service.
So really this is just making messages basically instant - but in a way that doesn't involve many threads.