代码如下:当我执行RETR命令的时候,服务器返回的信息总是"425 Can't open data connection. 
",当我去掉PASV命令时服务器才能返回"150 Opening BINARY mode data connection for /ftptest/test.rar(83735474 bytes).",我的目的是要下载"/ftptest/test.rar"文件,为什么就不行呢?搞不明白
         CSocket m_sktClient;
m_sktClient.Create();
m_sktClient.Connect("zgx" , 21); u_long arp = 1; //1为阻塞模式
ioctlsocket(m_sktClient.m_hSocket, FIONBIO, &arp); CString strInfo;
CCommon::GetServerReply(m_sktClient , strInfo); CCommon::SendCmd(m_sktClient.m_hSocket , "User anonymous\r\n");
CCommon::GetServerReply(m_sktClient.m_hSocket , strInfo); CCommon::SendCmd(m_sktClient.m_hSocket , "Pass ddd\r\n");
CCommon::GetServerReply(m_sktClient.m_hSocket , strInfo); CCommon::SendCmd(m_sktClient.m_hSocket , "TYPE I\r\n");
CCommon::GetServerReply(m_sktClient.m_hSocket , strInfo); CCommon::SendCmd(m_sktClient.m_hSocket , "PASV/r/n");
CCommon::GetServerReply(m_sktClient.m_hSocket , strInfo); CCommon::SendCmd(m_sktClient.m_hSocket , "REST 0\r\n");
CCommon::GetServerReply(m_sktClient.m_hSocket , strInfo); CCommon::SendCmd(m_sktClient.m_hSocket , "RETR\r\n");
CCommon::GetServerReply(m_sktClient.m_hSocket , strInfo); CString strIP , strCmd; int nPort;
CCommon::GetIPAndPort(strInfo , strIP , nPort); CSocket sktData;
sktData.Create();
int nError = sktData.Connect(strIP , nPort);
CCommon::GetServerReply(m_sktClient.m_hSocket , strInfo); char szDataBuffer[4096];
int m_nBytesRead = recv(sktData.m_hSocket , szDataBuffer , 4096 , 0);
CCommon::GetServerReply(m_sktClient.m_hSocket , strInfo);