For testing purposes I am sending tcp messages to a local server as follows:
echo -e "some message" | netcat localhost 1234
With netcat installed using brew install netcat
.
This works fine except for that this blocks for quite a long time (about a minute). I tried to use the options "-w 1" for specifying the timeout, but this does not change anything.
The process listening on the other end is a spring-xd tcp source.
Is there any other way of sending a tcp message that does not block as long?