Important: The information in this document is obsolete and should not be used for new development.
dspOptions
ThedspOptionsroutine allows you to set values for several parameters that affect
the behavior of the local connection end. You use thePBControlfunction to call thedspOptionsroutine. See "Routines" on page 5-43 for a description of thePBControlfunction.
Field Description
csCode- The routine selector, always equal to
dspOptions for this routine.ccbRefNum- The connection control block (CCB) reference number that the
dspInitroutine returned.sendBlocking- The maximum number of bytes that may accumulate in the send queue before ADSP sends a packet to the remote connection end. ADSP sends a packet before the maximum number of bytes accumulates if the period specified by the send timer expires, if
you execute thedspWriteroutine with the flush parameter set
to 1, or if a connection event requires that the local connection end send an acknowledgment packet to the remote connection end.- You can set the
sendBlockingparameter to any value from
1 byte to the maximum size of a packet (572 bytes). If you set thesendBlockingparameter to 0, the current value for this parameter is not changed. The default value for thesendBlockingparameter is 16 bytes.badSeqMax- The maximum number of out-of-sequence data packets that the local connection end can receive before requesting the remote connection end to retransmit the missing data. Because a connection end does not acknowledge the receipt of a data packet received out of sequence, the retransmit timer of the remote connection end will expire eventually and the connection end will retransmit the data. The
badSeqMaxparameter allows you to cause the data to be retransmitted before the retransmit timer of the remote connection end has expired.- You can set the
badSeqMaxparameter to any value from 1 to 255.
If you set thebadSeqMaxparameter to 0, the current value for
this parameter is not changed. The default value for thebadSeqMaxparameter is 3.useCheckSum- A flag specifying whether DDP should compute a checksum and include it in each packet that it sends to the remote connection end. Set this parameter to 1 if you want DDP to use checksums or to 0
if you do not want DDP to use checksums. The default value foruseCheckSumis 0.- ADSP cannot include a checksum in a packet that has a short DDP header--that is, a packet being sent over LocalTalk to a remote socket that is on the same cable as the local socket. Note that the
useCheckSumparameter affects only whether ADSP includes a checksum in a packet that it is sending. If ADSP receives a packet that includes a checksum, it validates the checksum regardless of the setting of theuseCheckSumparameter.DESCRIPTION
ThedspOptionsroutine lets you set values that determine the behavior of a connection end, such as the blocking factor, which is maximum number of bytes that should accumulate in the connection end's send queue before ADSP sends a packet to the remote connection end, the maximum number of out-of-sequence packets received by the connection end before ADSP sends a request for the missing packets, and whether or not DDP should use checksums for all the packets that it transmits. You can set the options for any established connection end, whether or not the connection end is open.ASSEMBLY-LANGUAGE INFORMATION
To execute thedspOptionsroutine from assembly language, call the_Controltrap macro with a value ofdspOptionsin thecsCodefield of the parameter block.RESULT CODES
noErr 0 No error errRefNum -1280 Bad connection reference number SEE ALSO
Use thedspInitroutine, described on page 5-45, to return the connection control block (CCB) reference number.