Important: The information in this document is obsolete and should not be used for new development.
dspOptions
ThedspOptions
routine allows you to set values for several parameters that affect
the behavior of the local connection end. You use thePBControl
function to call thedspOptions
routine. See "Routines" on page 5-43 for a description of thePBControl
function.
Field Description
csCode
- The routine selector, always equal to
dspOption
s for this routine.ccbRefNum
- The connection control block (CCB) reference number that the
dspInit
routine 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 thedspWrite
routine 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
sendBlocking
parameter to any value from
1 byte to the maximum size of a packet (572 bytes). If you set thesendBlocking
parameter to 0, the current value for this parameter is not changed. The default value for thesendBlocking
parameter 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
badSeqMax
parameter allows you to cause the data to be retransmitted before the retransmit timer of the remote connection end has expired.- You can set the
badSeqMax
parameter to any value from 1 to 255.
If you set thebadSeqMax
parameter to 0, the current value for
this parameter is not changed. The default value for thebadSeqMax
parameter 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 foruseCheckSum
is 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
useCheckSum
parameter 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 theuseCheckSum
parameter.DESCRIPTION
ThedspOptions
routine 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 thedspOptions
routine from assembly language, call the_Control
trap macro with a value ofdspOptions
in thecsCode
field of the parameter block.RESULT CODES
noErr 0 No error errRefNum -1280 Bad connection reference number SEE ALSO
Use thedspInit
routine, described on page 5-45, to return the connection control block (CCB) reference number.