diff options
Diffstat (limited to 'portal/portal.mli')
-rw-r--r-- | portal/portal.mli | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/portal/portal.mli b/portal/portal.mli index ed8765d..10b6bc3 100644 --- a/portal/portal.mli +++ b/portal/portal.mli @@ -4,6 +4,12 @@ exception MalformedStanza of Error.t type socket +(** Opaque domain name type. *) +type domain + +val domain_of_string : string -> domain +val domain_to_string : domain -> string + (** The type of portals communicating with an XMPP server via [_socket]. [stream] is the data sent by the XMPP server. @@ -23,7 +29,7 @@ type t = { val xmlns : string (** [connect domain] returns a Portal connected to the XMPP server [domain]. *) -val connect : string -> t Lwt.t +val connect : domain -> t Lwt.t (** [starttls portal] mutates [portal] into a TLS-encrypted stream with the same state. @@ -37,7 +43,7 @@ val starttls : t -> unit Lwt.t the response stream header. When [from] is specified, a from attribute is included. *) -val header : ?from:string -> string -> t -> string Lwt.t +val header : ?from:string -> domain -> t -> string Lwt.t (** [_encrypted socket] returns whether [socket] is encrypted, using TLS or otherwise. *) val _encrypted : socket -> bool |