int sm_channel_collector_connect(struct sm_channel_collector_connect_parms *dp)
typedef struct sm_channel_collector_connect_parms { tSMCollectorId source; /* in */ tSMChannelId channel; /* in */ } SM_CHANNEL_COLLECTOR_CONNECT_PARMS;
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()).
0 if call completed successfully, otherwise a standard error such as:
This function is part of the Prosody generic API.