mirror of
https://github.com/apple/swift-nio
synced 2026-11-25 04:47:49 +00:00
Documentation checking catches more issues in Swift 6.0.
Adopt the Swift 6.0 image and fix the errors.
More accurate docs.
(cherry picked from commit adfd61adc5)
Co-authored-by: Rick Newton-Rogers <rnro@apple.com>
This commit is contained in:
1 parent
4d5eb6bb15
commit
653da4d987
100 files changed
+2092
-2061
No files matched your search
@@ -83,16 +83,16 @@ public final class NIOWebSocketServerUpgrader: HTTPServerProtocolUpgrader, @unch
|
||||
|
||||
/// Create a new `NIOWebSocketServerUpgrader`.
|
||||
///
|
||||
/// - parameters:
|
||||
/// - automaticErrorHandling: Whether the pipeline should automatically handle protocol
|
||||
/// - Parameters:
|
||||
/// - automaticErrorHandling: Whether the pipeline should automatically handle protocol
|
||||
/// errors by sending error responses and closing the connection. Defaults to `true`,
|
||||
/// may be set to `false` if the user wishes to handle their own errors.
|
||||
/// - shouldUpgrade: A callback that determines whether the websocket request should be
|
||||
/// - shouldUpgrade: A callback that determines whether the websocket request should be
|
||||
/// upgraded. This callback is responsible for creating a `HTTPHeaders` object with
|
||||
/// any headers that it needs on the response *except for* the `Upgrade`, `Connection`,
|
||||
/// and `Sec-WebSocket-Accept` headers, which this upgrader will handle. Should return
|
||||
/// an `EventLoopFuture` containing `nil` if the upgrade should be refused.
|
||||
/// - upgradePipelineHandler: A function that will be called once the upgrade response is
|
||||
/// - upgradePipelineHandler: A function that will be called once the upgrade response is
|
||||
/// flushed, and that is expected to mutate the `Channel` appropriately to handle the
|
||||
/// websocket protocol. This only needs to add the user handlers: the
|
||||
/// `WebSocketFrameEncoder` and `WebSocketFrameDecoder` will have been added to the
|
||||
@@ -113,20 +113,20 @@ public final class NIOWebSocketServerUpgrader: HTTPServerProtocolUpgrader, @unch
|
||||
|
||||
/// Create a new `NIOWebSocketServerUpgrader`.
|
||||
///
|
||||
/// - parameters:
|
||||
/// - maxFrameSize: The maximum frame size the decoder is willing to tolerate from the
|
||||
/// - Parameters:
|
||||
/// - maxFrameSize: The maximum frame size the decoder is willing to tolerate from the
|
||||
/// remote peer. WebSockets in principle allows frame sizes up to `2**64` bytes, but
|
||||
/// this is an objectively unreasonable maximum value (on AMD64 systems it is not
|
||||
/// possible to even. Users may set this to any value up to `UInt32.max`.
|
||||
/// - automaticErrorHandling: Whether the pipeline should automatically handle protocol
|
||||
/// - automaticErrorHandling: Whether the pipeline should automatically handle protocol
|
||||
/// errors by sending error responses and closing the connection. Defaults to `true`,
|
||||
/// may be set to `false` if the user wishes to handle their own errors.
|
||||
/// - shouldUpgrade: A callback that determines whether the websocket request should be
|
||||
/// - shouldUpgrade: A callback that determines whether the websocket request should be
|
||||
/// upgraded. This callback is responsible for creating a `HTTPHeaders` object with
|
||||
/// any headers that it needs on the response *except for* the `Upgrade`, `Connection`,
|
||||
/// and `Sec-WebSocket-Accept` headers, which this upgrader will handle. Should return
|
||||
/// an `EventLoopFuture` containing `nil` if the upgrade should be refused.
|
||||
/// - upgradePipelineHandler: A function that will be called once the upgrade response is
|
||||
/// - upgradePipelineHandler: A function that will be called once the upgrade response is
|
||||
/// flushed, and that is expected to mutate the `Channel` appropriately to handle the
|
||||
/// websocket protocol. This only needs to add the user handlers: the
|
||||
/// `WebSocketFrameEncoder` and `WebSocketFrameDecoder` will have been added to the
|
||||
@@ -220,7 +220,7 @@ public final class NIOTypedWebSocketServerUpgrader<UpgradeResult: Sendable>: NIO
|
||||
/// remote peer. WebSockets in principle allows frame sizes up to `2**64` bytes, but
|
||||
/// this is an objectively unreasonable maximum value (on AMD64 systems it is not
|
||||
/// possible to even. Users may set this to any value up to `UInt32.max`.
|
||||
/// - automaticErrorHandling: Whether the pipeline should automatically handle protocol
|
||||
/// - enableAutomaticErrorHandling: Whether the pipeline should automatically handle protocol
|
||||
/// errors by sending error responses and closing the connection. Defaults to `true`,
|
||||
/// may be set to `false` if the user wishes to handle their own errors.
|
||||
/// - shouldUpgrade: A callback that determines whether the websocket request should be
|
||||
@@ -228,11 +228,9 @@ public final class NIOTypedWebSocketServerUpgrader<UpgradeResult: Sendable>: NIO
|
||||
/// any headers that it needs on the response *except for* the `Upgrade`, `Connection`,
|
||||
/// and `Sec-WebSocket-Accept` headers, which this upgrader will handle. Should return
|
||||
/// an `EventLoopFuture` containing `nil` if the upgrade should be refused.
|
||||
/// - enableAutomaticErrorHandling: A function that will be called once the upgrade response is
|
||||
/// flushed, and that is expected to mutate the `Channel` appropriately to handle the
|
||||
/// websocket protocol. This only needs to add the user handlers: the
|
||||
/// `WebSocketFrameEncoder` and `WebSocketFrameDecoder` will have been added to the
|
||||
/// pipeline automatically.
|
||||
/// pipeline automatically.to WebSocket protocol errors. Default is true.
|
||||
/// - upgradePipelineHandler: called once the upgrade was successful.
|
||||
public init(
|
||||
maxFrameSize: Int = 1 << 14,
|
||||
enableAutomaticErrorHandling: Bool = true,
|
||||
|
||||
Reference in new issue
Block a user