Multipeer Connectivity
Framework
報告⼈人:allenlinli 材料提供:李岡諭
2014.4.10
FireChat
請下載FireChat
⼤大家動⼿手做
• https://dl.dropboxusercontent.com/u/2857188/
MCDemo.zip
• 測試是否可以連⼋八個
Wireless mesh networking
• Peer-to-peer connections:
• infrastructure Wi-Fi networks
• peer-to-peer Wi-Fi
• Bluetooth pers...
Pros & Cons
• Pros
• Without an internet connection
• Location-based communication (nearby)
• Cons
• Sessions currently su...
Sending & Receiving
Information
• Messages: Text or small serialised objects
(NSData)
• Streams: Audio, video, or real-tim...
Build up Connection
Steps
• PeerID
• Session
• Advertise
• Browser
• Accept
_peerID = [[MCPeerID alloc]
initWithDisplayName:displayName];
_session = [[MCSession alloc] initWithPeer:_peerID];
_sessio...
_advertiser = [[MCAdvertiserAssistant alloc]
initWithServiceType:@"chat-files"
discoveryInfo:nil
session:_session];
[_adve...
Data Transfer
[_appDelegate.mcManager.session sendData:dataToSend
toPeers:allPeers
withMode:MCSessionSendDataReliable
error:&error];
傳輸速度
• Bluetooth:
• Bluetooth (Bonjour over Bluetooth)
• Multipeer Connectivity 不是使⽤用 BLE/Bluetooth 4.0 advertisement。
• 猜...
報告完畢,謝謝
感謝李岡諭
Resources
Tutorials
• http://www.appcoda.com/intro-multipeer-
connectivity-framework-ios-programming/
• http://code.tutsplus.com/tut...
Multiple Connectivity Framework Keynote
Multiple Connectivity Framework Keynote
Multiple Connectivity Framework Keynote
Upcoming SlideShare
Loading in …5
×

Multiple Connectivity Framework Keynote

1,074 views

Published on

Multiple Connectivity Framework Keynote

Published in: Software

Multiple Connectivity Framework Keynote

  1. 1. Multipeer Connectivity Framework 報告⼈人:allenlinli 材料提供:李岡諭 2014.4.10
  2. 2. FireChat
  3. 3. 請下載FireChat
  4. 4. ⼤大家動⼿手做 • https://dl.dropboxusercontent.com/u/2857188/ MCDemo.zip • 測試是否可以連⼋八個
  5. 5. Wireless mesh networking • Peer-to-peer connections: • infrastructure Wi-Fi networks • peer-to-peer Wi-Fi • Bluetooth personal area networks
  6. 6. Pros & Cons • Pros • Without an internet connection • Location-based communication (nearby) • Cons • Sessions currently support up to 8 peers • Data transfer is slow – especially on Bluetooth • Can not cross networks in single connection • Not support background mode
  7. 7. Sending & Receiving Information • Messages: Text or small serialised objects (NSData) • Streams: Audio, video, or real-time sensor events • Resources: Images, movies, or documents.
  8. 8. Build up Connection
  9. 9. Steps • PeerID • Session • Advertise • Browser • Accept
  10. 10. _peerID = [[MCPeerID alloc] initWithDisplayName:displayName]; _session = [[MCSession alloc] initWithPeer:_peerID]; _session.delegate = self;
  11. 11. _advertiser = [[MCAdvertiserAssistant alloc] initWithServiceType:@"chat-files" discoveryInfo:nil session:_session]; [_advertiser start]; _browser = [[MCBrowserViewController alloc] initWithServiceType:@"chat-files" session:_session];
  12. 12. Data Transfer
  13. 13. [_appDelegate.mcManager.session sendData:dataToSend toPeers:allPeers withMode:MCSessionSendDataReliable error:&error];
  14. 14. 傳輸速度 • Bluetooth: • Bluetooth (Bonjour over Bluetooth) • Multipeer Connectivity 不是使⽤用 BLE/Bluetooth 4.0 advertisement。 • 猜測:使⽤用 Bluetooth Classic。 • WiFi • Multipeer Connectivity 不是使⽤用 WiFi Direct。理論上可達 250 Mbps,實測⼤大約 35-50 Mbps。 • 猜測:與 AirDrop ⼀一樣,使⽤用 Adhoc WiFi。上限為 11 Mbps。實測 兩台 Mac 的 AirDrop 傳輸⼤大約是 18 Mbps (不同 Wifi 下是 4 Mbps)。
  15. 15. 報告完畢,謝謝 感謝李岡諭
  16. 16. Resources
  17. 17. Tutorials • http://www.appcoda.com/intro-multipeer- connectivity-framework-ios-programming/ • http://code.tutsplus.com/tutorials/exploring-the- multipeer-connectivity-framework-project-setup-- mobile-23071 • http://nshipster.com/multipeer-connectivity/

×