Date: Fri, 08 May 1998 03:10:18 -0700 From: "Jordan K. Hubbard" <jkh@time.cdrom.com> To: dag-erli@ifi.uio.no (Dag-Erling Coidan =?iso-8859-1?Q?Sm=F8rgrav?= ) Cc: Julian Elischer <julian@FreeBSD.ORG>, cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-lib@FreeBSD.ORG Subject: Re: cvs commit: src/lib/libftpio ftpio.c Message-ID: <20258.894622218@time.cdrom.com> In-Reply-To: Your message of "08 May 1998 11:47:42 %2B0200." <xzpogx9w0u9.fsf@skejdbrimir.ifi.uio.no>
next in thread | previous in thread | raw e-mail | index | archive | help
> OK, I took a quick look at it last night. My approach so far is to > write a new library (libfetch) and integrate the code from fetch and > libftpio into it. The libfetch interface consists of two functions: > > FILE *fetchGetURL(char *URL, int flags); > FILE *fetchPutURL(char *URL, int flags); > > which work as you'd expect. The flags parameter is used to specify > options such as passive mode, text/binary mode, verbosity, possibly > also protocol version (HTTP 1.0 / HTTP 1.1). Sounds reasonable - so the flags will be the union of all possible options, e.g. everything from (contrived) FILE_SYMLINK to FTP_PASSIVE? Do we have less than 32 options in total? ;-) > With this approach you gain generality at the expense of efficiency, > since you lose the single-connection-multiple-fetch functionality of > ftpio. To avoid this, I could allow direct access to the various > handlers and provide fetchGetURL() and fetchPutURL() simply as > convenient front-ends rather than as recommended entry point. Should > keeping the single-connection-multiple-fetch functionality be a big > priority? Well, last time I sat down and thought about this, I figured you could advertise fetch{Get,Put}URL() as the primary interfaces but also provide some of the existing libftpio functions as a set of fetchFTPFoo() functions for those who need to do _just_ that task. It may turn out that sysinstall is one such consumer for FTP media if the "transactional fetch" of the fetchFooURL() functions proves to be too slow when grabbing split distributions. I have the rather sneaking suspicion that it will be. :) That won't stop me from using the higher-level functions in other URL cases, of course, and it's still worth doing. - Jordan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20258.894622218>