int smdc_rx_control(struct smdc_rx_control_parms *controlp)
typedef struct smdc_rx_control_parms { tSMChannelId channel; /* in */ enum kSMDCRxCtl { kSMDCRxCtlDiscard, kSMDCRxCtlNotifyOnData, kSMDCRxCtlStop, kSMDCRxCtlResume, } cmd; /* in */ tSM_INT min_to_collect; /* in */ tSM_INT min_idle; /* in */ tSM_INT blocking; /* in */ } SMDC_RX_CONTROL_PARMS;
Performs a control operation on the input half of a data communications channel.
When the cmd field holds kSMDCRxCtlNotifyOnData, the values min_to_collect and min_idle configure the criteria used to determine when the input half of the channel is ready. There are two cases:
min_idle | Meaning |
---|---|
0 |
The channel is ready when at least min_to_collect octets of data are waiting. It ceases to be ready when the amount waiting falls below min_to_collect. |
T != 0 |
The channel is ready when any data can be
collected. Data becomes ready for collection when either
min_to_collect
octets of data are waiting, or data is waiting and no
further data has been received for a period of T mS.
|
Note that, although times can be specified to the nearest millisecond, the measurement of time is limited to the epoch period of the Prosody device.
When the input half of a channel is ready:
See also the document Prosody Data Communcations Protocols and Encodings for details of behaviour specific to individual protocols and encodings.
-256
means
that the threshold is reached when there is space available
for no more than 256 further octets.
See also the document Prosody
application note: considerations for data transfer
thresholds.
0 if call completed successfully, otherwise a standard error such as:
This function is part of the Prosody data communications API.