diff options
author | Clombrong <clombrong@egregore.fun> | 2025-05-30 01:21:36 +0200 |
---|---|---|
committer | Clombrong <cromblong@egregore.fun> | 2025-05-30 01:21:36 +0200 |
commit | 91e3de96fd83cfda68b3a842702f1a70cc06768d (patch) | |
tree | 0e3327a4b10785f8b7b8b145bd9ecad0ffe139b6 | |
parent | 94ca2d0a5052edbba7a629254cf509d8f8aff6a8 (diff) |
feat(portal): add default type t
-rw-r--r-- | portal/lib/portal.mli | 4 | ||||
-rw-r--r-- | portal/lib/ws/portal.ml | 2 |
2 files changed, 5 insertions, 1 deletions
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" |