Skip to content
Snippets Groups Projects
Commit 17e87a37 authored by joalhelk's avatar joalhelk
Browse files

list fix

parent 036e486d
Branches main
No related tags found
No related merge requests found
...@@ -212,6 +212,7 @@ namespace FTPClient ...@@ -212,6 +212,7 @@ namespace FTPClient
Console.WriteLine(response); Console.WriteLine(response);
} else { listen = false; } } else { listen = false; }
} }
handleResponse(sr.ReadLine());
} }
/// <summary> /// <summary>
...@@ -219,16 +220,18 @@ namespace FTPClient ...@@ -219,16 +220,18 @@ namespace FTPClient
/// </summary> /// </summary>
public void Retr() public void Retr()
{ {
string message = "RETR /pub/files/READ"; string message = "RETR README";
sw.WriteLine(message); sw.WriteLine(message);
sw.Flush(); sw.Flush();
handleResponse(sr.ReadLine());
//handleResponse(sr.ReadLine());
byte[] buffer = new byte[2048]; byte[] buffer = new byte[2048];
while(true) while(true)
{ {
ftpSocket.Receive(buffer); ftpSocket.Receive(buffer);
string response = Encoding.UTF8.GetString(buffer); string response = Encoding.UTF8.GetString(buffer);
string test = ftpSr.ReadLine();
if(response != null) if(response != null)
{ {
//Console.WriteLine(response); //Console.WriteLine(response);
......
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