• 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: Async output ready notification for file descriptors
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Async output ready notification for file descriptors


  • Subject: Re: Async output ready notification for file descriptors
  • From: Brian Adamson <email@hidden>
  • Date: Wed, 10 Sep 2003 12:39:27 -0400

Thanks Cameron and Glenn ...

On Glenn's commen: I was also concerned that the NSFileHandle async notification appeared to invoke threading anyway and I think you confirmed that concern

So it looks like the NSFileHandle approach was barking up the wrong tree ...

An approach using the CFSocket APIs _does_ provide for both async input and output for sockets... Furthermore the somewhat undocumented CFReadStream and CFWriteStream APIs appear to provide similar support for more generalized I/O (including sockets, too)

I'll look into it, but I suspect these might do what I want when used with a CFRunLoop approach like Cameron demonstrates ...

So, it looks like you guys put me on the right track.

Thanks again!




At 11:38 AM -0400 9/10/03, Cameron Hayne wrote:
On 10/9/03 10:16 AM, "Brian Adamson" <email@hidden> wrote:

I have a simple single-threaded, cross platform
class which provides asynchronous I/O notification and timers
(essentially acts as a custom main loop)

This is not an answer to your question about ready-for-write notifications,
but I thought you might find it useful to look at my attempt at reproducing
what is done in NSApplicationMain . My sample project "TestEvent" shows
this: http://hayne.net/MacDev/TestEvent/
But note that my handling of NSAutoreleasePool is not correct - as noted on
that web page, I now realize that I should be releasing the pool each time
through my main loop.

--
Cameron Hayne (email@hidden)
Hayne of Tintagel
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


--
Brian
__________________________________
Brian Adamson
<http://manimac.itd.nrl.navy.mil>
<mailto:email@hidden>
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Async output ready notification for file descriptors
      • From: Dustin Voss <email@hidden>
References: 
 >Re: Async output ready notification for file descriptors (From: Cameron Hayne <email@hidden>)

  • Prev by Date: Re: Async output ready notification for file descriptors
  • Next by Date: Re: Newbie question: forcing data format during saveDocumentTo:
  • Previous by thread: Re: Async output ready notification for file descriptors
  • Next by thread: Re: Async output ready notification for file descriptors
  • Index(es):
    • Date
    • Thread