FTP连接穿过防火墙

来源:互联网 发布:中国网络销售发展现状 编辑:程序博客网 时间:2024/04/29 21:34

CInternetSession::SetOption(INTERNET_OPTION_CONNECT_TIMEOUT, 100000); 设置连接超时时间
CInternetSession::GetFtpConnection("xxx.xxx.xxx.xxx", "test", "test", TRUE);  此处设置为TRUE才可以通过某些防火墙的拦截。

CFtpConnection* GetFtpConnection (LPCTSTR pstrServer, LPCTSTR pstrUserName = NULL, LPCTSTR pstrPassword = NULL, INTERNET_PORT nPort = INTERNET_INVALID_PORT_NUMBER, BOOL bPassive = FALSE)

原创粉丝点击