Type Aliasswift-nio 2.81.0NIOHTTP1
OutboundIn
NIOTypedHTTPClientUpgradeHandler.swift:81- iOS
- 16+
- macOS
- 13+
- tvOS
- 16+
- watchOS
- 9+
typealias OutboundIn = HTTPClientRequestPart
typealias OutboundIn = HTTPClientRequestPart
s8NIOHTTP132NIOTypedHTTPClientUpgradeHandlerC10OutboundIna
What are these?33PL7
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.
typealias HTTPClientRequestPart = HTTPPart<HTTPRequestHead, IOData>
The components of a HTTP request from the view of a HTTP client.
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 channelActive(context: ChannelHandlerContext)
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 OutboundOut = HTTPClientRequestPart