bugfixes and refactoring in game-server

This commit is contained in:
2026-10-27 15:55:48 +03:00
parent 3629411030
commit 31ef12b5f2
9 changed files with 732 additions and 66 deletions
+2 -1
View File
@@ -51,9 +51,10 @@ const (
EndCodeJoinTimeout = -1 // the second player never joined
)
// WebSocket close codes used by the server (application range 4000+).
// WebSocket close codes used by the server (application range 4000+ and RFC 6455 codes).
const (
CloseCodeNormal = 1000 // normal closure
CloseCodeGoingAway = 1001 // server shutting down
CloseCodeReplaced = 4000 // connection replaced by a newer one of the same player
CloseCodeExpectedJoin = 4001 // first message was not a JOIN
CloseCodeBadMessage = 4002 // malformed message