Re: [PHP4BETA] select() Design Notes

From: Date: Mon, 06 Dec 1999 12:56:20 +0000
Subject: Re: [PHP4BETA] select() Design Notes
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-7500@lists.php.net to get a copy of this message
Or, an idea, return an assoc. array, indexed by fd, with things like read/write, got an exception, etc. per fd? --Joey Smith On Sat, 4 Dec 1999, Evan Klinger wrote: > Christian Schneider wrote: > > > > Evan Klinger wrote: > > > and $ret could be: > > > a) false // timeout > > > b) a single fd-resouce > > > c) an array of fp-resources with their status. > > > > Hmm.. why not mimic the UNIX/C behaviour? > > $ret = number of fds (see man select) > > and input arrays would be modified to contain fds which caused select() to > > return. > > > > $ret gives you easy way to determine what happened, arrays are easy to examine > > as well. If you return an array of fds instead you run into the problem of > > marking which fd were readable vs. writeable vs. got an exception. Especially if > > you have the same fd in read and write fdset. > > > > But then again, maybe I'm too used to using select() with C :-) > > > > More opinions? > > Good point. However, there'd still need to be a fd_set(fd_resource) > function to see if the fd_resource is set. Or am I missing something? > -- > > ev > > ---------------------------- > Evan Klinger evan@php.net > AIM evan715 > > -- > PHP 4.0 Beta Mailing List <http://www.php.net/version4/> > To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net > For additional commands, e-mail: php4beta-help@lists.php.net > To contact the list administrators, e-mail: php4beta-admin@lists.php.net > >

« previous php.version4 (#7500) next »