Godot Version
4.2
Question
I am trying to setup a multicast listener for a ‘beacon’ that is broadcast every second on a specific port. Once I find that ‘beacon’ in contains the IP address of the broadcasting machine that I can use for UDP communication.
I’m having a problem understanding the join_multicast_group(multicast_address, interface_name) function. The documentation states: Joins the multicast group specified by multicast_address
using the interface identified by interface_name
.I have used IP.get_local_interfaces() which returns a dictionary of 13 items. However, interface_name is looking for a string. Should the string be ‘name’, ‘friendly’, ‘index’, ‘address’ or some other value like ‘ANY’? Is the multicast address the PORT number, or an IP address or something else?
A good example would be helpful, but I’ve been unable to find an example with my google searches.