Important: The information in this document is obsolete and should not be used for new development.
dspCLListen
ThedspCLListenroutine causes a connection listener to listen for connection requests. You use thePBControlfunction to call thedspCLListenroutine. See "Routines" on page 5-43 for a description of thePBControlfunction.
Field Description
csCode- The routine selector, always
dspCLListenfor this routine.ccbRefNum- The CCB reference number that the
dspCLInitroutine returned.remoteCID- The identification number of the remote connection end. You must pass this value to the
dspOpenroutine when you open the connec-
tion or to thedspCLDenyroutine when you deny the connection request. ThedspCLListenroutine returns this number.remoteAddress- The internet address of the remote socket that sent a request to open a connection. This address consists of a 2-byte network number, a 1-byte node ID, and a 1-byte socket number. You must pass this value to the
dspOpenroutine when you open the connection or to thedspCLDenyroutine when you deny the connection request.filterAddress- The internet address of the socket from which you will accept a connection request. The address consists of three fields: a 2-byte network number, a 1-byte node ID, and a 1-byte socket number. Specify 0 for any of these fields for which you wish to impose no restrictions. If you specify a filter address of $00082500, for example, the connection listener accepts a connection request from any socket at node $25 of network $0008.
sendSeq- The sequence number of the first byte that the local connection end will send to the remote connection end. ADSP uses this number to coordinate communications and to check for errors. You must pass this value to the
dspOpenroutine when you open the connection.sendWindow- The sequence number of the last byte that the remote connection end has buffer space to receive. ADSP uses this number to coordinate communications and to check for errors. You must pass this value to the
dspOpenroutine when you open the connection.attnSendSeq- The sequence number of the next attention packet that the local connection end will transmit. ADSP uses this number to ensure that attention packets are delivered in the correct order and to check for errors. You must pass this value to the
dspOpen routine when you open the connection.DESCRIPTION
ThedspCLListenroutine initiates the connection listener. You must have already used thedspCLInitroutine to establish a connection listener before using thedspCLListenroutine. ThedspCLListenroutine is used only by connection servers.When ADSP receives an open-connection request from a socket that satisfies the address requirements of the
filterAddressparameter, it returns values for theremoteCID,remoteAddress,sendSeq,sendWindow, andattnSendSeqparameters and completes execution of thedspCLListenroutine. You must then either accept the open-connection request by calling thedspOpenroutine in theocAcceptmode or
deny the request by calling thedspCLDenyroutine.You can call the
dspCLListenroutine several times, specifying the same connection listener. For example, if you wanted to accept connections from any or all of three different addresses, you could call thedspCLListenroutine three times with a different value for thefilterAddressparameter each time. Note that you must execute thedspCLListenroutine asynchronously to take advantage of this feature.ASSEMBLY-LANGUAGE INFORMATION
To execute thedspCLListenroutine from assembly language, call the_Controltrap macro with a value ofdspCLListenin thecsCodefield of the parameter block.RESULT CODES
noErr 0 No error errState -1278 Not a connection listener errAborted -1279 Request aborted by the dspRemoveroutineerrRefNum -1280 Bad connection reference number