ATPSndRsp
ATPSndRsp Send a response to another socket
#include <AppleTalk.h> AppleTalk Manager
OSErr ATPSndRsp( abRecord, async);
ATATPRecHandle abRecord; handle to an ATATPRec
Boolean async; 0=await completion; 1=immediate return
returns Error Code; 0=no error
ATPSndRsp is part of the AppleTalk alternate interface. It is recommended
that you use the preferred call, PSendResponse instead.
ATPSndRsp sends a response to another socket.
abRecord is a handle to an ATATPRec structure. The relevant fields are as
follows:
Out-InName Type Size Offset Description
¨ abOpcode ABCallType 1 0 Always tATPSndRsp
¨ abResult short 2 2 Result code
Æ abUserReference long 4 4 For your use
Æ atpSocket short 2 0 Responding socket number
Æ atpAddress AddrBlock 4 2 Destination socket address
Æ atpRspBDSPtr Ptr 4 12 Pointer to responseBDS
¨ atpTransID short 2 24 Transaction ID
¨ atpEOM Boolean 2 34 End-of-message flag
Æ atpNumBufs short 2 40 Number of response packets being sent
Æ atpBDSSize short 2 44 Number of elements in response BDS
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.
Returns: an operating system Error Code. It will be one of:
noErr (0) No error
badATPSkt (-1099) Bad ATP-responding socket
badBuffNum (-1100) Bad response buffer number specified
noRelErr (-1101) No release received
noDataArea (-1104) Too many outstanding ATP calls
sktClosedErr (-3109) Socket closed

Notes: ATPSndRsp sends a response to another socket. ATPSocket contains the
socket number from which the response should be sent and atpAddress
contains the internet address of the socket to which the response should be
sent. ATPTransID must contain the transaction ID. ATPEOM is TRUE if the
response BDS contains the final packet in a transaction composed of a group
of packets and the number of packets in the response is less than expected.
ATPRspBDSPtr points to the buffer data structure containing the responses
to be sent. ATPBDSSize indicates the number of elements in the response
BDS and must be in the range 1 to 8. ATPNumBufs indicates the number of
response packets being sent with this call, and must be in the range 0 to 8.
In some situations you may want to send only part of your response
message back immediately. For instance, you might be requested to send
back seven disk blocks, but have only enough internal memory to store one
block. In this case, set atpBDSSize to 7, atpNumbBufs to 0 and call
ATPSndRsp. Then, as you read in one block at a time, call ATPAddRsp
until all seven response datagrams have been sent.