bump ws, fix #598

This commit is contained in:
Erik 2016-12-18 20:06:12 -05:00
parent 077de02345
commit b1debdf912
No known key found for this signature in database
GPG Key ID: 4930B7C5FBC1A69D
2 changed files with 6 additions and 1 deletions

View File

@ -26,7 +26,7 @@ public protocol SSLTrustValidator {
func isValid(_ trust: SecTrust, domain: String?) -> Bool
}
open class SSLCert {
open class SSLCert : NSObject {
var certData: Data?
var key: SecKey?

View File

@ -162,6 +162,11 @@ open class WebSocket : NSObject, StreamDelegate {
public init(url: URL, protocols: [String]? = nil) {
self.url = url
self.origin = url.absoluteString
if let hostUrl = URL (string: "/", relativeTo: url) {
var origin = hostUrl.absoluteString
origin.remove(at: origin.index(before: origin.endIndex))
self.origin = origin
}
writeQueue.maxConcurrentOperationCount = 1
optionalProtocols = protocols
}