curl-library
Re: detection of new connection
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 10 Mar 2011 09:30:57 +0100 (CET)
Date: Thu, 10 Mar 2011 09:30:57 +0100 (CET)
On Wed, 9 Mar 2011, Pankaj Takawale wrote:
> Im polling a http server using libcurl. When server terminates connection, 
> curl_easy_perform() internally re-connects to server.
The connection is only reconnected if the connection is terminated after 
libcurl sent its request and no data has been received from the server. This 
is typically because of a race when the server has determined that the 
connection has been idle long enough and closes it at about the same time 
libcurl tries to use it.
> Is it possible to detect this scenario?
Not directly, no, but I figure you can use OPENSOCKETFUNCTION or similar as an 
indirect indication.
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2011-03-10