class UDPRest::UDPPacket
Attributes
addr_family[RW]
src_addr[RW]
src_port[RW]
text[RW]
Public Class Methods
new(data = nil)
click to toggle source
# File lib/udp_rest/udp.rb, line 55 def initialize(data = nil) # assume this was initialized with the standard data structure # that is returned by UDPSocket if !data.nil? self.text = data[0] self.addr_family = data[1][0] self.src_port = data[1][1] self.src_addr = data[1][2] end end
Public Instance Methods
to_s()
click to toggle source
# File lib/udp_rest/udp.rb, line 66 def to_s self.text end