Skip to content
Snippets Groups Projects
Commit 3e100104 authored by joalhelk's avatar joalhelk
Browse files

fixed retr loop

parent 42cc4846
No related branches found
No related tags found
No related merge requests found
No preview for this file type
......@@ -13,7 +13,7 @@ namespace FTPClient
static void Main(string[] args)
{
FtpClient client = new FtpClient(username, password, slackHost, port);
FtpClient client = new FtpClient(username, password, host, port);
client.Initialize();
client.LogIn();
//client.Epsv();
......
......@@ -265,7 +265,7 @@ namespace FTPClient
sw.WriteLine("MODE S");
sw.Flush();
handleResponse(sr.ReadLine());
string message = @"RETR debian";
string message = @"RETR README";
sw.WriteLine(message);
sw.Flush();
......@@ -281,9 +281,7 @@ namespace FTPClient
using (var sw = new StreamWriter(path))
switch(status)
{
case "553":
break;
default:
case "150":
while (true)
{
ftpSocket.Receive(descriptor);
......@@ -296,6 +294,9 @@ namespace FTPClient
}
else { break; }
}
break;
default:
Console.WriteLine("Error in retreiving file");
break;
}
}
......
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment