Class AMQ::Client::Async::CoolioClient
In: lib/amq/client/async/adapters/coolio.rb
Parent: Object

CoolioClient is a drop-in replacement for EventMachineClient, if you prefer cool.io style.

Methods

Included Modules

AMQ::Client::Async::Adapter

Classes and Modules

Class AMQ::Client::Async::CoolioClient::Socket

External Aliases

disconnect -> close

Attributes

callbacks  [RW]  Hash with available callbacks
socket  [RW]  Cool.io socket for multiplexing et al.

@private

Public Class methods

Performs basic initialization. Do not use this method directly, use CoolioClient.connect instead

@see AMQ::Client::Adapter::ClassMethods#connect @api private

Returns class used for tcp connection failures.

@api private

Public Instance methods

Closes the socket.

@api private

Called by AMQ::Client::Connection after we receive connection.open-ok.

@api private

Called by AMQ::Client::Connection after we receive connection.close-ok.

@api private

Creates a socket and attaches it to cool.io default loop.

Called from CoolioClient.connect

@see AMQ::Client::Adapter::ClassMethods#connect @param [Hash] connection settings @api private

Sets a callback for disconnection (as in client-side disconnection)

@api public

on_connection(&block)

Alias for on_open

on_disconnection(&block)

Alias for on_closed

Sets a callback for successful connection (after we receive open-ok)

@api public

Sets a callback for tcp connection failure (as in can‘t make initial connection)

The story about the buffering is kinda similar to EventMachine, you keep receiving more than one frame in a single packet.

@param [String] chunk with binary data received. It could be one frame,

  more than one frame or less than one frame.

@api private

Registers on_open callback @see on_open @api private

Sends raw data through the socket

@param [String] binary data @api private

Called when socket is connected but before handshake is done

@api private

Called after socket is closed

@api private

Protected Instance methods

@api private

@api private

[Validate]