• 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: retrieve a milliseconds interval with obj-C
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: retrieve a milliseconds interval with obj-C


  • Subject: Re: retrieve a milliseconds interval with obj-C
  • From: Markus Hitter <email@hidden>
  • Date: Sat, 26 Nov 2005 14:25:23 +0100


Am 25.11.2005 um 16:55 schrieb Shawn Erickson:

On Nov 25, 2005, at 7:40 AM, Andrea Salomoni wrote:

Hi and thank you,

the problem is simple : I need to check a socket connection with that while so:

if (10 seconds are passed)
	{
	return an error and exit;

	}
else
	{

	continue
	}

How can I do?

It is bests not to poll the socket ("check it every ten seconds") but either block a thread waiting for data to come in on the socket or setup so you get a callback / event when the socket has data available.

I may add a hint to the classical select() function which was made to do exactly such things.



Markus

- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/




_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: retrieve a milliseconds interval with obj-C
      • From: Scott Ribe <email@hidden>
References: 
 >retrieve a milliseconds interval with obj-C (From: Andrea Salomoni <email@hidden>)
 >Re: retrieve a milliseconds interval with obj-C (From: j o a r <email@hidden>)
 >Re: retrieve a milliseconds interval with obj-C (From: Andrea Salomoni <email@hidden>)
 >Re: retrieve a milliseconds interval with obj-C (From: Marco Scheurer <email@hidden>)
 >Re: retrieve a milliseconds interval with obj-C (From: Andrea Salomoni <email@hidden>)
 >Re: retrieve a milliseconds interval with obj-C (From: Shawn Erickson <email@hidden>)

  • Prev by Date: Re: Is Apple's singleton sample code correct?
  • Next by Date: Re: Is Apple's singleton sample code correct?
  • Previous by thread: Re: retrieve a milliseconds interval with obj-C
  • Next by thread: Re: retrieve a milliseconds interval with obj-C
  • Index(es):
    • Date
    • Thread