Important: The information in this document is obsolete and should not be used for new development.
dspCLInit
ThedspCLInit
routine establishes and initializes a connection listener. You use thePBControl
function to call thedspCLInit
routine. See "Routines" on page 5-43 for a description of thePBControl
function.
Field Description
csCode
- The routine selector, always equal to
dspCLInit
for this routine.ccbRefNum
- The connection control block (CCB) reference number. The
dspCLInit
routine returns this value.You must provide this number in all subsequentdspCLListen
anddspCLRemove
calls to this connection listener.ccbPtr
- A pointer to the CCB that you allocated. The CCB is 242 bytes
in size.localSocket
- The number of the DDP socket that you want ADSP to use for this connection end. Specify 0 for this parameter to cause ADSP to assign the socket; in this case, ADSP returns the socket number when the
dspCLInit
routine completes execution.DESCRIPTION
ThedspCLInit
routine establishes a connection listener; that is, it assigns a specific socket for use by ADSP and initializes the variables that ADSP uses to maintain a connection listener. ThedspCLInit
routine does not cause the connection listener
to listen for connection requests; you must follow thedspCLInit
routine with thedspCLListen
routine to activate the connection listener.You must allocate a block of nonrelocatable memory for a CCB before you call the
dspCLInit
routine and pass a pointer to that CCB as the value of theccbPtr
parameter. See the section "Creating and Using a Connection Control Block" on page 5-12 and the section "The ADSP Connection Control Block Record" on page 5-35 for more information.SPECIAL CONSIDERATIONS
The connection control block for which you allocate memory belongs to ADSP until you explicitly remove the connection listener. You cannot release the memory for the CCB until after you eliminate the connection listener.ASSEMBLY-LANGUAGE INFORMATION
To execute thedspCLInit
routine from assembly language, call the_Control
trap macro with a value ofdspCLInit
in thecsCode
field of the parameter block.RESULT CODES
noErr 0 No error ddpSktErr -91 Error opening socket SEE ALSO
To establish a connection end that is not a connection listener, use thedspInit
routine described on page 5-45.To eliminate a connection listener, use the
dspCLRemove
routine, described on page 5-68.