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.
116 117 118 119 120 121 122 123 124 125 126 127 128 129 |
# File 'lib/rex/services/local_relay.rb', line 116 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
140 141 142 |
# File 'lib/rex/services/local_relay.rb', line 140 def channel @channel end |
Instance Method Details
#close ⇒ Object
135 136 137 138 |
# File 'lib/rex/services/local_relay.rb', line 135 def close self.channel.close if self.channel self.channel = nil end |
#shutdown ⇒ Object
131 132 133 |
# File 'lib/rex/services/local_relay.rb', line 131 def shutdown # don't need to do anything here, it's only "close" we care about end |