int sm_channel_dispatcher_connect(struct sm_channel_dispatcher_connect_parms *dp)
typedef struct sm_channel_dispatcher_connect_parms { tSMDispatcherId dest; /* in */ tSMChannelId channel; /* in */ } SM_CHANNEL_DISPATCHER_CONNECT_PARMS;
Connects an input channel to a dispatcher, replacing the
previous dispatcher connected to it. The
dest
must be a dispatcher created by a call to
sm_udp_dispatcher_create().
or the value kSMNullDispatcherId
.
The input channel,
channel,
will use data dispatcher to pass on data it produces
(e.g. for record or receive operations).
There must be no operation in progress (e.g. record) on the input half of the channel when this function is called.
The default dispatcher for a channel is
kSMNullDispatcherId
, which dispatches data through
the API (e.g. via
smdc_rx_data()).
0 if call completed successfully, otherwise a standard error such as:
This function is part of the Prosody generic API.