Class: Fluent::Counter::Handler
- Inherits:
-
BaseSocket
- Object
- Coolio::TCPSocket
- BaseSocket
- Fluent::Counter::Handler
- Defined in:
- lib/fluent/counter/server.rb
Instance Method Summary collapse
-
#initialize(io, on_message) ⇒ Handler
constructor
A new instance of Handler.
- #on_message(data) ⇒ Object
Methods inherited from BaseSocket
Constructor Details
#initialize(io, on_message) ⇒ Handler
Returns a new instance of Handler.
262 263 264 265 |
# File 'lib/fluent/counter/server.rb', line 262 def initialize(io, ) super(io) @on_message = end |
Instance Method Details
#on_message(data) ⇒ Object
267 268 269 270 |
# File 'lib/fluent/counter/server.rb', line 267 def (data) res = @on_message.call(data) packed_write res if res end |