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