Class: BetterCap::Proxy::TCP::Event

Inherits:
Object
  • Object
show all
Defined in:
lib/bettercap/proxy/tcp/proxy.rb

Overview

Class used to encapsulate ( and keep references ) of a single TCP event-. stackoverflow.com/questions/161510/pass-parameter-by-reference-in-ruby

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ip, port, data = nil) ⇒ Event

Returns a new instance of Event.



28
29
30
31
32
# File 'lib/bettercap/proxy/tcp/proxy.rb', line 28

def initialize( ip, port, data = nil )
  @ip   = ip
  @port = port
  @data = data
end

Instance Attribute Details

#dataObject

Reference to the buffer being transmitted.



26
27
28
# File 'lib/bettercap/proxy/tcp/proxy.rb', line 26

def data
  @data
end

#ipObject

The source IP address of this event.



22
23
24
# File 'lib/bettercap/proxy/tcp/proxy.rb', line 22

def ip
  @ip
end

#portObject

Source port.



24
25
26
# File 'lib/bettercap/proxy/tcp/proxy.rb', line 24

def port
  @port
end