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:

          vortex_channel_set_data (my_channel, "my_key", NULL);
          // 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.

Parameters:
channel Channel where data will be stored.
key The 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.
value The 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.