file IO abstraction layer

From: Date: Wed, 04 Apr 2001 16:43:47 +0000
Subject: file IO abstraction layer
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-50866@lists.php.net to get a copy of this message
Stig [+ Andi & others] I've made a start, and concerning sockets, I wanted to ask a question. main/network.c has php_hostconnect, which is used only by the http/ftp fopen wrappers, and does not yet implement the timeout (AFAICS). ext/standard/fsock.c has php_fsockopen, which seems to a more complete implementation, but uses zvals and does resource registration, and doesn't handle IPV6 as well as php_hostconnect (if at all). I take it the plan is to make php_hostconnect the definitive function for connecting to a host, but it not yet complete? I'm aiming for a definitive function that will return a php_file * representing a socket - most of my skeleton is complete, it's just the opening of sockets that I wasn't 100% sure about. Can I get away with merging php_fsockopen into php_hostconnect? It's just the non-blocking stuff missing right? Also, since these changes are pretty hairy, they will need a bit of "testing-in" - I dont want to check them into CVS and have it break everything, but at the same time I could do with some developers out there trying it out and giving me some feedback. I could do a cvs diff periodically, but that makes things hard - I guess the best thing would be to create a branch? Any pointers? --Wez. PS: for those that missed it last time, the general idea is that instead of all the madness with FP_FGETS and issock, sock and fp vars flying around, we aim for an abstraction where the calling code doesn't have to know if it is using a file or a socket (or anything else), unless it really wants to know.

« previous php.dev (#50866) next »