. Net/C #: implement the Http Web Client tool class that supports resumable multi-thread download (C # DIY Ht

Source: Internet
Author: User

/*. Net/C #: implement the Http Web Client tool class that supports resumable download of multiple threads (C # DIY HttpWebClient)
* Reflector: The System. Net. WebClient is reloaded or added:
* DownLoad and Upload Methods!
* Great changes to DownLoad!
* Added DataReceive and predictionoccurrs events!
* For more information about the HTTP protocol used for server-client interaction, see:
* Enables custom connections for file downloads to support resumable multi-thread download of FlashGet! JSP/Servlet implementation!
* Http://blog.csdn.net/playyuer/archive/2004/08/02/58430.aspx
* Enables custom connections for file downloads to support resumable multi-thread download of FlashGet! C #/ASP. Net implementation!
* Http://blog.csdn.net/playyuer/archive/2004/08/02/58281.aspx
*/
Namespace Microshaoft. Utils
{
Using System;
Using System. IO;
Using System. Net;
Using System. Text;
Using System. Security;
Using System. Threading;
Using System. Collections. Specialized;

/// <Summary>
/// Record the location of the downloaded byte
/// </Summary>
Public class DownLoadState
{
Private string _ FileName;
Private string _ AttachmentName;
Private int _ Position;
Private string _ RequestURL;
Private string _ ResponseURL;
Private int _ Length;
Private byte [] _ Data;
Public string FileName
{
Get
{
Return _ FileName;
}
}
Public int Position
{
Get
{
Return _ Position;
}
}
Public int Length
{
Get
{
Return _ Length;
}
}
Public string AttachmentName
{
Get

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.