Amqp_client_async.Connectionval connect :
id:string ->
?virtual_host:string ->
?port:int ->
?credentials:(string * string) ->
?heartbeat:int ->
string ->
t Thread.Deferred.tConnect to an Amqp server.
connect ~id:"test" localhost connects to localhost using default guest credentials, with identity "test"
val connect_uri : id:string -> string -> t Thread.Deferred.tConnect to amqp using an uri.
connect_uri ~id:"test" "amqp://localhost/" connects to amqp server on localhost using default port and default username/password.
The uri must be on the form: ampq://user:password@hostname:port/vhost?params. Currently only 'heartbeat_interval=<sec>' parameter is used.
val open_channel :
id:string ->
'a Channel.confirms ->
t ->
'a Channel.t Thread.Deferred.tOpen a new channel.
val close : t -> unit Thread.Deferred.tval on_closed : t -> unit Thread.Deferred.ton_closed becomes ready when the connection has been closed.