Giter VIP home page Giter VIP logo

peerkit's Introduction

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.

peerkit's People

Contributors

igormuzyka avatar jpsim avatar khaullen avatar neonichu avatar nickswalker avatar patoroco avatar tinoheth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

peerkit's Issues

Distribute through CocoaPods

Would you be amenable to distributing PeerKit through CocoaPods? I'm sure this would make many people's lives a little easier. The process isn't too involved.

Any update for support Swift 3

Hi

I'm trying to convert your project into Swift 3 with XCode 8.1 beta, but it failed to convert.

Any leads to solve this issue or plan to support Swift 3?

Thanks!

Question

How does the connection between the devices work exactly ? :) Just curious :)

File exchange

Hi,

Is there any example demonstrating file exchange using PeerKit? Stackoverflow is almost empty concerning PeerKit unfortunately.
Thanks.

transfer speed is slow

Using the multipeer test, the transfer speed is about 2MB/s. The transmission speed under the LAN should be very fast.

Do you know why.

Connection successful only 10% of the time

I have set up PeerKit as per the example from the Cards Against app and have managed to get two devices to connect to each other.

However, this connection is only successful ~10% of the time. The other times, .onDisconnect is called right away. Is there any reason why this is happening, or am I doing something wrong?

Also, what is the procedure to attempt a reconnection after the connection is unsuccessful? Should I call .transceive again after creating a new Transceiver?

PeerKit performances

Hi,

I started by using MultiPeer Connectivity directly and I have faced multiple issues concerning file exchange. For instance, I can send files only up to 5m distance between two nodes. Beyond this distance, file exchange is not possible.
Also, I try sending files of different sizes, ranging from 1KB to 10MB. Something, file exchange hangs with 5MB files and sometimes it works flawlessly.
Maybe I'm doing something wrong but I could not find any paper or document giving information about the limitations etc of MPC. I know it is based on Bluetooth and Wifi and, thus, should have the same performances as these technologies but if someone has any information about that, I'll be happy to have them.
Thanks a lot.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.