Prosody generic: API: sm_channel_collector_connect

Prototype Definition

int sm_channel_collector_connect(struct sm_channel_collector_connect_parms *dp)

Parameters

*dp
a structure of the following type:
typedef struct sm_channel_collector_connect_parms {
	tSMCollectorId source;					/* in */
	tSMChannelId channel;					/* in */
} SM_CHANNEL_COLLECTOR_CONNECT_PARMS;

Description

Connects a collector to an output channel, replacing the previous collector connected to it. The source must be a collector created by a call to sm_udp_collector_create(). or the value kSMNullCollectorId. The output channel, channel, will use data collector as its source of data (e.g. for replay or transmit operations).

There must be no operation in progress (e.g. replay) on the output half of the channel when this function is called.

The default collector for a channel is kSMNullCollectorId, which collects data through the API (e.g. via smdc_tx_data()).

Fields

source
The collector which the channel should use as a source of data
channel
The channel that will receive the data

Returns

0 if call completed successfully, otherwise a standard error such as:


This function is part of the Prosody generic API.