How do I choose a multicast address for my application's use?

前端 未结 5 1526
情深已故
情深已故 2020-12-22 18:38

How should I choose an IPv4 multicast address for my application\'s use? I may need more than one (a whole range perhaps ultimately) but just want to avoid conflicts with ot

5条回答
  •  庸人自扰
    2020-12-22 19:23

    As already suggested, allow the range to be configured. But taking that further, don't require configuration. You pick the range and allow configuration to override if necessary.

    You should have some logic in your application to handle foreign packets, to alert the user, through logs, or some other mechanism, that your application has detected multicast packets from another app, with instructions on how to change the configuration.

    If it turns out that there is a conflict, play those numbers in the lottery!

提交回复
热议问题