2

I've got a solution using netcat / nc as a service listening for input, but the service never returns any input to the client. Somewhat like this:

server$ nc -l 12345

and then:

client$ echo message | nc server 12345

The trick is that because the server never sends anything back to the client (including no EOF), essentially because it doesn't know when the client is done, the client netcat never terminates.

One easy solution is to have the client use the -q <secs> option to netcat, but not all implementations (e.g. FreeBSD and Mac OSX) of netcat include the -q option.

Any other workarounds from the brilliant minds here?

0 Answers0