设备自动查找的常见做法?
通过 WiFi 对设备/计算机进行“自动查找”的最佳或最常见方法是什么?你只是做一个UDP广播和响应吗?广播时,您只广播到您的子网还是所有内容?还是阿尔普?或者扫描主机部分的每个 IP 并希望连接?我正在考虑仅对设备连接到的任何子网进行 UDP 广播。具体来说,我正在开发 android-pc 解决方案。
What are the best, or most common, ways of employing "auto finding" for a device/computer over wifi? Do you just do a UDP broadcast and response? When broadcasting do you only broadcast to your subnet or to everything? or Arp? or scan through every IP for the host-part and hope t connect? I was thinking of doing a UDP broadcast only to whatever subnet the device is connected to. Specifically, I'm working on an android-pc solution.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不确定你的问题中关于 wifi 的具体部分,但事实上你问的是 UDP 等网络级别的东西,这让我觉得你会对 Apple 所谓的 Bonjour 或 IETF 中被称为 Zeroconf 的东西感兴趣。尽管我从未使用过,但 Android 上有 Bonjour 支持。
I'm not sure about the wifi specific part of your question but the fact you ask about network level stuff like UDP makes me link you would be interested in what Apple calls Bonjour or was called Zeroconf in the IETF. There is Bonjour support for android out there although I've never worked with it.