unify objc/swift constructors

This commit is contained in:
Erik 2015-06-12 09:42:44 -04:00
parent 5854262280
commit a0c676bc54

View File

@ -76,7 +76,7 @@ public final class SocketIOClient: NSObject, SocketEngineClient, SocketLogClient
/** /**
Create a new SocketIOClient. opts can be omitted Create a new SocketIOClient. opts can be omitted
*/ */
public init(var socketURL:String, opts:[String: AnyObject]? = nil) { public init(var socketURL:String, opts:[String: AnyObject]?) {
if socketURL["https://"].matches().count != 0 { if socketURL["https://"].matches().count != 0 {
self._secure = true self._secure = true
} }
@ -125,10 +125,6 @@ public final class SocketIOClient: NSObject, SocketEngineClient, SocketLogClient
super.init() super.init()
} }
public convenience init(socketURL:String, options:[String: AnyObject]?) {
self.init(socketURL: socketURL, opts: options)
}
deinit { deinit {
SocketLogger.log("Client is being deinit", client: self) SocketLogger.log("Client is being deinit", client: self)
engine?.close(fast: true) engine?.close(fast: true)