sshnet / sshnet/SSH.NET

Continue Interrupted file uploads

Aperta
#660 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
C#
Stelle
4.4k
Fork
993
Merge medio
9g 21h
PR unite (30g)
1

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia tracciando SftpClient.UploadFile e l’implementazione interna di UploadFile, quindi confrontala con l’approccio SftpStream descritto nell’issue. Determina come devono riprendere i trasferimenti interrotti, preservando il comportamento esistente degli upload e la velocità di trasferimento. Il lavoro è completato quando l’opzione è chiaramente definita e gli upload riprendibili funzionano in modo affidabile.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
csharp
Ambito
networking
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.