diff --git a/docs/12to13.html b/docs/12to13.html index 85b45e5..ccf8495 100644 --- a/docs/12to13.html +++ b/docs/12to13.html @@ -186,8 +186,8 @@ the swift client now only uses one engine per connection. Previously in order to to create multiple clients, and each client had its own engine.

Some v12 code might’ve looked like this:

-
let defaultSocket = SocketIOClient(socketURL: myURL)
-let namespaceSocket = SocketIOClient(socketURL: myURL, config: [.nsp("/swift")])
+
let defaultSocket = SocketIOClient(socketURL: myURL)
+let namespaceSocket = SocketIOClient(socketURL: myURL, config: [.nsp("/swift")])
 
 // add handlers for sockets and connect
 
@@ -196,7 +196,7 @@ to create multiple clients, and each client had its own engine.

In v12 this would have opened two connections to the socket.io.

In v13 the same code would look like this:

-
let manager = SocketManager(socketURL: myURL)
+
let manager = SocketManager(socketURL: myURL)
 let defaultSocket = manager.defaultSocket
 let namespaceSocket = manager.socket(forNamespace: "/swift")
 
@@ -227,9 +227,9 @@ associated with that namespace.

You should know that SocketIOClients no longer need to be held around in properties, but the SocketManager should.

One of the most common mistakes people made is not maintaining a strong reference to the client.

-
class Manager {
+
class Manager {
     func addHandlers() {
-        let socket = SocketIOClient(socketURL: myURL, config: [.nsp("/swift")])
+        let socket = SocketIOClient(socketURL: myURL, config: [.nsp("/swift")])
 
         // Add handlers
     }
@@ -239,8 +239,8 @@ associated with that namespace.

This would have resulted in the client being released and no handlers being called.

A correct equivalent would be:

-
class Manager {
-    let socketManager = SocketManager(socketURL: someURL)
+
class Manager {
+    let socketManager = SocketManager(socketURL: someURL)
 
     func addHandlers() {
         let socket = socketManager.socket(forNamespace: "/swift")
@@ -274,8 +274,8 @@ and a connect event fired.

diff --git a/docs/Classes.html b/docs/Classes.html index 098b1c2..795ba83 100644 --- a/docs/Classes.html +++ b/docs/Classes.html @@ -207,7 +207,7 @@ See SocketEnginePollable

Declaration

Swift

-
public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePollable, SocketEngineWebsocket,
+                          
public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePollable, SocketEngineWebsocket,
                                   ConfigSettable
@@ -242,7 +242,7 @@ See SocketEnginePollable

Declaration

Swift

-
public final class SocketAckEmitter : NSObject
+
public final class SocketAckEmitter : NSObject
@@ -276,7 +276,7 @@ Example:

Declaration

Swift

-
public final class OnAckCallback : NSObject
+
public final class OnAckCallback : NSObject
@@ -308,7 +308,7 @@ Example:

Declaration

Swift

-
public final class SocketAnyEvent : NSObject
+
public final class SocketAnyEvent : NSObject
@@ -351,7 +351,7 @@ Example:

Declaration

Swift

-
open class SocketIOClient : NSObject, SocketIOClientSpec
+
open class SocketIOClient : NSObject, SocketIOClientSpec
@@ -383,7 +383,7 @@ Example:

Declaration

Swift

-
open class SSLSecurity : NSObject
+
open class SSLSecurity : NSObject
@@ -412,7 +412,7 @@ Example:

A SocketManager is responsible for multiplexing multiple namespaces through a single SocketEngineSpec.

Example:

-
let manager = SocketManager(socketURL: URL(string:"http://localhost:8080/")!)
+
let manager = SocketManager(socketURL: URL(string:"http://localhost:8080/")!)
 let defaultNamespaceSocket = manager.defaultSocket
 let swiftSocket = manager.socket(forNamespace: "/swift")
 
@@ -431,7 +431,7 @@ or call one of the disconnectSocket methods on this class.

Declaration

Swift

-
open class SocketManager : NSObject, SocketManagerSpec, SocketParsable, SocketDataBufferable, ConfigSettable
+
open class SocketManager : NSObject, SocketManagerSpec, SocketParsable, SocketDataBufferable, ConfigSettable
@@ -446,8 +446,8 @@ or call one of the disconnectSocket methods on this class.

diff --git a/docs/Classes/OnAckCallback.html b/docs/Classes/OnAckCallback.html index b62e562..4a02be0 100644 --- a/docs/Classes/OnAckCallback.html +++ b/docs/Classes/OnAckCallback.html @@ -179,7 +179,7 @@

OnAckCallback

-
public final class OnAckCallback : NSObject
+
public final class OnAckCallback : NSObject
@@ -225,7 +225,7 @@ Example:

Declaration

Swift

-
public func timingOut(after seconds: Double, callback: @escaping AckCallback)
+
public func timingOut(after seconds: Double, callback: @escaping AckCallback)
@@ -272,8 +272,8 @@ Example:

diff --git a/docs/Classes/SSLSecurity.html b/docs/Classes/SSLSecurity.html index 4dc9a40..25973c6 100644 --- a/docs/Classes/SSLSecurity.html +++ b/docs/Classes/SSLSecurity.html @@ -179,7 +179,7 @@

SSLSecurity

-
open class SSLSecurity : NSObject
+
open class SSLSecurity : NSObject
@@ -219,7 +219,7 @@

Declaration

Swift

-
public let security: Starscream.SSLSecurity
+
public let security: Starscream.SSLSecurity
@@ -258,7 +258,7 @@ pinning validation

Declaration

Swift

-
public convenience init(usePublicKeys: Bool = true)
+
public convenience init(usePublicKeys: Bool = true)
@@ -305,7 +305,7 @@ validation

Declaration

Swift

-
public convenience init(certs: [SSLCert], usePublicKeys: Bool)
+
public convenience init(certs: [SSLCert], usePublicKeys: Bool)
@@ -368,7 +368,7 @@ validation

Declaration

Swift

-
public func isValid(_ trust: SecTrust, domain: String?) -> Bool
+
public func isValid(_ trust: SecTrust, domain: String?) -> Bool
@@ -418,8 +418,8 @@ validation

diff --git a/docs/Classes/SocketAckEmitter.html b/docs/Classes/SocketAckEmitter.html index e17b2d8..51a8cfc 100644 --- a/docs/Classes/SocketAckEmitter.html +++ b/docs/Classes/SocketAckEmitter.html @@ -179,7 +179,7 @@

SocketAckEmitter

-
public final class SocketAckEmitter : NSObject
+
public final class SocketAckEmitter : NSObject
@@ -221,7 +221,7 @@

Declaration

Swift

-
public var expected: Bool
+
public var expected: Bool
@@ -259,7 +259,7 @@

Declaration

Swift

-
public init(socket: SocketIOClient, ackNum: Int)
+
public init(socket: SocketIOClient, ackNum: Int)
@@ -331,7 +331,7 @@ will be emitted. The structure of the error data is [ackNum, items, theErr

Declaration

Swift

-
public func with(_ items: SocketData...)
+
public func with(_ items: SocketData...)
@@ -377,7 +377,7 @@ will be emitted. The structure of the error data is [ackNum, items, theErr

Declaration

Swift

-
public func with(_ items: [Any])
+
public func with(_ items: [Any])
@@ -411,8 +411,8 @@ will be emitted. The structure of the error data is [ackNum, items, theErr diff --git a/docs/Classes/SocketAnyEvent.html b/docs/Classes/SocketAnyEvent.html index 44b5094..7d80975 100644 --- a/docs/Classes/SocketAnyEvent.html +++ b/docs/Classes/SocketAnyEvent.html @@ -179,7 +179,7 @@

SocketAnyEvent

-
public final class SocketAnyEvent : NSObject
+
public final class SocketAnyEvent : NSObject
@@ -219,7 +219,7 @@

Declaration

Swift

-
public let event: String
+
public let event: String
@@ -246,7 +246,7 @@

Declaration

Swift

-
public let items: [Any]?
+
public let items: [Any]?
@@ -273,7 +273,7 @@

Declaration

Swift

-
override public var description: String
+
override public var description: String
@@ -288,8 +288,8 @@ diff --git a/docs/Classes/SocketEngine.html b/docs/Classes/SocketEngine.html index f73a419..18d81d2 100644 --- a/docs/Classes/SocketEngine.html +++ b/docs/Classes/SocketEngine.html @@ -179,7 +179,7 @@

SocketEngine

@@ -248,7 +248,7 @@ See SocketEnginePollable<

Declaration

Swift

-
public var connectParams: [String: Any]?
+
public var connectParams: [String: Any]?
@@ -275,7 +275,7 @@ See
SocketEnginePollable<

Declaration

Swift

-
public var extraHeaders: [String: String]?
+
public var extraHeaders: [String: String]?
@@ -304,7 +304,7 @@ See
SocketEnginePollable<

Declaration

Swift

-
public var postWait = [String]()
+
public var postWait = [String]()
@@ -334,7 +334,7 @@ disconnect us.

Declaration

Swift

-
public var waitingForPoll = false
+
public var waitingForPoll = false
@@ -364,7 +364,7 @@ disconnect us.

Declaration

Swift

-
public var waitingForPost = false
+
public var waitingForPost = false
@@ -391,7 +391,7 @@ disconnect us.

Declaration

Swift

-
public private(set) var closed = false
+
public private(set) var closed = false
@@ -418,7 +418,7 @@ disconnect us.

Declaration

Swift

-
public private(set) var compress = false
+
public private(set) var compress = false
@@ -445,7 +445,7 @@ disconnect us.

Declaration

Swift

-
public private(set) var connected = false
+
public private(set) var connected = false
@@ -472,7 +472,7 @@ disconnect us.

Declaration

Swift

-
public private(set) var cookies: [HTTPCookie]?
+
public private(set) var cookies: [HTTPCookie]?
@@ -501,7 +501,7 @@ disconnect us.

Declaration

Swift

-
public private(set) var fastUpgrade = false
+
public private(set) var fastUpgrade = false
@@ -528,7 +528,7 @@ disconnect us.

Declaration

Swift

-
public private(set) var forcePolling = false
+
public private(set) var forcePolling = false
@@ -555,7 +555,7 @@ disconnect us.

Declaration

Swift

-
public private(set) var forceWebsockets = false
+
public private(set) var forceWebsockets = false
@@ -582,7 +582,7 @@ disconnect us.

Declaration

Swift

-
public private(set) var invalidated = false
+
public private(set) var invalidated = false
@@ -609,7 +609,7 @@ disconnect us.

Declaration

Swift

-
public private(set) var polling = true
+
public private(set) var polling = true
@@ -636,7 +636,7 @@ disconnect us.

Declaration

Swift

-
public private(set) var probing = false
+
public private(set) var probing = false
@@ -663,7 +663,7 @@ disconnect us.

Declaration

Swift

-
public private(set) var session: URLSession?
+
public private(set) var session: URLSession?
@@ -690,7 +690,7 @@ disconnect us.

Declaration

Swift

-
public private(set) var sid = ""
+
public private(set) var sid = ""
@@ -717,7 +717,7 @@ disconnect us.

Declaration

Swift

-
public private(set) var socketPath = "/engine.io/"
+
public private(set) var socketPath = "/engine.io/"
@@ -744,7 +744,7 @@ disconnect us.

Declaration

Swift

-
public private(set) var urlPolling = URL(string: "http://localhost/")!
+
public private(set) var urlPolling = URL(string: "http://localhost/")!
@@ -771,7 +771,7 @@ disconnect us.

Declaration

Swift

-
public private(set) var urlWebSocket = URL(string: "http://localhost/")!
+
public private(set) var urlWebSocket = URL(string: "http://localhost/")!
@@ -798,7 +798,7 @@ disconnect us.

Declaration

Swift

-
public private(set) var websocket = false
+
public private(set) var websocket = false
@@ -825,7 +825,7 @@ disconnect us.

Declaration

Swift

-
public private(set) var ws: WebSocket?
+
public private(set) var ws: WebSocket?
@@ -852,7 +852,7 @@ disconnect us.

Declaration

@@ -890,7 +890,7 @@ disconnect us.

Declaration

Swift

-
public init(client: SocketEngineClient, url: URL, config: SocketIOClientConfiguration)
+
public init(client: SocketEngineClient, url: URL, config: SocketIOClientConfiguration)
@@ -960,7 +960,7 @@ disconnect us.

Declaration

Swift

-
public convenience init(client: SocketEngineClient, url: URL, options: [String: Any]?)
+
public convenience init(client: SocketEngineClient, url: URL, options: [String: Any]?)
@@ -1041,7 +1041,7 @@ disconnect us.

Declaration

Swift

-
public func connect()
+
public func connect()
@@ -1068,7 +1068,7 @@ disconnect us.

Declaration

Swift

-
public func didError(reason: String)
+
public func didError(reason: String)
@@ -1095,7 +1095,7 @@ disconnect us.

Declaration

Swift

-
public func disconnect(reason: String)
+
public func disconnect(reason: String)
@@ -1144,7 +1144,7 @@ WebSocket mode.

Declaration

Swift

-
public func doFastUpgrade()
+
public func doFastUpgrade()
@@ -1174,7 +1174,7 @@ the engine is attempting to upgrade to WebSocket it does not do any POSTing.

Declaration

Swift

-
public func flushWaitingForPostToWebSocket()
+
public func flushWaitingForPostToWebSocket()
@@ -1201,7 +1201,7 @@ the engine is attempting to upgrade to WebSocket it does not do any POSTing.

Declaration

Swift

-
public func parseEngineData(_ data: Data)
+
public func parseEngineData(_ data: Data)
@@ -1247,7 +1247,7 @@ the engine is attempting to upgrade to WebSocket it does not do any POSTing.

Declaration

Swift

-
public func parseEngineMessage(_ message: String)
+
public func parseEngineMessage(_ message: String)
@@ -1308,7 +1308,7 @@ the engine is attempting to upgrade to WebSocket it does not do any POSTing.

Declaration

Swift

-
open func setConfigs(_ config: SocketIOClientConfiguration)
+
open func setConfigs(_ config: SocketIOClientConfiguration)
@@ -1335,7 +1335,7 @@ the engine is attempting to upgrade to WebSocket it does not do any POSTing.

Declaration

Swift

-
public func write(_ msg: String, withType type: SocketEnginePacketType, withData data: [Data])
+
public func write(_ msg: String, withType type: SocketEnginePacketType, withData data: [Data])
@@ -1416,7 +1416,7 @@ the engine is attempting to upgrade to WebSocket it does not do any POSTing.

Declaration

Swift

-
public func websocketDidConnect(socket: WebSocketClient)
+
public func websocketDidConnect(socket: WebSocketClient)
@@ -1443,7 +1443,7 @@ the engine is attempting to upgrade to WebSocket it does not do any POSTing.

Declaration

Swift

-
public func websocketDidDisconnect(socket: WebSocketClient, error: Error?)
+
public func websocketDidDisconnect(socket: WebSocketClient, error: Error?)
@@ -1481,7 +1481,7 @@ the engine is attempting to upgrade to WebSocket it does not do any POSTing.

Declaration

Swift

-
public func URLSession(session: URLSession, didBecomeInvalidWithError error: NSError?)
+
public func URLSession(session: URLSession, didBecomeInvalidWithError error: NSError?)
@@ -1496,8 +1496,8 @@ the engine is attempting to upgrade to WebSocket it does not do any POSTing.

diff --git a/docs/Classes/SocketIOClient.html b/docs/Classes/SocketIOClient.html index 4c3c174..77abe5e 100644 --- a/docs/Classes/SocketIOClient.html +++ b/docs/Classes/SocketIOClient.html @@ -179,7 +179,7 @@

SocketIOClient

-
open class SocketIOClient : NSObject, SocketIOClientSpec
+
open class SocketIOClient : NSObject, SocketIOClientSpec
@@ -232,7 +232,7 @@

Declaration

Swift

-
public let nsp: String
+
public let nsp: String
@@ -259,7 +259,7 @@

Declaration

Swift

-
public var sid: String
+
public var sid: String
@@ -286,7 +286,7 @@

Declaration

Swift

-
public private(set) var anyHandler: ((SocketAnyEvent) -> ())?
+
public private(set) var anyHandler: ((SocketAnyEvent) -> ())?
@@ -313,7 +313,7 @@

Declaration

Swift

-
public private(set) var handlers = [SocketEventHandler]()
+
public private(set) var handlers = [SocketEventHandler]()
@@ -340,7 +340,7 @@

Declaration

Swift

-
public private(set) weak var manager: SocketManagerSpec?
+
public private(set) weak var manager: SocketManagerSpec?
@@ -367,7 +367,7 @@

Declaration

Swift

-
public private(set) var status = SocketIOStatus.notConnected
+
public private(set) var status = SocketIOStatus.notConnected
@@ -405,7 +405,7 @@

Declaration

Swift

-
public init(manager: SocketManagerSpec, nsp: String)
+
public init(manager: SocketManagerSpec, nsp: String)
@@ -476,7 +476,7 @@

Declaration

Swift

-
open func connect()
+
open func connect()
@@ -505,7 +505,7 @@

Declaration

Swift

-
open func connect(timeoutAfter: Double, withHandler handler: (() -> ())?)
+
open func connect(timeoutAfter: Double, withHandler handler: (() -> ())?)
@@ -565,7 +565,7 @@ then this is only called when the client connects to that namespace.

Declaration

Swift

-
open func didConnect(toNamespace namespace: String)
+
open func didConnect(toNamespace namespace: String)
@@ -611,7 +611,7 @@ then this is only called when the client connects to that namespace.

Declaration

Swift

-
open func didDisconnect(reason: String)
+
open func didDisconnect(reason: String)
@@ -660,7 +660,7 @@ then this is only called when the client connects to that namespace.

Declaration

Swift

-
open func disconnect()
+
open func disconnect()
@@ -690,7 +690,7 @@ will be emitted. The structure of the error data is [eventName, items, the

Declaration

Swift

-
open func emit(_ event: String, _ items: SocketData...)
+
open func emit(_ event: String, _ items: SocketData...)
@@ -748,7 +748,7 @@ will be emitted. The structure of the error data is [eventName, items, the

Declaration

Swift

-
open func emit(_ event: String, with items: [Any])
+
open func emit(_ event: String, with items: [Any])
@@ -818,7 +818,7 @@ will be emitted. The structure of the error data is [eventName, items, the

Declaration

Swift

-
open func emitWithAck(_ event: String, _ items: SocketData...) -> OnAckCallback
+
open func emitWithAck(_ event: String, _ items: SocketData...) -> OnAckCallback
@@ -889,7 +889,7 @@ Check that your server’s api will ack the event being sent.

Declaration

Swift

-
open func emitWithAck(_ event: String, with items: [Any]) -> OnAckCallback
+
open func emitWithAck(_ event: String, with items: [Any]) -> OnAckCallback
@@ -953,7 +953,7 @@ Check that your server’s api will ack the event being sent.

Declaration

Swift

-
open func emitAck(_ ack: Int, with items: [Any])
+
open func emitAck(_ ack: Int, with items: [Any])
@@ -1011,7 +1011,7 @@ Check that your server’s api will ack the event being sent.

Declaration

Swift

-
open func handleAck(_ ack: Int, data: [Any])
+
open func handleAck(_ ack: Int, data: [Any])
@@ -1069,7 +1069,7 @@ Check that your server’s api will ack the event being sent.

Declaration

Swift

-
open func handleClientEvent(_ event: SocketClientEvent, data: [Any])
+
open func handleClientEvent(_ event: SocketClientEvent, data: [Any])
@@ -1127,7 +1127,7 @@ Check that your server’s api will ack the event being sent.

Declaration

Swift

-
open func handleEvent(_ event: String, data: [Any], isInternalMessage: Bool, withAck ack: Int = -1)
+
open func handleEvent(_ event: String, data: [Any], isInternalMessage: Bool, withAck ack: Int = -1)
@@ -1210,7 +1210,7 @@ socket.

Declaration

Swift

-
open func handlePacket(_ packet: SocketPacket)
+
open func handlePacket(_ packet: SocketPacket)
@@ -1256,7 +1256,7 @@ socket.

Declaration

Swift

-
open func leaveNamespace()
+
open func leaveNamespace()
@@ -1283,7 +1283,7 @@ socket.

Declaration

Swift

-
open func joinNamespace()
+
open func joinNamespace()
@@ -1312,7 +1312,7 @@ socket.

Declaration

Swift

-
open func off(clientEvent event: SocketClientEvent)
+
open func off(clientEvent event: SocketClientEvent)
@@ -1360,7 +1360,7 @@ socket.

Declaration

Swift

-
open func off(_ event: String)
+
open func off(_ event: String)
@@ -1408,7 +1408,7 @@ socket.

Declaration

Swift

-
open func off(id: UUID)
+
open func off(id: UUID)
@@ -1454,7 +1454,7 @@ socket.

Declaration

Swift

-
open func on(_ event: String, callback: @escaping NormalCallback) -> UUID
+
open func on(_ event: String, callback: @escaping NormalCallback) -> UUID
@@ -1522,7 +1522,7 @@ socket.

Declaration

Swift

-
open func on(clientEvent event: SocketClientEvent, callback: @escaping NormalCallback) -> UUID
+
open func on(clientEvent event: SocketClientEvent, callback: @escaping NormalCallback) -> UUID
@@ -1584,7 +1584,7 @@ socket.

Declaration

Swift

-
open func once(clientEvent event: SocketClientEvent, callback: @escaping NormalCallback) -> UUID
+
open func once(clientEvent event: SocketClientEvent, callback: @escaping NormalCallback) -> UUID
@@ -1646,7 +1646,7 @@ socket.

Declaration

Swift

-
open func once(_ event: String, callback: @escaping NormalCallback) -> UUID
+
open func once(_ event: String, callback: @escaping NormalCallback) -> UUID
@@ -1708,7 +1708,7 @@ socket.

Declaration

Swift

-
open func onAny(_ handler: @escaping (SocketAnyEvent) -> ())
+
open func onAny(_ handler: @escaping (SocketAnyEvent) -> ())
@@ -1756,7 +1756,7 @@ socket.

Declaration

Swift

-
open func removeAllHandlers()
+
open func removeAllHandlers()
@@ -1784,7 +1784,7 @@ Called when the manager detects a broken connection, or when a manual reconnect

Declaration

Swift

-
open func setReconnecting(reason: String)
+
open func setReconnecting(reason: String)
@@ -1818,8 +1818,8 @@ Called when the manager detects a broken connection, or when a manual reconnect diff --git a/docs/Classes/SocketManager.html b/docs/Classes/SocketManager.html index d99f16d..5aa4aa5 100644 --- a/docs/Classes/SocketManager.html +++ b/docs/Classes/SocketManager.html @@ -179,7 +179,7 @@

SocketManager

-
open class SocketManager : NSObject, SocketManagerSpec, SocketParsable, SocketDataBufferable, ConfigSettable
+
open class SocketManager : NSObject, SocketManagerSpec, SocketParsable, SocketDataBufferable, ConfigSettable
@@ -188,7 +188,7 @@

A SocketManager is responsible for multiplexing multiple namespaces through a single SocketEngineSpec.

Example:

-
let manager = SocketManager(socketURL: URL(string:"http://localhost:8080/")!)
+
let manager = SocketManager(socketURL: URL(string:"http://localhost:8080/")!)
 let defaultNamespaceSocket = manager.defaultSocket
 let swiftSocket = manager.socket(forNamespace: "/swift")
 
@@ -235,7 +235,7 @@ or call one of the disconnectSocket methods on this class.

Declaration

Swift

-
public var defaultSocket: SocketIOClient
+
public var defaultSocket: SocketIOClient
@@ -265,7 +265,7 @@ init.

Declaration

Swift

-
public let socketURL: URL
+
public let socketURL: URL
@@ -294,7 +294,7 @@ init.

Declaration

Swift

-
public var config: SocketIOClientConfiguration
+
public var config: SocketIOClientConfiguration
@@ -321,7 +321,7 @@ init.

Declaration

Swift

-
public var engine: SocketEngineSpec?
+
public var engine: SocketEngineSpec?
@@ -348,7 +348,7 @@ init.

Declaration

Swift

-
public var forceNew = false
+
public var forceNew = false
@@ -378,7 +378,7 @@ called on.

Declaration

Swift

-
public var handleQueue = DispatchQueue.main
+
public var handleQueue = DispatchQueue.main
@@ -405,7 +405,7 @@ called on.

Declaration

Swift

-
public var nsps = [String: SocketIOClient]()
+
public var nsps = [String: SocketIOClient]()
@@ -432,7 +432,7 @@ called on.

Declaration

Swift

-
public var reconnects = true
+
public var reconnects = true
@@ -459,7 +459,7 @@ called on.

Declaration

Swift

-
public var reconnectWait = 10
+
public var reconnectWait = 10
@@ -486,7 +486,7 @@ called on.

Declaration

Swift

-
public private(set) var status: SocketIOStatus = .notConnected
+
public private(set) var status: SocketIOStatus = .notConnected
@@ -518,7 +518,7 @@ So this should ideally be an array of one packet waiting for data.

Declaration

Swift

-
public var waitingPackets = [SocketPacket]()
+
public var waitingPackets = [SocketPacket]()
@@ -556,7 +556,7 @@ So this should ideally be an array of one packet waiting for data.

Declaration

Swift

-
public init(socketURL: URL, config: SocketIOClientConfiguration = [])
+
public init(socketURL: URL, config: SocketIOClientConfiguration = [])
@@ -615,7 +615,7 @@ If using Swift it’s recommended to use init(socketURL: NSURL, option

Declaration

Swift

-
public convenience init(socketURL: URL, config: [String: Any]?)
+
public convenience init(socketURL: URL, config: [String: Any]?)
@@ -686,7 +686,7 @@ If using Swift it’s recommended to use init(socketURL: NSURL, option

Declaration

Swift

-
open func connect()
+
open func connect()
@@ -713,7 +713,7 @@ If using Swift it’s recommended to use init(socketURL: NSURL, option

Declaration

Swift

-
open func connectSocket(_ socket: SocketIOClient)
+
open func connectSocket(_ socket: SocketIOClient)
@@ -759,7 +759,7 @@ If using Swift it’s recommended to use init(socketURL: NSURL, option

Declaration

Swift

-
open func didDisconnect(reason: String)
+
open func didDisconnect(reason: String)
@@ -805,7 +805,7 @@ If using Swift it’s recommended to use init(socketURL: NSURL, option

Declaration

Swift

-
open func disconnect()
+
open func disconnect()
@@ -835,7 +835,7 @@ releasing.

Declaration

Swift

-
open func disconnectSocket(_ socket: SocketIOClient)
+
open func disconnectSocket(_ socket: SocketIOClient)
@@ -884,7 +884,7 @@ releasing.

Declaration

Swift

-
open func disconnectSocket(forNamespace nsp: String)
+
open func disconnectSocket(forNamespace nsp: String)
@@ -930,7 +930,7 @@ releasing.

Declaration

Swift

-
open func emitAll(clientEvent event: SocketClientEvent, data: [Any])
+
open func emitAll(clientEvent event: SocketClientEvent, data: [Any])
@@ -976,7 +976,7 @@ releasing.

Declaration

Swift

-
open func emitAll(_ event: String, _ items: SocketData...)
+
open func emitAll(_ event: String, _ items: SocketData...)
@@ -1036,7 +1036,7 @@ releasing.

Declaration

Swift

-
open func emitAll(_ event: String, withItems items: [Any])
+
open func emitAll(_ event: String, withItems items: [Any])
@@ -1094,7 +1094,7 @@ releasing.

Declaration

Swift

-
open func engineDidClose(reason: String)
+
open func engineDidClose(reason: String)
@@ -1140,7 +1140,7 @@ releasing.

Declaration

Swift

-
open func engineDidError(reason: String)
+
open func engineDidError(reason: String)
@@ -1186,7 +1186,7 @@ releasing.

Declaration

Swift

-
open func engineDidOpen(reason: String)
+
open func engineDidOpen(reason: String)
@@ -1232,7 +1232,7 @@ releasing.

Declaration

Swift

-
open func engineDidReceivePong()
+
open func engineDidReceivePong()
@@ -1259,7 +1259,7 @@ releasing.

Declaration

Swift

-
open func engineDidSendPing()
+
open func engineDidSendPing()
@@ -1286,7 +1286,7 @@ releasing.

Declaration

Swift

-
open func parseEngineMessage(_ msg: String)
+
open func parseEngineMessage(_ msg: String)
@@ -1332,7 +1332,7 @@ releasing.

Declaration

Swift

-
open func parseEngineBinaryData(_ data: Data)
+
open func parseEngineBinaryData(_ data: Data)
@@ -1373,14 +1373,15 @@ releasing.

Tries to reconnect to the server.

-

This will cause a disconnect event to be emitted, as well as an reconnectAttempt event.

+

This will cause a SocketClientEvent.reconnect event to be emitted, as well as +SocketClientEvent.reconnectAttempt events.

Declaration

Swift

-
open func reconnect()
+
open func reconnect()
@@ -1410,7 +1411,7 @@ method.

Declaration

Swift

-
open func removeSocket(_ socket: SocketIOClient) -> SocketIOClient?
+
open func removeSocket(_ socket: SocketIOClient) -> SocketIOClient?
@@ -1462,7 +1463,7 @@ method.

Declaration

Swift

-
open func setConfigs(_ config: SocketIOClientConfiguration)
+
open func setConfigs(_ config: SocketIOClientConfiguration)
@@ -1495,7 +1496,7 @@ Or call

Swift

-
open func socket(forNamespace nsp: String) -> SocketIOClient
+
open func socket(forNamespace nsp: String) -> SocketIOClient
@@ -1533,8 +1534,8 @@ Or call -

© 2017 Erik. All rights reserved. (Last updated: 2017-11-30)

-

Generated by jazzy ♪♫ v0.9.0, a Realm project.

+

© 2018 Erik. All rights reserved. (Last updated: 2018-01-10)

+

Generated by jazzy ♪♫ v0.9.1, a Realm project.

diff --git a/docs/Enums.html b/docs/Enums.html index c41b0b5..a9d08ea 100644 --- a/docs/Enums.html +++ b/docs/Enums.html @@ -206,7 +206,7 @@

Declaration

Swift

-
@objc public enum SocketEnginePacketType : Int
+
@objc public enum SocketEnginePacketType : Int
@@ -238,7 +238,7 @@

Declaration

Swift

-
public enum SocketAckStatus : String
+
public enum SocketAckStatus : String
@@ -270,7 +270,7 @@

Declaration

Swift

-
public enum SocketClientEvent : String
+
public enum SocketClientEvent : String
@@ -302,7 +302,7 @@

Declaration

Swift

-
public enum SocketIOClientOption : ClientOption
+
public enum SocketIOClientOption : ClientOption
@@ -334,7 +334,7 @@

Declaration

Swift

-
public enum SocketIOStatus : Int, CustomStringConvertible
+
public enum SocketIOStatus : Int, CustomStringConvertible
@@ -366,7 +366,7 @@

Declaration

Swift

-
public enum SocketParsableError : Error
+
public enum SocketParsableError : Error
@@ -381,8 +381,8 @@ diff --git a/docs/Enums/SocketAckStatus.html b/docs/Enums/SocketAckStatus.html index 59eea2f..39cc5ca 100644 --- a/docs/Enums/SocketAckStatus.html +++ b/docs/Enums/SocketAckStatus.html @@ -179,7 +179,7 @@

SocketAckStatus

-
public enum SocketAckStatus : String
+
public enum SocketAckStatus : String
@@ -212,7 +212,7 @@

Declaration

Swift

-
case noAck = "NO ACK"
+
case noAck = "NO ACK"
@@ -227,8 +227,8 @@ diff --git a/docs/Enums/SocketClientEvent.html b/docs/Enums/SocketClientEvent.html index 56c2871..b576994 100644 --- a/docs/Enums/SocketClientEvent.html +++ b/docs/Enums/SocketClientEvent.html @@ -179,7 +179,7 @@

SocketClientEvent

-
public enum SocketClientEvent : String
+
public enum SocketClientEvent : String
@@ -208,7 +208,7 @@

Emitted when the client connects. This is also called on a successful reconnection. A connect event gets one data item: the namespace that was connected to.

socket.on(clientEvent: .connect) {data, ack in
-    guard let nsp = data[0] as? String else { return }
+    guard let nsp = data[0] as? String else { return }
     // Some logic using the nsp
 }
 
@@ -218,7 +218,7 @@ data item: the namespace that was connected to.

Declaration

Swift

-
case connect
+
case connect
@@ -255,7 +255,7 @@ data item: the namespace that was connected to.

Declaration

Swift

-
case disconnect
+
case disconnect
@@ -292,7 +292,7 @@ data item: the namespace that was connected to.

Declaration

Swift

-
case error
+
case error
@@ -329,7 +329,7 @@ data item: the namespace that was connected to.

Declaration

Swift

-
case ping
+
case ping
@@ -366,7 +366,7 @@ data item: the namespace that was connected to.

Declaration

Swift

-
case pong
+
case pong
@@ -403,7 +403,7 @@ data item: the namespace that was connected to.

Declaration

Swift

-
case reconnect
+
case reconnect
@@ -440,7 +440,7 @@ data item: the namespace that was connected to.

Declaration

Swift

-
case reconnectAttempt
+
case reconnectAttempt
@@ -477,7 +477,7 @@ data item: the namespace that was connected to.

Declaration

Swift

-
case statusChange
+
case statusChange
@@ -492,8 +492,8 @@ data item: the namespace that was connected to.

diff --git a/docs/Enums/SocketEnginePacketType.html b/docs/Enums/SocketEnginePacketType.html index da32c3d..50f4219 100644 --- a/docs/Enums/SocketEnginePacketType.html +++ b/docs/Enums/SocketEnginePacketType.html @@ -179,7 +179,7 @@

SocketEnginePacketType

-
@objc public enum SocketEnginePacketType : Int
+
@objc public enum SocketEnginePacketType : Int
@@ -212,7 +212,7 @@

Declaration

Swift

-
case open
+
case open
@@ -243,7 +243,7 @@

Declaration

Swift

-
case close
+
case close
@@ -274,7 +274,7 @@

Declaration

Swift

-
case ping
+
case ping
@@ -305,7 +305,7 @@

Declaration

Swift

-
case pong
+
case pong
@@ -336,7 +336,7 @@

Declaration

Swift

-
case message
+
case message
@@ -367,7 +367,7 @@

Declaration

Swift

-
case upgrade
+
case upgrade
@@ -398,7 +398,7 @@

Declaration

Swift

-
case noop
+
case noop
@@ -413,8 +413,8 @@ diff --git a/docs/Enums/SocketIOClientOption.html b/docs/Enums/SocketIOClientOption.html index ab10f21..a27d3cf 100644 --- a/docs/Enums/SocketIOClientOption.html +++ b/docs/Enums/SocketIOClientOption.html @@ -179,7 +179,7 @@

SocketIOClientOption

-
public enum SocketIOClientOption : ClientOption
+
public enum SocketIOClientOption : ClientOption
@@ -212,7 +212,7 @@

Declaration

Swift

-
case compress
+
case compress
@@ -243,7 +243,7 @@

Declaration

Swift

-
case connectParams([String: Any])
+
case connectParams([String: Any])
@@ -274,7 +274,7 @@

Declaration

Swift

-
case cookies([HTTPCookie])
+
case cookies([HTTPCookie])
@@ -305,7 +305,7 @@

Declaration

Swift

-
case extraHeaders([String: String])
+
case extraHeaders([String: String])
@@ -337,7 +337,7 @@ or when you want to be sure no state from previous engines is being carried over

Declaration

Swift

-
case forceNew(Bool)
+
case forceNew(Bool)
@@ -368,7 +368,7 @@ or when you want to be sure no state from previous engines is being carried over

Declaration

Swift

-
case forcePolling(Bool)
+
case forcePolling(Bool)
@@ -399,7 +399,7 @@ or when you want to be sure no state from previous engines is being carried over

Declaration

Swift

-
case forceWebsockets(Bool)
+
case forceWebsockets(Bool)
@@ -431,7 +431,7 @@ called on.

Declaration

Swift

-
case handleQueue(DispatchQueue)
+
case handleQueue(DispatchQueue)
@@ -462,7 +462,7 @@ called on.

Declaration

Swift

-
case log(Bool)
+
case log(Bool)
@@ -493,7 +493,7 @@ called on.

Declaration

Swift

-
case logger(SocketLogger)
+
case logger(SocketLogger)
@@ -524,7 +524,7 @@ called on.

Declaration

Swift

-
case path(String)
+
case path(String)
@@ -556,7 +556,7 @@ over when reconnects happen.

Declaration

Swift

-
case reconnects(Bool)
+
case reconnects(Bool)
@@ -587,7 +587,7 @@ over when reconnects happen.

Declaration

Swift

-
case reconnectAttempts(Int)
+
case reconnectAttempts(Int)
@@ -618,7 +618,7 @@ over when reconnects happen.

Declaration

Swift

-
case reconnectWait(Int)
+
case reconnectWait(Int)
@@ -649,7 +649,7 @@ over when reconnects happen.

Declaration

Swift

-
case secure(Bool)
+
case secure(Bool)
@@ -680,7 +680,7 @@ over when reconnects happen.

Declaration

Swift

-
case security(SSLSecurity)
+
case security(SSLSecurity)
@@ -711,7 +711,7 @@ over when reconnects happen.

Declaration

Swift

-
case selfSigned(Bool)
+
case selfSigned(Bool)
@@ -742,7 +742,7 @@ over when reconnects happen.

Declaration

Swift

-
case sessionDelegate(URLSessionDelegate)
+
case sessionDelegate(URLSessionDelegate)
@@ -780,7 +780,7 @@ over when reconnects happen.

Declaration

Swift

-
public var description: String
+
public var description: String
@@ -818,7 +818,7 @@ over when reconnects happen.

Declaration

Swift

-
public static func ==(lhs: SocketIOClientOption, rhs: SocketIOClientOption) -> Bool
+
public static func ==(lhs: SocketIOClientOption, rhs: SocketIOClientOption) -> Bool
@@ -868,8 +868,8 @@ over when reconnects happen.

diff --git a/docs/Enums/SocketIOStatus.html b/docs/Enums/SocketIOStatus.html index 8f1c7d1..8ee7362 100644 --- a/docs/Enums/SocketIOStatus.html +++ b/docs/Enums/SocketIOStatus.html @@ -179,7 +179,7 @@

SocketIOStatus

-
public enum SocketIOStatus : Int, CustomStringConvertible
+
public enum SocketIOStatus : Int, CustomStringConvertible
@@ -212,7 +212,7 @@

Declaration

Swift

-
case notConnected
+
case notConnected
@@ -243,7 +243,7 @@

Declaration

Swift

-
case disconnected
+
case disconnected
@@ -274,7 +274,7 @@

Declaration

Swift

-
case connecting
+
case connecting
@@ -305,7 +305,7 @@

Declaration

Swift

-
case connected
+
case connected
@@ -342,7 +342,7 @@

Declaration

Swift

-
public var active: Bool
+
public var active: Bool
@@ -372,7 +372,7 @@

Declaration

Swift

-
public var description: String
+
public var description: String
@@ -387,8 +387,8 @@ diff --git a/docs/Enums/SocketParsableError.html b/docs/Enums/SocketParsableError.html index 5b92ac9..6a9013f 100644 --- a/docs/Enums/SocketParsableError.html +++ b/docs/Enums/SocketParsableError.html @@ -179,7 +179,7 @@

SocketParsableError

-
public enum SocketParsableError : Error
+
public enum SocketParsableError : Error
@@ -212,7 +212,7 @@

Declaration

Swift

-
case invalidDataArray
+
case invalidDataArray
@@ -243,7 +243,7 @@

Declaration

Swift

-
case invalidPacket
+
case invalidPacket
@@ -274,7 +274,7 @@

Declaration

Swift

-
case invalidPacketType
+
case invalidPacketType
@@ -289,8 +289,8 @@ diff --git a/docs/Guides.html b/docs/Guides.html index bf26b5b..12fa85d 100644 --- a/docs/Guides.html +++ b/docs/Guides.html @@ -189,8 +189,8 @@ diff --git a/docs/Protocols.html b/docs/Protocols.html index 9395ab7..09ad42b 100644 --- a/docs/Protocols.html +++ b/docs/Protocols.html @@ -206,7 +206,7 @@

Declaration

Swift

-
@objc public protocol SocketEngineSpec
+
@objc public protocol SocketEngineSpec
@@ -238,7 +238,7 @@

Declaration

Swift

-
@objc public protocol SocketEngineClient
+
@objc public protocol SocketEngineClient
@@ -270,7 +270,7 @@

Declaration

Swift

-
public protocol SocketEnginePollable : SocketEngineSpec
+
public protocol SocketEnginePollable : SocketEngineSpec
@@ -302,7 +302,7 @@

Declaration

Swift

-
public protocol SocketEngineWebsocket : SocketEngineSpec, WebSocketDelegate
+
public protocol SocketEngineWebsocket : SocketEngineSpec, WebSocketDelegate
@@ -334,7 +334,7 @@

Declaration

Swift

-
public protocol SocketIOClientSpec : class
+
public protocol SocketIOClientSpec : class
@@ -366,7 +366,7 @@

Declaration

Swift

-
public protocol ConfigSettable
+
public protocol ConfigSettable
@@ -393,16 +393,16 @@

A marking protocol that says a type can be represented in a socket.io packet.

Example:

-
struct CustomData : SocketData {
+
struct CustomData : SocketData {
    let name: String
    let age: Int
 
-   func socketRepresentation() -> SocketData {
+   func socketRepresentation() -> SocketData {
        return ["name": name, "age": age]
    }
 }
 
-socket.emit("myEvent", CustomData(name: "Erik", age: 24))
+socket.emit("myEvent", CustomData(name: "Erik", age: 24))
 
See more @@ -411,7 +411,7 @@

Declaration

Swift

-
public protocol SocketData
+
public protocol SocketData
@@ -443,7 +443,7 @@

Declaration

Swift

-
public protocol SocketLogger : class
+
public protocol SocketLogger : class
@@ -475,7 +475,7 @@

Declaration

Swift

-
public protocol SocketParsable : class
+
public protocol SocketParsable : class
@@ -503,7 +503,7 @@

Declaration

Swift

-
public protocol SocketDataBufferable : class
+
public protocol SocketDataBufferable : class
@@ -532,7 +532,7 @@

A SocketManagerSpec is responsible for multiplexing multiple namespaces through a single SocketEngineSpec.

Example with SocketManager:

-
let manager = SocketManager(socketURL: URL(string:"http://localhost:8080/")!)
+
let manager = SocketManager(socketURL: URL(string:"http://localhost:8080/")!)
 let defaultNamespaceSocket = manager.defaultSocket
 let swiftSocket = manager.socket(forNamespace: "/swift")
 
@@ -551,7 +551,7 @@ or call one of the disconnectSocket methods on this class.

Declaration

Swift

-
public protocol SocketManagerSpec : class, SocketEngineClient
+
public protocol SocketManagerSpec : class, SocketEngineClient
@@ -566,8 +566,8 @@ or call one of the disconnectSocket methods on this class.

diff --git a/docs/Protocols/ConfigSettable.html b/docs/Protocols/ConfigSettable.html index af06681..de9f55d 100644 --- a/docs/Protocols/ConfigSettable.html +++ b/docs/Protocols/ConfigSettable.html @@ -179,7 +179,7 @@

ConfigSettable

-
public protocol ConfigSettable
+
public protocol ConfigSettable
@@ -219,7 +219,7 @@

Declaration

Swift

-
mutating func setConfigs(_ config: SocketIOClientConfiguration)
+
mutating func setConfigs(_ config: SocketIOClientConfiguration)
@@ -253,8 +253,8 @@ diff --git a/docs/Protocols/SocketData.html b/docs/Protocols/SocketData.html index 54c425d..84295d6 100644 --- a/docs/Protocols/SocketData.html +++ b/docs/Protocols/SocketData.html @@ -179,23 +179,23 @@

SocketData

-
public protocol SocketData
+
public protocol SocketData

A marking protocol that says a type can be represented in a socket.io packet.

Example:

-
struct CustomData : SocketData {
+
struct CustomData : SocketData {
    let name: String
    let age: Int
 
-   func socketRepresentation() -> SocketData {
+   func socketRepresentation() -> SocketData {
        return ["name": name, "age": age]
    }
 }
 
-socket.emit("myEvent", CustomData(name: "Erik", age: 24))
+socket.emit("myEvent", CustomData(name: "Erik", age: 24))
 
@@ -240,7 +240,7 @@

Declaration

Swift

-
func socketRepresentation() throws -> SocketData
+
func socketRepresentation() throws -> SocketData
@@ -255,8 +255,8 @@ diff --git a/docs/Protocols/SocketDataBufferable.html b/docs/Protocols/SocketDataBufferable.html index f375129..00f65f0 100644 --- a/docs/Protocols/SocketDataBufferable.html +++ b/docs/Protocols/SocketDataBufferable.html @@ -179,7 +179,7 @@

SocketDataBufferable

-
public protocol SocketDataBufferable : class
+
public protocol SocketDataBufferable : class
@@ -224,7 +224,7 @@ So this should ideally be an array of one packet waiting for data.

Declaration

Swift

-
var waitingPackets: [SocketPacket]
+
var waitingPackets: [SocketPacket]
@@ -239,8 +239,8 @@ So this should ideally be an array of one packet waiting for data.

diff --git a/docs/Protocols/SocketEngineClient.html b/docs/Protocols/SocketEngineClient.html index 398200f..3f888a3 100644 --- a/docs/Protocols/SocketEngineClient.html +++ b/docs/Protocols/SocketEngineClient.html @@ -179,7 +179,7 @@

SocketEngineClient

-
@objc public protocol SocketEngineClient
+
@objc public protocol SocketEngineClient
@@ -219,7 +219,7 @@

Declaration

Swift

-
func engineDidError(reason: String)
+
func engineDidError(reason: String)
@@ -265,7 +265,7 @@

Declaration

Swift

-
func engineDidClose(reason: String)
+
func engineDidClose(reason: String)
@@ -311,7 +311,7 @@

Declaration

Swift

-
func engineDidOpen(reason: String)
+
func engineDidOpen(reason: String)
@@ -357,7 +357,7 @@

Declaration

Swift

-
func engineDidReceivePong()
+
func engineDidReceivePong()
@@ -384,7 +384,7 @@

Declaration

Swift

-
func engineDidSendPing()
+
func engineDidSendPing()
@@ -411,7 +411,7 @@

Declaration

Swift

-
func parseEngineMessage(_ msg: String)
+
func parseEngineMessage(_ msg: String)
@@ -457,7 +457,7 @@

Declaration

Swift

-
func parseEngineBinaryData(_ data: Data)
+
func parseEngineBinaryData(_ data: Data)
@@ -491,8 +491,8 @@ diff --git a/docs/Protocols/SocketEnginePollable.html b/docs/Protocols/SocketEnginePollable.html index 38a1724..496857e 100644 --- a/docs/Protocols/SocketEnginePollable.html +++ b/docs/Protocols/SocketEnginePollable.html @@ -179,7 +179,7 @@

SocketEnginePollable

-
public protocol SocketEnginePollable : SocketEngineSpec
+
public protocol SocketEnginePollable : SocketEngineSpec
@@ -219,7 +219,7 @@

Declaration

Swift

-
var invalidated: Bool
+
var invalidated: Bool
@@ -248,7 +248,7 @@

Declaration

Swift

-
var postWait: [String]
+
var postWait: [String]
@@ -275,7 +275,7 @@

Declaration

Swift

-
var session: URLSession?
+
var session: URLSession?
@@ -305,7 +305,7 @@ disconnect us.

Declaration

Swift

-
var waitingForPoll: Bool
+
var waitingForPoll: Bool
@@ -335,7 +335,7 @@ disconnect us.

Declaration

Swift

-
var waitingForPost: Bool
+
var waitingForPost: Bool
@@ -385,7 +385,7 @@ disconnect us.

Declaration

Swift

-
func doPoll()
+
func doPoll()
@@ -424,7 +424,7 @@ disconnect us.

Declaration

Swift

-
func sendPollMessage(_ message: String, withType type: SocketEnginePacketType, withData datas: [Data])
+
func sendPollMessage(_ message: String, withType type: SocketEnginePacketType, withData datas: [Data])
@@ -502,7 +502,7 @@ disconnect us.

Declaration

Swift

-
func stopPolling()
+
func stopPolling()
@@ -517,8 +517,8 @@ disconnect us.

diff --git a/docs/Protocols/SocketEngineSpec.html b/docs/Protocols/SocketEngineSpec.html index 5d4d3c9..df3a94a 100644 --- a/docs/Protocols/SocketEngineSpec.html +++ b/docs/Protocols/SocketEngineSpec.html @@ -179,7 +179,7 @@

SocketEngineSpec

-
@objc public protocol SocketEngineSpec
+
@objc public protocol SocketEngineSpec
@@ -219,7 +219,7 @@

Declaration

Swift

-
var client: SocketEngineClient?
+
var client: SocketEngineClient?
@@ -246,7 +246,7 @@

Declaration

Swift

-
var closed: Bool
+
var closed: Bool
@@ -273,7 +273,7 @@

Declaration

Swift

-
var compress: Bool
+
var compress: Bool
@@ -300,7 +300,7 @@

Declaration

Swift

-
var connected: Bool
+
var connected: Bool
@@ -327,7 +327,7 @@

Declaration

Swift

-
var connectParams: [String: Any]?
+
var connectParams: [String: Any]?
@@ -354,7 +354,7 @@

Declaration

Swift

-
var cookies: [HTTPCookie]?
+
var cookies: [HTTPCookie]?
@@ -381,7 +381,7 @@

Declaration

Swift

-
var engineQueue: DispatchQueue
+
var engineQueue: DispatchQueue
@@ -408,7 +408,7 @@

Declaration

Swift

-
var extraHeaders: [String: String]?
+
var extraHeaders: [String: String]?
@@ -435,7 +435,7 @@

Declaration

Swift

-
var fastUpgrade: Bool
+
var fastUpgrade: Bool
@@ -462,7 +462,7 @@

Declaration

Swift

-
var forcePolling: Bool
+
var forcePolling: Bool
@@ -489,7 +489,7 @@

Declaration

Swift

-
var forceWebsockets: Bool
+
var forceWebsockets: Bool
@@ -516,7 +516,7 @@

Declaration

Swift

-
var polling: Bool
+
var polling: Bool
@@ -543,7 +543,7 @@

Declaration

Swift

-
var probing: Bool
+
var probing: Bool
@@ -570,7 +570,7 @@

Declaration

Swift

-
var sid: String
+
var sid: String
@@ -597,7 +597,7 @@

Declaration

Swift

-
var socketPath: String
+
var socketPath: String
@@ -624,7 +624,7 @@

Declaration

Swift

-
var urlPolling: URL
+
var urlPolling: URL
@@ -651,7 +651,7 @@

Declaration

Swift

-
var urlWebSocket: URL
+
var urlWebSocket: URL
@@ -678,7 +678,7 @@

Declaration

Swift

-
var websocket: Bool
+
var websocket: Bool
@@ -705,7 +705,7 @@

Declaration

Swift

-
var ws: WebSocket?
+
var ws: WebSocket?
@@ -743,7 +743,7 @@

Declaration

Swift

-
init(client: SocketEngineClient, url: URL, options: [String: Any]?)
+
init(client: SocketEngineClient, url: URL, options: [String: Any]?)
@@ -824,7 +824,7 @@

Declaration

Swift

-
func connect()
+
func connect()
@@ -851,7 +851,7 @@

Declaration

Swift

-
func didError(reason: String)
+
func didError(reason: String)
@@ -878,7 +878,7 @@

Declaration

Swift

-
func disconnect(reason: String)
+
func disconnect(reason: String)
@@ -927,7 +927,7 @@ WebSocket mode.

Declaration

Swift

-
func doFastUpgrade()
+
func doFastUpgrade()
@@ -957,7 +957,7 @@ the engine is attempting to upgrade to WebSocket it does not do any POSTing.

Declaration

Swift

-
func flushWaitingForPostToWebSocket()
+
func flushWaitingForPostToWebSocket()
@@ -984,7 +984,7 @@ the engine is attempting to upgrade to WebSocket it does not do any POSTing.

Declaration

Swift

-
func parseEngineData(_ data: Data)
+
func parseEngineData(_ data: Data)
@@ -1030,7 +1030,7 @@ the engine is attempting to upgrade to WebSocket it does not do any POSTing.

Declaration

Swift

-
func parseEngineMessage(_ message: String)
+
func parseEngineMessage(_ message: String)
@@ -1089,7 +1089,7 @@ the engine is attempting to upgrade to WebSocket it does not do any POSTing.

Declaration

Swift

-
func write(_ msg: String, withType type: SocketEnginePacketType, withData data: [Data])
+
func write(_ msg: String, withType type: SocketEnginePacketType, withData data: [Data])
@@ -1147,8 +1147,8 @@ the engine is attempting to upgrade to WebSocket it does not do any POSTing.

diff --git a/docs/Protocols/SocketEngineWebsocket.html b/docs/Protocols/SocketEngineWebsocket.html index b7bffc9..7814717 100644 --- a/docs/Protocols/SocketEngineWebsocket.html +++ b/docs/Protocols/SocketEngineWebsocket.html @@ -179,7 +179,7 @@

SocketEngineWebsocket

-
public protocol SocketEngineWebsocket : SocketEngineSpec, WebSocketDelegate
+
public protocol SocketEngineWebsocket : SocketEngineSpec, WebSocketDelegate
@@ -231,7 +231,7 @@

Declaration

Swift

-
func sendWebSocketMessage(_ str: String, withType type: SocketEnginePacketType, withData datas: [Data])
+
func sendWebSocketMessage(_ str: String, withType type: SocketEnginePacketType, withData datas: [Data])
@@ -315,7 +315,7 @@

Declaration

Swift

-
public func websocketDidReceiveMessage(socket: WebSocketClient, text: String)
+
public func websocketDidReceiveMessage(socket: WebSocketClient, text: String)
@@ -345,7 +345,7 @@

Declaration

Swift

-
public func websocketDidReceiveData(socket: WebSocketClient, data: Data)
+
public func websocketDidReceiveData(socket: WebSocketClient, data: Data)
@@ -360,8 +360,8 @@ diff --git a/docs/Protocols/SocketIOClientSpec.html b/docs/Protocols/SocketIOClientSpec.html index c7a535b..a9a8611 100644 --- a/docs/Protocols/SocketIOClientSpec.html +++ b/docs/Protocols/SocketIOClientSpec.html @@ -179,7 +179,7 @@

SocketIOClientSpec

-
public protocol SocketIOClientSpec : class
+
public protocol SocketIOClientSpec : class
@@ -219,7 +219,7 @@

Declaration

Swift

-
var anyHandler: ((SocketAnyEvent) -> ())?
+
var anyHandler: ((SocketAnyEvent) -> ())?
@@ -246,7 +246,7 @@

Declaration

Swift

-
var handlers: [SocketEventHandler]
+
var handlers: [SocketEventHandler]
@@ -273,7 +273,7 @@

Declaration

Swift

-
var manager: SocketManagerSpec?
+
var manager: SocketManagerSpec?
@@ -302,7 +302,7 @@

Declaration

Swift

-
var nsp: String
+
var nsp: String
@@ -329,7 +329,7 @@

Declaration

Swift

-
var status: SocketIOStatus
+
var status: SocketIOStatus
@@ -369,7 +369,7 @@

Declaration

Swift

-
func connect()
+
func connect()
@@ -398,7 +398,7 @@

Declaration

Swift

-
func connect(timeoutAfter: Double, withHandler handler: (() -> ())?)
+
func connect(timeoutAfter: Double, withHandler handler: (() -> ())?)
@@ -458,7 +458,7 @@ then this is only called when the client connects to that namespace.

Declaration

Swift

-
func didConnect(toNamespace namespace: String)
+
func didConnect(toNamespace namespace: String)
@@ -504,7 +504,7 @@ then this is only called when the client connects to that namespace.

Declaration

Swift

-
func didDisconnect(reason: String)
+
func didDisconnect(reason: String)
@@ -558,7 +558,7 @@ then this is only called when the client connects to that namespace.

Declaration

Swift

-
func didError(reason: String)
+
func didError(reason: String)
@@ -604,7 +604,7 @@ then this is only called when the client connects to that namespace.

Declaration

Swift

-
func disconnect()
+
func disconnect()
@@ -634,7 +634,7 @@ will be emitted. The structure of the error data is [eventName, items, the

Declaration

Swift

-
func emit(_ event: String, _ items: SocketData...)
+
func emit(_ event: String, _ items: SocketData...)
@@ -692,7 +692,7 @@ will be emitted. The structure of the error data is [eventName, items, the

Declaration

Swift

-
func emitAck(_ ack: Int, with items: [Any])
+
func emitAck(_ ack: Int, with items: [Any])
@@ -762,7 +762,7 @@ will be emitted. The structure of the error data is [eventName, items, the

Declaration

Swift

-
func emitWithAck(_ event: String, _ items: SocketData...) -> OnAckCallback
+
func emitWithAck(_ event: String, _ items: SocketData...) -> OnAckCallback
@@ -824,7 +824,7 @@ will be emitted. The structure of the error data is [eventName, items, the

Declaration

Swift

-
func handleAck(_ ack: Int, data: [Any])
+
func handleAck(_ ack: Int, data: [Any])
@@ -882,7 +882,7 @@ will be emitted. The structure of the error data is [eventName, items, the

Declaration

Swift

-
func handleClientEvent(_ event: SocketClientEvent, data: [Any])
+
func handleClientEvent(_ event: SocketClientEvent, data: [Any])
@@ -940,7 +940,7 @@ will be emitted. The structure of the error data is [eventName, items, the

Declaration

Swift

-
func handleEvent(_ event: String, data: [Any], isInternalMessage: Bool, withAck ack: Int)
+
func handleEvent(_ event: String, data: [Any], isInternalMessage: Bool, withAck ack: Int)
@@ -1023,7 +1023,7 @@ socket.

Declaration

Swift

-
func handlePacket(_ packet: SocketPacket)
+
func handlePacket(_ packet: SocketPacket)
@@ -1069,7 +1069,7 @@ socket.

Declaration

Swift

-
func leaveNamespace()
+
func leaveNamespace()
@@ -1096,7 +1096,7 @@ socket.

Declaration

Swift

-
func joinNamespace()
+
func joinNamespace()
@@ -1125,7 +1125,7 @@ socket.

Declaration

Swift

-
func off(clientEvent event: SocketClientEvent)
+
func off(clientEvent event: SocketClientEvent)
@@ -1173,7 +1173,7 @@ socket.

Declaration

Swift

-
func off(_ event: String)
+
func off(_ event: String)
@@ -1221,7 +1221,7 @@ socket.

Declaration

Swift

-
func off(id: UUID)
+
func off(id: UUID)
@@ -1267,7 +1267,7 @@ socket.

Declaration

Swift

-
func on(_ event: String, callback: @escaping NormalCallback) -> UUID
+
func on(_ event: String, callback: @escaping NormalCallback) -> UUID
@@ -1335,7 +1335,7 @@ socket.

Declaration

Swift

-
func on(clientEvent event: SocketClientEvent, callback: @escaping NormalCallback) -> UUID
+
func on(clientEvent event: SocketClientEvent, callback: @escaping NormalCallback) -> UUID
@@ -1397,7 +1397,7 @@ socket.

Declaration

Swift

-
func once(clientEvent event: SocketClientEvent, callback: @escaping NormalCallback) -> UUID
+
func once(clientEvent event: SocketClientEvent, callback: @escaping NormalCallback) -> UUID
@@ -1459,7 +1459,7 @@ socket.

Declaration

Swift

-
func once(_ event: String, callback: @escaping NormalCallback) -> UUID
+
func once(_ event: String, callback: @escaping NormalCallback) -> UUID
@@ -1521,7 +1521,7 @@ socket.

Declaration

Swift

-
func onAny(_ handler: @escaping (SocketAnyEvent) -> ())
+
func onAny(_ handler: @escaping (SocketAnyEvent) -> ())
@@ -1569,7 +1569,7 @@ socket.

Declaration

Swift

-
func removeAllHandlers()
+
func removeAllHandlers()
@@ -1599,7 +1599,7 @@ Called when the manager detects a broken connection, or when a manual reconnect

Declaration

Swift

-
func setReconnecting(reason: String)
+
func setReconnecting(reason: String)
@@ -1614,8 +1614,8 @@ Called when the manager detects a broken connection, or when a manual reconnect diff --git a/docs/Protocols/SocketLogger.html b/docs/Protocols/SocketLogger.html index d382e3c..7b63bd3 100644 --- a/docs/Protocols/SocketLogger.html +++ b/docs/Protocols/SocketLogger.html @@ -179,7 +179,7 @@

SocketLogger

-
public protocol SocketLogger : class
+
public protocol SocketLogger : class
@@ -219,7 +219,7 @@

Declaration

Swift

-
var log: Bool
+
var log: Bool
@@ -265,7 +265,7 @@

Declaration

Swift

-
func log(_ message: @autoclosure () -> String, type: String)
+
func log(_ message: @autoclosure () -> String, type: String)
@@ -343,7 +343,7 @@

Declaration

Swift

-
func error(_ message: @autoclosure () -> String, type: String)
+
func error(_ message: @autoclosure () -> String, type: String)
@@ -401,8 +401,8 @@ diff --git a/docs/Protocols/SocketManagerSpec.html b/docs/Protocols/SocketManagerSpec.html index 208d775..aa62d12 100644 --- a/docs/Protocols/SocketManagerSpec.html +++ b/docs/Protocols/SocketManagerSpec.html @@ -179,7 +179,7 @@

SocketManagerSpec

-
public protocol SocketManagerSpec : class, SocketEngineClient
+
public protocol SocketManagerSpec : class, SocketEngineClient
@@ -188,7 +188,7 @@

A SocketManagerSpec is responsible for multiplexing multiple namespaces through a single SocketEngineSpec.

Example with SocketManager:

-
let manager = SocketManager(socketURL: URL(string:"http://localhost:8080/")!)
+
let manager = SocketManager(socketURL: URL(string:"http://localhost:8080/")!)
 let defaultNamespaceSocket = manager.defaultSocket
 let swiftSocket = manager.socket(forNamespace: "/swift")
 
@@ -235,7 +235,7 @@ or call one of the disconnectSocket methods on this class.

Declaration

Swift

-
var defaultSocket: SocketIOClient
+
var defaultSocket: SocketIOClient
@@ -262,7 +262,7 @@ or call one of the disconnectSocket methods on this class.

Declaration

Swift

-
var engine: SocketEngineSpec?
+
var engine: SocketEngineSpec?
@@ -289,7 +289,7 @@ or call one of the disconnectSocket methods on this class.

Declaration

Swift

-
var forceNew: Bool
+
var forceNew: Bool
@@ -317,7 +317,7 @@ called on.

Declaration

Swift

-
var handleQueue: DispatchQueue
+
var handleQueue: DispatchQueue
@@ -344,7 +344,7 @@ called on.

Declaration

Swift

-
var nsps: [String: SocketIOClient]
+
var nsps: [String: SocketIOClient]
@@ -371,7 +371,7 @@ called on.

Declaration

Swift

-
var reconnects: Bool
+
var reconnects: Bool
@@ -398,7 +398,7 @@ called on.

Declaration

Swift

-
var reconnectWait: Int
+
var reconnectWait: Int
@@ -425,7 +425,7 @@ called on.

Declaration

Swift

-
var socketURL: URL
+
var socketURL: URL
@@ -452,7 +452,7 @@ called on.

Declaration

Swift

-
var status: SocketIOStatus
+
var status: SocketIOStatus
@@ -490,7 +490,7 @@ called on.

Declaration

Swift

-
func connect()
+
func connect()
@@ -517,7 +517,7 @@ called on.

Declaration

Swift

-
func connectSocket(_ socket: SocketIOClient)
+
func connectSocket(_ socket: SocketIOClient)
@@ -563,7 +563,7 @@ called on.

Declaration

Swift

-
func didDisconnect(reason: String)
+
func didDisconnect(reason: String)
@@ -609,7 +609,7 @@ called on.

Declaration

Swift

-
func disconnect()
+
func disconnect()
@@ -636,7 +636,7 @@ called on.

Declaration

Swift

-
func disconnectSocket(_ socket: SocketIOClient)
+
func disconnectSocket(_ socket: SocketIOClient)
@@ -682,7 +682,7 @@ called on.

Declaration

Swift

-
func disconnectSocket(forNamespace nsp: String)
+
func disconnectSocket(forNamespace nsp: String)
@@ -728,7 +728,7 @@ called on.

Declaration

Swift

-
func emitAll(_ event: String, withItems items: [Any])
+
func emitAll(_ event: String, withItems items: [Any])
@@ -788,7 +788,7 @@ called on.

Declaration

Swift

-
func reconnect()
+
func reconnect()
@@ -816,7 +816,7 @@ After calling this method the socket should no longer be considered usable.

Declaration

Swift

-
func removeSocket(_ socket: SocketIOClient) -> SocketIOClient?
+
func removeSocket(_ socket: SocketIOClient) -> SocketIOClient?
@@ -872,7 +872,7 @@ Or call

Swift

-
func socket(forNamespace nsp: String) -> SocketIOClient
+
func socket(forNamespace nsp: String) -> SocketIOClient
@@ -910,8 +910,8 @@ Or call -

© 2017 Erik. All rights reserved. (Last updated: 2017-11-30)

-

Generated by jazzy ♪♫ v0.9.0, a Realm project.

+

© 2018 Erik. All rights reserved. (Last updated: 2018-01-10)

+

Generated by jazzy ♪♫ v0.9.1, a Realm project.

diff --git a/docs/Protocols/SocketParsable.html b/docs/Protocols/SocketParsable.html index 7c7eb03..e74affd 100644 --- a/docs/Protocols/SocketParsable.html +++ b/docs/Protocols/SocketParsable.html @@ -179,7 +179,7 @@

SocketParsable

-
public protocol SocketParsable : class
+
public protocol SocketParsable : class
@@ -235,7 +235,7 @@ into the correct placeholder.

Declaration

Swift

-
func parseBinaryData(_ data: Data) -> SocketPacket?
+
func parseBinaryData(_ data: Data) -> SocketPacket?
@@ -289,7 +289,7 @@ into the correct placeholder.

Declaration

Swift

-
func parseSocketMessage(_ message: String) -> SocketPacket?
+
func parseSocketMessage(_ message: String) -> SocketPacket?
@@ -327,8 +327,8 @@ into the correct placeholder.

diff --git a/docs/Structs.html b/docs/Structs.html index 036e8c5..181f6a5 100644 --- a/docs/Structs.html +++ b/docs/Structs.html @@ -206,7 +206,7 @@

Declaration

Swift

-
public struct SocketEventHandler
+
public struct SocketEventHandler
@@ -238,7 +238,7 @@

Declaration

Swift

-
public struct SocketIOClientConfiguration : ExpressibleByArrayLiteral, Collection, MutableCollection
+
public struct SocketIOClientConfiguration : ExpressibleByArrayLiteral, Collection, MutableCollection
@@ -270,7 +270,7 @@

Declaration

Swift

-
public struct SocketPacket : CustomStringConvertible
+
public struct SocketPacket : CustomStringConvertible
@@ -285,8 +285,8 @@ diff --git a/docs/Structs/SocketEventHandler.html b/docs/Structs/SocketEventHandler.html index aafd464..7e80889 100644 --- a/docs/Structs/SocketEventHandler.html +++ b/docs/Structs/SocketEventHandler.html @@ -179,7 +179,7 @@

SocketEventHandler

-
public struct SocketEventHandler
+
public struct SocketEventHandler
@@ -219,7 +219,7 @@

Declaration

Swift

-
public let event: String
+
public let event: String
@@ -246,7 +246,7 @@

Declaration

Swift

-
public let id: UUID
+
public let id: UUID
@@ -273,7 +273,7 @@

Declaration

Swift

-
public let callback: NormalCallback
+
public let callback: NormalCallback
@@ -311,7 +311,7 @@

Declaration

Swift

-
public func executeCallback(with items: [Any], withAck ack: Int, withSocket socket: SocketIOClient)
+
public func executeCallback(with items: [Any], withAck ack: Int, withSocket socket: SocketIOClient)
@@ -369,8 +369,8 @@ diff --git a/docs/Structs/SocketIOClientConfiguration.html b/docs/Structs/SocketIOClientConfiguration.html index 55d384d..17fba23 100644 --- a/docs/Structs/SocketIOClientConfiguration.html +++ b/docs/Structs/SocketIOClientConfiguration.html @@ -179,7 +179,7 @@

SocketIOClientConfiguration

-
public struct SocketIOClientConfiguration : ExpressibleByArrayLiteral, Collection, MutableCollection
+
public struct SocketIOClientConfiguration : ExpressibleByArrayLiteral, Collection, MutableCollection
@@ -219,7 +219,7 @@

Declaration

Swift

-
public typealias Element = SocketIOClientOption
+
public typealias Element = SocketIOClientOption
@@ -246,7 +246,7 @@

Declaration

Swift

-
public typealias Index = Array<SocketIOClientOption>.Index
+
public typealias Index = Array<SocketIOClientOption>.Index
@@ -273,7 +273,7 @@

Declaration

Swift

-
public typealias Iterator = Array<SocketIOClientOption>.Iterator
+
public typealias Iterator = Array<SocketIOClientOption>.Iterator
@@ -300,7 +300,7 @@

Declaration

Swift

-
public typealias SubSequence =  Array<SocketIOClientOption>.SubSequence
+
public typealias SubSequence =  Array<SocketIOClientOption>.SubSequence
@@ -338,7 +338,7 @@

Declaration

Swift

-
public var startIndex: Index
+
public var startIndex: Index
@@ -365,7 +365,7 @@

Declaration

Swift

-
public var endIndex: Index
+
public var endIndex: Index
@@ -392,7 +392,7 @@

Declaration

Swift

-
public var isEmpty: Bool
+
public var isEmpty: Bool
@@ -419,7 +419,7 @@

Declaration

Swift

-
public var count: Index.Stride
+
public var count: Index.Stride
@@ -446,7 +446,7 @@

Declaration

Swift

-
public var first: Element?
+
public var first: Element?
@@ -484,7 +484,7 @@

Declaration

Swift

-
public init(arrayLiteral elements: Element...)
+
public init(arrayLiteral elements: Element...)
@@ -541,7 +541,7 @@

Declaration

Swift

-
public func makeIterator() -> Iterator
+
public func makeIterator() -> Iterator
@@ -571,7 +571,7 @@

Declaration

Swift

-
public func index(after i: Index) -> Index
+
public func index(after i: Index) -> Index
@@ -602,7 +602,7 @@

Declaration

Swift

-
public mutating func insert(_ element: Element, replacing replace: Bool = true)
+
public mutating func insert(_ element: Element, replacing replace: Bool = true)
@@ -648,8 +648,8 @@ diff --git a/docs/Structs/SocketPacket.html b/docs/Structs/SocketPacket.html index 818cace..6b47e48 100644 --- a/docs/Structs/SocketPacket.html +++ b/docs/Structs/SocketPacket.html @@ -179,7 +179,7 @@

SocketPacket

-
public struct SocketPacket : CustomStringConvertible
+
public struct SocketPacket : CustomStringConvertible
@@ -219,7 +219,7 @@

Declaration

Swift

-
public let nsp: String
+
public let nsp: String
@@ -246,7 +246,7 @@

Declaration

Swift

-
public let id: Int
+
public let id: Int
@@ -273,7 +273,7 @@

Declaration

Swift

-
public let type: PacketType
+
public let type: PacketType
@@ -300,7 +300,7 @@

Declaration

Swift

-
public internal(set) var binary: [Data]
+
public internal(set) var binary: [Data]
@@ -330,7 +330,7 @@ event type packets.

Declaration

Swift

-
public internal(set) var data: [Any]
+
public internal(set) var data: [Any]
@@ -357,7 +357,7 @@ event type packets.

Declaration

Swift

-
public var args: [Any]
+
public var args: [Any]
@@ -384,7 +384,7 @@ event type packets.

Declaration

Swift

-
public var description: String
+
public var description: String
@@ -411,7 +411,7 @@ event type packets.

Declaration

Swift

-
public var event: String
+
public var event: String
@@ -438,7 +438,7 @@ event type packets.

Declaration

Swift

-
public var packetString: String
+
public var packetString: String
@@ -477,7 +477,7 @@ event type packets.

Declaration

Swift

-
public enum PacketType: Int
+
public enum PacketType: Int
@@ -492,8 +492,8 @@ event type packets.

diff --git a/docs/Structs/SocketPacket/PacketType.html b/docs/Structs/SocketPacket/PacketType.html index dc76df7..26bc296 100644 --- a/docs/Structs/SocketPacket/PacketType.html +++ b/docs/Structs/SocketPacket/PacketType.html @@ -179,7 +179,7 @@

PacketType

-
public enum PacketType: Int
+
public enum PacketType: Int
@@ -212,7 +212,7 @@

Declaration

Swift

-
case connect
+
case connect
@@ -243,7 +243,7 @@

Declaration

Swift

-
case disconnect
+
case disconnect
@@ -274,7 +274,7 @@

Declaration

Swift

-
case event
+
case event
@@ -305,7 +305,7 @@

Declaration

Swift

-
case ack
+
case ack
@@ -336,7 +336,7 @@

Declaration

Swift

-
case error
+
case error
@@ -367,7 +367,7 @@

Declaration

Swift

-
case binaryEvent
+
case binaryEvent
@@ -398,7 +398,7 @@

Declaration

Swift

-
case binaryAck
+
case binaryAck
@@ -413,8 +413,8 @@ diff --git a/docs/Typealiases.html b/docs/Typealiases.html index c460254..7805449 100644 --- a/docs/Typealiases.html +++ b/docs/Typealiases.html @@ -205,7 +205,7 @@

Declaration

Swift

-
public typealias AckCallback = ([Any]) -> ()
+
public typealias AckCallback = ([Any]) -> ()
@@ -232,7 +232,7 @@

Declaration

Swift

-
public typealias NormalCallback = ([Any], SocketAckEmitter) -> ()
+
public typealias NormalCallback = ([Any], SocketAckEmitter) -> ()
@@ -247,8 +247,8 @@ diff --git a/docs/faq.html b/docs/faq.html index 8fec927..dd03698 100644 --- a/docs/faq.html +++ b/docs/faq.html @@ -188,9 +188,9 @@ for Objective-C.

ARC.

Take this code for example:

-
class Manager {
+
class Manager {
     func addHandlers() {
-        let manager = SocketManager(socketURL: URL(string: "http://somesocketioserver.com")!)
+        let manager = SocketManager(socketURL: URL(string: "http://somesocketioserver.com")!)
 
         manager.defaultSocket.on("myEvent") {data, ack in
             print(data)
@@ -204,8 +204,8 @@ for Objective-C.

will be released, along with the socket, and its memory reclaimed.

A correct way would be:

-
class Manager {
-    let manager = SocketManager(socketURL: URL(string: "http://somesocketioserver.com")!)
+
class Manager {
+    let manager = SocketManager(socketURL: URL(string: "http://somesocketioserver.com")!)
 
     func addHandlers() {
         manager.defaultSocket.on("myEvent") {data, ack in
@@ -223,8 +223,8 @@ will be released, along with the socket, and its memory reclaimed.

diff --git a/docs/index.html b/docs/index.html index 58e0a47..07918ac 100644 --- a/docs/index.html +++ b/docs/index.html @@ -183,7 +183,7 @@

Example

import SocketIO
 
-let manager = SocketManager(socketURL: URL(string: "http://localhost:8080")!, config: [.log(true), .compress])
+let manager = SocketManager(socketURL: URL(string: "http://localhost:8080")!, config: [.log(true), .compress])
 let socket = manager.defaultSocket
 
 socket.on(clientEvent: .connect) {data, ack in
@@ -191,7 +191,7 @@
 }
 
 socket.on("currentAmount") {data, ack in
-    guard let cur = data[0] as? Double else { return }
+    guard let cur = data[0] as? Double else { return }
 
     socket.emitWithAck("canUpdate", cur).timingOut(after: 0) {data in
         socket.emit("update", ["amount": cur + 2.50])
@@ -254,7 +254,7 @@ SocketIOClient* socket = manager.defaultSocket;
 
 import PackageDescription
 
-let package = Package(
+let package = Package(
     name: "socket.io-test",
     products: [
         .executable(name: "socket.io-test", targets: ["YourTargetName"])
@@ -325,8 +325,8 @@ SocketIOClient* socket = manager.defaultSocket;