diff --git a/Source/SocketEngine.swift b/Source/SocketEngine.swift index b86f42a..9b3c5e1 100644 --- a/Source/SocketEngine.swift +++ b/Source/SocketEngine.swift @@ -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 { diff --git a/Source/SocketIOClient.swift b/Source/SocketIOClient.swift index 7912615..3cc5fa4 100644 --- a/Source/SocketIOClient.swift +++ b/Source/SocketIOClient.swift @@ -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! }