To compliment UDP.send and udp_send, there should be UDP.recv and UDP::Mixin#udp_recv methods. These methods should call connect with the host and port arguments, then calls .recv(1024) to read the first chunk of data sent through the connection. This method is similar to UDP.banner and udp_banner, but it reads the whole packet of data and doesn't stop at the first newline.
data = UDP.recv(host,port)
data = UDP.recv(host,port, length: 4096)
include Network::UDP::Mixin
data = udp_recv(host,port)
data = udp_recv(host,port, length: 4096)
To compliment
UDP.send
andudp_send
, there should beUDP.recv
andUDP::Mixin#udp_recv
methods. These methods should callconnect
with thehost
andport
arguments, then calls.recv(1024)
to read the first chunk of data sent through the connection. This method is similar toUDP.banner
andudp_banner
, but it reads the whole packet of data and doesn't stop at the first newline.