I am using Network framework for connecting two iPad devices that are connected through LAN and has Wifi enabled. I have enabled peerToPeerIncluded. I would like to understand how the framework chooses the interface types for browsing and discovering devices. When I start a browser with browser.run or listener.run, does the browser and advertiser browse and listen on all available interface types? My concern is that if it does in only one interface, Is there a chance that the browser is browsing in one interface(Lets say WiredEthernet) and the listener is listening on another interface(Lets say AWDL) and they dont discover?
does the browser and advertiser browse and listen on all available interface types?
Yes.
At least by default. If you don’t want that behaviour, you can limit it to a specific interface type or a specific interface. The exact mechanism you use depends on which Network framework API you’re using. You mentioned the run(_:) method which suggests you’re using the shiny new one. In that case, the droids you’re looking for are listed here (search that page for interface).
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"