Today's plan

Source: Internet
Author: User
1. Use Indy to download Sina homepage text over HTTP -- OK
2. Use Indy to download common files through HTTP -- OK
3. Open a new thread and use Indy to implement HTTP to download Sina homepage text -- OK
4. Open a new thread and use Indy to implement HTTP to download Sina homepage text and ensure thread security-OK
5. Obtain the remote file size -- OK
Memo: You need to use get to retrieve Content-Length from the response. Reading HTTP ......
Memo: Response found in tidhttp, which contains the attribute contentlength
Result: connect to the server first, and then use the head method and response to complete the task.
6. Use a tcp client to achieve connection and disconnection -- OK
7. Use a tcp client to send and accept commands-failed
Memo: used to send commands in the HTTP protocol and learn from them at a lower level.
Result: www.sina.com.cn and www.cnblogs.com are used as experimental objects. It is very difficult to directly use HTTP to send and accept TCP/IP commands. I decided to suspend this test method. Instead, I studied the tidhttp function and returned to the HTTP level to see how to obtain the file information fed back by the GET command. The TCP/IP Command Transmission and acceptance switch to self-writing server for two-way debugging.
8. Track the download process-OK
Memo: the message sending and receiving are intercepted with idconnectionintercept, but the form is tstream ......
Result: register the onwork event directly.
9. Use what you learned during the day to create a simple download tool and use a progressbar to display the download progress-OK
Memo: pay extra attention to the excessive URL Parsing work and decide to suspend this out-of-band aspect.
Memo: Later I found a uriparse. It seems that Indy has taken care of everything ......
Result: http://files.cnblogs.com/taowen/SimpleHTTPDonwloader.rar
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.