Class: BetterCap::Proxy::UDP::Event

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

Overview

Class used to encapsulate ( and keep references ) of a single UDP 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.



29
30
31
32
33
# File 'lib/bettercap/proxy/udp/proxy.rb', line 29

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

Instance Attribute Details

#dataObject

Reference to the buffer being transmitted.



27
28
29
# File 'lib/bettercap/proxy/udp/proxy.rb', line 27

def data
  @data
end

#ipObject

The source IP address of this event.



23
24
25
# File 'lib/bettercap/proxy/udp/proxy.rb', line 23

def ip
  @ip
end

#portObject

Source port.



25
26
27
# File 'lib/bettercap/proxy/udp/proxy.rb', line 25

def port
  @port
end