To compliment TCP.send and tcp_send, there should be TCP.recv and TCP::Mixin#tcp_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 TCP.banner and tcp_banner, but it reads the whole packet of data and doesn't stop at the first newline.
data = TCP.recv(host,port)
data = TCP.recv(host,port, length: 4096)
include Network::TCP::Mixin
data = tcp_recv(host,port)
data = tcp_recv(host,port, length: 4096)
To compliment
TCP.send
andtcp_send
, there should beTCP.recv
andTCP::Mixin#tcp_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 toTCP.banner
andtcp_banner
, but it reads the whole packet of data and doesn't stop at the first newline.