Important: The information in this document is obsolete and should not be used for new development.
dspCLInit
ThedspCLInitroutine establishes and initializes a connection listener. You use thePBControlfunction to call thedspCLInitroutine. See "Routines" on page 5-43 for a description of thePBControlfunction.
Field Description
csCode- The routine selector, always equal to
dspCLInitfor this routine.ccbRefNum- The connection control block (CCB) reference number. The
dspCLInitroutine returns this value.You must provide this number in all subsequentdspCLListenanddspCLRemove
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
dspCLInitroutine completes execution.DESCRIPTION
ThedspCLInitroutine 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. ThedspCLInitroutine does not cause the connection listener
to listen for connection requests; you must follow thedspCLInitroutine with thedspCLListenroutine to activate the connection listener.You must allocate a block of nonrelocatable memory for a CCB before you call the
dspCLInitroutine and pass a pointer to that CCB as the value of theccbPtrparameter. 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 thedspCLInitroutine from assembly language, call the_Controltrap macro with a value ofdspCLInitin thecsCodefield 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 thedspInitroutine described on page 5-45.To eliminate a connection listener, use the
dspCLRemoveroutine, described on page 5-68.