class AMQP::Client::Connection

Defined in:

amqp-client/connection.cr
amqp-client/errors.cr

Class Method Summary

Instance Method Summary

Class Method Detail

def self.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


[View source]

Instance Method Detail

def blocked? : Bool #

[View source]
def channel(id : Int | Nil = nil) #

Opens a channel


[View source]
def channel(& : Channel -> _) #

[View source]
def channel_max : UInt16 #

[View source]
def close(reason = "", no_wait = false) #

Close the connection the server.

The reason might be logged by the server


[View source]
def closed? : Bool #

[View source]
def closing_frame : Frame::Connection::Close | Nil #

[View source]
def frame_max : UInt32 #

[View source]
def on_blocked(&blk : String -> ) #

Callback called when server is blocked, first argument is the reason from the server


[View source]
def on_close(&blk : UInt16, String -> ) #

Callback that's called if the Connection is closed by the server


[View source]
def on_unblocked(&blk : -> ) #

Callback for when the server is unblocked again


[View source]
def update_secret(secret : String, reason : String) : Nil #

[View source]