sshnet / sshnet/SSH.NET

Continue Interrupted file uploads

オープン
#660 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
C#
スター
4.4k
フォーク
993
平均マージ
9日 21時間
マージ済み PR(30日)
1

説明

Hi,

I am in a situation where I am uploading large files via SFTP , and sometimes this gets interrupted. The next time I try I want to continue where it stopped. The provided SftpClient.UploadFile functionality did not have that option, so I wrote it using an SftpStream to write to. However the throughput of that was something like 4 to 5 times lower than a call to uploadfile.

So I ended up forking, and added a parameter "continueAbortedTransfer", to the
(Internal)UploadFile function. And a few lines of code at the start of the function to set
the stream positions correctly if the user wants to continue where it stopped the last time.

I have some questions:

  1. Is there an interest in this option, and should I try to prepare a pull request?
  2. Is the best way to add this? I know very little about the internals of this library,
    this was the first location that I found and it is just a couple of lines of code, but
    it could well be that there are better ways to add options like this, or that I broke
    some other code in the process.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず SftpClient.UploadFile と内部の UploadFile 実装を追跡し、issue で説明されている SftpStream のアプローチと比較します。既存のアップロード動作とスループットを維持しながら、中断された転送をどのように再開するべきかを確認します。オプションが明確に定義され、再開可能なアップロードが確実に機能すれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
csharp
領域
networking
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。