I've been working through some issues here attempting to migrate away from the MultiPeer Connectivity following the guidance in here, Moving from Multipeer Connectivity to Network Framework, and implementing a home-grown solution using NWBrowser and NWListener and NWConnections.
I feel like I am 95% of the way there, but am experiencing an issue where my connection attempts seem to fail about 50% of the time.
If I have two nodes say, one a physical iPad, and one a simulator on my Mac. I can start them both up, and they are both discovered with Bounjour no problem. Sometimes the "connect" no problem. Othertimes however when I attempt to "connect" from one device to the other, I get failures. I'd say it's about 50/50 success - fail at this point.
The "dialing" device state enters "preparing" but never progesses past that, and on the "receiving end" I see
receive error: POSIXErrorCode(rawValue: 61): Connection refused
I'm at my wits end here with this, everything else in my migration I think is done...just need some insights maybe on potential causes for that error...