class
AMQP::Client::Connection
- AMQP::Client::Connection
- Reference
- Object
Defined in:
amqp-client/connection.cramqp-client/errors.cr
Class Method Summary
-
.start(io : UNIXSocket | TCPSocket | OpenSSL::SSL::Socket::Client | WebSocketIO, user, password, vhost, channel_max, frame_max, heartbeat, connection_information, name = File.basename(PROGRAM_NAME))
Connection negotiation
Instance Method Summary
- #blocked? : Bool
-
#channel(id : Int | Nil = nil)
Opens a channel
- #channel(& : Channel -> _)
- #channel_max : UInt16
-
#close(reason = "", no_wait = false)
Close the connection the server.
- #closed? : Bool
- #closing_frame : Frame::Connection::Close | Nil
- #frame_max : UInt32
-
#on_blocked(&blk : String -> )
Callback called when server is blocked, first argument is the reason from the server
-
#on_close(&blk : UInt16, String -> )
Callback called when the server closes the
Connectiongracefully via an AMQPConnection.Closemethod frame. -
#on_disconnect(&blk : Exception -> )
Callback called when the
Connectionis lost at the network layer — i.e. -
#on_unblocked(&blk : -> )
Callback for when the server is unblocked again
- #update_secret(secret : String, reason : String) : Nil
Class Method Detail
Connection negotiation
Instance Method Detail
Close the connection the server.
The reason might be logged by the server
Callback called when server is blocked, first argument is the reason from the server
Callback called when the server closes the Connection
gracefully via an AMQP Connection.Close method frame.
Callback called when the Connection is lost at the network
layer — i.e. the read loop encountered IO::Error or OpenSSL::Error
without a preceding AMQP Connection.Close frame.