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.



--
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]

Reply via email to