rename engine init

This commit is contained in:
Erik 2016-08-14 11:06:55 -04:00
parent c364f6a832
commit 07f2ca5f16
No known key found for this signature in database
GPG Key ID: 4930B7C5FBC1A69D
2 changed files with 4 additions and 4 deletions

View File

@ -80,11 +80,11 @@ public final class SocketEngine : NSObject, NSURLSessionDelegate, SocketEnginePo
private var selfSigned = false
private var voipEnabled = false
public init(client: SocketEngineClient, url: NSURL, options: SocketIOClientConfiguration) {
public init(client: SocketEngineClient, url: NSURL, config: SocketIOClientConfiguration) {
self.client = client
self.url = url
for option in options {
for option in config {
switch option {
case let .ConnectParams(params):
connectParams = params
@ -127,7 +127,7 @@ public final class SocketEngine : NSObject, NSURLSessionDelegate, SocketEnginePo
}
public convenience init(client: SocketEngineClient, url: NSURL, options: NSDictionary?) {
self.init(client: client, url: url, options: options?.toSocketConfiguration() ?? [])
self.init(client: client, url: url, config: options?.toSocketConfiguration() ?? [])
}
deinit {

View File

@ -118,7 +118,7 @@ public final class SocketIOClient : NSObject, SocketEngineClient, SocketParsable
private func addEngine() -> SocketEngineSpec {
DefaultSocketLogger.Logger.log("Adding engine", type: logType)
engine = SocketEngine(client: self, url: socketURL, options: config)
engine = SocketEngine(client: self, url: socketURL, config: config)
return engine!
}