Important: The information in this document is obsolete and should not be used for new development.
dspCLListen
ThedspCLListen
routine causes a connection listener to listen for connection requests. You use thePBControl
function to call thedspCLListen
routine. See "Routines" on page 5-43 for a description of thePBControl
function.
Field Description
csCode
- The routine selector, always
dspCLListen
for this routine.ccbRefNum
- The CCB reference number that the
dspCLInit
routine returned.remoteCID
- The identification number of the remote connection end. You must pass this value to the
dspOpen
routine when you open the connec-
tion or to thedspCLDeny
routine when you deny the connection request. ThedspCLListen
routine 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
dspOpen
routine when you open the connection or to thedspCLDeny
routine 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
dspOpen
routine 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
dspOpen
routine 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
dspOpe
n routine when you open the connection.DESCRIPTION
ThedspCLListen
routine initiates the connection listener. You must have already used thedspCLInit
routine to establish a connection listener before using thedspCLListen
routine. ThedspCLListen
routine is used only by connection servers.When ADSP receives an open-connection request from a socket that satisfies the address requirements of the
filterAddress
parameter, it returns values for theremoteCID
,remoteAddress
,sendSeq
,sendWindow
, andattnSendSeq
parameters and completes execution of thedspCLListen
routine. You must then either accept the open-connection request by calling thedspOpen
routine in theocAccept
mode or
deny the request by calling thedspCLDeny
routine.You can call the
dspCLListen
routine 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 thedspCLListen
routine three times with a different value for thefilterAddress
parameter each time. Note that you must execute thedspCLListen
routine asynchronously to take advantage of this feature.ASSEMBLY-LANGUAGE INFORMATION
To execute thedspCLListen
routine from assembly language, call the_Control
trap macro with a value ofdspCLListen
in thecsCode
field of the parameter block.RESULT CODES
noErr 0 No error errState -1278 Not a connection listener errAborted -1279 Request aborted by the dspRemove
routineerrRefNum -1280 Bad connection reference number