日期:2014-05-17 浏览次数:21010 次
if (a.ToString() != readCount.ToString())//断点续传
{
Uri urii=new Uri("ftp://192.168.1.123:21");
FileInfo fileInfo = new FileInfo("E:\\报价\\巴比来定制产品.rar");
long locSize = fileInfo.Length;
RestartDownloadFromServer("巴比来定制产品.rar", urii, locSize);
CloseSocketConnect();
Socket soketData = CreateDataSocket();
Byte[] cmdType = GB2312.GetBytes(("TYPE I \r\n"));
socketControl.Send(cmdType, cmdType.Length, 0);
MessageBox.Show("开始断点续传");
FileStream output = new
FileStream("E:\\报价\\" + "巴比来定制产品.rar", FileMode.Append, FileAccess.Write);
Byte[] cmdPASV = GB2312.GetBytes(("PASV \r\n").ToCharArray());
socketControl.Send(cmdPASV, cmdPASV.Length, 0);
//获取本地文长度
FileInfo fileInfo = new FileInfo("E:\\报价\\巴比来定制产品.rar");
long locSize = fileInfo.Length;