diff options
author | Clombrong <cromblong@egregore.fun> | 2025-06-28 13:34:22 +0200 |
---|---|---|
committer | Clombrong <cromblong@egregore.fun> | 2025-06-28 16:44:54 +0200 |
commit | 9aeae3482c3de81b3bd13ca0e52f344b51fa7799 (patch) | |
tree | d67ae8bd3ffa4eaa93866800d6644af37d7d466a /lib | |
parent | 1f7e45684ab4b3858937d5d5b7b3b883c37f5603 (diff) |
docs(stream): improve doc of negotiate
Diffstat (limited to 'lib')
-rw-r--r-- | lib/stream.ml | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/stream.ml b/lib/stream.ml index 2c6bf37..e6a46b8 100644 --- a/lib/stream.ml +++ b/lib/stream.ml @@ -35,12 +35,16 @@ let parse_features (el : Xml.element) : features = {mechanisms=[]; starttls=`None; unknown=[]} (List.filter_map find_left el.children) -(** [negotiate domain stream] is a promise containing the features supported by the - XMPP server communicating with [stream]. +(** [negotiate domain portal auth] is a promise containing the features supported by the + XMPP server [portal], after eventual STARTTLS negotiation and authentication using + the auth config [auth]. This function should be called every time a stream needs to be reopened and stream negotiation takes place. + When the XMPP server advertises optional STARTTLS support, whether the connection + will be upgraded to STARTTLS depends on [prefer_starttls]. + Basically, it conforms to {{: https://datatracker.ietf.org/doc/html/rfc6120#section-4.3 }}. *) let negotiate |