Skip to content

Instance Method

webSocket(maxFrameSize:shouldUpgrade:onUpgrade:)

@preconcurrency func webSocket(maxFrameSize: WebSocketMaxFrameSize = .`default`, shouldUpgrade: @escaping @Sendable (Request) -> EventLoopFuture<HTTPHeaders?> = {
             $0.eventLoop.makeSucceededFuture([:])
         }, onUpgrade: @escaping @Sendable (Request, WebSocket) -> ()) -> Response