Skip to content

Commit

Permalink
Allow send(_ binary:) to accept some DataProtocol (#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
fizker authored Mar 20, 2024
1 parent 253a28e commit 4232d34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/WebSocketKit/WebSocket.swift
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public final class WebSocket: Sendable {

}

public func send(_ binary: [UInt8], promise: EventLoopPromise<Void>? = nil) {
public func send(_ binary: some DataProtocol, promise: EventLoopPromise<Void>? = nil) {
self.send(raw: binary, opcode: .binary, fin: true, promise: promise)
}

Expand Down

0 comments on commit 4232d34

Please sign in to comment.