waitForOutboundWrite(as:)

    This method is similar to readOutbound(as:) but will wait if the outbound buffer is empty. If available, this method reads one element of type T out of the NIOAsyncTestingChannel’s outbound buffer. If the first element was of a different type than requested, WrongTypeError will be thrown, if there are no elements in the outbound buffer, nil will be returned.

    AsyncTestingChannel.swift:395
    iOS
    13.0+
    macOS
    10.15+
    tvOS
    13.0+
    watchOS
    6.0+
    func waitForOutboundWrite<T>(as type: T.Type = T.self) async throws -> T where T : Sendable

    Data hits the NIOAsyncTestingChannel’s outbound buffer when data was written using write, then flushed, and then travelled the ChannelPipeline all the way to the front. For data to hit the outbound buffer, the very first ChannelHandler must have written and flushed it either explicitly (by calling ChannelHandlerContext.write and flush) or implicitly by not implementing write/flush.

    Other members in extension

    Types

    Type members

    Instance members

    Show implementation details (1)

    Hide implementation details