使用dns-sd进行服务发现 [英] Service discovery using dns-sd
问题描述
我有一个配置为工作站模式的设备.设备通过智能手机提供的热点连接到智能手机.设备需要搜索由智能手机上的应用程序发布的服务,例如_abc._tcp.
I have a device which is configured in station mode. Device is connected to a smart phone over hotspot provided by smartphone. Device needs to search for a service published by an application on smartphone say _abc._tcp.
我正在使用命令dns-sd -B _abc._tcp
,但没有输出.
请指导我可能会丢失的东西.
I am using the command dns-sd -B _abc._tcp
but no output.
Please guide me what I may be missing.
应用程序发布服务.我在Android上使用Bonjour应用程序进行了验证.
The application publishes the service. I verified it using Bonjour application on android.
还请澄清
- 是否可以在站点模式下发现服务.
- 在搜索服务时,有必要提供完整的服务名称.如果不是,我们如何发现智能手机上发布的所有服务
- 设备上的防火墙设置会影响服务发现吗?
- 我们如何在C ++中实现相同的目标.任何可以帮助发现的图书馆.
谢谢前进.
推荐答案
是否可以在站点模式下发现服务.
Is it possible to discover the services while in station mode.
请参见站点模式 >
在搜索服务时,有必要提供完整的信息 服务名称.
While searching for services is it necessary to provide complete service name.
是
如果不是,我们如何发现发布于的所有服务 智能手机
If not how we can discover all the services published on the smart phone
服务发现旨在用于发现您正在寻找的打印机或网页之类的服务. 您可能使用的一种解决方案是查找所有服务并查询该服务的每个实例.每个实例都有一个名称和一个IP,您可以将其与电话的IP进行比较.好吧,我觉得这很丑.
Service discovery is meant to be used to discover a severice you're looking for like a printer or a webpage. One solution you might use is to find all services and query for each instance of the service. Each instance has a name and an ip which you can compare to the phone's ip. Well this is quite ugly I think.
设备上的防火墙设置会影响服务发现吗?
Can firewall settings on device affect for service discovery?
是
我们如何在C ++中实现相同的目标.任何可以提供帮助的图书馆 发现.
How can we achieve the same in C++. Any libraries which can help in discovering.
几乎每种语言都有库...在您喜欢的搜索引擎中搜索c ++服务发现,您会发现很多(或另一个带有一个或多个链接的so-thread)
There are libs in almost every language... search for c++ service discovery in your favourite search engine and you will find plenty (or another so-thread with links to one or more)
这篇关于使用dns-sd进行服务发现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!