Re: [PHP4BETA] select() Design Notes

From: Date: Sat, 04 Dec 1999 08:50:47 +0000
Subject: Re: [PHP4BETA] select() Design Notes
References: 1 2  Groups: php.version4 
Request: Send a blank email to php-version4+get-7386@lists.php.net to get a copy of this message
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

« previous php.version4 (#7386) next »