lib/firehose/rack/consumer/web_socket.rb
# Manages messages sent from the connect client to the server. This is mostly
# used to handle heart-beats that are designed to prevent the WebSocket connection
# from timing out from inactivity.
Manages messages sent from the connect client to the server. This is mostly
used to handle heart-beats that are designed to prevent the WebSocket connection
from timing out from inactivity.
Manages messages sent from the connect client to the server . This is mostly used to handle heart - beats that are designed to prevent the WebSocket connection from timing out from inactivity .
def message(event)
            msg = parse_message(event)
            seq = last_message_sequence(msg)
            if msg[:ping] == 'PING'
              Firehose.logger.debug "WS ping received, sending pong"
              send_message pong: "PONG"
            elsif !@subscribed && seq.kind_of?(Integer)
              Firehose.logger.debug "Subscribing at message_sequence #{seq}"
              subscribe seq, @req.params
            end
          end
def message ( event ) msg = parse_message ( event ) seq = last_message_sequence ( msg ) if msg [ :ping ] == 'PING' Firehose . logger . debug "WS ping received, sending pong" send_message pong : "PONG" elsif ! @subscribed && seq . kind_of? ( Integer ) Firehose . logger . debug "Subscribing at message_sequence #{seq}" subscribe seq , @req . params end end
Manages messages sent from the connect client to the server.
Manages messages sent from the connect client to the server .
event
<not_specific>