void vortex_channel_set_data ( VortexChannel channel,
axlPointer  key,
axlPointer  value 

Allows to store a pair key/value associated to the channel.

This allows to associate application data to the channel which can be easily retrieved later using vortex_channel_get_data.

In the case a NULL reference is passed to the function as the value parameter, the pair key/value is removed from the channel:

1 vortex_channel_set_data (my_channel, "my_key", NULL);
2 // previous will remove "my_key" pair from the channel

If it is required to associate a "destroy handler" to the key or value stored, you can use vortex_channel_set_data_full.

channelChannel where data will be stored.
keyThe key index to look up for the data stored. Though the API expects an axlPointer, the hash storing values is configured to receive string keys.
valueThe data to be stored. NULL to remove previous data stored under the provided key.

See also:

NOTE: the function do not allows storing NULL value pointers.

References vortex_channel_set_data_full().

Referenced by vortex_channel_defer_start(), vortex_channel_pool_get_next_ready_full(), vortex_channel_pool_release_channel(), and vortex_channel_wait_reply().