如何在 Visual C 中宣传 Bonjour 服务

发布于 2024-09-13 22:45:11 字数 58 浏览 1 评论 0原文

我试图弄清楚这是否可能,但是通过 Visual C++ 宣传 Bonjour 服务的最简单方法是什么?

I'm trying to figure out if this is even possible, but what's the simplest way of advertising a Bonjour service through Visual C++?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

拒绝两难 2024-09-20 22:45:11

您可以使用DNS服务发现客户端:dns-sd

Windows Bonjour Installer 将其放入 C:\Windows\system32\dns-sd.exe

概要是:

 dns-sd -R name type domain port [key=value ...]

 dns-sd -B type domain

 dns-sd -L name type domain

没有任何简单的方法都可以找到深入的 Bonjour Windows 文档,(这是一个严重的耻辱),但这里是其 mac 等效项的联机帮助页:
http://开发人员。 apple.com/.../dns-sd.1.html

还有 C:\Windows\system32\dnssd.dll 其 API,不幸的是我不得不假设,符合此文档:
http://developer.apple.com/... /dns_sd_h/

You can use the DNS Service Discovery client: dns-sd.

Windows Bonjour Installer puts it in C:\Windows\system32\dns-sd.exe

Its synopsis is:

 dns-sd -R name type domain port [key=value ...]

 dns-sd -B type domain

 dns-sd -L name type domain

There isn't any easy way to find indepth Bonjour windows documentation, (and it's a serious shame) but here's the manpage for its mac equivalent:
http://developer.apple.com/.../dns-sd.1.html

There is also C:\Windows\system32\dnssd.dll whose API, I unfortunately have to suppose, conforms to this document:
http://developer.apple.com/.../dns_sd_h/

爱要勇敢去追 2024-09-20 22:45:11

这是一个相当老的问题...但是,由于我最近在 Windows 中为一个项目实现了 Bonjour 功能,因此对其有一些见解。 Apple 开发者网站有一个适用于 Windows 的 Bonjour SDK,其中包含 C、C# 等示例。在 C 示例文件夹中,有 dns-sd 客户端的完整源代码,然后您可以使用它来构建自己的客户端(用于注册服务、名称) , ETC。)。由于它是 C,因此您可以轻松地将此功能打包为 dll,然后允许其他语言使用它(例如,C#)。

Bonjour SDK for Windows@developer.apple.com

This is rather old question... however as I had recently implemented Bonjour functionality in Windows for one project, have some insight into it. There is a Bonjour SDK for Windows from Apple developer site with examples in C, C#, etc. In C examples folder there is a complete source for dns-sd client which you can then use to build your own client (for registering services, names, etc.). As that is C, you can then easily pack this functionality as dll and then allow and other languages to use it (for example, C#).

Bonjour SDK for Windows @ developer.apple.com

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文