From 7a1b6a1d14b549de17c4f98b3a4ed80027f1fcac Mon Sep 17 00:00:00 2001 From: Clombrong Date: Tue, 17 Jun 2025 23:40:39 +0200 Subject: feat(portal-websockets): return a stream of signals with stanza_close --- portal/lib/portal.mli | 2 +- portal/lib/ws/portal.ml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/portal/lib/portal.mli b/portal/lib/portal.mli index 7f9dc0d..7b8a30a 100644 --- a/portal/lib/portal.mli +++ b/portal/lib/portal.mli @@ -4,6 +4,6 @@ type t = string Lwt_stream.t * (string option -> unit) val stanza_open : ?from:string -> string -> (signal, sync) stream -val stanza_close : string +val stanza_close : (signal, sync) stream val connect : string -> t Lwt.t diff --git a/portal/lib/ws/portal.ml b/portal/lib/ws/portal.ml index 7b79166..06f952f 100644 --- a/portal/lib/ws/portal.ml +++ b/portal/lib/ws/portal.ml @@ -30,7 +30,7 @@ let stanza_open ?from domain : (signal, sync) stream = `End_element] in stanza |> of_list -let stanza_close = {||} +let stanza_close = string {||} |> parse_xml |> signals exception MalformedStanza of Markup.location * Markup.Error.t -- cgit v1.2.3