UDP Multicast over the internet?

In general this is not possible since multicast packets aren’t routed. There are some techniques to work around this (DVMRP, MOSPF and others) but they all require that you can configure all the routers between your server and the clients (or create a tunnel). There are backbone networks (Abilene, Mbone) with multicast support, but those … Read more

how to list rooms on socket.io nodejs server

The short answer: io.sockets.adapter.rooms I analysed io: I got the following output: { server: { stack: [ [Object], [Object], [Object], [Object], [Object], [Object] ], connections: 3, allowHalfOpen: true, watcher: { host: [Circular], callback: [Function] }, _events: { request: [Function], connection: [Function: connectionListener], listening: [Object], upgrade: [Object] }, httpAllowHalfOpen: false, cache: {}, settings: { home: “https://stackoverflow.com/”, … Read more

Receiving multiple multicast feeds on the same port – C, Linux

After some years facing this linux strange behaviour, and using the bind workaround describe in previous answers, I realize that the ip(7) manpage describe a possible solution : IP_MULTICAST_ALL (since Linux 2.6.31) This option can be used to modify the delivery policy of multicast messages to sockets bound to the wildcard INADDR_ANY address. The argument … Read more

How do you UDP multicast in Python?

This works for me: Receive import socket import struct MCAST_GRP = ‘224.1.1.1’ MCAST_PORT = 5007 IS_ALL_GROUPS = True sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP) sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) if IS_ALL_GROUPS: # on this port, receives ALL multicast groups sock.bind((”, MCAST_PORT)) else: # on this port, listen ONLY to MCAST_GRP sock.bind((MCAST_GRP, MCAST_PORT)) mreq = struct.pack(“4sl”, socket.inet_aton(MCAST_GRP), socket.INADDR_ANY) sock.setsockopt(socket.IPPROTO_IP, … Read more