• 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
Re: Using CFSocket to connect
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Using CFSocket to connect
      • From: Mike Laster <email@hidden>
References: 
 >Re: Using CFSocket to connect (From: Mike Laster <email@hidden>)

  • Prev by Date: Re: Using CFSocket to connect
  • Next by Date: Re: Using CFSocket to connect
  • Previous by thread: Re: Using CFSocket to connect
  • Next by thread: Re: Using CFSocket to connect
  • Index(es):
    • Date
    • Thread