cURL / Mailing Lists / curl-library / Single Mail


Re: "Timeout was reached" error

From: Daniel Stenberg <>
Date: Fri, 19 Aug 2011 16:33:48 +0200 (CEST)

On Fri, 19 Aug 2011, amit paliwal wrote:

> In this case what will be the solution? I need to do initial step manually
> because of some requirements and then I want CURL to takeover and do HTTP
> POST send and HTTP OK receive for me. I wana connect to server and then I
> want Curl to send and receive HTTP on same socket.

I can only think of one working approach. I trust you notice that your
requirements are a bit unusual so the solution has to be rather un-libcurlish.

Create the socket yourself, connect to the server yourself, do your magic on
the socket and then when you create the libcurl easy handle you set the
the socket and tell libcurl it already is connected.

Of course, a fun trick would be to do the first part with libcurl using
CONNECT_ONLY and then before closing that easy handle, you pass that socket on
to a second easy handle using the above mentioned options.

List admin:
Received on 2011-08-19