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

Getting `Can’t assign requested address` java.net.SocketException using Ehcache multicast

This was caused by an IPv6 address being returned from java.net.NetworkInterface.getDefault(). I’m on a Macbook and was using wireless — p2p0 (used for AirDrop) was returned as the default network interface but my p2p0 only has an IPv6 ether entry (found by running ipconfig). Two solutions, both of which worked for me (I prefer the … Read more

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

It seems you’ve already found http://www.iana.org/assignments/multicast-addresses, so you’ve done the right thing by picking an address from the 239.255/16 range. As those ranges are entirely for site-local use it’s no ones else’s business which particular address you pick, but you may need to coordinate with the network manager (assuming that’s not you) to pick an … 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

How DNS service discovery, multicast DNS and Bonjour are related?

I just answered your previous question over here. I think that answer covered the questions you asked here, but just in case: Bonjour consists of 3 parts: 1. IPv4 (and IPv6) link-local addressing (169.254.0.0/16 addresses in IPv4). 2. Multicast name resolution (via the mDNS protocol). This allows hosts on an ad-hoc or isolated LAN to … Read more

Tools to test multicast routing [closed]

Don’t have much real world multicast experience, but have you seen mz? Description: versatile packet creation and network traffic generation tool mausezahn (mz) is a fast traffic generator written in C which allows you to send nearly every possible and impossible packet. It is mainly used to test VoIP or multicast networks but also for … Read more