-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hrvoje Niksic wrote: > Micah Cowan <[EMAIL PROTECTED]> writes: > > But > adding a whole new abstraction layer over something as general as > Berkely sockets to facilitate an automated test suite definitely > sounds like ignoring the costs of such an abstraction layer.
Facilitate a test suite _and_ pave the way for more general connection handling, don't forget. Proper SOCKS (and other) support is a current goal; I don't see how we can handle it without an additional interface layer. > I have no idea what "file descriptor silliness" with values 0-2 you're > referring to. :-) I do agree that an application-specific struct is > better than a more general abstraction because it is easier to design > and more useful to Wget in the long run. Hm, I was actually thinking the struct (or, more specifically, a pointer to the struct) was the more general abstraction. :) By "file descriptor silliness", I really meant the use of a single pool of possible ints, which is shared across a large number of fairly different applications. Not to say that file descriptors was a bad idea for Unix, but rather that emulating them would be sloppy. > Because implementing a file I/O abstraction is much harder and more > time-consuming than it sounds. To paraphrase Greenspun, it would > appear that every sufficiently large code base contains an ad-hoc, > informally-specified, bug-ridden implementation of a streaming layer. > There are streaming libraries out there; maybe we should consider > using some of them. Yeah. But we're not doing streaming. And you still haven't given much explanation for _why_ it's as hard and time-consuming as you say. Making a claim and demonstrating it are different things, I think. All we've to do for a testing-capable replacement interface is replace calls to socket, connect, (socket) read/write, shutdown/close with equivalents. We don't even have to do the other calls to start with, nor do we even need to use the new layer everywhere (just in http.c to start, I believe). Yes, there's slightly more to it than that, but not earth-shatteringly more. - -- Micah J. Cowan Programmer, musician, typesetting enthusiast, gamer, and GNU Wget Project Maintainer. http://micah.cowan.name/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFH+KR47M8hyUobTrERAiQTAJ9472Wju3vP4GqDDEaHRBM32PISFgCfSp6v zuUlnXtnA6sgag2FmzfNUcE= =FC2o -----END PGP SIGNATURE-----