Download accelarators

For example flashget.It can download different parts simultaneously.I wonder this.How can it achieve this If there is no avaliable api.General algorithm will enough for me..


Answer this question

Download accelarators

  • Bollwerk

    I can take contetnt length by contentlength property
     HttpWebResponse response = (HttpWebResponse)request.GetResponse ();

    Console.WriteLine ("Content length is {0}", response.ContentLength);
    but how can i take different parts simultaneously from server
    I can not find solution from your link.

  • Andy White


    Thanks for all answers.I think ergin and JonCole(AddRange) answers are what i am looking for.Also
    @Mike Flasko now i don't know what ServicePointManager class is.But i will search it.
    Also more advices for  download accelarator progrraming  will  help  me more(If anyone want to share some ideas or advices).
    Thanks.

  • aburstein

    http://www.apacheweek.com/features/http11

    Add an extra header into your request; Range: bytes=startFromByte-ByteLength

    Range: bytes=500-999
    Get 500 bytes, start from 500th byte and receive 500 bytes (999 -500+1) = 500

    check the link above for more information.

  • kamilce

    Using System.Net.HttpWebRequest you can request multiple objects from an HTTP server at once; however, the number you can simultaneously request is limited by the number of connections you can open to a given server.  The RFC recommends no more than 2 connections per host to a given server.  Therefore, you can request 2 objects at once from a server.  You can adjust the number of connections to a given server that System.Net will create using the ServicePointManager class or an application configuration file.  

    Also, to increase performance, you can enable pipelining (via a property on the HttpWebRequest class).  This allows you to send multiple requests over a connection before hearing the response of the first request.

    I hope this helps..



  • Fil

    There is support for this in the http protocol. RFC 2616

    I think section 14.35 describes how to do it. Section 14.13 mentions how to get the length without getting the data.




  • TomP

    In HttpWebRequest, you would use the AddRange method instead of directly adding the Range header to your request.

  • Download accelarators