channelActive(context:)
NIOTypedHTTPClientUpgradeHandler.swift:141- iOS
- 16+
- macOS
- 13+
- tvOS
- 16+
- watchOS
- 9+
func channelActive(context: ChannelHandlerContext)
func channelActive(context: ChannelHandlerContext)
s8NIOHTTP132NIOTypedHTTPClientUpgradeHandlerC13channelActive7contexty7NIOCore07ChannelE7ContextC_tF
What are these?1RR6D
import NIOHTTP1
final class NIOTypedHTTPClientUpgradeHandler<UpgradeResult> where UpgradeResult : Sendable
A client-side channel handler that sends a HTTP upgrade handshake request to perform a HTTP-upgrade. 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.
final class ChannelHandlerContext
Every ChannelHandler
has – when added to a ChannelPipeline
– a corresponding ChannelHandlerContext
which is the way ChannelHandler
s can interact with other ChannelHandler
s in the pipeline.
init(httpHandlers: [RemovableChannelHandler], upgradeConfiguration: NIOTypedHTTPClientUpgradeConfiguration<UpgradeResult>)
Create a NIOTypedHTTPClientUpgradeHandler
.
var upgradeResultFuture: EventLoopFuture<UpgradeResult> { get }
The upgrade future which will be completed once protocol upgrading has been done.
func channelRead(context: ChannelHandlerContext, data: NIOAny)
func handlerAdded(context: ChannelHandlerContext)
func handlerRemoved(context: ChannelHandlerContext)
func write(context: ChannelHandlerContext, data: NIOAny, promise: EventLoopPromise<Void>?)
typealias InboundIn = HTTPClientResponsePart
typealias InboundOut = HTTPClientResponsePart
typealias OutboundIn = HTTPClientRequestPart
typealias OutboundOut = HTTPClientRequestPart