@@ -39,7 +39,7 @@ public struct HTTP1WebSocketUpgradeChannel: ServerChildChannel, HTTPChannelHandl
3939 public let channel : Channel
4040 }
4141
42- /// Basic context implementation of ``WebSocketContext``.
42+ /// Basic context implementation of ``/HummingbirdWSCore/ WebSocketContext``.
4343 /// Used by non-router web socket handle function
4444 public struct Context : WebSocketContext {
4545 public let logger : Logger
@@ -51,11 +51,10 @@ public struct HTTP1WebSocketUpgradeChannel: ServerChildChannel, HTTPChannelHandl
5151
5252 /// Initialize HTTP1AndWebSocketChannel with synchronous `shouldUpgrade` function
5353 /// - Parameters:
54- /// - additionalChannelHandlers: Additional channel handlers to add
5554 /// - responder: HTTP responder
56- /// - maxFrameSize: Max frame size WebSocket will allow
55+ /// - configuration: WebSocket configuration
56+ /// - additionalChannelHandlers: Additional channel handlers to add
5757 /// - shouldUpgrade: Function returning whether upgrade should be allowed
58- /// - Returns: Upgrade result future
5958 public init (
6059 responder: @escaping HTTPChannelHandler . Responder ,
6160 configuration: WebSocketServerConfiguration ,
@@ -97,13 +96,23 @@ public struct HTTP1WebSocketUpgradeChannel: ServerChildChannel, HTTPChannelHandl
9796 self . responder = responder
9897 }
9998
99+ @available ( * , deprecated, renamed: " init(responder:configuration:additionalChannelHandlers:shouldUpgrade:) " )
100+ @_documentation ( visibility: internal)
101+ public init (
102+ responder: @escaping HTTPChannelHandler . Responder ,
103+ additionalChannelHandlers: @escaping @Sendable ( ) -> [ any RemovableChannelHandler ] = { [ ] } ,
104+ configuration: WebSocketServerConfiguration ,
105+ shouldUpgrade: @escaping @Sendable ( HTTPRequest, Channel, Logger) async throws -> ShouldUpgradeResult < WebSocketDataHandler < Context > >
106+ ) {
107+ self . init ( responder: responder, configuration: configuration, additionalChannelHandlers: additionalChannelHandlers, shouldUpgrade: shouldUpgrade)
108+ }
109+
100110 /// Initialize HTTP1AndWebSocketChannel with async `shouldUpgrade` function
101111 /// - Parameters:
102- /// - additionalChannelHandlers: Additional channel handlers to add
103112 /// - responder: HTTP responder
104- /// - maxFrameSize: Max frame size WebSocket will allow
113+ /// - additionalChannelHandlers: Additional channel handlers to add
114+ /// - configuration: WebSocket configuration
105115 /// - shouldUpgrade: Function returning whether upgrade should be allowed
106- /// - Returns: Upgrade result future
107116 public init (
108117 responder: @escaping HTTPChannelHandler . Responder ,
109118 configuration: WebSocketServerConfiguration ,
0 commit comments