diff options
author | Clombrong <cromblong@egregore.fun> | 2025-06-27 10:00:39 +0200 |
---|---|---|
committer | Clombrong <cromblong@egregore.fun> | 2025-06-27 10:00:39 +0200 |
commit | 3a1fb81fdb94405c52ef5a78104eabdd8dafce04 (patch) | |
tree | 58c2f5cd92b176c6f5e1d8b2e6d300bae826525f | |
parent | 7dc03676059c35eaf005732d35a1db3f3a3cee1f (diff) |
docs(portal): document Portal.t
-rw-r--r-- | portal/portal.mli | 6 | ||||
-rw-r--r-- | portal/ws/portal.ml | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/portal/portal.mli b/portal/portal.mli index a9810cd..2f52547 100644 --- a/portal/portal.mli +++ b/portal/portal.mli @@ -4,6 +4,12 @@ exception MalformedStanza of location * Error.t type socket +(** The type of portals communicating with an XMPP server via [_socket]. + + [stream] is the data sent by the XMPP server. + + [push None] disconnects brutally the underlying XMPP server and closes [_socket], + without closing the element stream first. *) type t = { stream : (signal, async) stream; push : (signal, sync) stream option -> unit; diff --git a/portal/ws/portal.ml b/portal/ws/portal.ml index 233ea8d..b313471 100644 --- a/portal/ws/portal.ml +++ b/portal/ws/portal.ml @@ -96,8 +96,6 @@ let ws_endpoint (domain : string) : string Lwt.t = Valid XMPP WebSocket subprotocol frames must be sent to the stream, because it directly exposes the websocket under. - Pushing [None] closes the websocket. - If the websocket is closed server-side, the stream closes. *) let ws_stream (url : string) = let open Lwt_stream in |