Re: [PHP4BETA] select() Design Notes
| From: | Thies C. Arntzen | Date: | Mon, 06 Dec 1999 12:59:41 +0000 |
| Subject: | Re: [PHP4BETA] select() Design Notes | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-7502@lists.php.net to get a copy of this message | ||
On Mon, 6 Dec 1999, Joey wrote:
> Or, an idea, return an assoc. array, indexed by fd, with things like
> read/write, got an exception, etc. per fd?
array indices are strings or integers. an fd is a resource - so that won't
work.
but we could have:
array("read" => array(/* of fds */),"write" => ...
tc
>
>
> --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
> >
> >
>
>
> --
> 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
>
>
Thies C. Arntzen "One Big-Mac, Small Fries and a Coke!"
Digital Collections Phone +49 40 235350 Fax +49 40 23535180
Hammerbrookstr. 93 20097 Hamburg / Germany