开发者

Avahi DNS Stack for iPhone?

开发者 https://www.devze.com 2022-12-24 00:39 出处:网络
I would like to know if we have an avahi api for iphone side? Alternatively, can we implement avahi protocol in iphone?

I would like to know if we have an avahi api for iphone side? Alternatively, can we implement avahi protocol in iphone?

The avahi API provides:

avahi-core: an API for embedding a complete mDNS/DNS-SD stack into your software. This is intended for developers of embedded appliances only. We dissuade from using this API in normal desktop applications since it is not a good idea to run multiple mDNS stacks 开发者_StackOverflow社区simultaneously on the same host.

D-Bus API: an extensive D-Bus interface for browsing and registering mDNS/DNS-SD services using avahi-daemon. We recommend using this API for software written in any language other than C (e.g. Python).

avahi-client: a simplifying C wrapper around the D-Bus API. We recommend using this API in C or C++ progams. The D-Bus internals are hidden completely.

avahi-gobject: an object-oriented C wrapper based on GLib's GObject. We recommd using this API for GNOME/Gtk programs.


Avahi and Bonjour are basically the same thing, both implementing mDNS.

Check these two documents:

  • Introduction to NSNetServices and CFNetServices Programming Guide
  • Game Kit Programming Guide

The first introduces the iPhone equivalent of Avahi and the second one builds on top of that and also provides a way to talk to clients that you find.


In principle, any POSIX compatible library can be included on the iPhone. However, you might not be able to get it past the app store screening.

A better question would be: why bother? What does avahi offer you that the iPhone API DNS handling does not?

If you tell us what you're trying to accomplish we could better advise you.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号