Class: Fluent::GroongaInput::GQTPInput::Handler
- Inherits:
-
Coolio::Socket
- Object
- Coolio::Socket
- Fluent::GroongaInput::GQTPInput::Handler
- Defined in:
- lib/fluent/plugin/in_groonga.rb
Instance Method Summary collapse
-
#initialize(socket, input) ⇒ Handler
constructor
A new instance of Handler.
- #on_close ⇒ Object
- #on_connect ⇒ Object
- #on_read(data) ⇒ Object
Constructor Details
#initialize(socket, input) ⇒ Handler
Returns a new instance of Handler.
232 233 234 235 |
# File 'lib/fluent/plugin/in_groonga.rb', line 232 def initialize(socket, input) super(socket) @input = input end |
Instance Method Details
#on_close ⇒ Object
247 248 249 |
# File 'lib/fluent/plugin/in_groonga.rb', line 247 def on_close @parser.close end |
#on_connect ⇒ Object
237 238 239 240 |
# File 'lib/fluent/plugin/in_groonga.rb', line 237 def on_connect @parser = Parser.new(@input) @repeater = @input.create_repeater(self) end |
#on_read(data) ⇒ Object
242 243 244 245 |
# File 'lib/fluent/plugin/in_groonga.rb', line 242 def on_read(data) @parser << data @repeater.write(data) end |