diff options
author | Clombrong <cromblong@egregore.fun> | 2025-06-25 20:42:19 +0200 |
---|---|---|
committer | Clombrong <cromblong@egregore.fun> | 2025-06-25 20:42:19 +0200 |
commit | d9d4e6c329cb3ad7c88a63b681556335adb7d7ce (patch) | |
tree | 9c25f1aa4db419455c560f45b19d72081dfbc84c /portal/tcp | |
parent | f94341042783ed94ded2148e6ee98ec2a8997974 (diff) |
docs(portal_tcp): document connect
Diffstat (limited to 'portal/tcp')
-rw-r--r-- | portal/tcp/portal_tcp.ml | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/portal/tcp/portal_tcp.ml b/portal/tcp/portal_tcp.ml index 451d303..e7d6455 100644 --- a/portal/tcp/portal_tcp.ml +++ b/portal/tcp/portal_tcp.ml @@ -32,6 +32,13 @@ let tcp_stream (domain : string) : (string Lwt_stream.t * file_descr) Lwt.t = | len -> Lwt.return_some (Bytes.sub_string buffer 0 len)) in (stream, sock) +(** [connect domain] is a Portal.t communicating with the XMPP server located at + [domain] via plaintext TCP. + + This function is a comparatively simple wrapper around the original TCP stream, + simply converting to/from Markup.ml signals. + + TODO: right now it's possible to get parts of unfinished stanzas... *) let connect (domain : string) : t Lwt.t = let+ tcp_stream, tcp_socket = tcp_stream domain in let push msg = |