From 6239a77559ddb98f5fe6bb80787b604469843758 Mon Sep 17 00:00:00 2001 From: Max Rydahl Andersen Date: Thu, 6 Feb 2025 22:19:23 +0100 Subject: [PATCH] document coalesce feature (#2128) * document coalesce feature * Update docs/api/websocket.md Co-authored-by: J. Nick Koston --------- Co-authored-by: Franck Nijhof Co-authored-by: J. Nick Koston Co-authored-by: Franck Nijhof --- docs/api/websocket.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/api/websocket.md b/docs/api/websocket.md index 749f0c2a..0850eebb 100644 --- a/docs/api/websocket.md +++ b/docs/api/websocket.md @@ -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 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.