writeOutbound(_:)

    Sends an outbound writeAndFlush event through the ChannelPipeline.

    Embedded.swift:771
    @discardableResult func writeOutbound<T>(_ data: T) throws -> BufferState

    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.

    Other members in extension

    Types

    • enum BufferState

      BufferState represents the state of either the inbound, or the outbound EmbeddedChannel buffer. These buffers contain data that travelled the ChannelPipeline all the way.

    • enum LeftOverState

      LeftOverState represents any left-over inbound, outbound, and pending outbound events that hit the EmbeddedChannel and were not consumed when finish was called on the EmbeddedChannel.

    • struct SynchronousOptions
    • struct WrongTypeError

      WrongTypeError is throws if you use readInbound or readOutbound and request a certain type but the first item in the respective buffer is of a different type.

    Type members

    Instance members

    Show implementation details (1)

    Hide implementation details