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


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

def other_stream
  @other_stream
end

#relayObject

Returns the value of attribute relay


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

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.


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

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