writeOutbound(_:)

Sends an outbound writeAndFlush event through the ChannelPipeline.

AsyncTestingChannel.swift:515
iOS
13.0+
macOS
10.15+
tvOS
13.0+
watchOS
6.0+
@discardableResult func writeOutbound<T>(_ data: T) async throws -> NIOAsyncTestingChannel.BufferState where T : Sendable

Parameters

data

The data to fire through the pipeline.

Returns

The state of the outbound buffer which contains all the events that travelled the ChannelPipeline

The immediate effect being that the first ChannelOutboundHandler will get its write method called with the data you provide. Note that the first ChannelOutboundHandler in the pipeline is the last handler because outbound events travel the pipeline from back to front.