Send all the files in a folder to the client. The size of each file is no greater than 200 kb. How can this problem be solved?

Source: Internet
Author: User
Send all the files in a folder to the client. The size of each file is no greater than 200 kb. How can this problem be solved? Delphi/Windows SDK/API
Http://www.delphi2007.net/DelphiNetwork/html/delphi_20061217181039107.html
First, a list of all the file names in a folder is obtained and sent to the client cyclically. Is there any efficient method?

Define a data packet.
For example, the package length, file name, and file content
The client returns a result after receiving the message.
This way, you can send it all the time.

You are asking others how to write a software.

It's not just a few words that can solve the problem.

I think your question is not accurate enough:
The following describes how to consider this issue from the perspective of the server and client. For more information, see:

Server:
I. Do a good job in concurrent processing. If necessary, you can use the complete port. If you are in trouble, you can select the asynchronous message or event mode; 2. Support data acquisition in Content-Length/rang mode like IIS (this function can be left unspecified if it is only used to meet the needs of K files );

Client:
I. multithreading is necessary, such as flashget and Xunlei. And a file list, you can allocate the files in the list to different threads for download. Depending on the situation, the number of threads is not too large. Refer to the number of threads for software such as flashget!

In addition, you can find some stream compression mechanisms.ArticleFor more information, see!

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.