Re: Best way to handle background i/o and notify main UI thread
Re: Best way to handle background i/o and notify main UI thread
- Subject: Re: Best way to handle background i/o and notify main UI thread
- From: Jean-Daniel Dupas <email@hidden>
- Date: Wed, 2 Jul 2008 01:27:22 +0200
Le 2 juil. 08 à 01:24, Chris Irvine a écrit :
On Jul 1, 2008, at 3:17 PM, Douglas Davidson wrote:
On Jul 1, 2008, at 3:11 PM, Chris Irvine wrote:
I've been doing a lot of reading about this, but I still don't
feel like I have a concise answer. I'm building a small suite of
applications that all will all share similar interaction with a
UDP based network based peer. It will be necessary to have various
background threaded activities to keep the connection alive and
monitored. I've already built a small proof of concept using a
separate C program that does standard i/o and can be managed by a
the Cocoa front end using NSTask. This is somewhat limiting and
isn't portable to our most favorite mobile device.
If your need is for the receipt of UDP packets, CFSocket provides a
run loop source that can handle that.
And then I suppose you would suggest CFRunLoopTimer to schedule
transmission of keep-alive packets or other periodic connection
handling activities? or, something more cocoa-esk ?
-Chris
CFRunLoopTimer, NSTimer, it's just a matter of tast ;-)
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden