diff options
author | Clombrong <clombrong@egregore.fun> | 2025-05-08 21:16:43 +0200 |
---|---|---|
committer | Clombrong <cromblong@egregore.fun> | 2025-05-08 21:16:43 +0200 |
commit | 18c45a66888c4cefad677e2f9545fd5ee46d2acb (patch) | |
tree | 63d33f82c02a2f7540728fac5058e6d95981006f | |
parent | 7a5da788b661ea9efeb92d060b2bb8f4923a7e0d (diff) |
docs: redo ws_stream
-rw-r--r-- | portal/lib/portal_ws.ml | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/portal/lib/portal_ws.ml b/portal/lib/portal_ws.ml index 0b21f4b..b808733 100644 --- a/portal/lib/portal_ws.ml +++ b/portal/lib/portal_ws.ml @@ -49,8 +49,11 @@ let ws_endpoint (domain : string) = | None -> failwith (domain ^ "doesn't advertise a WebSocket endpoint via Web-host Metadata.") let ws_stream (url : string) = - (** [ws_stream url] returns an Lwt stream (and its push function) communicating with the websocket located at [url] - using the XMPP protocol. + (** [ws_stream url] returns a framed Lwt stream (and its push function) communicating with the websocket located at + [url] using the XMPP protocol.Lwt + + Valid XMPP WebSocket subprotocol frames must be sent to the stream, because it directly exposes the websocket + under. Pushing [None] closes the websocket. |