Merge branch 'development'
* development: bump ws, fix #598 remove namespace from socket id
This commit is contained in:
commit
650538ad2e
@ -26,7 +26,7 @@ public protocol SSLTrustValidator {
|
|||||||
func isValid(_ trust: SecTrust, domain: String?) -> Bool
|
func isValid(_ trust: SecTrust, domain: String?) -> Bool
|
||||||
}
|
}
|
||||||
|
|
||||||
open class SSLCert {
|
open class SSLCert : NSObject {
|
||||||
var certData: Data?
|
var certData: Data?
|
||||||
var key: SecKey?
|
var key: SecKey?
|
||||||
|
|
||||||
|
|||||||
@ -65,7 +65,7 @@ public final class SocketIOClient : NSObject, SocketEngineClient, SocketParsable
|
|||||||
var waitingPackets = [SocketPacket]()
|
var waitingPackets = [SocketPacket]()
|
||||||
|
|
||||||
public var sid: String? {
|
public var sid: String? {
|
||||||
return nsp + "#" + (engine?.sid ?? "")
|
return engine?.sid
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Type safe way to create a new SocketIOClient. opts can be omitted
|
/// Type safe way to create a new SocketIOClient. opts can be omitted
|
||||||
|
|||||||
@ -162,6 +162,11 @@ open class WebSocket : NSObject, StreamDelegate {
|
|||||||
public init(url: URL, protocols: [String]? = nil) {
|
public init(url: URL, protocols: [String]? = nil) {
|
||||||
self.url = url
|
self.url = url
|
||||||
self.origin = url.absoluteString
|
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
|
writeQueue.maxConcurrentOperationCount = 1
|
||||||
optionalProtocols = protocols
|
optionalProtocols = protocols
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user