Required Instance Methodswift-nio 2.72.0NIOCore

    decodeLast(buffer:seenEOF:)

    Decode from a ByteBuffer when no more data is incoming.

    SingleStepByteToMessageDecoder.swift:50
    mutating func decodeLast(buffer: inout ByteBuffer, seenEOF: Bool) throws -> InboundOut?

    Parameters

    buffer

    The ByteBuffer from which we decode.

    seenEOF

    true if EOF has been seen.

    Returns

    A message if one can be decoded or nil if no more messages can be produced.

    Like with decode, this method will be called in a loop until either nil is returned from the method or until the input ByteBuffer has no more readable bytes. If non-nil is returned and the ByteBuffer contains more readable bytes, this method will immediately be invoked again.

    Once nil is returned, neither decode nor decodeLast will be called again. If there are no bytes left, decodeLast will be called once with an empty buffer.

    Other requirements

    Type members

    • associatedtype InboundOut

      The decoded type this NIOSingleStepByteToMessageDecoder decodes to. To conform to ByteToMessageDecoder it must be called InboundOut - see https://bugs.swift.org/browse/SR-11868.

    Instance members