Hello,
Thanks for answering.
The code that is failing isn’t making the en0 assumption, it is using an open source C# network library called Lidgren: https://github.com/lidgren/lidgren-network-gen3
Lidgren binds to the local address 0.0.0.0:0 which I understand means the socket will listen on all interfaces. This library that was previously working pre update for the users is attempting to discover a server running on their local network.
I saw the other thread about assuming the interface is called en0.
I use the same code snippet elsewhere in my app when the user is playing with a game console, they need to enter their devices IP address into the games settings and it will send the UDP packets directly to that address. As a convenience for the user I use the same code snippet with the en0 assumption to let them know the address of their device to type into the game settings.
After seeing your suggestion that this assumption might be related to these network issues I asked one of my users who is having connectivity issues using the Lidgren code to discover his PC server to switch to console mode in my app as a test and see if the IP address of his device was reported. He did successfully have the iPhone IP Address printed in the log. So I’m thinking the code that assumes the interface name may be unreliable in theory but isn’t the cause of the current issues.
PS: I’d assume most of us picked this code up at this stackoverflow thread: https://stackoverflow.com/questions/30748480/swift-get-devices-wifi-ip-address
Interestingly enough I haven’t heard from any console users having issues. In that mode I use System.Net.Sockets.UdpClient to listen for data. This is making me think the issue is when Lidgren tries to discover local peers by sending a discovery message using the System.Net.IPAddress.Broadcast address that resolves to 255.255.255.255.
I believe as the app has Multicast Networking capabilities this should be allowed work.
Topic:
App & System Services
SubTopic:
Networking
Tags: