lib/sensu/client/socket.rb
def receive_data(data)
        unless @mode == MODE_REJECT
          case @protocol
          when :udp
            process_data(data)
          when :tcp
            if EM::reactor_running?
              reset_watchdog
            end
            @data_buffer << data
            process_data(@data_buffer)
          end
        end
      end
# This method is called whenever data is received. For UDP, it
# will only be called once, the original data length can be
# expected. For TCP, this method may be called several times, data
# received is buffered. TCP connections require a +watchdog+.
#
# @param [String] data received from the sender.
This method is called whenever data is received. For UDP, it
will only be called once, the original data length can be
expected. For TCP, this method may be called several times, data
received is buffered. TCP connections require a +watchdog+.
This method is called whenever data is received . For UDP it will only be called once the original data length can be expected . For TCP this method may be called several times data received is buffered . TCP connections require a + watchdog + .
def receive_data(data)
        unless @mode == MODE_REJECT
          case @protocol
          when :udp
            process_data(data)
          when :tcp
            if EM::reactor_running?
              reset_watchdog
            end
            @data_buffer << data
            process_data(@data_buffer)
          end
        end
      end
def receive_data ( data ) unless @mode == MODE_REJECT case @protocol when :udp process_data ( data ) when :tcp if EM :: reactor_running? reset_watchdog end @data_buffer << data process_data ( @data_buffer ) end end end
This method is called whenever data is received.
This method is called whenever data is received .
data
data received from the sender.
data received from the sender .