ATPRequest
ATATPRecHandle abRecord; handle to an ATATPRec Boolean async; 0=await completion; 1=immediate return ATPRequest is part of the AppleTalk alternate interface. It is recommended 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
Æ atpAddress AddrBlock 4 10 Destination socket address Æ atpReqCount short 2 14 Request size in bytes
Æ atpDataPtr Ptr 4 16 Pointer to buffer ¨ atpActCount short 2 28 Number of bytes actually received
Æ atpUserData long 4 30 User bytes
¨ atpEOM Boolean 1 35 End-of-message flag Æ atpTimeOut short 2 36 Retry timeout interval in seconds
Æ atpRetries short 2 38 Maximum number of retries
¨ atpRspUData long 4 46 User bytes received in response
Æ atpRspBufs Ptr 4 50 Pointer to response message buffer ¨ atpRspSize short 2 54 Size of response message buffer
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
reqFailed (-1096) SendRequest failed: retry count exceeded
tooManyReqs (-1097) Too many concurrent requests
noDataArea (-1104) Too many outstanding ATP calls
sktClosedErr (-3109) Socket closed
request to another socket, but does not require the caller to set up and use
the BDS data structure to describe the response buffers.
ATPTimeOut indicates the length of time that ATPRequest should wait for a response before retransmitting the request. ATPRetries indicates the
maximum number of retries ATPRequest should attempt. ATPXO should be TRUE if you want the request to be part of an exactly-once transaction
ATPSndRequest completes when either the transaction is completed or the retry count is exceeded.
Although you do not provide a BDS, ATPRequestin fact creates one and calls the .ATP driver. For this reason, you should not expect these fields to
remain unaltered during or after the function's execution.
For ATPRequest to receive and correctly deliver the response as a single message, the responding end must, upon receiving the request, generate the
complete response as a message in a single buffer and then call
that each response packet (except the last one) contains less than 578 ATP
data bytes. Also, if this method is used, only the ATP user bytes of the first
response packet will be delivered to the requester; any information in the
user bytes of the remaining response packets will not be delivered.
ATPRequest completes when either the transaction is completed or the retry count is exceeded.