NIOHTTPClientUpgradeHandler

    A client-side channel handler that sends a HTTP upgrade handshake request to perform a HTTP-upgrade. When the first HTTP request is sent, this handler will add all appropriate headers to perform an upgrade to the a protocol. It may add headers for a set of protocols in preference order. If the upgrade fails (i.e. response is not 101 Switching Protocols), this handler simply removes itself from the pipeline. If the upgrade is successful, it upgrades the pipeline to the new protocol.

    NIOHTTPClientUpgradeHandler.swift:93
    final class NIOHTTPClientUpgradeHandler

    The request sends an order of preference to request which protocol it would like to use for the upgrade. It will only upgrade to the protocol that is returned first in the list and does not currently have the capability to upgrade to multiple simultaneous layered protocols.

    Citizens in NIOHTTP1

    Conformances

    • protocol ChannelHandler

      Base protocol for handlers that handle I/O events or intercept an I/O operation.

    • protocol ChannelInboundHandler

      ChannelHandler which handles inbound I/O events for a Channel.

    • protocol ChannelOutboundHandler

      ChannelHandler which handles outbound I/O events or intercept an outbound I/O operation for a Channel.

    • protocol RemovableChannelHandler

      A RemovableChannelHandler is a ChannelHandler that can be dynamically removed from a ChannelPipeline whilst the Channel is operating normally. A RemovableChannelHandler is required to remove itself from the ChannelPipeline (using ChannelHandlerContext.leavePipeline) as soon as possible.

    • protocol Sendable

      A type whose values can safely be passed across concurrency domains by copying.

    Show implementation details (3)

    Hide implementation details

    Typealiases

    Type members

    Instance members

    Instance features