So above, after echo writes test\n, it exits, which closes the pipe. When during the timeout interval the read part gives EOF, socat terminates without awaiting the timeout. This timeout only applies to addresses where write and read part can be closed independently. Then, socat waits secondsīefore terminating. When one channel has reached EOF, the write part of the other channel is shut down. ![]() It's your ultimate plumbing Swiss Army knife. Socat can do much much much more than the various (different and incompatible) implementations of nc/ netcat, and generally works more reliably. (here waiting for up to 10 seconds for the server to reply and shutdown) ![]() I'd recommend socat instead: echo test | socat -t 10 - tcp:server:7
0 Comments
Leave a Reply. |