Swift -Does the Bonjour NSNetServiceBrowser have a peer limit larger then MCSession's 8?
Asked Answered
E

1

0

Using a MCSession, the session can only have 8 devices connected to it:

Sessions currently support up to 8 peers, including the local peer

I need way more than 8 peers. I came across this apple forums dev thread where someone asked a similar question and an Apple engineer named eskimo said that it can be achieved using NSNetService and its includesPeerToPeer flag or the Bonjour browser.

I've seen a bunch of people ask questions on how to get around the MCSession 8 peer limit but I haven't seen anyone recommend what eskimo recommended. I also haven't found any blog posts with sample code to support what he said. His answer was posted on 6/5/19 so it's very recent.

If this is possible what is the peer limit if there is one?

enter image description here

Egestion answered 22/2, 2020 at 6:1 Comment(8)
I think they are suggesting that you build your own discovery service using Bonjour. The number of peers would then only be limited by your own code.Melodiemelodion
You may have better luck posting this to another StackExchanges site: Ask Different which describes itself as "Ask Different is a question and answer site for power users of Apple hardware and software. It only takes a minute to sign up."Banal
@Banal I didn’t understand why this got downvoted. I think it’s a legit question especially since so many people ask how to get around the MCSession 8 peer limit. I have only found 1 Obj-C answers that leads you in the right direction but it’s still in Obj-C not Swift. This questions let’s others know that there are other ways to do achieve other then MCSession.Egestion
I didn't downvote it. However it's not really a coding question. It's about library or offsite code or big picture stuff and those aren't well suited for this site. And I referred you to a site that is probably better for a question like yours. The downvote was probably to discourage people from wasting time on your question stackoverflow.com/help/how-to-askBanal
For what ever it's worth, Lance, I bumped into your question while working the Close Votes queue. Don't know why it ended up there. And I didn't vote to close it myself.Banal
@Banal I know you didn’t downvote it. It got downvoted 5 minute after I posted it yesterday. I was just asking your opinion because of what you said. I will say this though, @Paulw11’s comment gave me enough info to lead on path to building my own Bonjour service. Had he not said that I would’ve never had idea to do that. Even though it got downvoted it helped me tremendously. I understand the coding part but I always saw it has as long as it helps a developer develop that’s what counts 🤷🏾‍♂️Egestion
That's why I didn't vote to close it.Banal
@Banal thanks, I appreciate it. Happy Coding 😊😊Egestion
E
0

Using Bonjour there doesn't seem to be a limit. I found the answer here. eskimo insinuated the same thing.

enter image description here

Egestion answered 22/2, 2020 at 22:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.