-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6d80303
commit c9438f7
Showing
4 changed files
with
172 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"$id": "https://schema.beyondallreason.dev/tachyon/system/disconnected/event.json", | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "SystemDisconnectedEvent", | ||
"tachyon": { | ||
"source": "server", | ||
"target": "user", | ||
"scopes": ["tachyon.lobby"] | ||
}, | ||
"type": "object", | ||
"properties": { | ||
"type": { "const": "event" }, | ||
"messageId": { "type": "string" }, | ||
"commandId": { "const": "system/disconnected" }, | ||
"data": { | ||
"title": "SystemDisconnectedEventData", | ||
"type": "object", | ||
"properties": { | ||
"reason": { | ||
"enum": ["protocol_violation", "server_error", "timeout"] | ||
}, | ||
"details": { "type": "string" } | ||
}, | ||
"required": ["reason"] | ||
} | ||
}, | ||
"required": ["type", "messageId", "commandId"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
System commands to manage the connection itself and get updates from the server. | ||
|
||
* [disconnect](#disconnect) is the event to send to the server before | ||
stopping the connection. If the client closes the connection without first | ||
sending this event, it will be considered as a client crash by the server. | ||
|
||
* [disconnected](#disconnected) is the dual of `disconnect` where the server | ||
is terminating the connection and disconnecting the user. This can happen | ||
if the server detects a timeout, either because no activity on the connection | ||
or the server is expecting a response to a request and hasn't received it (and | ||
all potential retries have been exhausted). `server_error` is sent when the | ||
server encountered a fatal error for the user and the only way to recover is | ||
to reconnect. | ||
|
||
* [serverStats](#serverStats) can be used to request generic, user facing data | ||
about the server like number of connecting players. |