Module type Client.TRANSPORT

A XMPP transport provides following functionalities:

This level of abstraction allows the core XMPP client logic to be used over a TCP socket on Unix and WebSockets on the web (using `js_of_ocaml`).

Connection

type options

Additional options that may be passed to the transport

type t

Type of an instantiated connection to an XMPP server

val connect : host:string -> options -> t Lwt.t
val close : t -> unit Lwt.t
val closed : t -> unit Lwt.t

XML Stream

type stream
val open_stream : t -> to':string -> stream Lwt.t
val stream_id : stream -> string Lwt.t
val send_xml : stream -> Xmlc.Tree.t -> unit Lwt.t
val signals : stream -> Xmlm.signal Lwt_stream.t
val stop_stream : stream -> unit Lwt.t