ATPGetRequest
ATATPRecHandle abRecord; handle to an ATATPRec Boolean async; 0=await completion; 1=immediate return ATPGetRequest is part of the AppleTalk alternate interface. It is recommended that you use the preferred call, PGetRequest instead. ATPGetRequest sets up the mechanism to receive a request sent by either an abRecord is a handle to an ATATPRec structure. The relevant fields are as follows:
¨ abResult short 2 2 Result code
Æ abUserReference long 4 4 For your use
Æ atpSocket short 2 8 Listening socket number
Æ atpAddress AddrBlock 4 10 Source socket address Æ atpReqCount short 2 14 Buffer size in bytes
Æ atpDataPtr Ptr 4 16 Pointer to buffer ¨ atpTransID short 2 26 Transaction ID
¨ atpActCount short 2 28 Number of bytes actually received
Æ atpUserData long 4 30 User bytes
async is a Boolean value. Use FALSE for normal ( synchronous) operation or TRUE to enqueue the request and resume control immediately. See Async I/O.
noErr (0) No error
badATPSkt (-1099) Bad ATP-responding socket
sktClosedErr (-3109) Socket closed
Notes: ATPGetRequest sets up the mechanism to receive a request sent by either socket number of the socket that should listen for a request; this socket
must already have been opened by calling ATPOpenSocket. The address of the socket from which the request was sent is returned in
atpAddress.ATPDataPtr specifies a buffer to store the incoming request;
atpReqCount indicates the size of the buffer in bytes. The number of bytes
actually received in the request is returned in atpActCount. ATPUserData
contains the user bytes from the ATP header. The transaction bit map is
returned in atpBitMap. The transaction ID is returned in atpTransID. ATPXO
will be TRUE if the request is part of an exactly-once transaction.
This routine completes when a request is received. To cancel asynchronous
but this cancels all pending calls involving that socket.