writeInbound(_:)

Sends an inbound channelRead event followed by a channelReadComplete event through the ChannelPipeline.

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

Parameters

data

The data to fire through the pipeline.

Returns

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

The immediate effect being that the first ChannelInboundHandler will get its channelRead method called with the data you provide.