-
各个线程任务分配是这样实现的。在开始下载时,文件平均分成若干块进行下载。如第一个线程一开始的任务是从文件的0位置开始下载一直到72908位置处。线程1每次下载...
各个线程任务分配是这样实现的。在开始下载时,文件平均分成若干块进行下载。如第一个线程一开始的任务是从文件的0位置开始下载一直到72908位置处。线程1每次下载一块数据后就要调整任务,如第一次下载了20800字节的数据,那么线程1的任务将改为:20800-72908。如此下去,直到任务为72908-72908时表示线程1完成了当前的下载任务。此时,线程1就分析各个线程的任务,找出任务最为繁忙的一个线程:如线程3:14816-218724。那么线程1就自动去调整任务,拿50%的任务来再次下载。周而复始直到各个线程都完成任务。不过这里有一点需要注意:为了避免重复下载部分数据,在调整任务的时候,起始的文件便移量必须加上接受缓冲器的字节数,因为如前面所举的列子来看。线程1和线程3在平衡负载的时候,线程正在下载数据,如果所剩的数据比接受缓冲器的大小还小,线程1和线程3的部分下载数据将会重复。
在调整任务和分析任务的时候,会发现一个问题。就是读取文件数据太过频繁。于是我用了一个数据结构。在下载文件的过程中始终打开配置文件,这样速度提高了很多。在文件下载完毕后关闭文件。-various threads assignment is achieved. At the beginning of the download, the paper divided into a number of pieces of the download. As a thread of a task is to start from the position paper of 0 to start the download has 72,908 locations Department. Thread a download each one will have to adjust the data tasks, such as the first downloaded 20,800 gigabytes of data, then threaded a task will be re :20800- 72908. This situation continues until the mandate of 72908-72908 said threaded a completion of the cu
- 2022-03-20 03:50:55下载
- 积分:1
-
一个windows SOCKET client端测试程序,与Remote Server 连接后可以发送和接收TCP Packet。在作网络程序开发时,我们用它做...
一个windows SOCKET client端测试程序,与Remote Server 连接后可以发送和接收TCP Packet。在作网络程序开发时,我们用它做网络测试程序。基于microsoft visual studio 开发。-A windows SOCKET client-side test procedure, with the Remote Server connections can send and receive TCP Packet. In program development for the network, we use it to do network testing procedures. Development based on microsoft visual studio.
- 2022-04-27 23:42:54下载
- 积分:1
-
异步http请求。 不用通常的线程模型。使用者可以放心使用,不用担心资源冲突。...
异步http请求。 不用通常的线程模型。使用者可以放心使用,不用担心资源冲突。-asynchronous http requests. Not usually the thread model. Users can be assured use without fear of resource conflicts.
- 2022-01-25 14:59:13下载
- 积分:1
-
这是一款在局域网发送消息的小程序,和系统自带NET SEND的命令功能相同,在一个框内输入计算机名称,下面写你发送的内容及可,不过你对方计算机必须把管理里的ME...
这是一款在局域网发送消息的小程序,和系统自带NET SEND的命令功能相同,在一个框内输入计算机名称,下面写你发送的内容及可,不过你对方计算机必须把管理里的MESSAGE启用才可-This is a LAN messaging in the small procedures, and systems onboard NET SEND command of the same functions in one box to be entered into a computer name, write below you send the content and can, but you must be the other side"s management before the opening MESSAGE
- 2022-07-03 00:32:08下载
- 积分:1
-
13.如何采用VC实现查询HTTP站点?
该实例采用的是163网站.单机又键即可显示...
13.如何采用VC实现查询HTTP站点?
该实例采用的是163网站.单机又键即可显示-13. How uses the VC realization to inquire the HTTP stand? This
example uses is 163 websites The single plane key then demonstrated
- 2022-01-25 23:30:06下载
- 积分:1
-
一个socket实例代码.包括客户端和服务端,适合初学者.
一个socket实例代码.包括客户端和服务端,适合初学者.-A socket example code. Including client and server, suitable for beginners.
- 2022-03-23 08:24:13下载
- 积分:1
-
一个小浏览器
实验题目:
基于MFC的IE浏览器应用程序
请点击左侧文件开始预览 !预览只提供20%的代码片段,完整代码需下载后查看 加载中 侵权举报
- 2022-04-14 12:03:57下载
- 积分:1
-
C++Builder下实现端口读写
本文介绍怎样在C++Builder下实现端口读写,并举出一个具体例子。...
C++Builder下实现端口读写
本文介绍怎样在C++Builder下实现端口读写,并举出一个具体例子。
-C Builder achieve ports This paper describes how to read and write in C++ Builder achieve literacy port, citing a specific example.
- 2022-08-04 09:19:55下载
- 积分:1
-
TCOM一个串口源程序
TCOM一个串口源程序-an integral serial source
- 2022-05-19 03:43:29下载
- 积分:1
-
很简单的程序,实现多client和server的通信。
很简单的程序,实现多client和server的通信。-very simple procedure, multi-client and server communication.
- 2022-11-17 20:40:03下载
- 积分:1