cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: An idea on separate options for different URLs

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Mon, 2 Aug 2004 10:24:51 +0200 (CEST)

On Sun, 1 Aug 2004, Walt Pawley wrote:

> Just make sure I'm on the same page - the crux of the issue is being able to
> operate through a persistent connection by what ever means is deemed to be
> the most sensible, right?

Yes, that's one of the main reasons for this.

> Assuming that's true, I don't see the real value of putting more stuff on
> "one line". It's not all that uncommon to see people resorting to multi-line
> continued curl commands now.

Quite true. But persistent connections _require_ the transfers to be done on a
single command line.

> Adding more functions, perhaps each with their own burden of long winded
> options, would exacerbate any buffer size related problems that might be
> waiting to crop up. Additionally, it serves as a means of "noisifying" the
> command even more.

curl currently provides 96 (ninetysix) different command line options. I think
it already is very complex. I don't think this little extra makes much extra
though.

> Apparently, the idea is that a single TCP connection is established to do
> multiple activities at a site (and I only see HTTP being discussed in the
> literature I read).

The term was set with HTTP(S) in mind, but curl does a similar job with FTP(S)
as well.

> So, assuming I'm not completely out to lunch here one might hypothesize
> three options to curl. One would be used to set up the persistent connection
> and associate some kind of identifier with it (the proper means to do this
> eludes me but perhaps an entry in a /var/run sort of file???). Another
> (perhaps the same one as mentioned previously - which might have some
> advantage in reestablishing a persistent connection in the event one is
> lost) would be used to issue further transfers on the connection. Finally a
> third one would be used to specifically close a persistent connection if it
> were open.

The open TCP connection gets torned down and closed when the first command
exits. It cannot be done like this. At least not without involving a whole lot
of OS-specific magic.

-- 
      Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
       Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2004-08-02