-
各个线程任务分配是这样实现的。在开始下载时,文件平均分成若干块进行下载。如第一个线程一开始的任务是从文件的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
-
firefox系列,扩展编程之五,一个简单的实例。
firefox系列,扩展编程之五,一个简单的实例。-series, extended programming Five, a simple example.
- 2022-03-04 18:32:07下载
- 积分:1
-
messenger elf is a simple chat tools. A major demonstration is the main network...
信使小精灵,是一个简易的聊天工具。主要是演示了网络编程的主要步骤。本程序使用封装好的函数库,使得应用层不需要考虑网络消息是如何被接受和发送的,也不需要考虑数据粘包和丢包的刺手问题,你只要调用相应的函数就可以了。函数库为你做好了这些工作。你只需要定义自己的协议头和消息结构体,定义好网络消息的回调函数就可以了。-messenger elf is a simple chat tools. A major demonstration is the main network programming steps. The programs use Packaging good libraries, makes application layer need not consider the network news is how it has been accepted and sent, and do not need sticky packets of data and packet loss of a thorn in hand, as long as you call the corresponding function on it. Functions well as your work. You only need to define its own agreement head and the structure of news, the definition of a good network news callback function on it.
- 2023-08-16 20:20:03下载
- 积分:1
-
一个VC发送邮件的例子代码
一个VC发送邮件的例子代码-a VC mail code examples
- 2022-06-21 05:03:56下载
- 积分:1
-
这个源代码,做的源程序,这是对的,是的,是的,是的
this source code to do the source this is the for then yes-this is source code to do the source this is the for then yes
- 2022-01-26 02:25:15下载
- 积分:1
-
典型的论坛原码,是一个使用PHP+mySQL做为数据源的二手市场程序,系统需求: 1 Linux + Apache 或者 Windows IIS/PWS 2 M...
典型的论坛原码,是一个使用PHP+mySQL做为数据源的二手市场程序,系统需求: 1 Linux + Apache 或者 Windows IIS/PWS 2 MySQL 3.23+:For Windows and Linux 3 Telnet 或者一个 MySQL 的 WEB 界面管理程序,phpMyAdmin 或者其它类似的。-typical forum original code, is a PHP mySQL as a source of data for the secondary market procedures, system requirements : a Linux or Windows IIS Apache/MySQL 3.23 PWS 2 : For Windows and Linux 3 MySQL Telnet or a Web interface management procedures, or phpMyAdmin similar to the other person.
- 2023-05-03 17:50:03下载
- 积分:1
-
This is a client/server model of Internet chat small program through wiretapping...
这是一个客户端/服务器模式的网络聊天小程序,通过监听和连接好后就可以发信息-This is a client/server model of Internet chat small program through wiretapping and good connections can be made after the information
- 2023-03-05 15:05:03下载
- 积分:1
-
Control_Server.rar
监控软件,分客户端,服务器
Control_Server.rar
监控软件,分客户端,服务器-Control_Server.rar monitoring software, sub-client, server
- 2022-02-22 02:42:05下载
- 积分:1
-
opc server and wak server
opc server and wak server
- 2022-01-25 14:18:29下载
- 积分:1
-
组播测试,等等。
组播测试,等等。-multicast testing, and so on.
- 2022-03-11 23:05:33下载
- 积分:1