本文共 811 字,大约阅读时间需要 2 分钟。
enterLocalActiveMode,enterRemoteActiveMode,enterRemotePassiveMode。
我的理解大概是这样的enterLocalPassiveMode:设置客户端PASV模式static int PASSIVE_LOCAL_DATA_CONNECTION_MODEenterLocalActiveMode:设置客户端PORT模式static int ACTIVE_LOCAL_DATA_CONNECTION_MODEenterRemoteActiveMode:server to serverstatic int ACTIVE_REMOTE_DATA_CONNECTION_MODErequiring the one(client) connect to the other server's data port to initiate a data transfer. enterRemotePassiveMode:server to serverstatic int PASSIVE_REMOTE_DATA_CONNECTION_MODErequiring the other server to connect to the first server's data port to initiate a data transfer对FTP协议了解的不太清楚是一个很大的原因,有时间要看看FTP协议的内容了。查了一些资料:FTP传输有两种模式:主动模式(PORT)和被动模式(PASV)主动模式:客户端主动连服务器端;端口用20被动模式:服务器端连客户端;随机打开一个高端端口(端口号大于1024)小提示:有防火墙用户不能使用主动模式,这是因为防火墙不允许来自网外的主动连接,所以用户必须同使用被动模式。到这里上面遇到的问题也就比较清晰了。转载地址:http://cctci.baihongyu.com/