Merge branch 'development'

* development:
  bump ws, fix #598
  remove namespace from socket id
This commit is contained in:
Erik 2016-12-18 20:17:51 -05:00
commit 650538ad2e
No known key found for this signature in database
GPG Key ID: 4930B7C5FBC1A69D
3 changed files with 7 additions and 2 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

@ -65,7 +65,7 @@ public final class SocketIOClient : NSObject, SocketEngineClient, SocketParsable
var waitingPackets = [SocketPacket]()
public var sid: String? {
return nsp + "#" + (engine?.sid ?? "")
return engine?.sid
}
/// Type safe way to create a new SocketIOClient. opts can be omitted

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
}