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.

Author:

Instance Method Summary collapse

Instance Method Details

#on_attachObject

This method is abstract.

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

This method is abstract.
Note:

If a connection could not be established no Arachni::Reactor::Connection#socket may be available.

Called when the connection gets closed.

Parameters:

  • reason (Exception)

    Reason for the close.



45
46
# File 'lib/arachni/reactor/connection/callbacks.rb', line 45

def on_close( reason )
end

#on_connectObject

This method is abstract.

Called after the connection has been established.



21
22
# File 'lib/arachni/reactor/connection/callbacks.rb', line 21

def on_connect
end

#on_detachObject

This method is abstract.

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_flushObject

This method is abstract.

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

This method is abstract.

Called when data are available.

Parameters:

  • data (String)

    Incoming data.



54
55
# File 'lib/arachni/reactor/connection/callbacks.rb', line 54

def on_read( data )
end

#on_writeObject

This method is abstract.

Called after each Arachni::Reactor::Connection#write call.



60
61
# File 'lib/arachni/reactor/connection/callbacks.rb', line 60

def on_write
end