Contents

parseOutput(minimumIncompleteLength:maximumLength:parse:)

Examines the content of output data while inside your output handler.

Declaration

final func parseOutput(minimumIncompleteLength: Int, maximumLength: Int, parse: (UnsafeMutableRawBufferPointer?, Bool) -> Int) -> Bool

Parameters

  • minimumIncompleteLength:

    The minimum number of bytes that should be delivered to the parse completion.

  • maximumLength:

    The maximum number of bytes that should be delivered to the parse completion.

  • parse:

    A completion handler that will be called inline to examine a region of bytes. This will contain the buffer that matches the constraints, and a boolean indicating if this buffer represents the end of a message.

Return Value

Returns true if the requested length was available to parse, or false if the conditions could not be met.

See Also

Writing Output