Goal of this is to provide UDP multicast examples using the two main OCaml concurrency libraries lwt
, async
and no concurrency. I couldn't find good examples at the time so I created them for anyone who may need them as a starting point in the future.
See blog post: https://www.kevinfox.dev/udp-multicast
opam switch create udp_multicast ocaml.5.1.1
eval $(opam env --switch=udp_multicast)
opam install . --deps-only
# Run one (or all three) of the multicast listeners
# Option 1: Run lwt
dune exec multicast_udp lwt
# Option 2: Run async
dune exec multicast_udp async
# Option 3: Run with no concurrency
dune exec multicast_udp none
# In a seperate terminal run:
dune exec multicast_udp sender