document coalesce feature (#2128)

* document coalesce feature

* Update docs/api/websocket.md

Co-authored-by: J. Nick Koston <nick@koston.org>

---------

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
Max Rydahl Andersen 2025-02-06 22:19:23 +01:00 committed by GitHub
parent 3afcff2985
commit 6239a77559
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -85,6 +85,20 @@ If the data is incorrect, the server will reply with `auth_invalid` message and
} }
``` ```
## Feature enablement phase
Clients that supports features that needs enabling should as their first message (with `"id": 1`) send a message in the form:
```
{
"id": 1,
"type": "supported_features",
"features": { coalesce_messages: 1 }
}
```
As of now the only feature supported is 'coalesce_messages' which result in messages being sent coalesced in bulk instead of individually.
## Command phase ## Command phase
During this phase the client can give commands to the server. The server will respond to each command with a `result` message indicating when the command is done and if it was successful along with the context of the command. During this phase the client can give commands to the server. The server will respond to each command with a `result` message indicating when the command is done and if it was successful along with the context of the command.