object
  method authenticate : Auth.credentials -> string -> unit
  method close : unit -> unit
  method connect : string -> int -> unit
  method get_stream_id : unit -> string
  method pull_packet : unit -> Jabber.packet
  method write_packet : Jabber.packet -> unit
end