當前位置:首頁 » 文件管理 » ftp多線程下載

ftp多線程下載

發布時間: 2022-01-08 00:36:07

㈠ 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 <stdio.h>
#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站點,選中你要下載的文件,右擊滑鼠,在出現的菜單上選擇:「復制URL(Ctrl+U)」,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

熱點內容
塞爾達荒野之息緩存 發布:2024-12-26 04:21:12 瀏覽:687
資料庫高手 發布:2024-12-26 04:19:01 瀏覽:42
零件加工編程 發布:2024-12-26 04:17:32 瀏覽:952
如何看壓縮包里的密碼 發布:2024-12-26 04:07:25 瀏覽:670
封靈訣在哪裡修改密碼 發布:2024-12-26 04:07:17 瀏覽:361
中班教科書密碼有多少 發布:2024-12-26 04:02:52 瀏覽:54
mysql事務和存儲過程 發布:2024-12-26 03:57:53 瀏覽:745
阿里雲伺服器安裝qt 發布:2024-12-26 03:54:45 瀏覽:698
android基本知識培訓 發布:2024-12-26 03:46:17 瀏覽:904
足彩計演算法 發布:2024-12-26 03:31:33 瀏覽:891