Class: NFAgent::Event
- Defined in:
- lib/nfagent/event.rb
Instance Method Summary collapse
- #associate_callback_target(sig) ⇒ Object
-
#initialize(chunk_handler, poller) ⇒ Event
constructor
A new instance of Event.
- #post_init ⇒ Object
- #receive_data(data) ⇒ Object
- #unbind ⇒ Object
Constructor Details
#initialize(chunk_handler, poller) ⇒ Event
Returns a new instance of Event.
3 4 5 6 |
# File 'lib/nfagent/event.rb', line 3 def initialize(chunk_handler, poller) @handler = chunk_handler @poller = poller end |
Instance Method Details
#associate_callback_target(sig) ⇒ Object
23 24 25 |
# File 'lib/nfagent/event.rb', line 23 def associate_callback_target(sig) # Take no action end |
#post_init ⇒ Object
8 9 10 |
# File 'lib/nfagent/event.rb', line 8 def post_init Log.info "Client Connected" end |
#receive_data(data) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/nfagent/event.rb', line 12 def receive_data(data) if data && data.length > 10 @handler.append(data) end #send_data('OK') end |