POpenATPSkt
POpenATPSkt Open a socket for the purpose of receiving requests ATPPBPtr thePBptr; pointer to an ATPparms structure Boolean async; 0=await completion; 1=immediate return POpenATPSkt opens a socket for the purpose of receiving requests. thePBptr iis a pointer to an ATPparms structure. Æ csCode short 2 26 always openATPSkt
´ atpSocket char 1 28 socket number
Æ addrBlock AddrBlock 4 30 socket request specification 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
tooManySkts (-1074) Too many responding sockets
noDataArea (-1104) Too many outstanding ATP calls
Notes: atpSocket contains the socket number of the socket to open. If it's 0, a
number is dynamically assigned and returned in atpSocket. addrBlock
contains a specification of the socket addresss from which requests will be
accepted. A 0 in the network number, node ID, or socket number field of
addrBlock means that requests will be accepted from every network, node,
or socket, respectively.
To send a request to another socket and get a response, call
PSendRequest. The call terminates when either an entire response is received or a specified retry timeout interval elapses. To open a socket for
the purpose of responding to requests, call POpenATPSkt. Then call PGetRequest to receive a request; when a request is received, the call is completed. After receiving and servicing a request, call PSendResponse to return response information. If you cannot or do not want to send the
entire response all at once, make a PSendResponse call to send some of the response, and then call PAddResponse later to send the remainder of the response. To close a socket opened for the purpose of sending responses,