Function

nw_framer_prepend_application_protocol

Dynamically adds another protocol that will run above your protocol after your protocol calls nw_framer_mark_ready.

Declaration

bool nw_framer_prepend_application_protocol(nw_framer_t framer, nw_protocol_options_t protocol_options);

See Also

Managing Instance Lifetime

nw_framer_mark_ready

Indicates to a connection that your protocol's handshake is complete.

nw_framer_mark_failed_with_error

Indicates to a connection that your protocol has encountered an error, or has gracefully closed.

nw_framer_set_stop_handler

Sets a block to handle when the connection is being closed.

nw_framer_stop_handler_t

A handler that requests that your protocol send any final messages to close the connection.

nw_framer_set_cleanup_handler

Sets a block to handle the final cleanup of allocations made by your protocol instance.

nw_framer_cleanup_handler_t

A handler that tells your protocol to clean up all allocations before being deallocated.