• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
OT/PPP, OTIoctl & asynchronous completion events
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

OT/PPP, OTIoctl & asynchronous completion events


  • Subject: OT/PPP, OTIoctl & asynchronous completion events
  • From: Xavier Jubier <email@hidden>
  • Date: Wed, 17 Sep 2003 15:52:52 +0200

I need to write a 4D plug-in (CFM library for 4th Dimension 6.5 to 2003 under OS 9 and OS X) to make programmatically OT/PPP calls under OS 9 and OS X.

The code skeleton is based on the OT/PPP Client Developer Note 1.0:

Initialize connection flags
Open the endpoint
myEndpointRef = OTOpenEndpoint(OTCreateConfiguration(kPPPControlName), 0L, NULL, &myOTStatus);
Install the notifier
myOTStatus = OTInstallNotifier(myEndpointRef, (OTNotifyProcPtr) MyARA_OT_EndpointNotifier, &myEndpointRef);
Set the endpoint to asynchronous
myOTStatus = OTSetAsynchronous(myEndpointRef);
Set the OT/PPP options (that is working perfectly)
myOTStatus = OTOptionManagement(myEndpointRef, &myOptionsManagement, &myOptionsManagement);
Make the call
myOTStatus = OTIoctl(myEndpointRef, I_OTConnect, NULL);
do {
Wait for the connection or error
} while (connection flags is set or error (by the notifier));
Return the error and or connection status

Under OS 9 how can I wait for the asynchronous completion events of the notifier proc after the following call
myOTStatus = OTIoctl(myEndpointRef, I_OTConnect, NULL);
without hanging all the system?
I tried different approaches without any success (ie loop with WaitNextEvent(), timer task, ...).

When creating a new thread to wait for the connection it is better in the sense that the call is made but the plug-in crashes on YieldToThread(myNewThread).
This approach confirm that I must implement the callback method in this note
<http://developer.apple.com/qa/ps/ps06.html>.
But since I'm not a programmer I don't see how to implement it.

Would someone have an example that I could use as a starting point?


Xavier
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Memory leak with entourage ?
  • Next by Date: Re:OT/PPP, OTIoctl & asynchronous completion events
  • Previous by thread: Re: OT/PPP, OTIoctl & asynchronous completion events
  • Next by thread: Re:OT/PPP, OTIoctl & asynchronous completion events
  • Index(es):
    • Date
    • Thread