How to multicast using gen_udp in Erlang?

后端 未结 4 1220
梦如初夏
梦如初夏 2020-12-29 06:31

How do you use gen_udp in Erlang to do multicasting? I know its in the code, there is just no documentation behind it. Sending out data is obvious and simple. I

4条回答
  •  囚心锁ツ
    2020-12-29 07:08

    Multicast is specified by IP Address

    It's the same in erlang as for all languages. The IP addresses 224.0.0.0 through 239.255.255.255 are multicast addresses.

    Pick an address in that range, check that you're not overlapping an already assigned address, and you are good to go.

    http://www.iana.org/assignments/multicast-addresses

提交回复
热议问题