Class: Rex::Services::LocalRelay::ReverseRelay
- Defined in:
- lib/rex/services/local_relay.rb
Overview
This class acts as an instance of a local relay handling a reverse connection
Instance Attribute Summary collapse
-
#channel ⇒ Object
Returns the value of attribute channel.
Attributes inherited from Relay
#listener, #name, #on_conn_close_proc, #on_local_connection_proc, #on_other_data_proc, #opts
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize(name, channel, opts = {}) ⇒ ReverseRelay
constructor
A new instance of ReverseRelay.
- #shutdown ⇒ Object
Constructor Details
#initialize(name, channel, opts = {}) ⇒ ReverseRelay
Returns a new instance of ReverseRelay.
115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
# File 'lib/rex/services/local_relay.rb', line 115 def initialize(name, channel, opts = {}) self.name = name self.listener = nil self.opts = opts self.on_local_connection_proc = opts['OnLocalConnection'] self.on_conn_close_proc = opts['OnConnectionClose'] self.on_other_data_proc = opts['OnOtherData'] self.channel = channel if !$dispatcher['rex'] register_log_source('rex', $dispatcher['core'], get_log_level('core')) end end |
Instance Attribute Details
#channel ⇒ Object
Returns the value of attribute channel.
139 140 141 |
# File 'lib/rex/services/local_relay.rb', line 139 def channel @channel end |
Instance Method Details
#close ⇒ Object
134 135 136 137 |
# File 'lib/rex/services/local_relay.rb', line 134 def close self.channel.close if self.channel self.channel = nil end |
#shutdown ⇒ Object
130 131 132 |
# File 'lib/rex/services/local_relay.rb', line 130 def shutdown # don't need to do anything here, it's only "close" we care about end |