netcat 2

This is a follow on from the NetCat basic


I am trying to do some Spark development I wrote my Server to generate data - but wrote it using UDP Broardcast Which at the time seemed a clever thing to do.

However when asking Spark Stream to connect to the UDP stream I have found that by default it only connects to a TCP Sock stream.

NetCat Piping

  • The program sends text terminated with \r\n the format is UDP - port 50000 ip (broadcast)

  • This data is collected via a UDP netcat command

  • The Output now piped through lv so I can check the data rates

  • The Output now passed into NetCat TCP Server - port 50001 TCP mode

  • Checked in a seperate process by reading port 50001 TCP from

And this looks like

nc -l -s -p 50000 -u | \
pv | \
nc  -l  -p 50001&
#check process
#This should see TCP data on port 50001 
nc -l -s -p 50001

Very impressed with Netcat