From f17c65dd5f2f41e7a1d48c950018f8888fe18e50 Mon Sep 17 00:00:00 2001 From: Adam Fowler Date: Mon, 18 Nov 2024 09:05:39 +0000 Subject: [PATCH] nonNegociatedExtension --- Sources/WSCore/Extensions/WebSocketExtensionBuilder.swift | 2 +- Tests/WebSocketTests/WebSocketExtensionNegotiationTests.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/WSCore/Extensions/WebSocketExtensionBuilder.swift b/Sources/WSCore/Extensions/WebSocketExtensionBuilder.swift index 1f2e5ff..ad1d980 100644 --- a/Sources/WSCore/Extensions/WebSocketExtensionBuilder.swift +++ b/Sources/WSCore/Extensions/WebSocketExtensionBuilder.swift @@ -134,7 +134,7 @@ public struct WebSocketExtensionFactory: Sendable { self.build = build } - public static func nonNegotiableExtension(_ _build: @escaping @Sendable () -> some WebSocketExtension) -> Self { + public static func nonNegotiatedExtension(_ _build: @escaping @Sendable () -> some WebSocketExtension) -> Self { return .init { WebSocketNonNegotiableExtensionBuilder { _build() diff --git a/Tests/WebSocketTests/WebSocketExtensionNegotiationTests.swift b/Tests/WebSocketTests/WebSocketExtensionNegotiationTests.swift index 2db8bff..01071c1 100644 --- a/Tests/WebSocketTests/WebSocketExtensionNegotiationTests.swift +++ b/Tests/WebSocketTests/WebSocketExtensionNegotiationTests.swift @@ -99,7 +99,7 @@ final class WebSocketExtensionNegotiationTests: XCTestCase { func shutdown() async {} } - let clientExtensionBuilders: [WebSocketExtensionBuilder] = [WebSocketExtensionFactory.nonNegotiableExtension { + let clientExtensionBuilders: [WebSocketExtensionBuilder] = [WebSocketExtensionFactory.nonNegotiatedExtension { MyExtension() }.build()] let clientExtensions = try clientExtensionBuilders.buildClientExtensions(from: [:])