discuss-gnustep
[Top][All Lists]
Advanced

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

Re: nsrunloop is not using select?


From: address@hidden
Subject: Re: nsrunloop is not using select?
Date: 23 Jan 2007 00:35:44 -0800
User-agent: G2/1.0

Rogelio Serrano schrieb:
> > > And how does nsconnection work with nsrunloop?
> >
> > That's too big a discussion for an email, but the very short answer
> > is that it adds ports to the runloop and handles messages arriving on
> > those ports. For more detail you should go to the documentation of
> > the classes.
> >
>
> i just skimmed the sources. so nsonnection is the delegate for nsport.
> is that correct?

NSPort uses NSRunLoop to send and receive data asynchronously with
other input/output events and timers.
(a simple call to read() or write() would block the process).
As soon as data is received, it notifies its delegate.
If you use NSConnection over NSPorts, each NSConnection instance
registeres itself 
as the deleagte of the receiving port.

-- hns



reply via email to

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