Class: Fluent::Counter::BaseSocket

Inherits:
Coolio::TCPSocket
  • Object
show all
Defined in:
lib/fluent/counter/base_socket.rb

Direct Known Subclasses

Connection, Handler

Instance Method Summary collapse

Instance Method Details

#on_message(data) ⇒ Object

Raises:

  • (NotImplementedError)


33
34
35
# File 'lib/fluent/counter/base_socket.rb', line 33

def on_message(data)
  raise NotImplementedError
end

#on_read(data) ⇒ Object



27
28
29
30
31
# 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) ⇒ Object



23
24
25
# File 'lib/fluent/counter/base_socket.rb', line 23

def packed_write(data)
  write pack(data)
end