iphone 的卓悦 [英] bonjour for iphone

查看:18
本文介绍了iphone 的卓悦的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道bonjour是公共的还是私有的api?我们可以直接在我们的应用程序中使用它吗.

I would like to know whether bonjour is a public or private api?Can we use it in our apps directly.

推荐答案

Bonjour 由 NSNetServices 和 CFNetServices API 处理,您可以阅读有关 这里.这些是 Cocoa 和 Core Foundation 接口,可公开用于 Mac 和 iPhone 应用程序.正如已经指出的那样,许多应用程序利用它来进行 iPhone - iPhone 网络(例如,Game Kit 位于 Bonjour 之上)或 Mac - iPhone 数据同步(例如 Marcus Zarra 的 ZSync 库).

Bonjour is handled by the NSNetServices and CFNetServices APIs, which you can read more about here. These are Cocoa and Core Foundation interfaces, and are publicly available for use in Mac and iPhone applications. As has been pointed out, many applications make use of this to do iPhone - iPhone networking (Game Kit is layered on top of Bonjour, for example) or Mac - iPhone data syncing (such as for Marcus Zarra's ZSync library).

Bill Dudney 为 iPhone 创建了一个精简的 Bonjour 服务器类,他对其进行了描述 这里.我创建了一个匹配的 Mac 应用程序,它与他的测试应用程序通信,可以从 这里下载.Apple 的 WiTap 示例代码演示了如何使用 Bonjour 将两部 iPhone 联网.

Bill Dudney has created a stripped-down Bonjour server class for the iPhone, which he describes here. I created a matching Mac application which communicates with his test application and can be downloaded from here. Apple's WiTap sample code demonstrates how to use Bonjour to network two iPhones together.

我教授的 iPhone 开发课程的一部分专门用于 Bonjour 网络,可以下载 VoodooPad 格式的课程笔记此处(转到网络课程了解此内容).

I devoted a section of the class I teach on iPhone development to Bonjour networking, for which the course notes can be downloaded in VoodooPad format here (go to the Networking class for coverage of this).

这篇关于iphone 的卓悦的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆