How to use Network Service Discovery (bonjour, mdns)

I have been wrestling with Zeroconf all day trying to get a very basic service discovery to work. So far, I've been unable to get any response at all. The call goes out to ZeroconfResolver.ResolveAsync, and nothing ever returns. It just seems to hang forever.

I'd be happy at this point just to implement a solution using platform specific implementations via Xamarin's DependencyService, but I haven't been able to find any sample code to learn from even on that.

If anyone has any resources regarding network discovery for iOS/Android with Xamarin, be it cross-platform or using a DependencyService, I'm eager to learn anything I can to get things rolling at least.

Thanks in advance for any help you may be able to provide!

Answers

  • EnriqueZavaletaEnriqueZavaleta USMember ✭✭

    Hi @JonathanBachelor,

    Almost 3 years since you asked, were you able to find a solution/best way to this?

    Thanks

  • JonathanBachelorJonathanBachelor USMember ✭✭

    @EnriqueZavaleta I can't tell you what the best way is, but I can tell you that we wound up implementing it natively on each platform, piecing together information from blogs and Apple/Google documentation. It was painful, especially on Android. However, a year or two later, we were having some issues and went to go look at the Zeroconf library again, and this time everything worked like a charm. Hats off to Oren Novotny on this one! He turned MDNS into a super simple async/await operation and it works very well. I would definitely recommend going with Zeroconf if you possibly can.

  • EnriqueZavaletaEnriqueZavaleta USMember ✭✭

    Thanks for taking the time to share this. I tried using Zeroconf with no success, not sure if because I'm not understanding completely how it works yet or something else.

    Thanks again @JonathanBachelor

Sign In or Register to comment.