Страница: 1 |
Вопрос: Проблемы с ftp | Добавлено: 17.08.07 19:24 |
Автор вопроса: ![]() |
Написал я ang клиент через winapi - а проблема вот в чем:
1 При конекте с сервером прога виснет - отвисает только после дисконекта. Кто знает как енту весчб убрать :) ? |
Ответы | Всего ответов: 4 |
Номер ответа: 1 Автор ответа: ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Лидер форума ICQ: 216865379 Вопросов: 106 Ответов: 9979 |
Web-сайт: Профиль | Цитата | #1 | Добавлено: 17.08.07 21:16 |
Видимо, неправильно написал. Здесь телепатия бессильна. |
Номер ответа: 2 Автор ответа: ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Вопросов: 23 Ответов: 71 |
Профиль | Цитата | #2 | Добавлено: 18.08.07 09:42 |
вот код
'
![]() 'open an internet connection ' hOpen = InternetOpen("API-Guide sample program", INTERNET_OPEN_TYPE_PRECONFIG, vbNullString, vbNullString, 0) 'connect to the FTP server ' hConnection = InternetConnect(hOpen, "your ftp server", INTERNET_DEFAULT_FTP_PORT, "your login", "your password", INTERNET_SERVICE_FTP, IIf(PassiveConnection, INTERNET_FLAG_PASSIVE, 0), 0) 'create a buffer to store the original directory ' sOrgPath = String(MAX_PATH, 0) 'get the directory ' FtpGetCurrentDirectory hConnection, sOrgPath, Len(sOrgPath) 'create a new directory 'testing' ' FtpCreateDirectory hConnection, "testing" 'set the current directory to 'root/testing' ' FtpSetCurrentDirectory hConnection, "testing" 'upload the file 'test.htm' ' FtpPutFile hConnection, "C:\test.htm", "test.htm", FTP_TRANSFER_TYPE_UNKNOWN, 0 'rename 'test.htm' to 'apiguide.htm' ' FtpRenameFile hConnection, "test.htm", "apiguide.htm" 'enumerate the file list from the current directory ('root/testing') ' EnumFiles hConnection 'retrieve the file from the FTP server ' FtpGetFile hConnection, "apiguide.htm", "c:\apiguide.htm", False, 0, FTP_TRANSFER_TYPE_UNKNOWN, 0 'delete the file from the FTP server ' FtpDeleteFile hConnection, "apiguide.htm" 'set the current directory back to the root ' FtpSetCurrentDirectory hConnection, sOrgPath 'remove the direcrtory 'testing' ' FtpRemoveDirectory hConnection, "testing" 'close the FTP connection ' InternetCloseHandle hConnection 'close the internet connection ' InternetCloseHandle hOpen |
Номер ответа: 3 Автор ответа: ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ICQ: 629966 Вопросов: 118 Ответов: 903 |
Web-сайт: Профиль | Цитата | #3 | Добавлено: 18.08.07 11:07 |
а ты с норм рабочим клиентом (не твоим) пытался подключится к этому серваку? |
Номер ответа: 4 Автор ответа: ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ICQ: 247906854 Вопросов: 133 Ответов: 882 |
Web-сайт: Профиль | Цитата | #4 | Добавлено: 20.08.07 11:43 |
проще переписать ftp через сокеты, плюс кроссплатформености добавится. |
Страница: 1 |
|