[英]Error when logging into FTP from AsyncTask class using org.apache.commons.net.ftp.FTPClient
[英]Difference between enterLocal...() and enterRemote...() methods in FTPClient class from org.apache.commons.net.ftp
我試圖從 org.apache.commons.net.ftp enterRemotePassiveMode()
FTPClient
類的enterLocalActiveMode()
/ enterLocalPassiveMode()
和enterRemoteActiveMode(InetAddress host, int port)
/ enterRemotePassiveMode()
方法之間的enterRemotePassiveMode()
。
我只找到了一些關於 FTP 主動模式和被動模式之間區別的信息。 但是我不明白前面提到的本地和遠程的概念。
Apache Commons Net 文檔(您在問題中鏈接自己)涵蓋了這一點。
在 99.9% 的情況下,您希望使用FTPClient.enterLocal*Mode
。 那是用於客戶端-服務器傳輸。
FTPClient.enterRemote*Mode
僅用於服務器-服務器傳輸(又名FXP )。 大多數FTP服務器無論如何都不允許。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.