Module: Rex::Services::LocalRelay::Stream

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

Overview

This module is used to extend streams such that they can be associated with a relay context and the other side of the stream.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#other_streamObject

Returns the value of attribute other_stream.



40
41
42
# File 'lib/rex/services/local_relay.rb', line 40

def other_stream
  @other_stream
end

#relayObject

Returns the value of attribute relay.



39
40
41
# File 'lib/rex/services/local_relay.rb', line 39

def relay
  @relay
end

Instance Method Details

#on_other_data(data) ⇒ Object

This method is called when the other side has data that has been read in.



31
32
33
34
35
36
37
# File 'lib/rex/services/local_relay.rb', line 31

def on_other_data(data)
  if relay.on_other_data_proc
    relay.on_other_data_proc.call(relay, self, data)
  else
    put(data)
  end
end