optimizing websockets
Sync server and client