From 8156085ef33a4ce048c5bf57e776c4e48995a2c6 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Tue, 4 Jan 2022 20:32:03 -0700 Subject: [PATCH] Begin on the docs for the code that resides in it's own folder --- docs/events.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 docs/events.md diff --git a/docs/events.md b/docs/events.md new file mode 100644 index 0000000..5d08a27 --- /dev/null +++ b/docs/events.md @@ -0,0 +1,30 @@ +# Events +Every event in this document has two forms, a request and a response, the event +type can be differentiated by the event prefix, `req` is an event going to the +server, and `res` is a response coming from the server to the client. Some events +may only have one of these types, if this is the case, it will be denoted in the +relevant section. + +**Important**: Events with the `Broadcasted` event type, must be listened to +even if you don't send any `Request` events of that type. This is because other +clients connected to the server may trigger the server in such a way that the +event response gets sent to multiple clients. + +--- + +## `server.info` +Asks the server for information about it. + + +### Supported Event Types +| Request | Response | Broadcasted +| ------- | -------- | ----------- +| Yes | Yes | No + + +### Payloads: +Request Payload: `IServerInfoRequest` + +Response Payload: `IServerInfoResponse` + +--- \ No newline at end of file