discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSRunLoop + FileDescriptors


From: Richard Frith-Macdonald
Subject: Re: NSRunLoop + FileDescriptors
Date: Wed, 22 May 2002 18:56:46 +0100

On Wednesday, May 22, 2002, at 10:28 AM, Helge Hess wrote:

Hi,

how can I watch filedescriptors using gstep-base' NSRunLoop ? Are there any hooks provided ?

Is this correct:
---snip---
int myfd;
[runloop addEvent:&myfd
         type:ET_RDESC
         watcher:myObserver
         forMode:[runloop currentMode]];
---snap---
? Are there any examples/test-programs for this ?

Looks about right ... of course, that's only if you want to use the GNUstep specific code for efficiency. If you want something more portable, you may be able to use NSFileHandle -
but I guess you know about that and need something it doesn't do.

The NSFileHandle code uses the lower-level API anyway, so you can look at that as an example.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]