-
各个线程任务分配是这样实现的。在开始下载时,文件平均分成若干块进行下载。如第一个线程一开始的任务是从文件的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
-
一个IOCP框架,从SourceForge上down下来的,有需要的可以看看。
一个IOCP框架,从SourceForge上down下来的,有需要的可以看看。-an iocp framework which download from the SourceForge.net. make fun!
- 2022-07-23 01:22:29下载
- 积分:1
-
监听网络上的数据报!
监听网络上的数据报!-eavesdropping on the network reported data!
- 2022-11-20 10:30:03下载
- 积分:1
-
九达测速,测试网络速度的,可输入IP地址测试, winping程序的中文化处理。修改了一些bug, 调整了速度,较稳定。vs2005 C...
九达测速,测试网络速度的,可输入IP地址测试, winping程序的中文化处理。修改了一些bug, 调整了速度,较稳定。vs2005 C-Tatsu nine guns, testing speed network, enter the IP address test, winping cultural treatment procedures. Modify a number of bug, adjust the speed, more stable. vs2005 C
- 2023-08-02 09:20:03下载
- 积分:1
-
ISAPI过滤器实现用户身份鉴别,只有通过验证的用户才可访问资源...
ISAPI过滤器实现用户身份鉴别,只有通过验证的用户才可访问资源-ISAPI filter to achieve user authentication, only authenticated users can access resources
- 2022-09-19 22:30:03下载
- 积分:1
-
一个简单实用的网络TCP/IP测试程序源代码,不修改 即可完成普通测试,在此基础上修改后,即可得到特定的程序。...
一个简单实用的网络TCP/IP测试程序源代码,不修改 即可完成普通测试,在此基础上修改后,即可得到特定的程序。-a simple and practical network TCP/IP testing program"s source code can be completed without amending the general test, on the basis of this revision, can be a particular procedure.
- 2022-03-17 19:08:46下载
- 积分:1
-
自己编写,一个支持使用代理的Smtp收EMAIL程序。
自己编写,一个支持使用代理的Smtp收EMAIL程序。-their preparation, support the use of an agent Smtp EMAIL admission procedures.
- 2022-03-17 05:34:27下载
- 积分:1
-
最新的迅雷下载工具 具有快速下载 直接收索等强大的功能
最新的迅雷下载工具 具有快速下载 直接收索等强大的功能-Xunlei download the latest tools with fast download cable, such as direct admission powerful
- 2022-04-22 03:32:00下载
- 积分:1
-
a network programming to study cases, the yo well not believe in themselves down...
一个网络编程的学习用例,很好的哟,不信自己下下来看嘛-a network programming to study cases, the yo well not believe in themselves down under Kanma
- 2022-03-01 12:37:52下载
- 积分:1
-
自己的火车售票系统欢迎指导大家下载我的软件…
自己编的一个火车售票系统,欢迎大家下载指点我的软件- Own arrange a train booking system, welcome everybody downloading to direct my software 【上载源码成为会员下载此源码】【成为VIP会员下载此源码】-Own a train ticketing system are welcome to instruct everyone to download my software- Own arrange a train booking system, welcome everybody downloading to direct my software [upload source to become a member download the source code] [become a VIP member to download this source]
- 2022-06-20 23:03:32下载
- 积分:1