aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClombrong <cromblong@egregore.fun>2025-08-15 00:21:36 +0200
committerClombrong <cromblong@egregore.fun>2025-08-15 00:21:36 +0200
commit137169b69587e843c525fd1099033f77a18c1290 (patch)
treefaca2beddeea320c8884d5b766bd9adf040d3d99
parent8d6b3cba4fa9538c42d3126aa02962b0cd7371ca (diff)
feat(session): new function connectHEADv0.1.1master
-rw-r--r--lib/session.ml3
-rw-r--r--test/hello.ml2
2 files changed, 4 insertions, 1 deletions
diff --git a/lib/session.ml b/lib/session.ml
index 7a69d37..cb44653 100644
--- a/lib/session.ml
+++ b/lib/session.ml
@@ -61,3 +61,6 @@ let create (config : config) : t Lwt.t =
| _ -> Lwt.return_unit)
state >|= S.keep;
in { state; update }
+
+let connect (session : t) (domain : Portal.domain) : unit =
+ session.update (Connecting domain)
diff --git a/test/hello.ml b/test/hello.ml
index cd4f5bb..3504af4 100644
--- a/test/hello.ml
+++ b/test/hello.ml
@@ -22,7 +22,7 @@ let main =
Lwt.wakeup wakener ()
| _ -> ())
state |> S.keep;
- update (Connecting config.sasl.jid.domainpart);
+ connect { state; update } config.sasl.jid.domainpart;
waiter
with exn ->
begin