module Arachni::Reactor::Connection::Callbacks

Callbacks to be invoked per event.

@author Tasos “Zapotek” Laskos <tasos.laskos@gmail.com>

Public Instance Methods

on_attach() click to toggle source

Called after the connection has been attached to a {#reactor}.

@abstract

# File lib/arachni/reactor/connection/callbacks.rb, line 27
def on_attach
end
on_close( reason ) click to toggle source

@note If a connection could not be established no {#socket} may be

available.

Called when the connection gets closed.

@param [Exception] reason

Reason for the close.

@abstract

# File lib/arachni/reactor/connection/callbacks.rb, line 45
def on_close( reason )
end
on_connect() click to toggle source

Called after the connection has been established.

@abstract

# File lib/arachni/reactor/connection/callbacks.rb, line 21
def on_connect
end
on_detach() click to toggle source

Called right the connection is detached from the {#reactor}.

@abstract

# File lib/arachni/reactor/connection/callbacks.rb, line 33
def on_detach
end
on_flush() click to toggle source

Called after the {#write buffered data} have all been sent to the peer.

@abstract

# File lib/arachni/reactor/connection/callbacks.rb, line 66
def on_flush
end
on_read( data ) click to toggle source

Called when data are available.

@param [String] data

Incoming data.

@abstract

# File lib/arachni/reactor/connection/callbacks.rb, line 54
def on_read( data )
end
on_write() click to toggle source

Called after each {#write} call.

@abstract

# File lib/arachni/reactor/connection/callbacks.rb, line 60
def on_write
end