RE: [PEAR-DEV] Net_IRC class

From: Date: Wed, 17 Apr 2002 12:26:26 +0000
Subject: RE: [PEAR-DEV] Net_IRC class
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-5603@lists.php.net to get a copy of this message
> > Well I guess there's always the method of opening multiple > sockets in non > > blocking mode, using a while(true) loop and checking each socket on each > > iteration of the loop. But that's kind of icky. > > With socket_select() this is exactly the way it works. You > create and connect multiple sockets to endpoints, put them > all in the socket_select() call and wait if you got a > READ/WRITE/ERROR from a socket. > > I don't see a way to avoid this, do you (would be nice) ? Afaik socket_select() can block until it gets a status change in one of the sockets by giving it a null timeout, so negating the need for the permanent loop. -- Richard Heyes "If you have any trouble sounding condescending, find a Unix user to show you how it's done." - Scott Adams

« previous php.pear.dev (#5603) next »