cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Adding client WAN support to libcurl

From: Gisle Vanem <giva_at_bgnett.no>
Date: Fri, 11 Feb 2005 13:22:50 +0100

"Pavel Orehov" wrote:

> I want to add to libcurl client WAN support functionality to
> be able to perform the following features:
> - Delay between transactions
> - Send/Receive data in chunks on TCP layer
> - Dtop transaction after some defined time period
> - All these features should work via HTTP, HTTPS, FTPoHTTP
> protocols
>
> Probably libcurl dev will not add this features to libcurl
> because this is not normal behavior of client.

I don't understand why you want to limit the rates just because
libcurl uses a WAN link. The link uses handshake (CRT/RTS) packets
to prevent heavy traffic to saturate the WAN link. What is 'Dtop'?

> So i wanted to know in which functions and files i should add
> delays and write/read in my defined blocks in all before
> specified protocols. If first look i see that all read/write
> to socket actions are in one function, i just want to be sure
> that i am not missing something.

You could try setting the SO_RCVBUF+SO_SNDBUF options
on the socket(s). For example in SetupConnection() when
ConnectedPlease() == CURLE_OK.

See also Wget's limit_bandwidth() function.

--gv
Received on 2005-02-11