In order to check if I can reach a particular TCP port, I use:
TcpStream::connect_timeout(&socket, Duration...
There is no clear equivalent with UdpSocket, so would like to know what would work similarly. The closest I could find is using the set_write_timeout
, then doing a send
or send_to
, but these yield wrong results in that they show that the connection is successful, when the port is not even open on the other side.