protocol Channel : AnyObject, ChannelOutboundInvoker, _NIOPreconcurrencySendable
A Channel
is easiest thought of as a network socket. But it can be anything that is capable of I/O operations such as read, write, connect, and bind.
func configureAsyncHTTP2Pipeline<Output>(mode: NIOHTTP2Handler.ParserMode, configuration: NIOHTTP2Handler.Configuration = .init(), streamInitializer: @escaping NIOChannelInitializerWithOutput<Output>) -> EventLoopFuture<NIOHTTP2Handler.AsyncStreamMultiplexer<Output>> where Output : Sendable
Configures a ChannelPipeline
to speak HTTP/2 and sets up mapping functions so that it may be interacted with from concurrent code.
func configureAsyncHTTP2Pipeline<Output>(mode: NIOHTTP2Handler.ParserMode, streamDelegate: NIOHTTP2StreamDelegate?, configuration: NIOHTTP2Handler.Configuration = NIOHTTP2Handler.Configuration(), streamInitializer: @escaping NIOChannelInitializerWithOutput<Output>) -> EventLoopFuture<NIOHTTP2Handler.AsyncStreamMultiplexer<Output>> where Output : Sendable
Configures a ChannelPipeline
to speak HTTP/2 and sets up mapping functions so that it may be interacted with from concurrent code.
func configureAsyncHTTPServerPipeline<HTTP1ConnectionOutput, HTTP2ConnectionOutput, HTTP2StreamOutput>(http2Configuration: NIOHTTP2Handler.Configuration = .init(), http1ConnectionInitializer: @escaping NIOChannelInitializerWithOutput<HTTP1ConnectionOutput>, http2ConnectionInitializer: @escaping NIOChannelInitializerWithOutput<HTTP2ConnectionOutput>, http2StreamInitializer: @escaping NIOChannelInitializerWithOutput<HTTP2StreamOutput>) -> EventLoopFuture<EventLoopFuture<NIONegotiatedHTTPVersion<HTTP1ConnectionOutput, (HTTP2ConnectionOutput, NIOHTTP2Handler.AsyncStreamMultiplexer<HTTP2StreamOutput>)>>> where HTTP1ConnectionOutput : Sendable, HTTP2ConnectionOutput : Sendable, HTTP2StreamOutput : Sendable
Configures a ChannelPipeline
to speak either HTTP/1.1 or HTTP/2 according to what can be negotiated with the client.
func configureAsyncHTTPServerPipeline<HTTP1ConnectionOutput, HTTP2ConnectionOutput, HTTP2StreamOutput>(streamDelegate: NIOHTTP2StreamDelegate?, http2Configuration: NIOHTTP2Handler.Configuration = .init(), http1ConnectionInitializer: @escaping NIOChannelInitializerWithOutput<HTTP1ConnectionOutput>, http2ConnectionInitializer: @escaping NIOChannelInitializerWithOutput<HTTP2ConnectionOutput>, http2StreamInitializer: @escaping NIOChannelInitializerWithOutput<HTTP2StreamOutput>) -> EventLoopFuture<EventLoopFuture<NIONegotiatedHTTPVersion<HTTP1ConnectionOutput, (HTTP2ConnectionOutput, NIOHTTP2Handler.AsyncStreamMultiplexer<HTTP2StreamOutput>)>>> where HTTP1ConnectionOutput : Sendable, HTTP2ConnectionOutput : Sendable, HTTP2StreamOutput : Sendable
Configures a ChannelPipeline
to speak either HTTP/1.1 or HTTP/2 according to what can be negotiated with the client.
func configureCommonHTTPServerPipeline(connectionConfiguration: NIOHTTP2Handler.ConnectionConfiguration, streamConfiguration: NIOHTTP2Handler.StreamConfiguration, streamDelegate: NIOHTTP2StreamDelegate? = nil, h2ConnectionChannelConfigurator: NIOChannelInitializer? = nil, configurator: @escaping NIOChannelInitializer) -> EventLoopFuture<Void>
Configures a ChannelPipeline
to speak either HTTP/1.1 or HTTP/2 according to what can be negotiated with the client.
func configureHTTP2AsyncSecureUpgrade<HTTP1Output, HTTP2Output>(http1ConnectionInitializer: @escaping NIOChannelInitializerWithOutput<HTTP1Output>, http2ConnectionInitializer: @escaping NIOChannelInitializerWithOutput<HTTP2Output>) -> EventLoopFuture<EventLoopFuture<NIONegotiatedHTTPVersion<HTTP1Output, HTTP2Output>>> where HTTP1Output : Sendable, HTTP2Output : Sendable
Configures a channel to perform an HTTP/2 secure upgrade with typed negotiation results.
func configureHTTP2Pipeline(mode: NIOHTTP2Handler.ParserMode, initialLocalSettings: [HTTP2Setting] = nioDefaultSettings, position: ChannelPipeline.Position = .last, targetWindowSize: Int = 65535, inboundStreamInitializer: NIOChannelInitializer?) -> EventLoopFuture<HTTP2StreamMultiplexer>
Configures a ChannelPipeline
to speak HTTP/2.
func configureHTTP2Pipeline(mode: NIOHTTP2Handler.ParserMode, initialLocalSettings: [HTTP2Setting] = nioDefaultSettings, position: ChannelPipeline.Position = .last, inboundStreamStateInitializer: NIOChannelInitializerWithStreamID? = nil) -> EventLoopFuture<HTTP2StreamMultiplexer>
Configures a ChannelPipeline
to speak HTTP/2.
func configureHTTP2Pipeline(mode: NIOHTTP2Handler.ParserMode, initialLocalSettings: [HTTP2Setting] = nioDefaultSettings, position: ChannelPipeline.Position = .last, targetWindowSize: Int, inboundStreamStateInitializer: NIOChannelInitializerWithStreamID? = nil) -> EventLoopFuture<HTTP2StreamMultiplexer>
Configures a ChannelPipeline
to speak HTTP/2.