PPCAcceptSync
PPCAccept Indicate willingness to accept incoming session request
#include <PPCToolbox.h> PPC Toolbox
OSErr PPCAccept(pb, async);
PPCAcceptPBPtr pb; Pointer to PPC parameter block
Boolean async; if TRUE, use asynchronous communications
returns Error Code; 0=no error
On entry A0: pointer to a parameter block
D0: selector (4)
On exit D0: result code
Parameter block
Æ 12 ioCompletion long address of a completion routine
¨ 16 ioResult short result code
Æ 40 sessRefNum long session reference number of session to accept
Use the PPCAccept function to indicate that an application is willing to
accept an incoming session request after a PPCInform function completes.
If your application calls this function asynchronously, you must specify in
the ioCompletion field either the address of a completion routine or NIL. If
ioCompletion is NIL, you should poll the ioResult field of the
PPC parameter block (from your application's main event loop) to determine
whether the PPC Toolbox has completed the requested operation. A value in
the ioResult field other than 1 indicates that the call is complete. Note that it is
unsafe to poll the ioResult field at interrupt time since the PPC Toolbox may
be in the process of completing a call.
The sessRefNum field specifies a session identifier. Use the
session reference number returned from the completed PPCInform
parameter block to accept the session request.
Returns: an operating system Error Code.
noErr (0) No error
notInitErr (-900) PPC Toolbox has not been initialized yet
noGlobalsErr (-904) System unable to allocate memory, critical error
noSessionErr (-908) Invalid session reference number
badReqErr (-909) Invalid state for this operation