Re: Using CFSocket to connect
Re: Using CFSocket to connect
- Subject: Re: Using CFSocket to connect
- From: Douglas Davidson <email@hidden>
- Date: Tue, 2 Jul 2002 11:53:49 -0700
On Tuesday, July 2, 2002, at 11:40 AM, Mike Laster wrote:
This is the part I'm confused about. If I have a timeout of say 5
seconds,
then the connect callback WILL be called in 5 seconds, whether the
connect
succeeded or failed, right? If I can count on getting this callback,
why do
I need to create ANOTHER timer to detect when I ran into the timeout?
No. If you set a timeout of 5 seconds, the call to
CFSocketConnectToAddress blocks, and returns within 5 seconds. If you
want a callback, you set the timeout to a negative value; then
CFSocketConnectToAddress returns immediately, and you get a callback (if
you requested one).
Douglas Davidson
_______________________________________________
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.