DataSource for C SDK  7.0.2.308582
Deprecated: Sending Data Objects To Peers

Functions

void ds_send_data (ds_data_t *data)
 Send the data object to all connected DataSource peers. More...
 
void ds_send_data_direct (ds_data_t *data)
 Send the data object to all connected DataSource peers. More...
 
void ds_send_data_no_free (ds_data_t *data)
 Send the data object to all connected DataSource peers. More...
 
void ds_send_data_to_peer (int peer, ds_data_t *data)
 Send the data object to a specific peer. More...
 
void ds_send_data_to_peer_no_free (int peer, ds_data_t *data)
 Send the data object to a specific peer. More...
 

Detailed Description

These functions are for sending data objects to DataSource peers. Once an object has been created and some fields and values added to it, it can be sent to a number of DataSource peers. This can either be to all connected peers using ds_send_data() or to a specific peer using ds_send_data_to_peer(). Sending to a specific peer is typically used by active DataSources in response to a request for an object.

Function Documentation

void ds_send_data ( ds_data_t data)

Send the data object to all connected DataSource peers.

Parameters
dataThe data object to send

This function automatically frees the data object (i.e. you do not need to call ds_free_data() after using this function).

Note
This function may or may not actually send the object, depending on configuration (eg if the Active Cache is enabled or delay channels have been configured). All other ds_send_data functions will always try to send directly.
See also
ds_send_data_no_free()
ds_send_data_direct()
void ds_send_data_direct ( ds_data_t data)

Send the data object to all connected DataSource peers.

Parameters
dataThe data object to send

This function automatically frees the data object (i.e. you do not need to call ds_free_data() after using this function).

Note
This function will send the object directly.
See also
ds_send_data_no_free()
ds_send_data_direct()
void ds_send_data_no_free ( ds_data_t data)

Send the data object to all connected DataSource peers.

Parameters
dataThe data object to send

This function automatically does not free the data object (i.e. you may need to call ds_free_data() after using this function).

See also
ds_send_data()
ds_send_data_direct()
void ds_send_data_to_peer ( int  peer,
ds_data_t data 
)

Send the data object to a specific peer.

Parameters
peerPeer number to send to
dataThe data object to send

This function automatically frees the data object (i.e. you do not need to call ds_free_data() after using this function).

Note
The peer number is not the DataSource ID specified by datasrc_id parameter in the configuration file, but corresponds to the order of the peer's add-peer entries in the configuration file. The first add-peer is for peer 0, the next peer 1 and so on.
For the purpose of easy integration with the active cache, sending to peer -1 is the equivalent of calling ds_send_data().
See also
ds_send_data_to_peer_no_free()
void ds_send_data_to_peer_no_free ( int  peer,
ds_data_t data 
)

Send the data object to a specific peer.

Parameters
peerPeer number to send to
dataThe data object to send

This function automatically does not free the data object (i.e. you may need to call ds_free_data() after using this function).

Note
The peer number is not the DataSource ID specified by datasrc_id parameter in the configuration file, but corresponds to the order of the peer's add-peer entries in the configuration file. The first add-peer is for peer 0, the next peer 1 and so on.
For the purpose of easy integration with the active cache, sending to peer -1 is the equivalent of calling ds_send_data_no_free().
See also
ds_send_data_to_peer()

Generated on Wed Feb 22 2017 11:09:13 for DataSource for C SDK