Type Method
server(on:onUpgrade:)
Sets up a channel to operate as a WebSocket server.
@preconcurrency static func server(on channel: any Channel, onUpgrade: @escaping @Sendable (WebSocket) -> ()) -> EventLoopFuture<Void>
Parameters
channelNIO channel which the server will use to communicate.
onUpgradeAn escaping closure to be executed the channel is configured with the WebSocket handlers.
Return Value
A future which completes when the WebSocket connection to the server is established.