Type Alias


A handler that examines a range of data being sent or received.


typealias nw_framer_parse_completion_t = (UnsafeMutablePointer<UInt8>?, Int, Bool) -> Int



The pointer to bytes to parse.


The length of the buffer.


A boolean indicating if this span of bytes represents the end of a message.

Return Value

Return the number of bytes by which to increment the input or output cursor. Once the cursor is moved, previous bytes will no longer be delivered to nw_framer_parse_input(_:_:_:_:_:) and nw_framer_deliver_input_no_copy(_:_:_:_:) for input data, or nw_framer_parse_output(_:_:_:_:_:) and nw_framer_write_output_no_copy(_:_:) for output messages.

See Also

Handling Input Data

typealias nw_framer_input_handler_t

A handler that notifies your protocol that new inbound data is available to parse.

func nw_framer_deliver_input(nw_framer_t, UnsafePointer<UInt8>, Int, nw_framer_message_t, Bool)

Delivers an inbound message containing arbitrary data from your protocol to the application.

func nw_framer_deliver_input_no_copy(nw_framer_t, Int, nw_framer_message_t, Bool) -> Bool

Delivers an inbound message containing a specific number of next received bytes.

func nw_framer_pass_through_input(nw_framer_t)

Indicates that your protocol no longer needs to handle input data.