Important: The information in this document is obsolete and should not be used for new development.
dspStatus
ThedspStatus
routine returns the number of bytes waiting to be read and sent and the amount of space available in the send and receive queues. You use thePBControl
function to call thedspStatus
routine. See "Routines" on page 5-43 for a description of thePBControl
function.
--> ioCompletion ProcPtr A pointer to a completion routine. <-- ioResult OSErr The function result. --> ioCRefNum Integer The driver reference number. --> csCode Integer Always dspStatus
for this function.--> ccbRefNum Integer The CCB reference number. <-- statusCCB TPCCB A pointer to the CCB. <-- sendQPending Integer Bytes waiting to be sent or acknowledged. <-- sendQFree Integer Available send queue in bytes. <-- recvQPending Integer Bytes waiting to be read from queue. <-- recvQFree Integer Available receive queue in bytes.
Field Description
csCode
- The routine selector, always
dspStatus
for this routine.ccbRefNum
- The connection control block (CCB) reference number that the
dspInit
routine returned.statusCCB
- A pointer to the CCB of the connection specified by the
ccbRefNum
parameter value.- s
endQPending
- The number of bytes of data that are in the send queue waiting to be sent, including 1 byte for each logical end-of-message (EOM) indicator in the send queue. (ADSP counts 1 byte for each EOM, even though no actual data corresponds to the EOM indicator.) The send queue contains all data that has been sent to ADSP for transmission and that has not yet been acknowledged. Some of the data in the send queue might have already been transmitted, but ADSP retains it in the send queue until the remote connection end acknowledges its receipt in case the data has to be retransmitted.
sendQFree
- The number of bytes available in the send queue for additional data.
recvQPending
- The number of bytes in the receive queue, including 1 byte for each EOM if the EOM bit is set in an ADSP packet header. The receive queue contains all of the data that has been received by the connection end but not yet read by the connection end's client.
recvQFree
- The number of bytes available in the receive queue for
additional data.DESCRIPTION
ThedspStatus
routine provides information about an open connection. In addition to returning the number of bytes waiting to be read and sent and the space available in the send and receive queues, this routine also returns a pointer to the CCB, which contains information about the state of the connection end and about connection events received by the connection end. For more information about the CCB, see "Creating and Using a Connection Control Block" on page 5-12 and "The ADSP Connection Control Block Record" beginning on page 5-35.ASSEMBLY-LANGUAGE INFORMATION
To execute thedspStatus
routine from assembly language, call the_Control
trap macro with a value ofdspStatus
in thecsCode
field of the parameter block.RESULT CODES
noErr 0 No error errRefNum -1280 Bad connection reference number