class type session = object end
The type of a Jabber session object.
method connect : string -> int -> unit
s#connect server port
establishes an XML stream with the specified server on the specified port.
RaisesUnix.Unix_error
if a connection error occurs
Protocol_error
if there was some problem with the server's XML stream.
method get_stream_id : unit -> string
Retrieves the stream ID set by the server after a successful connect
, which may be needed to build credentials for authenticate
.
method authenticate : Auth.credentials -> string -> unit
Authenticates with the server using the specified credentials and resource.
Raises Auth_error
if the server rejects the credentials or resource.
method pull_packet : unit -> Jabber.packet
Waits for the next packet from the server.
RaisesXmlstream.Stream_end
if the server ends the stream.
Xmlstream.Stream_error
if the server sends a stream error.
method write_packet : Jabber.packet -> unit
Writes a packet to the server.
method close : unit -> unit
Closes the session.