An Open Source Swift Based Websockets Client Library

Some time ago I mentioned the objective-c based SocketRocket Websockets client libary.

Here’s an open source library Swift based websocket client library called StarScream from Dalton Cherry.

StarScream features a nice clean syntax, support for secure websocket connections (tls/wss), and is automatically non-blocking with everything happening in the background.

This example from the readme shows how to create a socket and the callback once a connection is made:

var socket = Websocket(url: NSURL(scheme: "ws", host: "localhost:8080", path: "/"))
socket.delegate = self
socket.connect()

func websocketDidConnect() {
    println("websocket is connected")
}

You can find StarScream on Github here.

A great library for using Websockets.

FacebookTwitterDiggStumbleUponGoogle Plus

Original article: An Open Source Swift Based Websockets Client Library

©2014 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.

Leave a Reply

Your email address will not be published. Required fields are marked *