This repository was archived by the owner on Nov 2, 2020. It is now read-only.
-
Couldn't load subscription status.
- Fork 7
Installation and Configuration
Roman Baitaliuk edited this page May 31, 2018
·
7 revisions
ClusterWS-Client-Swift is compatible with CocoaPods. With CocoaPods, just add this to your Podfile:
pod 'ClusterWS-Client-Swift', '~> 3.0.2'To connect to the server use ClusterWS instance:
let webSocket = ClusterWS(url: "ws://localhost:80")
webSocket.delegate = self
webSocket.connect()/**
autoReconnect: Bool - allow to auto-reconnect to the server on lost connection (default false),
reconnectionIntervalMin: Double - how often it will try to reconnect in seconds (default 1.0),
reconnectionIntervalMax: Double - how often it will try to reconnect in seconds (default 5.0),
reconnectionAttempts: Int - how many attempts, 0 means without limit (default 0)
*/
webSocket.setReconnection(autoReconnect: true, reconnectionIntervalMin: 1.0, reconnectionIntervalMax: 5.0, reconnectionAttempts: 0)We would really appreciate if you give us stars (on all our repositories) this will motivate us to work harder. Thank you very much.