示例:IPv4 出站多播接口


🌐 Example: IPv4 outgoing multicast interface

所有系统都在所需的物理接口上使用主机的 IP:

🌐 All systems use an IP of the host on the desired physical interface:

const socket = dgram.createSocket('udp4');

socket.bind(1234, () => {
  socket.setMulticastInterface('10.0.0.2');
});