Module: Rex::IO::StreamAbstraction

Includes:
SocketAbstraction
Defined in:
lib/rex/io/stream_abstraction.rb

Overview

This class provides an abstraction to a stream based connection through the use of a streaming socketpair.

Instance Attribute Summary

Attributes included from SocketAbstraction

#lsock, #rsock

Instance Method Summary collapse

Methods included from SocketAbstraction

#cleanup_abstraction, #close, #localinfo, #peerinfo, #shutdown, #sysread, #syswrite

Instance Method Details

#initialize_abstractionObject

This method creates a streaming socket pair and initializes it.



20
21
22
23
24
25
26
27
# File 'lib/rex/io/stream_abstraction.rb', line 20

def initialize_abstraction
  self.lsock, self.rsock = Rex::Socket.tcp_socket_pair()
  self.lsock.extend(Rex::IO::Stream)
  self.lsock.extend(Ext)
  self.rsock.extend(Rex::IO::Stream)

  self.monitor_rsock("StreamMonitorRemote")
end