1
1
I'm trying to send some data to a server with a command like nc -w 3 IP_ADDRESS PORT < data
where nc is the netcat from FreeBSD 5.4. When the server doesn't respond within 3 seconds I get no indication of it at all (exit code is 0 and there is no terminal output). How can I send data to the server and be alerted when a timeout occurs?