Important: The information in this document is obsolete and should not be used for new development.
dspClose
ThedspCloseroutine closes a connection end. You use thePBControlfunction
to call thedspCloseroutine. See "Routines" on page 5-43 for a description of thePBControlfunction.
--> ioCompletion ProcPtr A pointer to a completion routine. <-- ioResult OSErr The function result. --> ioCRefNum Integer The driver reference number. --> csCode Integer Always dspClosefor this function.--> ccbRefNum Integer The CCB reference number. --> abort Byte A value specifying to abort send requests
if not 0.
Field Description
csCode- The routine selector, always equal to
dspClosefor this routine.ccbRefNum- The connection control block (CCB) reference number that was returned by the
dspNewCIDroutine for the connection end that
you want to close.abort- A value that specifies whether or not to send all of the data in the send queue and all outstanding messages before closing the connection end. If the abort parameter is nonzero, ADSP cancels any outstanding requests to send data packets (such as the
dspAttentionroutine) and discards all data in the send queue.
If the abort parameter is 0, ADSP does not close the connection
end until all of the data in the send queue and all outstanding attention messages have been sent and acknowledged.DESCRIPTION
ThedspCloseroutine closes the connection end. The connection end is still established; that is, ADSP retains ownership of the CCB, send queue, receive queue, and attention-
message buffer. You can continue to read bytes from the receive queue after you have called thedspCloseroutine. Use thedspRemoveroutine instead of thedspCloseroutine if you are finished with reading bytes from the receive queue and want to release the memory associated with the connection end.SPECIAL CONSIDERATIONS
ThedspCloseroutine does not return an error if you call it for a connection end that is already closed.ASSEMBLY-LANGUAGE INFORMATION
To execute thedspCloseroutine from assembly language, call the_Controltrap macro with a value ofdspClosein thecsCodefield of the parameter block.RESULT CODES
noErr 0 No error errRefNum -1280 Bad connection reference number SEE ALSO
For information on how to remove a connection end and release the memory associated with it, see the description of thedspRemoveroutine that follows.