mscdex / mscdex/ssh2

How do I break the transfer of a stream

Open
#1,447 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
JavaScript
Stars
5.8k
Forks
734
PR merge metrics
No merged PRs in 30d

Description

Hi, I am using fastPut and fastGet of this library to get the high-speed transfer, but I have a request to interrupt the transfer so that the user can break the transfer, can I add a flag bit so that the developer can set a time to interrupt the stream transfer。

this.sftp?.fastPut(local, remote, atomicBreak, {
      step: (transferd, chunk, totalSize) => {
        console.log(transferd, totalSize);
      },
    }, (err) => {
      if (err) {
        console.error("error: ", err);
      }
    })

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the fastPut and fastGet entry points shown in the report and trace their transfer callbacks. Define the interruption behavior and verify that a caller can stop an in-progress transfer and observe its completion or error outcome; no implementation file or test is named, so locate relevant coverage before changing it.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
networking
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.