Skip to content

Commit

Permalink
wip why bother
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoughjr committed Aug 30, 2023
1 parent 1d4c083 commit 340fd4e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
12 changes: 6 additions & 6 deletions Sources/WebSocketKit/PMCE.swift
Expand Up @@ -387,6 +387,7 @@ public final class PMCE: Sendable {
guard let channel = channel else {
throw IOError(errnoCode: 0, reason: "PMCE: channel not configured.")
}

let notakeover = !shouldTakeOverContext()

do {
Expand All @@ -402,7 +403,6 @@ public final class PMCE: Sendable {

if notakeover {
try compressorBox.value?.resetStream()
}else {
}

var frame = WebSocketFrame(
Expand Down Expand Up @@ -526,9 +526,9 @@ public final class PMCE: Sendable {
extension PMCE: CustomStringConvertible {
public var description: String {
"""
extendedSocketType : \(self.extendedSocketType),
serverConfig : \(serverConfig),
clientConfig : \(clientConfig)
extendedSocketType: \(self.extendedSocketType),
serverConfig: \(serverConfig),
clientConfig: \(clientConfig)
"""
}
}
Expand All @@ -542,7 +542,7 @@ extension PMCE.PMCEConfig: Equatable {

extension PMCE.PMCEConfig: CustomDebugStringConvertible {
public var debugDescription: String {
"PMCEConfig {config:\(deflateConfig)}"
"PMCEConfig {config: \(deflateConfig)}"
}
}

Expand All @@ -567,7 +567,7 @@ extension PMCE.PMCEConfig.DeflateConfig: Equatable {
extension PMCE.PMCEConfig.DeflateConfig: CustomDebugStringConvertible {
public var debugDescription: String {
"""
DeflateConfig {agreedParams:\(agreedParams), zlib:\(zlibConfig)}
DeflateConfig {agreedParams: \(agreedParams), zlib: \(zlibConfig)}
"""
}
}
Expand Down
4 changes: 2 additions & 2 deletions Sources/WebSocketKit/WebSocket.swift
Expand Up @@ -33,9 +33,9 @@ public final class WebSocket: Sendable {
self.channel.closeFuture
}

/// PMCE insance that handles compressing and decompressing of frames as well as
/// PMCE instance that handles compressing and decompressing of frames as well as
/// configuring the connection per RFC-7692.
public let pmce:PMCE?
public let pmce: PMCE?

@usableFromInline
/* private but @usableFromInline */
Expand Down
3 changes: 0 additions & 3 deletions Sources/WebSocketKit/WebSocketClient.swift
Expand Up @@ -146,12 +146,9 @@ public final class WebSocketClient: Sendable {
}
}



var headers = upgradeRequestHeaders
if let pmce = self.configuration.pmceConfig {
let pmceHeaders = pmce.headers()
self.logger.trace("injecting headers for pmce config \(pmce)")
headers.add(contentsOf: pmceHeaders)
}

Expand Down

0 comments on commit 340fd4e

Please sign in to comment.