線上訂房服務-台灣趴趴狗聯合訂房中心
發文 回覆 瀏覽次數:3177
推到 Plurk!
推到 Facebook!

有關個 NMFTP 的問題

缺席
P.D.
版主


發表:603
回覆:4038
積分:3874
註冊:2006-10-31

發送簡訊給我
#1 引用回覆 回覆 發表時間:2002-09-07 16:24:37 IP:210.85.xxx.xxx 未訂閱
請問各位! 下列的幾個功能, 我查過NMFTP HELP, 不過有些我仍有不清楚, 可否請各位解釋一下 1.NMFTP1.Reinitialize 是重置主機, 但目的為何, 何時該使用 2.NMFTP1.DoCommand 是傳送一個Command, 但傳什麼樣的Command, 再者傳這個Command有何目的 3.NMFTP1.Allocate, 就其help字面來看是配置一個檔案大小在主機上, 但真正的作用為何, 我並不懂? 4.NMFTP1.DownloadRestore 查過help, 大致上是指具有續傳功能, 但不是所有主機都支援, 那何種主機有支援, 又其續傳的功能如何, 是否我下載到一半當機, 只要執行本功能即可以接續完整的下載其他未完成的部份, 因為我實測並未如說明可以順利執行 5.NMFTP1.UploadRestore 的 position如何判斷, 依說明指示如果上傳100k, 下次position為 101k, 但這似乎太過含糊, 電腦以bytes計算, 那該如何定義, 如果說我下 110 會如何? 6.NMFTP1.UploadUnique只傳送一個參數, 是否代表上傳時FTPserver直接覆蓋(如果檔案已存在), 因為說明是說如果主機端檔案已存在, 則直接使用該檔 原文:If a file with the same name already exists, a unique name is used for the file. 我不清楚的是如果是覆蓋, 為何不直接寫 if a file with the same name already exists on the remote host, the existing file is overwritten. 7.如果我要上傳一個檔案是主機已存在的, 我希望程式上能知道並提示警告, 當使用者選 "是" 才會上傳, 有沒有那一個功能可以得知, 但我不能使用list功能將全部檔案存到stringlist再來找, 因為ftpserver上可能會有上千萬個檔 以上不知各位前輩是否有更清楚的解釋, 謝謝! 發表人 - P.D. 於 2002/09/07 16:48:51
turboted
版主


發表:95
回覆:754
積分:452
註冊:2002-07-23

發送簡訊給我
#2 引用回覆 回覆 發表時間:2002-09-08 04:27:45 IP:61.224.xxx.xxx 未訂閱
首先,就如果之前的人說過...NM的元件真的不太好..再來談到 1.有時主機會卡死,例如網路速度太慢可用 2.直接下FTP 的Command 例如切換目錄..可參考RFC 959 3.NMFTP1.Allocate, 可以用來試驗是否能ACCESS REMOTE 4.NMFTP1.DownloadRestore 可說說看你的問題在那裏,因為我用沒有問題 這是指一般性的續傳,斷了可再傳,當機就不一定 這個好像是新功能???三年前玩時好像沒有???? 7.基本上你可直接對SERVER下FTP Command 去Check是否檔案存在 會有回應值你就能做了..
P.D.
版主


發表:603
回覆:4038
積分:3874
註冊:2006-10-31

發送簡訊給我
#3 引用回覆 回覆 發表時間:2002-09-08 23:24:49 IP:210.85.xxx.xxx 未訂閱
引言: 首先,就如果之前的人說過...NM的元件真的不太好..再來談到 1.有時主機會卡死,例如網路速度太慢可用 那如果我重置後, 是否要重新連結(connect), 因為我曾經測試只執行Reinitialize, 結果會造成系統錯誤, 後來必須關閉程式重新進入與連結才又恢復! 2.直接下FTP 的Command 例如切換目錄..可參考RFC 959 恕小弟才疏學淺, RFC 959 是? 3.NMFTP1.Allocate, 可以用來試驗是否能ACCESS REMOTE 這要如何試驗, 何種狀況才表示 Access 成功? 4.NMFTP1.DownloadRestore 可說說看你的問題在那裏,因為我用沒有問題 這是指一般性的續傳,斷了可再傳,當機就不一定 這個好像是新功能???三年前玩時好像沒有???? 我續傳下來的檔案不能用(資料庫檔), 根本無法開啟, 另外這個功能是如何續傳, 也就是說可以做到怎樣的續傳, 因為我查不到這方面的資料! 7.基本上你可直接對SERVER下FTP Command 去Check是否檔案存在 會有回應值你就能做了.. sorry! 應該下那一個command? 謝謝再次指教!
發表人 - P.D. 於 2002/09/08 23:25:23
turboted
版主


發表:95
回覆:754
積分:452
註冊:2002-07-23

發送簡訊給我
#4 引用回覆 回覆 發表時間:2002-09-09 00:09:26 IP:61.216.xxx.xxx 未訂閱
我想,在您要寫一個軟體之前,您就必需對他的SPEC做一定程度的了解 RFC定義的東西如下 RFC Number STD Number Name Status RFC-768 STD-6 User Datagram Protocol (UDP) Recommended RFC-791 STD-5 Internet Protocol (IP) Required RFC-792 STD-5 Internet Control Message Protocol (ICMP) Recommended RFC-793 STD-7 Transmission Control Protocol (TCP) Recommended RFC-821 STD-10 Simple Mail Transfer Protocol (SMTP) Recommended RFC-822 STD-11 Standard for the format of ARPA Internet text messages Recommended RFC-826 STD-37 Ethernet Address Resolution Protocol Elective RFC-854 STD-8 Telnet Protocol Specification Recommended RFC-855 STD-8 Telnet Option Specification Recommended RFC-862 STD-20 Echo Protocol Recommended RFC-863 STD-21 Discard Protocol Elective RFC-865 STD-23 Quote of the Day Protocol Elective RFC-866 STD-24 Active users Elective RFC-867 STD-25 Daytime Protocol Elective RFC-868 STD-26 Time Protocol Elective RFC-891 STD-44 DCN local-network protocols Elective RFC-894 STD-41 Standard for the transmission of IP datagrams over Ethernet networks Elective RFC-895 STD-42 Standard for the transmission of IP datagrams over experimental Ethernet networks Elective RFC-903 STD-38 Reserve Address Resolution Protocol (RARP) Elective RFC-907 STD-40 Host Access Protocol specification Elective RFC-919 STD-5 Broadcasting Internet Datagrams Required RFC-922 STD-5 Broadcasting Internet Datagrams in the presence of subnets Required RFC-950 STD-5 Internet Standard Subnetting Procedure Required RFC-959 STD-9 File Transfer Protocol (FTP) Recommended RFC-974 STD-14 Mail routing and the domain system Recommended RFC-1001 STD-19 Protocol standard for a NETBIOS service on a TCP/UDP transport : concepts and methods Elective RFC-1002 STD-19 Protocol standard for a NETBIOS service on a TCP/UDP transport : Detailed specifications Elective RFC-1006 STD-35 ISO transport services on top of the TCP : Version 3 Elective RFC-1034 STD-13 Domain names – concepts and facilities Recommended RFC-1035 STD-13 Domain names –implementation and specification Recommended RFC-1042 STD-43 Standard for the transmission of IP datagrams over IEEE 802 networks Elective RFC-1044 STD-45 Internet Protocol on Network System's HYPER channel : Protocol specification Elective RFC-1049 STD-11 Content-type header field for Internet messages Recommended RFC-1055 STD-47 Standard for the transmission of IP datagrams over serial lines : SLIP Elective RFC-1088 STD-48 Standard for the transmission of IP datagrams over NetBIOS networks Elective RFC-1112 STD-5 Host extensions for IP multicasting Recommended RFC-1119 STD-12 Network Time Protocol(version 2) specification and implementation Recommended RFC-1122 STD-3 Requirements for Internet hosts–communication layers Required RFC-1123 STD-3 Requirements for Internet hosts –application and support Required RFC-1132 STD-49 Standard for the transmission of 802.2 packets over IPX networks Elective RFC-1155 STD-16 Structure and identification of management information for TCP/IP-based internets Recommended RFC-1157 STD-15 Simple Network Management Protocol (SNMP) Recommended RFC-1201 STD-46 Transmitting IP traffic over ARCNET networks Elective RFC-1209 STD-52 Transmission of IP datagrams over the SMDS Service Elective RFC-1212 STD-16 Concise MIB definitions Recommended RFC-1213 STD-17 MIB2 Recommended RFC-1350 STD-33 The TFTP Protocol Elective RFC-1390 STD-36 Transmission of IP and ARP over FDDI Networks Elective RFC-1643 STD-50 Definitions of Managed Objects for the Ethernet-like Interface Types Elective RFC-1661 STD-51 The Point-to-Point Protocol (PPP) Elective RFC-1662 STD-51 PPP in HDLC-like Framing Elective RFC-1700 STD-2 ASSIGNED NUMBERS Required RFC-1722 STD-57 RIP Version 2 Protocol App. Statement Recommended RFC-1869 STD-10 SMTP Service Extensions Recommended RFC-1870 STD-10 SMTP Service Extensions for Message Size Declaration Recommended RFC-1939 STD-53 Post Office Protocol – Version 3 Elective RFC-2328 STD-54 OSPF Version2 Elective RFC-2427 STD-55 Multiprotocol over Frame Relay Elective RFC-2453 STD-56 RIP Version 2 Recommended RFC-2500 STD-1 INTERNET OFFICIAL PROTOCOL STANDARDS Required RFC-2578 STD-58 Structure of Management Information Version 2 Recommended RFC-2579 STD-58 Textual Conventions for SNMPv2 Recommended RFC-2580 STD-58 Conformance Statements for SNMPv2 Recommended 完整的RFC 資訊請參考http://rfc.sunsite.dk/ 其實不必多說RFC 959 能解決一切的問題..並且.. 使用WinSock 直接Control 才是王道
P.D.
版主


發表:603
回覆:4038
積分:3874
註冊:2006-10-31

發送簡訊給我
#5 引用回覆 回覆 發表時間:2002-09-09 02:02:26 IP:210.85.xxx.xxx 未訂閱
sorry! 雖然列了十分詳細的RFC資訊, 不過我是初次使用NMFTP, 我看了之後仍然不知道 NMFTP.DOCOMMAND() 要如何將 RFC595加入, 有沒有SAMPLE, 謝謝!
turboted
版主


發表:95
回覆:754
積分:452
註冊:2002-07-23

發送簡訊給我
#6 引用回覆 回覆 發表時間:2002-09-09 13:03:00 IP:210.71.xxx.xxx 未訂閱
Declaration procedure DoCommand(CommandStr: string); Description The DoCommand method is used for sending a command to the remote FTP host. This method is especially useful for use with custom FTP hosts, that may have non-standard commands, or for support of unimplemented commands. Parameters: The CommandStr parameter is the command that is to be sent to the server. This can be as simple as 'PWD' (command for obtaining the name of the current directory), or as complex as a multi-file download. Notes: This method is used internally in the component as well for executing many of the commands available. void __fastcall TForm1::Button9Click(TObject *Sender) { AnsiString AnID, APass; if (InputQuery("Authentication needed", "Enter User ID", AnID)) if (InputQuery("Authentication needed", "Enter Password", APass)) { NMFTP1->DoCommand("USER " AnID); NMFTP1->DoCommand("PASS " APass); } } When Button9 is clicked the InputQuery function is used to obtain the user's User ID. If the Ok button is clicked, InputQuery is called again to obtain the user's password. If the Ok button is clicked a second time, the DoCommand method is used to send the USER and PASS commands to the remote host, effectively logging in to the FTP host. ***Please note that this is the only way to continue an FTP session once the Reinitialize method has been called.
P.D.
版主


發表:603
回覆:4038
積分:3874
註冊:2006-10-31

發送簡訊給我
#7 引用回覆 回覆 發表時間:2002-09-09 21:03:12 IP:210.85.xxx.xxx 未訂閱
turboted 兄! 謝謝你不厭其煩的指教, 不過我還是無法知道 RFC-959 到底要如何應用 我曾嘗試 DOCommand(RFC-959), DOCommand('RFC959') 都不能用, 我要如何送 COMMAND, 系統可以告訴我該檔已存在的訊息, 再次感謝你的指教!
rexchiu
中階會員


發表:14
回覆:88
積分:70
註冊:2002-03-17

發送簡訊給我
#8 引用回覆 回覆 發表時間:2002-11-21 16:35:58 IP:203.69.xxx.xxx 未訂閱
P.D兄: RCF-959 是指一種規範,而非一個指令. 詳細你應該去搜尋RCF-959的參考文件. 手邊現在沒有,無法提供給你.
------
Best Regards,
Rex Chiu
luckfox
一般會員


發表:34
回覆:40
積分:24
註冊:2002-10-15

發送簡訊給我
#9 引用回覆 回覆 發表時間:2002-11-21 17:02:49 IP:211.75.xxx.xxx 未訂閱
查閱RFC的資料可至 http://www.rfc-editor.org/cgi-bin/rfcsearch.pl
P.D.
版主


發表:603
回覆:4038
積分:3874
註冊:2006-10-31

發送簡訊給我
#10 引用回覆 回覆 發表時間:2002-11-21 23:52:17 IP:61.66.xxx.xxx 未訂閱
謝謝各位網友提供的所有資料, 不過因為為了日後版本昇級的問題 Delphi7已經沒有FASTNET元件, 所以我現在已改用indy元件! 再次感謝!
turboted
版主


發表:95
回覆:754
積分:452
註冊:2002-07-23

發送簡訊給我
#11 引用回覆 回覆 發表時間:2002-11-26 08:28:08 IP:61.216.xxx.xxx 未訂閱
用indy 也好拉,不然nmftp問題真的是一堆,也麻煩
系統時間:2024-04-17 4:11:50
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!