PNSendRequest
Boolean async; 0=await completion; 1=immediate return thePBptr is a pointer to an ATPParamBlock structure. The relevant fields are as follows:
¨ 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
Æ 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.
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
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
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.