ftp多線程下載-九游会j9娱乐平台
㈠ 2003搭建多線程ftp下載伺服器
adsl是一種非對稱的dsl技術,所謂非對稱是指用戶線的上行速率與下行速率不同,上行速率低,下行速率高,adsl 在一對銅線上支持上行速率512kbps~1mbps,下行速率1mbps~8mbps,有效傳輸距離在3~5公里范圍以內。
你要提高外網下載速度,只能更換成小區寬頻,而後使用動態域名的方式。
㈡ c#多線程ftp下載的實現(java也可,關鍵是思路)
參考答案:讀書之法,在循序而漸進,熟讀而精思。——朱熹
㈢ delphi ftp 多線程下載 (能支持斷點更好)
看不懂
㈣ windows環境下c語言支持ftp和http多線程下載的客戶端
下面的程序,編譯之後,你可以運行很多個實例,目前我將文件寫在了d:\1.txt,每個程序寫1000行數據,這些值你可以自己更改(比如 寫在c:,每個程序寫10000行等),等程序都寫完後,你可以去文件中查看寫文件的結果。補充一下,我是在vc6.0環境中寫的,所以windows.h,如果你不是在這個環境中的話,可能需要修改一些定義,比如dword等。其他的api都是windows平台提供的api;
#include
#include "windows.h"
int main()
{
//獲取進程id,因為你希望是多個進程運行同時寫一個文件,所以,我們列印出進程id
dword dwprocessid = getcurrentprocessid();
//初始化我們要寫入文件中的內容,及該內容長度;
char szcontent[100] = ;
sprintf(szcontent,"process[%u] write file\r\n",dwprocessid);
dword dwcontentlen = strlen(szcontent);
//創建互斥量,這樣可以進行進程間的互斥,當然用這個也可以做線程間的互斥
handle hmutex = createmutex(null,false,"myfilemutex");
if (null == hmutex)
{
printf("[%u]create/open mutex error!\r\n",dwprocessid);
return 1;
}
//創建或打開文件
handle hfile = createfile("d:\\1.txt",
generic_read | generic_write,
file_share_write | file_share_read,null,
open_always,
file_attribute_archive,
null);
if (invalid_handle_value == hfile)
{
printf("[%u]creat/open file error!\r\n",dwprocessid);
return 1;
}
//循環寫入文件
for(int i = 0; i < 1000 ; i )
{
//等待臨界資源,即鎖定文件
waitforsingleobject(hmutex,infinite);
printf("process[%u] get the signal\r\n",dwprocessid);
dword len = 0;
//因為是共享寫文件,即多個程序寫一個文件,所以一定要將文件指針偏移到尾部
setfilepointer(hfile,0,null,file_end);
//寫入文件
bool rnt = writefile(hfile,szcontent,dwcontentlen,&len,null);
if (rnt == false)
{
printf("process[%u] fail to write file\r\n",dwprocessid);
}
//釋放互斥量,解除鎖定
releasemutex(hmutex);
//加個sleep便於我們中間觀察結果
sleep(30);
}
closehandle(hmutex);
closehandle(hfile);
return 0;
}
應你要求,我把aip中的宏定義解釋如下:
handle hfile = createfile("d:\\1.txt",
generic_read | generic_write,//表示程序對該文件有讀和寫的許可權
file_share_write | file_share_read,//表示可以多個程序共享讀和寫的許可權
null,
open_always,//表示打開該文件,如果該文件不存在,則創建該文件
file_attribute_archive,//文件的屬性為存檔
null);
waitforsingleobject(hmutex,infinite);
//infinite表示永遠等待,直到hmutex有信號為止
setfilepointer(hfile,0,null,file_end);
//file_end表示從文件尾部開始偏移;實際此舉就是將文件指針偏移到文件尾部;
另外,虛機團上產品團購,超級便宜
㈤ 如何設置多線程ftp下載
flashfxp只能單線程下載,可以先用flashfxp登錄ftp站點,選中你要下載的文件,右擊滑鼠,在出現的菜單上選擇:「復制」,flashfxp會提示:「是否復制用戶名及密碼?」,選擇「是」,然後打開迅雷,點「新建(ctrl n)」下載任務,在出現的界面上邊:「網址(url)」裡面(ctrl v)填上剛剛粘貼的信息,這樣迅雷就可以從你的ftp站點多線程下載文件了,而且你可以同時下載不同的文件,也是多線程的。當然,萬一你的ftp站點是限制單線程下載的話,為了充分利用帶寬,就只好同時下載其他文件來提高效率。萬一你的ftp站點是限制每個ip只能單線程下載一份文件,這個辦法可能就無能為力了。希望能幫到你,呵呵~~
㈥ c 程序中如何實現ftp多線程下載
本人不才,下面這個是從網路上轉來的.不知可有幫助.
這是codeproject的關於ftp的實現,你可以去down源代碼
introction
stuffftp is a free for life ftp client. this ftp client will allow you to connect to ftp servers and upload and download files.
motivation
why did i create and continue to support stuffftp? first it is a learning experience, and since i just got laid off from my company, i decided to use some of the tools they have provided, its legal as i technically bought them and they do not have other programmers following in my footstep nor do they plan on hiring any, to create something for the community. i also used another ftp program that was freeware for a while and then became pay to use software with little to no notice. that irked me and a friend suggested i create my own ftp client. so i am.
progress
this is currently a work in progress and i would be the first to say there is a lot of work to do. since i am laid off, i have lots of time on my hands. and this is an excellent chance for me to learn some of the concepts of c that i wanted to, but never had the chance while i was working. i was hoping to get a job in san jose, ca, but decided to hold off and live on saving for a while.
guarantee
i will support this program as best as i can. i have already setup a website and forum for it, here. i use the forum because i have trouble responding to email especially when i get a whole bunch of spam everyday. there is no adware or spyware in the program, and i guarantee that it will be free for the life of the program.
some people have already asked why i don't open source the project. the main reason is i do not know if i can. stuffftp uses some proprietary third party libraries. i do not know if i can post the source code or header files to those libraries. so everyone will have to wait until i can get rid of those libraries or hear back from the companies concerning my question about releasing header and associated help files.
tools
* ms windows xp professional
* ms visual studio .net c /mfc
* clickteam install maker
* clickteam patch maker
* betaone.net forum members
* cxlistctrl by hans dietrich
3rd party libraries
the application uses catalyst socket tools library edition and professional ui gui library. so far the support has been fair with prof-ui and outstanding with catalyst. the catalyst tool is for the actual ftp connection and, as the name suggests, prof-ui is being used for the gui.
updates
you can find the latest updates here and you can also find my latest ramblings, blogs, and support here. this is where you can find out all the latest versions and information.
how to contribute
money! just kidding you can contribute by downloading, using, and giving feedback on the program. that way i can determine which path to take with the application and which features to prioritize or not. graphics is also where i need lots of help. i am left brained and can not draw a good stick figure to save my life. if you can help with graphics or anything else, please let me know. also talk to me, i am bored. i have no job at the moment so i can use the company.
features
* able to upload/download from server/computer
* connect to ftp sites using login
* connect using other ports besides 21
* delete, rename, and chmod a file
history
* 12/10/2003 - version 0.11a
* 12/07/2003 - version 0.10a
㈦ 在bat腳本中如何實現ftp多任務同時下載,或者多線程下載
@echo off
setlocal enabledelayedexpansion
set ftpsvr=192.168.1.100
set downlist=a.rar b.rar c.rar
for %%i in (%d%) do (
set fn=ftp_%%i.txt
echo open %ftpsvr>!fn!
echo username>>!fn!
echo password>>!fn!
echo bin>>!fn!
echo get %%i>>!fn!
echo bye>>!fn!
start "ftp -s:!fn!")
del ftp_*.txt
㈧ ftp上的文件夾下載有沒有多線程下載的,我家網路50m帶寬,下載速度才500k,如果用兩個ftp軟
迅雷不就是嗎
㈨ java如何實現基於http和ftp多線程下載工具...
要訪問網路資源就要去了解你要訪問的網路資源所使用的協議。一般來說我們所使用的協議都是公開式的協議,比如http協議,它在數據的前面部分先設置一些信息來說明它所發送的數據的大小,文件類型等等。而多線程的實現原理就是先從http協議中獲取要下載的資源的資源大小,然後再分多個線程從不同的起點跟終點來分段下載資源。ftp資源的道理也是一樣。當然我並不是網路方面的專家,對網路我也不懂。以後只是我個人見解。
以下是給你找的一個java實現的http多線程下載。你看看吧
http://shazi.javaeye.com/blog/99132