What API of Linux/Windows corresponds to limiting network (download/upload) speed?

后端 未结 4 1410
谎友^
谎友^ 2021-02-09 03:15

I\'m talking about speed limiting in download managers. For example, in Internet Download Manager there is a an option :

4条回答
  •  说谎
    说谎 (楼主)
    2021-02-09 03:18

    I actually need this for a project I'm doing on Linux. I noticed that transmission had the ability to limit download speeds. Peeking through their source code, you can find curl all over it.

    With that said, libcurl seems to be a good api for C\C++ programs. The api doesn't look that bad and neither does the documentation.

    see CURLOPT_MAX_SEND_SPEED_LARGE and CURLOPT_MAX_RECV_SPEED_LARGE in:

    man curl_easy_setopt(3)
    

    and the libcurl homepage

提交回复
热议问题