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.



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

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.



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

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