EDIT THIS WAS NEVER USED
Client Loop
------------
1. Check for network (check buffer)
2. Input (puts in the send buffer)
3. Render
Network thread
LOOP
1.checks if there is anything in the buffer (global/shared between all port threads)
2.sends stuff if there is
3.check for client
4.put in server buffer
Server Loop
------
(FRAME LIMITED)
1. Check network buffer for updates
2. Do game logic
3. Puts stuff in the port threads to send
SERVER network logic
------
HUB THREAD
Waits for connections on port 24800 (TCP)
Everytime it gets a connection it then re-routes to inc. ports from 24801 to +maxplayers.
Spawns a new PORT THREAD
PORT THREAD(port x)
Opens/listens on x (TCP)
Has a timeout FIXED, 60seconds, disconnects if no connection
Otherwise if client connects, they are added to game and game logic takes place
init phase over,
LOOP
1.checks if there is anything in the buffer (global/shared between all port threads)
2.sends stuff if there is
3.check for client
4.put in server buffer