Module: Arachni::Reactor::Connection::Callbacks
- Included in:
- Arachni::Reactor::Connection
- Defined in:
- lib/arachni/reactor/connection/callbacks.rb
Overview
Callbacks to be invoked per event.
Instance Method Summary collapse
-
#on_attach ⇒ Object
abstract
Called after the connection has been attached to a #reactor.
-
#on_close(reason) ⇒ Object
abstract
Called when the connection gets closed.
-
#on_connect ⇒ Object
abstract
Called after the connection has been established.
-
#on_detach ⇒ Object
abstract
Called right the connection is detached from the #reactor.
-
#on_flush ⇒ Object
abstract
Called after the buffered data have all been sent to the peer.
-
#on_read(data) ⇒ Object
abstract
Called when data are available.
-
#on_write ⇒ Object
abstract
Called after each #write call.
Instance Method Details
#on_attach ⇒ Object
Called after the connection has been attached to a Arachni::Reactor::Connection#reactor.
27 28 |
# File 'lib/arachni/reactor/connection/callbacks.rb', line 27 def on_attach end |
#on_close(reason) ⇒ Object
If a connection could not be established no Arachni::Reactor::Connection#socket may be available.
Called when the connection gets closed.
45 46 |
# File 'lib/arachni/reactor/connection/callbacks.rb', line 45 def on_close( reason ) end |
#on_connect ⇒ Object
Called after the connection has been established.
21 22 |
# File 'lib/arachni/reactor/connection/callbacks.rb', line 21 def on_connect end |
#on_detach ⇒ Object
Called right the connection is detached from the Arachni::Reactor::Connection#reactor.
33 34 |
# File 'lib/arachni/reactor/connection/callbacks.rb', line 33 def on_detach end |
#on_flush ⇒ Object
Called after the buffered data have all been sent to the peer.
66 67 |
# File 'lib/arachni/reactor/connection/callbacks.rb', line 66 def on_flush end |
#on_read(data) ⇒ Object
Called when data are available.
54 55 |
# File 'lib/arachni/reactor/connection/callbacks.rb', line 54 def on_read( data ) end |
#on_write ⇒ Object
Called after each Arachni::Reactor::Connection#write call.
60 61 |
# File 'lib/arachni/reactor/connection/callbacks.rb', line 60 def on_write end |