Method: Ably::Realtime::Connection#send_protocol_message

Defined in:
lib/ably/realtime/connection.rb

#send_protocol_message(protocol_message) ⇒ void

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

This method returns an undefined value.

Add protocol message to the outgoing message queue and notify the dispatcher that a message is ready to be sent

Parameters:



392
393
394
395
396
397
398
399
400
# File 'lib/ably/realtime/connection.rb', line 392

def send_protocol_message(protocol_message)
  add_message_serial_if_ack_required_to(protocol_message) do
    Ably::Models::ProtocolMessage.new(protocol_message, logger: logger).tap do |message|
      add_message_to_outgoing_queue message
      notify_message_dispatcher_of_new_message message
      logger.debug { "Connection: Prot msg queued =>: #{message.action} #{message}" }
    end
  end
end