Start.
X=32739
X=65478
X=98217
X=130956
X=163695
X=229173
X=261912
X=262144
X=196434 <---=== Huh?
End.
Start.
X=32739
X=130956
X=163695
X=196434
X=229173
X=261912
X=262144
End. <---=== Huh?
X=98217 <---=== Huh?
X=65478 <---=== Huh?
Start.
End. <---=== Huh?
X=32739
X=98217
X=130956
X=163695
X=196434
X=229173
X=261912
X=262144
X=65478 <---=== Huh?
Console.WriteLine($"Start.");
using (var sftp = new SftpClient("1.1.1.2", "root", "root"))
{
File.WriteAllBytes("test.fil", Enumerable.Repeat<byte>((byte)0, 256 * 1024).ToArray());
using (var stream = File.OpenRead("test.fil"))
{
sftp.Connect();
sftp.ChangeDirectory(".");
sftp.UploadFile(stream, "test.fil", new Action<ulong>(x =>
{
Console.WriteLine($"X={x}");
}));
}
Console.WriteLine($"End.");
}
```</div>
Discussed in #1042
Originally posted by dca00 November 10, 2022
In a simple console app, I pass to
SftpClient.SftpUpload()a callback that writes progress to console. Before and after the call I write 'Start' and 'End'. Below is its output:Any ideas as to what I am doing wrong?