Get Updates By E-mail 

Article Written By:
Johann Dowa

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.


  •  
  •  
  •  
  •  
  •  

Submit A Resource

Have you created a useful tutorial, library or tool for iOS development that you would like to get in front of our 300,000+ monthly page views from iOS developers?

You can submit the url here.

The resources we feel will appeal to our readers the most will be posted on the front page.

Comments