cURL / Mailing Lists / curl-library / Single Mail

curl-library

socket connect prior to actual get

From: Calin <thecodemachine_at_gmail.com>
Date: Thu, 19 Jan 2006 06:58:10 -0800

greetings all

I'd like to use the library to preconnect to the server, and have the
actual fetch done via a separate library call... Or perhaps not at
all, allowing the server to disconnect the socket.

>From looking at the easy/multi apis, I don't see a way to do this, is
that correct? Looks like the connect has to happen at time of fetch.

The rationale is, I have a program that's a kind of proxy frontend to
an internal backend server (it heavily modifies the backend response),
and it often won't need to perform gets because it will be utilizing
data from its cache to answer requests.

But for cases where it does have to perform a get to the backend
server, I want the connect phase to already be completed, via a
separate thread, to eliminate the delay.

No big deal if curl can't do this i can do it manually, or modify
source for my needs, want to make sure i'm not missing it.

thanks for any help
cheers!
Received on 2006-01-19