shir / SocketClient

SocketShuttle is a Bayeux client implementation on top of SocketRocket.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SocketClient

Simple, fast & reliable Faye Websocket client. Well documented higher-level API build on SocketRocket, which is used as transport layer. Supports messaging on different channels.

  • Simple: You don't have to care about messaging on different channels for yourself and can rely for the server-side part on Faye. Automatically JSON serialization and deserialization with Foundation's NSJSONSerialization.
  • Fast: It uses Websockets! Furthermore it use GCD intensively and tries to never block the main queue.
  • Reliable connection: It automatically tries to reconnect, if the connection was interrupted. It uses SystemConfiguration's reachability events to observe connection state. Furthermore it observes UIKit's application active state notifications to disconnect when going in background and reconnect when becoming active.
  • Well documented: You can install and open Appledoc documentation by executing make doc.

TODO

  • Basic example
    • Create a basic Bayeux sample server
    • Create a basic sample app
  • Implement structured unit tests
  • Support hosts advice
  • Add method to delegate protocol which allows intercept and modify all non meta messages
  • Add Target to build for OS X

Installation instructions

via CocoaPods

The recommended approach for installing SocketClient is via the CocoaPods package manager, as it provides flexible dependency management and dead simple installation.

Install CocoaPods if not already available:

$ [sudo] gem install cocoapods
$ pod setup

Change to the directory of your Xcode project, and Create and Edit your Podfile and add SocketClient:

$ cd /path/to/MyProject
$ touch Podfile
$ edit Podfile
platform :ios, '5.0'
pod 'SocketClient', '~> 0.1.0'

Install into your project:

$ pod install

use as Submodule

  1. Execute git submodule add git@github.com:redpeppix-gmbh-co-kg/SocketClient.git vendor/SocketClient.

  2. open vendor/SocketClient

  3. Drop SocketClient.xcodeproj in your project navigator.

    Step 3

  4. Add Target SocketClient.

    Step 4

  5. Add library libSocketClient.a to your project.

    Step 5

  6. Add library libicucore.dylib to your project.

    Step 6

  7. (Ensure that library was placed in group Frameworks.)

    Step 7

  8. import <SocketClient/SocketClient.h> where ever you want to use the library. You could add it to your header prefix file, if you want.

Usage

See the provided example app and the documentation for more information.

Credits

License

Copyright (c) 2013 Marius Rackwitz marius@paij.com

The MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

SocketShuttle is a Bayeux client implementation on top of SocketRocket.

License:MIT License