Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jpsim/PeerKit
An open-source Swift framework for building event-driven, zero-config Multipeer Connectivity apps
https://github.com/jpsim/PeerKit
Last synced: 3 months ago
JSON representation
An open-source Swift framework for building event-driven, zero-config Multipeer Connectivity apps
- Host: GitHub
- URL: https://github.com/jpsim/PeerKit
- Owner: jpsim
- License: mit
- Created: 2014-11-06T23:38:26.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2018-12-18T09:49:15.000Z (almost 6 years ago)
- Last Synced: 2024-07-10T13:59:38.284Z (4 months ago)
- Language: Swift
- Size: 57.6 KB
- Stars: 872
- Watchers: 28
- Forks: 72
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ios - PeerKit - source Swift framework for building event-driven, zero-config Multipeer Connectivity apps. (Hardware / Bluetooth)
- awesome-swift - PeerKit - Framework for building event-driven, zero-config Multipeer Connectivity apps. (Libs / Network)
- awesome-ios-star - PeerKit - source Swift framework for building event-driven, zero-config Multipeer Connectivity apps. (Hardware / Bluetooth)
- awesome-swift-cn - PeerKit - An open-source Swift framework for building event-driven, zero-config Multipeer Connectivity apps. (Libs / Network)
README
# PeerKit
## An open-source Swift framework for building event-driven, zero-config Multipeer Connectivity apps
## Usage
```swift
// 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](https://github.com/jpsim/CardsAgainst) app for example usage. Specifically the [ConnectionManager](https://github.com/jpsim/CardsAgainst/blob/master/CardsAgainst/Controllers/ConnectionManager.swift) class.
## License
This project is under the MIT license.