Important: The information in this document is obsolete and should not be used for new development.
PAddResponse
ThePAddResponse
function sends an additional response packet to a socket that
has already been sent the first part of the response message through thePSendResponse
function.
FUNCTION PAddResponse (thePBPtr: ATPPBPtr; async: Boolean): OSErr;
thePBPtr
- A pointer to an ATP parameter block.
async
- A Boolean that indicates whether the function should be executed asynchronously or synchronously. Specify
TRUE
for asynchronous execution.
--> ioCompletion ProcPtr A pointer to a completion routine. <-- ioResult OSErr The function result. --> userData LongInt Four bytes of user data. --> csCode Integer Always addResponse
for this function.--> atpSocket Byte The source socket number. --> atpFlags Byte The control information. --> addrBlock AddrBlock The destination socket address. --> reqLength Integer The size in bytes of the response data. --> reqPointer Ptr A pointer to the response data. --> rspNum Byte The sequence number. --> transID Integer The transaction ID.
Field Description
userData
- Four bytes of user data that are sent in the header of the message. You can use these bytes for any purpose that you wish.
atpSocket
- The number of the socket that is used to send the additional response.
atpFlags
- A control information field whose bits, numbered 0-7, are used
as flags.- To signal that this packet is the last packet in the transaction's response message when the number of responses is less than expected, set the end-of-message (
atpEOMvalue
) bit (bit 4).- ATP sets the send-transmission-status (
atpSTSvalue
) bit (bit 3) to force the requester to retransmit a request immediately, when this
is necessary.- To direct ATP to use DDP's checksum feature, set the send checksum (
atpSendChkvalue
) bit (bit 0) of this flag.addrBlock
- The number of the socket to which the additional response packet is to be sent.
reqLength
- The size in bytes of the response data to be sent.
reqPointer
- A pointer to the response data to be sent.
rspNum
- The sequence number of the response, in the range of 0 to 7.
reqTID
- The transaction ID of the request for which this response is meant.
DESCRIPTION
ThePAddResponse
function sends an additional response packet, following the initial response sent in return to aPSendResponse
request message. You can send multiple additional response packets, one at a time, up to a total of eight packets including the initial response packets sent in thePSendResponse
function.You cannot issue a
PAddResponse
call without having first calledPSendResponse
. You must provide a pointer to the buffer containing the data to be sent and specify the amount of data. Each packet can contain up to 578 bytes of data. You also must specify the sequence number of the response.SPECIAL CONSIDERATIONS
If the transaction is part of an exactly-once transaction, you must allocate nonrelocatable memory for the buffer that you use for the response data, and you must not alter the contents of this buffer until the correspondingPSendRequest
function has completed execution.ASSEMBLY-LANGUAGE INFORMATION
To execute thePAddResponse
function from assembly language, call the_Control
trap macro with a value ofaddResponse
in thecsCode
field of the parameter block.
To execute this function from assembly language, you must also specify the .ATP driver reference number.RESULT CODES
noErr 0 No error badATPSkt -1099 Bad responding socket badBuffNum -1100 Sequence number out of range noSendResp -1103 PAddResponse
issued beforePSendResponse
noDataArea -1104 Too many outstanding ATP calls