From owner-cvs-lib Fri May 8 03:11:25 1998 Return-Path: Received: (from daemon@localhost) by hub.freebsd.org (8.8.8/8.8.8) id DAA25337 for cvs-lib-outgoing; Fri, 8 May 1998 03:11:25 -0700 (PDT) (envelope-from owner-cvs-lib) Received: from time.cdrom.com (root@time.cdrom.com [204.216.27.226]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id DAA25325; Fri, 8 May 1998 03:11:17 -0700 (PDT) (envelope-from jkh@time.cdrom.com) Received: from time.cdrom.com (jkh@localhost.cdrom.com [127.0.0.1]) by time.cdrom.com (8.8.8/8.8.8) with ESMTP id DAA20262; Fri, 8 May 1998 03:10:18 -0700 (PDT) (envelope-from jkh@time.cdrom.com) To: dag-erli@ifi.uio.no (Dag-Erling Coidan =?iso-8859-1?Q?Sm=F8rgrav?= ) cc: Julian Elischer , cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-lib@FreeBSD.ORG Subject: Re: cvs commit: src/lib/libftpio ftpio.c In-reply-to: Your message of "08 May 1998 11:47:42 +0200." Date: Fri, 08 May 1998 03:10:18 -0700 Message-ID: <20258.894622218@time.cdrom.com> From: "Jordan K. Hubbard" Sender: owner-cvs-lib@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > 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