Re: cvs socket extension

From: Date: Mon, 23 Jul 2001 22:03:34 +0000
Subject: Re: cvs socket extension
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-60797@lists.php.net to get a copy of this message
On Mon, Jul 23, 2001 at 11:57:44PM +0200, Markus Fischer wrote: > On Mon, Jul 23, 2001 at 11:15:49PM +0200, Stig Venaas wrote : > Chris mentioned something that its not needed to restore the last > highest value for the max_fd if you drop the current highest one. I agree, it would only be for efficiency. I think now that the best solution is to just store the max. If clear.. is called with the current max, we can start at max and going downwards we can do FD_ISSET on each number until we find something that is set. Then we have the new max. > This makes me wondering why we not ever pass something like > 0xffffffff to select() [of course there is some legal reason not > to do this, i'm just curious now]. Maybe, but I don't like it. Are you sure there are may not be bad things happening if the number is outside the size of the set? > One the other hand, Daniel [afaik??] suggested to let the user > retrieve the handle id for a socket and calculate the hightest > value on its own. Something like > > $fd = socket_get_fd( $socket); > > comes into my mind. > > > The first one would be more nice for the users while the later is > much less programming effort :-) Yes, I think we should be nice to the users though (: There's less time wasted by doing it once in C than having many PHP programmers doing it over and over again... > I'm just wondering if there can be ever any drawback if we don't > let the user specify the first parameter to the select() call. > > As I'm not an expert I can't tell. I'm no expert, but I really can't see why it's needed (: Stig

« previous php.dev (#60797) next »