diff options
author | Clombrong <cromblong@egregore.fun> | 2025-06-25 14:19:39 +0200 |
---|---|---|
committer | Clombrong <cromblong@egregore.fun> | 2025-06-25 14:19:39 +0200 |
commit | 8265439154737933d7103a7c2f0a871b475876af (patch) | |
tree | 90ee754e4bf2b95eb32d669423b6c360d98501ab | |
parent | 08d7c8435d487e85e37e8d7264572f4cc20b4c61 (diff) |
feat(portal_tcp): add connect function
-rw-r--r-- | portal/tcp/portal_tcp.ml | 3 | ||||
-rw-r--r-- | test/native/native_hello.ml | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/portal/tcp/portal_tcp.ml b/portal/tcp/portal_tcp.ml index 37a3065..cfe35dd 100644 --- a/portal/tcp/portal_tcp.ml +++ b/portal/tcp/portal_tcp.ml @@ -3,3 +3,6 @@ let xmpp_port (_domain : string) : int = 5222 Currently, it falls back to 5222 (always), but should use SRV records in the near future. *) + +let connect (domain : string) = + xmpp_port domain |> string_of_int |> print_endline diff --git a/test/native/native_hello.ml b/test/native/native_hello.ml index e30c7a5..308857f 100644 --- a/test/native/native_hello.ml +++ b/test/native/native_hello.ml @@ -4,5 +4,4 @@ let () = let jid = Sys.getenv "FLESH_JID" and _password = Sys.getenv "FLESH_PASSWORD" in let domain = (List.nth (String.split_on_char '@' jid) 1) - in let port = xmpp_port domain - in print_endline (string_of_int port) + in connect domain |