Function

nw_framer_message_access_value

Accesses a custom value stored in a framer message.

Declaration

bool nw_framer_message_access_value(nw_framer_message_t message, const char *key, bool (^access_value)(const void *value));

Parameters

message

The message to inspect.

key

The custom key used to store the value.

access_value

A block that will deliver the pointer value stored for the key. The block will be called inline. Returns a value to return to the outer function.

Return Value

Returns false if the key was not present, or else the boolean returned by the access block.

See Also

Customizing Framer Messages

nw_framer_message_t

A message for a custom protocol, in which you can store arbitrary key-value pairs.

nw_protocol_metadata_is_framer_message

Checks if a metadata object represents a custom framer protocol message.

nw_framer_protocol_create_message

Initializes an empty message for a custom framer definition.

nw_framer_message_create

Initializes an empty message from within a framer implementation.

nw_framer_message_set_value

Sets a value to be stored in a framer message, with a completion to call to disposed the stored value when the message is released.

nw_framer_message_dispose_value_t

A handler that's invoked when your custom value needs to be released due to a message being released or the value being replaced.

nw_framer_message_set_object_value

Sets an NSObject value to be stored in a framer message.

nw_framer_message_copy_object_value

Accesses an NSObject value stored in a framer message.