diff options
author | Clombrong <cromblong@egregore.fun> | 2025-06-26 10:11:02 +0200 |
---|---|---|
committer | Clombrong <cromblong@egregore.fun> | 2025-06-26 10:11:02 +0200 |
commit | b460769b3607d8c88679ee9d1d4b95be8ef1242d (patch) | |
tree | 6d0e689754cf6e4c3aeabed32679cf7b5a11dbf1 /lib/stream.ml | |
parent | 439711054759b19fdd814e103599e96c92991a69 (diff) |
feat(stream): use new Portal stream negotiation interface
Diffstat (limited to 'lib/stream.ml')
-rw-r--r-- | lib/stream.ml | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/stream.ml b/lib/stream.ml index 21c134d..ea64f0a 100644 --- a/lib/stream.ml +++ b/lib/stream.ml @@ -43,12 +43,9 @@ let get (stream : (signal, async) stream) : Xml.element Lwt.t = let start domain : Portal.t Lwt.t = let* stream, _push = Portal.connect domain in let push = function - | None -> _push (Some Portal.stanza_close); - _push None; + | None -> Portal.close (stream, _push); | anything -> _push anything - in Some (Portal.stanza_open domain) |> push; - (* TODO: check this is a good stanza *) - let+ _ = get stream + in let+ _id = Portal.negotiate domain (stream, _push) in stream, push (** [parse_features el] is a [stream_features] record with all the features of the |