简体   繁体   中英

Peer-to-peer network over wifi in iOS

I've been at this for a few days now, and can't seem to find a solution. I want to create a peer to peer network over wifi on iOS. All open source code seems to be supporting running a server or being a client, but there's no code built to support being both - a peer. Is anybody aware of a way I can do this?

iOS 7正是为此目的添加了多重连接框架

Have you thought of using Apple's GameKit framework? I've used it in the past for some simple communication between devices. It's really simple and can get you out of the gate quickly. This looks like a good tutorial.

I think Open Peer is the right solution. It provides real direct peer-to-peer connection between devices without the need of a centralised server. Check out this introductory video .

You cannot create a wi-fi network programmatically in iOS using current APIs. GameKit offers some APIs to do so over bluetooth however.

If you wish to implement a custom solution using CocoaHTTPServer, be aware that you will still not be able to create a direct wi-fi connection, you will simply be able to connect devices on the same (pre-existing) wi-fi network.

Ad-hoc peer to peer Wi-Fi (such as 802.11s) in iOS is still a few years off. Maybe iOSX ;)

iOS supports the Multipeer Connectivity framework which enables iOS devices to talk to each other over Bluetooth, infrastructure (with a router) WiFi, or P2P.

It does not, however, provide a way to explicitly use P2P. There is a layer of abstraction away from how any of a device's peers (other iOS devices) are connected, and it does not currently allow for non-iOS devices to be connected.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM