Class: Quaff::UDPSource
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(ip, port) ⇒ UDPSource
constructor
A new instance of UDPSource.
- #send_msg(cxn, data) ⇒ Object
Methods inherited from Source
#close, #remote_ip, #remote_port, #sock
Constructor Details
#initialize(ip, port) ⇒ UDPSource
Returns a new instance of UDPSource.
21 22 23 |
# File 'lib/sources.rb', line 21 def initialize ip, port @ip, @port = ip, port end |
Instance Method Details
#send_msg(cxn, data) ⇒ Object
25 26 27 |
# File 'lib/sources.rb', line 25 def send_msg cxn, data cxn.send(data, 0, @ip, @port) end |