Skip to content
This repository was archived by the owner on Jan 2, 2026. It is now read-only.

Commit eb55ad0

Browse files
committed
feat: start drafting section 4: WebSockets
1 parent a19d8fa commit eb55ad0

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"hpke",
55
"polyproto-auth",
66
"polyproto-chat",
7+
"polyproto-core",
78
"polyproto-mls"
89
],
910
"languageToolLinter.languageTool.disabledRules": "UPPERCASE_SENTENCE_START"

docs/protocols/mls.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,38 @@ be compliant MLS implementations.
8787
The HTTP APIs offered through polyproto-mls are fully documented as OpenAPI specification documents
8888
for OpenAPI versions 3.0.0 and 3.1.0. The OpenAPI specification documents can be found
8989
[at this link](https://github.com/polyphony-chat/typespec-openapi/tree/main/build). Select the
90-
OpenAPI preferred OpenAPI version and find the versioned `.yaml` files in the corresponding folder.
90+
preferred OpenAPI version and find the versioned `.yaml` files in the corresponding folder.
91+
92+
## 4. WebSocket Gateway
93+
94+
The polyproto-mls extension specification also registers a namespace `mls` for the WebSocket
95+
protocol defined in section #3 of the polyproto-core specification. As usual for WebSockets, this
96+
provides optional, real-time bidirectional communication functionality for implementations that
97+
require it.
98+
99+
Servers **must** offer the `mls` namespace for the WebSocket Gateway and the functionality described
100+
by this chapter. Clients may subscribe to the `mls` WebSocket Gateway Service Channel by sending a
101+
subscribe event with the appropriate contents to the polyproto-mls WebSocket Gateway server.
102+
103+
:::tip[Example MLS subscribe payload]
104+
105+
```json
106+
{
107+
"n": "core",
108+
"op": 8,
109+
"d": {
110+
"action": "subscribe",
111+
"service": "mls"
112+
}
113+
}
114+
```
115+
116+
:::
117+
118+
### 4.1. Gateway Event Opcodes
119+
120+
The following opcodes are defined by the `mls` namespace:
121+
122+
| Opcode | Name | Action | Description |
123+
| ------ | ---- | ------ | ----------- |
124+
| `TBD` | TBD | TBD | TBD |

0 commit comments

Comments
 (0)