Class: FluQ::Input::Socket::Connection
- Inherits:
-
EventMachine::Connection
- Object
- EventMachine::Connection
- FluQ::Input::Socket::Connection
- Includes:
- Mixins::Loggable
- Defined in:
- lib/fluq/input/socket/connection.rb
Instance Method Summary collapse
-
#initialize(parent) ⇒ Connection
constructor
Constructor.
-
#post_init ⇒ Object
Callback.
-
#receive_data(data) ⇒ Object
Callback.
-
#unbind ⇒ Object
Callback.
Methods included from Mixins::Loggable
Constructor Details
#initialize(parent) ⇒ Connection
Constructor
6 7 8 9 |
# File 'lib/fluq/input/socket/connection.rb', line 6 def initialize(parent) super() @parent = parent end |
Instance Method Details
#post_init ⇒ Object
Callback
12 13 14 |
# File 'lib/fluq/input/socket/connection.rb', line 12 def post_init self.comm_inactivity_timeout = 60 end |
#receive_data(data) ⇒ Object
Callback
17 18 19 20 21 22 |
# File 'lib/fluq/input/socket/connection.rb', line 17 def receive_data(data) buffer.write(data) flush! if buffer.full? rescue => ex logger.crash "#{self.class.name} failure: #{ex.} (#{ex.class.name})", ex end |
#unbind ⇒ Object
Callback
25 26 27 |
# File 'lib/fluq/input/socket/connection.rb', line 25 def unbind flush! end |