Class: Ably::Realtime::Client::OutgoingMessageDispatcher

Inherits:
Object
  • Object
show all
Includes:
Modules::EventMachineHelpers
Defined in:
lib/ably/realtime/client/outgoing_message_dispatcher.rb

Overview

OutgoingMessageDispatcher is a (private) class that is used to deliver outgoing Models::ProtocolMessages using the Ably::Realtime::Connection when the connection state is capable of delivering messages

Constant Summary collapse

ACTION =
Ably::Models::ProtocolMessage::ACTION

Instance Method Summary collapse

Constructor Details

#initialize(client, connection) ⇒ OutgoingMessageDispatcher

Returns a new instance of OutgoingMessageDispatcher.



11
12
13
14
15
16
17
# File 'lib/ably/realtime/client/outgoing_message_dispatcher.rb', line 11

def initialize(client, connection)
  @client     = client
  @connection = connection

  subscribe_to_outgoing_protocol_message_queue
  setup_event_handlers
end