Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TIES323
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
joalhelk
TIES323
Commits
17e87a37
Commit
17e87a37
authored
3 years ago
by
joalhelk
Browse files
Options
Downloads
Patches
Plain Diff
list fix
parent
036e486d
Branches
main
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
FTPClient/FTPClient/FtpClient.cs
+5
-2
5 additions, 2 deletions
FTPClient/FTPClient/FtpClient.cs
with
5 additions
and
2 deletions
FTPClient/FTPClient/FtpClient.cs
+
5
−
2
View file @
17e87a37
...
@@ -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 READ
ME
"
;
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);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment