c#上传下载ftp(支持断点续传socket)
(2012-03-22 14:02:41)
标签:
杂谈 |
分类: c#方面的总结 |
using System;
using System.Net;
using System.IO;
using System.Text;
using System.Net.Sockets;
namespace ftpGet
{
///
<summary>
/// FTP
Client
///
</summary>
public class
FTPClient
{
#region 构造函数
/// <summary>
/// 缺省构造函数
/// </summary>
public FTPClient()
{
strRemoteHost = "";
strRemotePath = "";
strRemoteUser = "";
strRemotePass = "";
strRemotePort = 21;
bConnected = false;
}
/// <summary>
/// 构造函数
/// </summary>
/// <param
name="remoteHost">FTP服务器IP地址</param>
/// <param
name="remotePath">当前服务器目录</param>
/// <param
name="remoteUser">登录用户账号</param>
/// <param
name="remotePass">登录用户密码</param>
/// <param
name="remotePort">FTP服务器端口</param>
public FTPClient(string remoteHost, string remotePath, string
remoteUser, string remotePass, int remotePort)
{
strRemoteHost = remoteHost;
strRemotePath = remotePath;
strRemoteUser = remoteUser;
strRemotePass = remotePass;
using System.Net;
using System.IO;
using System.Text;
using System.Net.Sockets;
namespace ftpGet
{