aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--portal/tcp/portal_tcp.ml7
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 =