migrate to tokio

This commit is contained in:
2022-10-04 16:59:12 -05:00
parent b6d54d086e
commit 13fb9a9fdd
6 changed files with 390 additions and 255 deletions

52
doc/flow.txt Normal file
View File

@@ -0,0 +1,52 @@
Sign on process:
New client
client server
HELO
SIGNUP
PLAYER_CODE
Existing client
client server
HELO
LOGIN
LOGIN_OK
Expired login
client server
HELO
LOGIN
PLAYER_CODE
Anything else
client server
HELO
HOST
ERROR
<Close Frame>
This is the only scenario where an error is followed by
an immediate close frame.
Room join process:
Create new room
client server
HOSTJOIN
HOST
ROOM_CODE
Join an existing room
client server
HOSTJOIN
JOIN
JOIN_OK
Join an expired room
client server
HOSTJOIN
JOIN
BAD_ROOM
At this point the client is responsible for procuring
a new room code