Re: [PHP4BETA] select() Design Notes
| From: | Evan Klinger | Date: | Sat, 04 Dec 1999 19:34:10 +0000 |
| Subject: | Re: [PHP4BETA] select() Design Notes | ||
| References: | 1 2 3 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-7415@lists.php.net to get a copy of this message | ||
> Without looking at the current implementation, I'd like to
> see a C-like select() as well. IMO it does not make sense to
> provide a function which has the same name, but other
> semantics. That will just confuse people who are used to
> select(2).
What about the possibility of keeping select(), fd_set() and fd_isset()
without using globals? One would call fd_set() with the fd and a second
parameter specifying what fd_set it should belong to (read, write,
except). fd_set() then calls ZEND_REGISTER_RESOURCE() to register the
fd_set and to register the highest numbered fd. Then select() is called
with just a timeout value and fetches the fd_set(s) and highest numbered
fd. fd_isset() would also fetch the fd_set(s) and see if the supplied fd
is set. I know this is different than C's select() but it seems that
it's either this way or exactly like C's select() except it only accepts
a single fd resource for each of read, write and except.
How does this sound?
--
ev
----------------------------
Evan Klinger evan@php.net
AIM evan715