UDP multicast receive on mac failing/intermittant

I’m struggling to receive udp multicast messages in a program I’ve written, when compiled for mac. I’m sure it used to work, so I’m wondering if this is a recent change in Mac OS Sequoia. The code works fine on a PC and even in windows running from Parallels on the same mac.

When I run the code in OSX, I can see the join request to the multicast has happened as all the packets show up in Wireshark and stop when I quit the app. However the app never receives any data. The app is listed in the Security and Privacy page under the Local Network permissions page.

Reading further, I guess I need to add the multicast entitlement when code signing?

Starting to think this is actually related to this case…

https://forum.xojo.com/t/sequoia-urlconnection-errors-for-first-few-requests/82700/16

In the mac build only, I have to send some kind of message (even just an empty write to the multicast group) before I receive any data at all. This is not needed in the Windows build. This happens in Sonoma too.

However in Sequoia, I’m having to put a delay of 3secs after opening the app before I attempt to write to the group or I get an error 65 ‘no route to host’.

You may take a look at this thread: Sequoia URLConnection errors for first few requests
(the initial error code reported is different, but 65 is found later in the discussion)

1 Like