NIOAsyncTestingChannel (ext)
You’re viewing third-party extensions to NIOAsyncTestingChannel
, a class from swift-nio.
You can also read the documentation forNIOAsyncTestingChannel
itself.
extension NIOAsyncTestingChannel
You’re viewing third-party extensions to NIOAsyncTestingChannel
, a class from swift-nio.
You can also read the documentation forNIOAsyncTestingChannel
itself.
extension NIOAsyncTestingChannel
final class NIOAsyncTestingChannel
A Channel
with fine-grained control for testing.
import Vapor
Vapor is a framework for building server applications, APIs and websites in Swift. It provides a safe, performant and scalable foundation for building large complex backends.
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 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 configureCommonHTTPServerPipeline(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 configureCommonHTTPServerPipeline(h2ConnectionChannelConfigurator: NIOChannelInitializer? = nil, targetWindowSize: Int, _ 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 configureHTTP2Pipeline(mode: NIOHTTP2Handler.ParserMode, connectionConfiguration: NIOHTTP2Handler.ConnectionConfiguration, streamConfiguration: NIOHTTP2Handler.StreamConfiguration, streamDelegate: NIOHTTP2StreamDelegate? = nil, position: ChannelPipeline.Position = .last, inboundStreamInitializer: @escaping NIOChannelInitializer) -> EventLoopFuture<NIOHTTP2Handler.StreamMultiplexer>
Configures a ChannelPipeline
to speak HTTP/2.
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 configureHTTP2SecureUpgrade(h2ChannelConfigurator: @escaping NIOChannelInitializer, http1ChannelConfigurator: @escaping NIOChannelInitializer) -> EventLoopFuture<Void>
Configures a channel to perform an HTTP/2 secure upgrade.
func nioSSL_tlsVersion() -> EventLoopFuture<TLSVersion?>
API to extract the TLSVersion
from off the Channel
.
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.