An abstract multicast socket library designed to handle some of the platform specific implementation details that make it difficult to write a cross platform multicast socket library.
https://gibme-npm.github.io/multicast
import { MulticastSocket } from '@gibme/multicast';
(async () => {
const socket = await MulticastSocket.create({
port: 5959,
multicastGroup: '224.0.0.251',
loopback: true
});
socket.on('message', (message, remote, fromSelf) => {
console.log({message, remote, fromSelf});
})
socket.send('Hello World');
});