Android/iOS 点对点架构 [英] Android/iOS Peer-To-Peer architecture
问题描述
这是一个很宽泛的问题,我找到了很多关于这个主题的信息.
This is kind of wide question, I found many information about this topic.
可能的技术
- 蓝牙
- 仅限 iOS 版 GameKit?
- 蓝牙 P2P 库,带 Wi-Fi 和 GPS?一个>
- Wifi 直连?
- 卓悦零配置?
这些目前都没有完全实现的点对点库,或者我还没有找到这样的库.
事实上,我对任何类型的游戏库都不感兴趣(我不针对此类问题)Neither of these does currently have a fully-implemented peer-to-peer library, or I haven't found such.
In fact I'm not interested in any kind of gaming library (and I don't target such issues)我考虑过的问题
- 安卓中的点对点连接
- Android 自 API 14 起,不支持跨平台使用
- ANI(https://github.com/pocmo/Android-Network-Intents) 只拦截网络
- 拨号、MOVL 仅 wi-fi
- C2DM/GCM 需要移动数据
- 仅限直接无线网络
- 需要网络数据和服务器
GameKit 仅与其他 GameKit 兼容
- 蓝牙没有得到很好的支持,需要设备的 root 权限.
我希望在尽可能多的设备之间高效通信,而无需使用移动数据(3G、HS*PA、LTE)或 WIFI AP 作为中间点.
并且不会远距离连接人,就像通过蓝牙连接 PAN.I'd like to efficiently communicate between as many devices as possible, without need of using mobile data (3G,HS*PA,LTE) or WIFI AP as intermediate point.
And not connecting people over large distances, really just like a PAN over Bluetooth.因此,我需要具备哪些功能
Thus, what features I'd require to have
- 完全离线(不需要任何移动数据服务或 wifi AP)
- 跨平台兼容性(Android、iOS)
- 移动操作系统向后兼容性(Android 自 2.3,iOS 自 5.1.1)
我想要的功能
- 路由优化(OSPF、MME、...)
- 不需要设备授权网络(参见 Android 不安全的 BT RFCOMM)
- 最多可容纳数十名用户(最多 20-30 个 imo,如果可能,可能更多)
- 如果需要,网络可能会选择自己的领导者(服务器节点)?
目前有什么可以用于上述功能的吗?
Is there currently anything I could use for mentioned features?
推荐答案
我知道 google 刚刚推出了一个跨平台的 api,用于 ios 和 android 设备相互通信.我不知道你到底在寻找什么,但这个可以让你在 Android 和 IOS 设备之间传递小的二进制有效载荷.他们根本不必在同一个网络上,也不必连接到互联网.我会把链接放上来看看.
I know google just came out with a cross platform api for ios and android devices to communicate with each other. I don't know what you're exactly looking for but this one lets you pass small binary payloads between Android and IOS devices. they don't have to be on the same network at all either or connected to the internet. I'll include the link just check it out.
https://developers.google.com/nearby/messages/overview
这篇关于Android/iOS 点对点架构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!