1

I have a Protobuf serialized data that is being sent over UDP multicast. I read it using socat from bash as follows

socat UDP4-RECVFROM:1277,ip-add-membership=239.195.1.2:192.168.254.5,fork,reuseaddr - 

I want to chain this with protoc in order to keep decoding data in every packet. How can I do that ? When I do

socat UDP4-RECVFROM:1277,ip-add-membership=239.195.1.2:192.168.254.5,fork,reuseaddr - | protoc --decode=proto.Message ./path/to/proto/message.proto

The terminal just hangs. Not sure how to proceed.

marc
  • 797
  • 1
  • 9
  • 26

1 Answers1

0

The problem turned out to be in socat. remove the fork portion and it works great.

So essentially

socat UDP4-RECVFROM:1277,ip-add-membership=239.195.1.2:192.168.254.5,reuseaddr - | protoc --decode=proto.Message ./path/to/proto/message.proto
marc
  • 797
  • 1
  • 9
  • 26