On 2001-04-17 17:20:34, "Zeev Suraski" <[EMAIL PROTECTED]> wrote: > How did you implement it? The main problem with doing this until now was > that under Windows, it's pretty much impossible to get a FILE* from a > socket. The right way to implement it would most probably be implementing > something similar to C++'s virtual classes, so I'm wondering whether you > did it that way... It's in CVS now - take a look at main/php_streams.h. It's a bit like implementing our own set of stdio functions and using those rather than the ANSI ones; these call down into the ANSI stdio or fds/sockets (or SSL sockets eventually) as appropriate. Casting into a FILE* just makes use of fdopen for sockets, or returns the underlying FILE* if there is one. We can only pass back a FILE* for something really alien if we have fopencookie. There's no real magic in it :-) If you can spot problems with this let me know! --Wez. -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
- Re: [PHP-DEV] Re: [PHP-CVS] cvs: php4 / TODO-4.1.txt Zeev Suraski
- Re: [PHP-DEV] Re: [PHP-CVS] cvs: php4 / TODO-4.1.t... Sterling Hughes
- Re: [PHP-DEV] Re: [PHP-CVS] cvs: php4 / TODO-4... Alexander Bokovoy
- Re: [PHP-DEV] Re: [PHP-CVS] cvs: php4 / TO... Zeev Suraski
- Re: [PHP-DEV] Re: [PHP-CVS] cvs: php4 / TO... Sterling Hughes
- Re: [PHP-DEV] Re: [PHP-CVS] cvs: php4 / TODO-4.1.t... Wez Furlong
- Re: [PHP-DEV] Re: [PHP-CVS] cvs: php4 / TODO-4... Stig Sæther Bakken
- Re: [PHP-DEV] Re: [PHP-CVS] cvs: php4 / TODO-4... Hartmut Holzgraefe
- Re: [PHP-DEV] Re: [PHP-CVS] cvs: php4 / TO... Wez Furlong
- Re: [PHP-DEV] Re: [PHP-CVS] cvs: php4 ... Zeev Suraski
- Re: [PHP-DEV] Re: [PHP-CVS] cvs: ... Wez Furlong
- Re: [PHP-DEV] Re: [PHP-CVS] cvs: ... Andi Gutmans
- Re: [PHP-DEV] Re: [PHP-CVS] cvs: ... Wez Furlong
- Re: [PHP-DEV] Re: [PHP-CVS] cvs: ... Wez Furlong
- Re: [PHP-DEV] Re: [PHP-CVS] cvs: ... Andi Gutmans
- Re: [PHP-DEV] Re: [PHP-CVS] cvs: ... Andi Gutmans
- Re: [PHP-DEV] Re: [PHP-CVS] cvs: ... Zeev Suraski
- Re: [PHP-DEV] Re: [PHP-CVS] cvs: ... Stig Venaas
- Re: [PHP-DEV] Re: [PHP-CVS] cvs: ... Wez Furlong
- Re: [PHP-DEV] Re: [PHP-CVS] cvs: ... Wez Furlong
- Re: [PHP-DEV] Re: [PHP-CVS] cvs: php4 ... Stig Venaas