PNSendRequest
PNSendRequest Send an ATP request to another socket
#include <AppleTalk.h> AppleTalk Manager
OSErr PNSendRequest( thePBptr, async);
ATPPBPtr thePBptr; pointer to an ATPParamBlock structure
Boolean async; 0=await completion; 1=immediate return
returns Error Code; 0=no error
PNSendRequest sends an ATP request to another socket.
thePBptr is a pointer to an ATPParamBlock structure. The relevant fields are
as follows:
Out-InName Type Size Offset Description
¨ userData long 4 18 User bytes
¨ reqTID short 2 22 Transaction ID used in request
Æ csCode short 2 26 Always sendRequest
Æ atpSocket short 2 28 Socket to send request on; current bitmap
´ atpFlags char 1 29 control information
Æ addrBlock long 4 30 Destination socket address
Æ reqLength short 2 34 Request size in bytes
Æ reqPointer Ptr 4 36 Pointer to request data
Æ bdsPointer Ptr 4 40 Pointer to responseBDS
¨ numOfBuffs char 1 44 Number of responses expected
Æ timeOutVal char 1 45 Timeout interval
Æ numOfResps char 1 46 Number of responses received
Æ retryCount char 1 47 Number of retries
¨ intBuff short 2 48 Used internally
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
reqFailed (-1096) SendRequest failed: retry count exceeded
tooManyReqs (-1097) Too many concurrent requests
noDataArea (-1104) Too many outstanding ATP calls
reqAborted (-1105) Request canceled by user

Notes: The PNSendRequest call is functionally equivalent to the PSendRequest
call, however, PNSendRequest allows you to specify, in the atpSocket
field, the socket through which the request is to be sent. This socket must
have previously opened through an POpenATPSkt request ( otherwise a
badATPSkt error will be returned). Note that PNSendRequest. Note that
PNSendRequest requires two additional bytes of memory at the end of the
parameter block, immediately following the retryCount. These bytes are
for the internal use of the AppleTalk Manager and should not be modified
while the PNSendRequest call is active.
There is a machine-dependent limit as to the number of of concurrent
PNSendRequests that can be active on a given socket. If this limit is
exceeded, the error tooManyReqs is returned.
One additional difference between PSendRequest and PNSendRequest is
that PNSendRequest is that a PNSendRequest can only be aborted by a
PKillSendReq call, whereas a PSendRequest can be aborted by either a