Module: Rex::Services::LocalRelay::StreamServer

Defined in:
lib/rex/services/local_relay.rb

Overview

This module is used to extend stream servers such that they can be associated with a relay context.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#relayObject

Returns the value of attribute relay.



63
64
65
# File 'lib/rex/services/local_relay.rb', line 63

def relay
  @relay
end

Instance Method Details

#on_local_connection(relay, lfd) ⇒ Object

This method is called when the stream server receives a local connection such that the remote half can be allocated. The return value of the callback should be a Stream instance.



57
58
59
60
61
# File 'lib/rex/services/local_relay.rb', line 57

def on_local_connection(relay, lfd)
  if (relay.on_local_connection_proc)
    relay.on_local_connection_proc.call(relay, lfd)
  end
end