67
GitHub - jpsim/PeerKit: An open-source Swift framework for building event-driven...
source link: https://github.com/jpsim/PeerKit
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
README.md
PeerKit
An open-source Swift framework for building event-driven, zero-config Multipeer Connectivity apps
Usage
// Automatically detect and attach to other peers with this service type PeerKit.transceive("com-jpsim-myApp") enum Event: String { case StartGame, EndGame } // Send a StartGame event with attached data to all peers PeerKit.sendEvent(Event.StartGame.rawValue, object: ["myInfo": "hello!"])
See the CardsAgainst app for example usage. Specifically the ConnectionManager class.
License
This project is under the MIT license.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK