-
各个线程任务分配是这样实现的。在开始下载时,文件平均分成若干块进行下载。如第一个线程一开始的任务是从文件的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
-
jitter buffer algorithm source code
jitter buffer算法的源代码-jitter buffer algorithm source code
- 2022-01-25 21:43:24下载
- 积分:1
-
完成端口的简单例子。自己写的,很好,很强大。
完成端口的简单例子。自己写的,很好,很强大。-Completion port simple example. Wrote it myself, very good, very powerful.
- 2022-05-20 08:54:42下载
- 积分:1
-
简单的网页设计,里面包含图片和flash等
简单的网页设计,里面包含图片和flash等-A simple web design, which contains pictures and flash, etc.
- 2022-07-12 07:29:27下载
- 积分:1
-
常用的lanhelp,netsuper等软件都用过吧?自己也写一个?这是个不错的例子。...
常用的lanhelp,netsuper等软件都用过吧?自己也写一个?这是个不错的例子。-common lanhelp, netsuper software has been used? One has written? This is a good example.
- 2022-08-17 08:16:23下载
- 积分:1
-
欢迎继续下载windows网络编程之3,希望对大家有些帮助
欢迎继续下载windows网络编程之3,希望对大家有些帮助-welcome to download windows in respect of the three network programming, we hope to help some
- 2022-03-25 12:04:57下载
- 积分:1
-
一段局域网内网上聊天程序。这是一测试程序,更多的网络程序以后陆续发上来。...
一段局域网内网上聊天程序。这是一测试程序,更多的网络程序以后陆续发上来。-a LAN online chat program. This is a test program, more network programming onto successive fat.
- 2022-03-09 17:43:20下载
- 积分:1
-
Through the structures on the remote host a remote dictionary service server, ot...
通过在远端主机上搭建一个远程字典服务服务器,其它主机可以通过客户端程序 RemoteLookup将所需要查询的单词传送给远程主机,远程主机字典服务服务器将单词的中文释义结果返回给客户端主机,在启动服务端后,即可用客户端在线查询单词,程序示范了运用没有封装的SOCKET以及Windows SDK编程的典型过程。
-Through the structures on the remote host a remote dictionary service server, other hosts can RemoteLookup client program will need to send word query the remote host, remote hosting service server dictionary word to return to the Chinese interpretation of the results to the client host, in client start-up services, you can use client-side online query word, the program has not demonstrated the use of packaging as well as the Windows SDK programming SOCKET typical process.
- 2022-03-17 01:23:57下载
- 积分:1
-
删除IE的历史记录
删除IE的历史记录- Deletes IE the historic record
- 2023-07-09 18:35:03下载
- 积分:1
-
带进度条的ASP无组件断点续传下载,实现网页断点续传
带进度条的ASP无组件断点续传下载,实现网页断点续传-with the progress of the ASP-HTTP download components, to achieve website HTTP
- 2023-08-28 03:20:03下载
- 积分:1