From 4232d34efa49f633ba61afde365d3896fc7f8740 Mon Sep 17 00:00:00 2001 From: Benjamin Horsleben Date: Wed, 20 Mar 2024 18:40:23 +0100 Subject: [PATCH] Allow `send(_ binary:)` to accept `some DataProtocol` (#146) --- Sources/WebSocketKit/WebSocket.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/WebSocketKit/WebSocket.swift b/Sources/WebSocketKit/WebSocket.swift index e0c11f55..963e93ed 100644 --- a/Sources/WebSocketKit/WebSocket.swift +++ b/Sources/WebSocketKit/WebSocket.swift @@ -117,7 +117,7 @@ public final class WebSocket: Sendable { } - public func send(_ binary: [UInt8], promise: EventLoopPromise? = nil) { + public func send(_ binary: some DataProtocol, promise: EventLoopPromise? = nil) { self.send(raw: binary, opcode: .binary, fin: true, promise: promise) }