udp multicast failing

I have been playing around with the xojo udp example program. Running on two computers on my local network, the program works fine transmitting directly from one computer to the local ip address of the other computer. However, trying to broadcast to all computers on the network or having the two computers join a group does not transmit from one computer to the other. Each computer says it has joined the multicast group, and the local computer receives the multicast transmissions, but the remote computer does not. I checked my router to see if there is any setting dealing with permitting multicast, but I couldn’t find anything. So I’m wondering two things:

  1. is there some simple solution I’m overlooking to get the multicast to work?
  2. if allowing multicast is not the default for the vast majority of routers, then is multicast reliable enough to be useful?

In the absence of an answer to these particular questions, has anyone ever tried using the multicast function of the xojo UDP sample program and been able to get it working between computers? If I know the program itself works that at least gives me something to go on.

You know, I wrote an UDPSocketMBS plugin class to get more features. Part of the MBS Network Plugin.

I don’t recall if I ever messed with the UDP example program, but I have done a few Xojo programs where I used UDP multicasting on local networks.

Have you made sure there is not a software firewall blocking packets from the network (e.g. Windows Firewall or similar)?

Other than that, my experience is that UDP multicast works fine within the same subnet or VLAN. I’ve not had a need to work with UDP in an environment where it had to work beyond a local subnet or VLAN though.

Christian, I downloaded your plugin and then ran your example program on two computers on the same network. Joining the multicast group on both computers, neither would send a multicast message that the other received. I also tried the broadcast to everyone in the network function. That sent from computer A to computer B, but not from computer B to computer A. I then tried sending to a specific address. That worked to send a message from computer B to computer A, but not to send a message from computer A to computer B. So, I’m a little confused at this point.

You used v8.4 on this?

Maybe @Massimo Valle can send you a sample?

I used UDP with a multicast group when I made the NetTank game for the Just Code Challenge. The code is on GitHub so maybe it could prove helpful?


Paul, I have tried running NetTank on two computers on my network. It does not work out of the box. I set the router hops to 255 just in case but still does not work. I tried changing ports but that also did not work. Both computers set up as player 1 and don’t seem to ever get any data from the other.

I only have a license for web currently so I can’t compile for desktop, so I’m compiling and running from the IDE. That wouldn’t make a difference would it?

I don’t see why running from the IDE would make a difference; I’m pretty sure that’s how I did my testing.

Could it be firewall settings on the computers?