Prosody data communications: API: smdc_stop

Prototype Definition

int smdc_stop(struct smdc_stop_parms *pp)

Parameters

*pp
a structure of the following type:
typedef struct smdc_stop_parms {
	tSMChannelId channel;					/* in */
} SMDC_STOP_PARMS;

Description

This stops any protocol configured on a channel. If the input half and the output half are configured with independent protocols, both are stopped. Unlike the kSMDCLineCtlCmdDisconnect command of smdc_line_control(), this does not use any disconnection procedures of the protocols - it simply stops immediately. It is intended for situations where there is no need to disconnect properly, such as when call control indicates that the remote party has cleared the call.

This function is equivalent to calling both smdc_rx_stop() and smdc_tx_stop() on the channel, except that it does not report an error if only one half of the channel is configured with a protocol.

When the input half of a channel has stopped, smdc_rx_status() returns the status kSMDCRxStatusFinished. When the output half of a channel has stopped smdc_tx_status() returns the status kSMDCTxStatusFinished.

See also the document Prosody Data Communcations Protocols and Encodings for details of behaviour specific to individual protocols and encodings.

Fields

channel
The data communication channel.

Returns

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


This function is part of the Prosody data communications API.