macos 新 Mac OS AirDrop 的工作原理

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5220136/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 07:47:37  来源:igfitidea点击:

how the new Mac OS AirDrop works

macoswifi

提问by AP.

I am wondering what technologies are used by the new Mac OS AirDrop and if there is a way to use it on windows.

我想知道新的 Mac OS AirDrop 使用了哪些技术,以及是否有办法在 Windows 上使用它。

回答by Cody Gray

You know that AirDrop is a feature that will be introduced as part of Mac OS X Lion(version 10.7), right? That version of the OS is not even out yet, and it won't be until later this summer.

您知道 AirDrop 是一项将作为Mac OS X Lion(版本 10.7)的一部分引入的功能,对吗?该版本的操作系统甚至还没有推出,而且要到今年夏天晚些时候才会推出。

Furthermore, I assume that the handful of lucky developers who have a pre-release copy are under a strict non-disclosure agreement (this isApple, and that's pretty standard policy in the industry anyway), which would keep them from giving any details about the feature in a public forum such as this one.

此外,我假设少数拥有预发布副本的幸运开发人员遵守严格的保密协议(这Apple,无论如何这是行业中非常标准的政策),这将使他们无法提供有关像这样的公共论坛中的功能。

But, since I am not one of those lucky developers, I suppose I'm free to do a little speculating about how it might work. Presumably, it takes advantage of Apple's existing Bonjournetwork service discovery protocol (formerly known as Rendezvous) to locate other users nearby whose devices support AirDrop. The rest of the pieces have been part of Mac OS X for years, they just haven't been wrapped up in a fancy, easy to use interface (really, that's about all that software development is about nowadays). There's always been rich support for peer-to-peer networking, you've always been able to share files with other users, users have always had a public folder, etc. (This isUNIX we're talking about, after all.)

但是,由于我不是那些幸运的开发人员之一,我想我可以自由地推测一下它的工作原理。据推测,它利用 Apple 现有的Bonjour网络服务发现协议(以前称为 Rendezvous)来定位附近设备支持 AirDrop 的其他用户。其余部分多年来一直是 Mac OS X 的一部分,只是没有包含在一个花哨的、易于使用的界面中(实际上,这就是当今软件开发的全部内容)。点对点网络一直有丰富的支持,你总是能够与其他用户共享文件,用户总是有一个公共文件夹等等(毕竟这我们谈论的 UNIX。)

Will it work on Windows? Maybe. Apple has been surprisingly good in recent history about including its Windows brethren in on the fun—iTunes, Safari, MobileMe, etc. But it doesn't always happen right away. Rolling your ownsolution for Windows (or any other platform) would be pretty simple, but there's no guarantee that it will be compatible with Apple's.

它可以在 Windows 上运行吗?或许。在最近的历史中,Apple 在让其 Windows 兄弟参与其中——iTunes、Safari、MobileMe 等方面做得非常好。但这并不总是立即发生。滚动您自己的Windows(或任何其他平台)解决方案是非常简单的,但不能保证,这将是与苹果的兼容。

回答by Rob

Bonjour happens at layer 3, so it may be a small part of it.

Bonjour 发生在第 3 层,因此它可能只是其中的一小部分。

The real question is how does AirDrop work at layer 2.

真正的问题是 AirDrop 如何在第 2 层工作。

回答by anarcat

Airdrop was reverse-engineerd by the https://owlink.org/folks. They implemented a free Python version called opendropas well. The implementation is (unsurprisingly) quite hairy as you need to setup a special Wi-Fi link alongside some bluetooth voodoo, but it apparently works. Or at least it works better than whatever we had before, which was those few question around SE:

空投是由https://owlink.org/人逆向工程的。他们还实现了一个名为opendrop的免费 Python 版本。这个实现(不出所料)相当麻烦,因为你需要在一些蓝牙伏都教旁边设置一个特殊的 Wi-Fi 链接,但它显然有效。或者至少它比我们以前的任何东西都好用,这是关于 SE 的几个问题: