Important: The information in this document is obsolete and should not be used for new development.
POpenATPSkt
ThePOpenATPSkt
function opens a socket to be used to receive ATP requests or to be used to send ATP requests through thePNSendRequest
function.
FUNCTION POpenATPSkt (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. --> csCode Integer Always openATPSkt
for this function.<-> atpSocket Byte The socket number to be used. --> addrBlock AddrBlock The socket request specification.
Field Description
atpSocket
- The number of the socket that ATP is to open. To direct ATP to dynamically assign a socket number, which it returns as the value
of this field, specify 0.addrBlock
- A value that specifies the AppleTalk internet socket addresses
that theatpSocket
field will receive requests from; specify 0 for the network number, the node ID, or the socket number to accept
all requests based on the value of that part of the AppleTalk internet socket address.DESCRIPTION
ThePOpenATPSkt
routine serves two purposes: you use it to open a socket to be used for incoming requests, and you use it to open a socket to send requests using a specific socket. (ThePNSendRequest
function lets you send a request using a specific socket, but you must first open that socket usingPOpenATPSkt
.) You can use theaddrBlock
field to filter requests that you will accept by restricting network addresses.ASSEMBLY-LANGUAGE INFORMATION
To execute thePOpenATPSkt
function from assembly language, call the_Control
trap macro with a value ofopenATPSkt
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 tooManySkts -1098 Too many responding sockets noDataArea -1104 Too many outstanding ATP calls SEE ALSO
ThePNSendRequest
function is described on page 6-27.