Skip to content

Instantly share code, notes, and snippets.

@btheu
Last active September 18, 2018 21:00
Show Gist options
  • Save btheu/575d733d0c062181605552303c043378 to your computer and use it in GitHub Desktop.
Save btheu/575d733d0c062181605552303c043378 to your computer and use it in GitHub Desktop.
## http://www.dest-unreach.org/socat/doc/socat-multicast.html
## SIMPLE
# receive
socat - udp4-listen:5000,reuseaddr,fork
# send
echo "hello" | socat - udp-sendto:127.0.0.1:5000
## MULTICAST
# receive
socat UDP4-RECVFROM:6666,ip-add-membership=224.1.0.1:192.168.1.67,fork EXEC:hostname
# send
socat STDIO UDP4-DATAGRAM:224.1.0.1:6666,range=192.168.1.0/24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment