writeLengthPrefixed(strategy:writeData:)

    Prefixes bytes written by writeData with the number of bytes written. The number of bytes written is encoded using strategy.

    ByteBuffer-binaryEncodedLengthPrefix.swift:119
    @discardableResult mutating func writeLengthPrefixed<Strategy>(strategy: Strategy, writeData: (_ buffer: inout ByteBuffer) throws -> Int) rethrows -> Int where Strategy : NIOBinaryIntegerEncodingStrategy

    Parameters

    strategy

    The strategy to use for encoding the length.

    writeData

    A closure that takes a buffer, writes some data to it, and returns the number of bytes written.

    Returns

    Number of total bytes written. This is the length of the written data + the number of bytes used to write the length before it.

    Other members in extension

    Types

    Typealiases

    Show implementation details (2)

    Hide implementation details

    Type members

    Instance members

    Show obsolete interfaces (3)

    Hide obsolete interfaces