class Fluent::Counter::BaseSocket

Public Instance Methods

on_message(data) click to toggle source
# File lib/fluent/counter/base_socket.rb, line 33
def on_message(data)
  raise NotImplementedError
end
on_read(data) click to toggle source
# File lib/fluent/counter/base_socket.rb, line 27
def on_read(data)
  Fluent::MessagePackFactory.msgpack_unpacker.feed_each(data) do |d|
    on_message d
  end
end
packed_write(data) click to toggle source
# File lib/fluent/counter/base_socket.rb, line 23
def packed_write(data)
  write pack(data)
end

Private Instance Methods

pack(data) click to toggle source
# File lib/fluent/counter/base_socket.rb, line 39
def pack(data)
  Fluent::MessagePackFactory.msgpack_packer.pack(data)
end