Re: Net_IRC class

From: Date: Wed, 17 Apr 2002 12:25:12 +0000
Subject: Re: Net_IRC class
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-5604@lists.php.net to get a copy of this message
On Wed, Apr 17, 2002 at 01:26:26PM +0100, Richard Heyes wrote : > > > 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. Yes, and preventing from getting user input data too (because it blocks ....). -- Please always Cc to me when replying to me on the lists. GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc "Mind if I MFH ?" "What QA did you do on it?" "the usual?" "ah... none :)"

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