You are not logged in.
Pages: 1
I am writing a program that listens on a specific port for the data, then I run the command
nc -w 1 127.0.0.1 42089
with the flag
-w
set to 1, so that it will close the connection after 1 sec of Idle or no connection.
But using this flag is not working, the
nc
indefinitely listens on the connected port or my server listens on the connected port as the connection from the
nc
is not broken.
Last edited by gutsthakur (2025-03-23 07:00:55)
Offline
There exist two netcat implementations, which one do you have installed and are you potentially mixing up flags for one or the other? (hint the packages are openbsd-netcat and gnu-netcat), though for this particular case both "should" be more or less identical
Offline
I have `gnu-netcat` installed on my system.
Offline
Well I installed the openbsd-netcat implmentation and it worked just fine.
Offline
\o/
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.
Offline
Pages: 1