Re: SCNetworkConnectionStart sometimes won't dial.
Re: SCNetworkConnectionStart sometimes won't dial.
- Subject: Re: SCNetworkConnectionStart sometimes won't dial.
- From: Dave Camp <email@hidden>
- Date: Thu, 20 May 2004 08:05:41 -0700
On May 19, 2004, at 10:34 PM, Christophe Allie wrote:
On 5/19/04 1:44 PM, "Jonathan Wight" <email@hidden> wrote:
Our app has had a long standing problem with the modem not being
ready
to make a PPP call if we initiate the call immediately after creating
our network location. In other words, if we create our network
location with all of our PPP settings and then ask OT to start the
PPP
session, it will almost always fail. Subsequent connections sometimes
fail as well.
What we discovered was that there is some amount of time we have to
wait after setting the network location before asking OT to start
PPP.
Five seconds seems to cover all the cases, although the specific
amount of time needed seems to vary by machine model. With the delay
in place, calls work perfectly (other than the user complaints about
slow PPP connection times...)
This sounds just like what I've been seeing.
I've toyed with putting in a delay but would definitely consider that
a
last resort.
Once you create you network connection, several notifications will be
propagated and at some point SCNetworkConnection API will get them and
you
service will become available.
If you really want to make a connection as soon as it is available,
you can
install a SCDynamicStore notification on the appropriate key in the
dynamic
store. Although there could possibly be a small window of non
availability
depending on how the processes are scheduled.
So, you are saying there is a notification we can get that will tell us
when it's safe to start attempting a PPP connection (i.e. we can start
the connection process and won't get random errors because we did not
wait long enough). If that is the case I guess I've got some more
reading to do...
Thanks,
Dave
_______________________________________________
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.