cURL / Mailing Lists / curl-library / Single Mail

curl-library

Problems in Multi-perform. Server does not close the connection.

From: <centrio_at_gmail.com>
Date: Thu, 27 Aug 2009 11:18:33 +0000

Hi,
I am trying to pull data from a server
http://livemedia.omroep.nl/vpro3voor12-central
in a continuous loop.
I am using Multi-Handle interface. I have three scenarios
1. The Connection is established, data is transferred from server to
client and connection is closed.
2. There is no internet connection to the machine.
3. There is internet connection to the machine but inbetween the
transfer of data, the connection terminates
(say someone pulls out the cable)

I was unable to figure out the conditions in libcurl which will decide
scenario 2 or 3 has occured.
So i decided to use

CURLOPT_LOW_SPEED_LIMIT = 0
CURLOPT_LOW_SPEED_TIME = 20
This will terminate the connection in 20 secs in case of scenario 2 and 3.

But for scenario 1, the connection never terminates for the above
server. running handles never become 0. If I increase the
CURLOPT_LOW_SPEED_LIMIT = 1 then the connection terminates in 20
seconds. I am running my client application on windows.

Please let me know the reason for such behaviour. Is
CURLOPT_LOW_SPEED_LIMIT = 0 a wrong option for curl easy handle that
resides in multi handle stack?

Please help

Thanks and Regards
Shivanand
Received on 2009-08-27