From d9d4e6c329cb3ad7c88a63b681556335adb7d7ce Mon Sep 17 00:00:00 2001 From: Clombrong Date: Wed, 25 Jun 2025 20:42:19 +0200 Subject: docs(portal_tcp): document connect --- portal/tcp/portal_tcp.ml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'portal/tcp/portal_tcp.ml') 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 = -- cgit v1.2.3