From 91e3de96fd83cfda68b3a842702f1a70cc06768d Mon Sep 17 00:00:00 2001 From: Clombrong Date: Fri, 30 May 2025 01:21:36 +0200 Subject: feat(portal): add default type t --- portal/lib/portal.mli | 4 +++- portal/lib/ws/portal.ml | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/portal/lib/portal.mli b/portal/lib/portal.mli index 4432e47..d752fa7 100644 --- a/portal/lib/portal.mli +++ b/portal/lib/portal.mli @@ -1,5 +1,7 @@ +type t = string Lwt_stream.t * (string option -> unit) + val stanza_open : string -> string val stanza_close : string -val connect : string -> (string Lwt_stream.t * (string option -> unit)) Lwt.t +val connect : string -> t Lwt.t diff --git a/portal/lib/ws/portal.ml b/portal/lib/ws/portal.ml index b0fe295..6e4a231 100644 --- a/portal/lib/ws/portal.ml +++ b/portal/lib/ws/portal.ml @@ -4,6 +4,8 @@ open Js_of_ocaml let jss = Js.string let sjs = Js.to_string +type t = string Lwt_stream.t * (string option -> unit) + (* sic. XEP-0156: "host-meta files MUST be fetched only over HTTPS". I don't make the rules. *) let well_known_of (domain : string) = "https://" ^ domain ^ "/.well-known/host-meta" -- cgit v1.2.3