Function

nw_framer_create_definition

Initializes a new protocol definition based on your protocol implementation.

Declaration

nw_protocol_definition_t nw_framer_create_definition(const char *identifier, uint32_t flags, nw_framer_start_handler_t start_handler);

Discussion

Each time you initialize a protocol definition with your custom start handler, a new definition is created that will not be considered equal to other definitions. If you need to associate messages with a protocol you have added to a connection's protocol stack, make sure to use the same definition.

See Also

Adding Framers to Connections

nw_framer_start_handler_t

A handler that represents the entry point into your custom protocol.

nw_framer_t

An object that represents a single instance of your custom protocol running in a connection.

nw_framer_start_result_t

Results that you send to indicate the disposition of your protocol after the start handler is invoked.

NW_FRAMER_CREATE_FLAGS_DEFAULT

A constant flag value that indicates that the default framer protocol behavior should be used.

nw_framer_create_options

Initializes a set of protocol options with a custom framer definition.