aboutsummaryrefslogtreecommitdiff
path: root/lib/stream.ml
diff options
context:
space:
mode:
authorClombrong <cromblong@egregore.fun>2025-06-29 20:03:41 +0200
committerClombrong <cromblong@egregore.fun>2025-06-29 20:03:41 +0200
commit8bd3adb7886da9a60520ade5e2379c5da534dd85 (patch)
treeef56b639458c487e29a8b99cf560e6dfffc6dd4c /lib/stream.ml
parentfcd21d19f0748bcc7a0e691df1df25c9b0ecd610 (diff)
docs(stream): document negotiate
Diffstat (limited to 'lib/stream.ml')
-rw-r--r--lib/stream.ml4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/stream.ml b/lib/stream.ml
index cdd0999..bdf7987 100644
--- a/lib/stream.ml
+++ b/lib/stream.ml
@@ -56,6 +56,10 @@ let start (domain : string) (portal : Portal.t) : features Lwt.t =
let* _id = Portal.header domain portal
in Wire.get portal.stream >|= parse_features
+(** [negotiate mandatory feature portal] negotiates the feature [feature] with the XMPP
+ server at [portal].
+
+ Some features can be sent as [mandatory] or not. *)
let negotiate mandatory feature portal {starttls; sasl; _} : unit Lwt.t =
(* authenticate using SASL with the XMPP server. *)
let authenticate mechanisms =