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:
socket.delegate = self
socket.connect()
func websocketDidConnect() {
println("websocket is connected")
}
You can find StarScream on Github here.
A great library for using Websockets.
- Open Source: Objective-C WebSockets Client Library
- Example: A Swift Language Based Hacker News Reading App
- An iOS Objective-C Socket.IO Client Library For Easy Real-Time Web Communication
- Open Source Library Extending Swift Strings With Linguistics And Social Features
- Guide: Everything You Need To Know About Swift Arrays
Original article: An Open Source Swift Based Websockets Client Library
©2014 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.