dspReset
The dspReset routine clears all the data associated with the connection that the remote connection client has not already read and resynchronizes the connection. You use the PBControl function to call the dspReset routine. See "Routines" on page 5-43 for a description of the PBControl function.
| --> | ioCompletion | ProcPtr | A pointer to a completion routine. |
| <-- | ioResult | OSErr | The function result. |
| --> | ioCRefNum | Integer | The driver reference number. |
| --> | csCode | Integer | Always dspReset for this routine. |
| --> | ccbRefNum | Integer | The CCB reference number. |
Field Description
csCode
- The routine selector, always
dspReset for this routine.
ccbRefNum
- The connection control block (CCB) reference number that the
dspInit routine returned.
DESCRIPTION
The dspReset routine causes ADSP to discard all data in the send queue, all data in transit to the remote connection end, and all data in the remote connection end's receive queue that the client has not yet read. This process is known as a forward reset. ADSP then resynchronizes the connection. You can determine that your connection end has received a forward reset and has discarded all data in the receive queue by checking the eFwdReset flag in the userFlags field of the CCB. For information on the CCB, see "Connections, Connection Ends, and Connection States" beginning on page 5-6.
ASSEMBLY-LANGUAGE INFORMATION
To execute the dspReset routine from assembly language, call the _Control trap macro with a value of dspReset in the csCode field of the parameter block.
RESULT CODES
| noErr | 0 | No error |
| errState | -1278 | Connection is not open |
| errAborted | -1279 | Request aborted by dspRemove or dspClose routine |
| errRefNum | -1280 | Bad connection reference number |