Class: BetterCap::Proxy::TCP::Event
- Inherits:
-
Object
- Object
- BetterCap::Proxy::TCP::Event
- 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
-
#data ⇒ Object
Reference to the buffer being transmitted.
-
#ip ⇒ Object
The source IP address of this event.
-
#port ⇒ Object
Source port.
Instance Method Summary collapse
-
#initialize(ip, port, data = nil) ⇒ Event
constructor
A new instance of Event.
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
#data ⇒ Object
Reference to the buffer being transmitted.
26 27 28 |
# File 'lib/bettercap/proxy/tcp/proxy.rb', line 26 def data @data end |
#ip ⇒ Object
The source IP address of this event.
22 23 24 |
# File 'lib/bettercap/proxy/tcp/proxy.rb', line 22 def ip @ip end |
#port ⇒ Object
Source port.
24 25 26 |
# File 'lib/bettercap/proxy/tcp/proxy.rb', line 24 def port @port end |