[Fwd: Re: select()]
| From: | Evan Klinger | Date: | Tue, 23 Nov 1999 00:48:30 +0000 |
| Subject: | [Fwd: Re: select()] | ||
| Groups: | php.dev php.version4 | ||
| Request: | Send a blank email to php-dev+get-12957@lists.php.net to get a copy of this message | ||
This is part of the conversation I had with Rasmus discussing select()
and how to implement it. If anyone could help with regards to fetching
the fd of a resource without knowing the resource_type, please let me
know. Thank you.
-------- Original Message --------
Subject: Re: select()
Date: Sun, 21 Nov 1999 16:04:37 -0800
From: Evan Klinger <evan715@sirius.com>
To: Rasmus Lerdorf <rasmus@lerdorf.on.ca>
References: <Pine.WNT.4.21.9911211905260.-696081@lithium.jetpen.com>
Rasmus Lerdorf wrote:
>
> > Ahh. Now I understand. But the question remains, after you are through
> > calling FD_SET() you would call select() but select will need the fd_set
> > variable which has the fd's stored in it. Could the fd_set struct be
> > registered or stored somewhere and fetched be select()?
>
> Sure, just make it another resource.
>
> -Rasmus
I am a little confused again. FD_SET() will be passed the resource as
returned by, say, fsockopen(). FD_SET() will need to fetch the actual fd
associated with the resource with ZEND_FETCH_RESOURCE() which leads us
back to square one.
--
ev
----------------------------
Evan Klinger evan@php.net
AIM evan715