The UDP - must listen on port. The TCP - must connect to a server.
nc -v -u -l -p 3333 | nc -v 127.0.0.1 50000 socat -v UDP-LISTEN:3333,fork TCP:localhost:50000
Both work -- they delivered the message -- but the line is not ended. VLC will only take the command if I close netcat/socat.
I monitored the connection with
sockettest and the messages are one after another in the same line, like this:
I need the line to be ended so that the message transmitted looks like this:
play stop exit add
Maybe the packet is not ended?
I am wondering if
socat have options to send the packet/end line after a certain amount of time.
If I add
\n to the output as suggested by @roaima, I get
play\nstop\nplay\n on a single line.