-
auth:
{ 'token': The client's access Json Web Token }
On success:
Accepts the connection
Eventscene
is sent to the client if the game has startedOn failure:
The connection is refused and an error message is sent to be received by the connect_error event on the client
-
Must be sent once the scene is loaded by the client
-
Argument:
time1: any
Response: Event
time_sync
{ 'time1': time1 (same as the given argument), 'time2': float (Seconds since the Epoch on server side) }
-
Argument:
{ 'client_paddle_position': float (y position), 'direction': str ('up' | 'down' | 'none') }
Position is bad (due to latency or cheating):
The position on server side is sent to all clients as well as the new direction
Position is OK:
Server side position is set to the client side position
The position sent by the client as well as the new direction is sent to all clients except the client that sent the update player eventThe new position and direction are sent using the client
update_player
event