Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support downloading to a Stream (#261) #266

Merged
merged 4 commits into from
Dec 10, 2024
Merged

Support downloading to a Stream (#261) #266

merged 4 commits into from
Dec 10, 2024

Conversation

yokrysty
Copy link
Contributor

@yokrysty yokrysty commented Dec 9, 2024

closes #261

src/Tmds.Ssh/SftpClient.cs Outdated Show resolved Hide resolved
src/Tmds.Ssh/SftpChannel.cs Outdated Show resolved Hide resolved
src/Tmds.Ssh/SftpChannel.cs Outdated Show resolved Hide resolved
src/Tmds.Ssh/SftpChannel.cs Outdated Show resolved Hide resolved
src/Tmds.Ssh/SftpChannel.cs Outdated Show resolved Hide resolved
src/Tmds.Ssh/SftpChannel.cs Outdated Show resolved Hide resolved
src/Tmds.Ssh/SftpChannel.cs Outdated Show resolved Hide resolved
src/Tmds.Ssh/SftpChannel.cs Outdated Show resolved Hide resolved
@tmds
Copy link
Owner

tmds commented Dec 10, 2024

@yokrysty thanks for the updates! I have some more minor request and then this will be good to merge.

@yokrysty
Copy link
Contributor Author

yokrysty commented Dec 10, 2024

@tmds great, almost there, after this i have prepared an implementation for uploading from a stream
i will create a new issue with a PR and i hope you will like the changes on a first try

@tmds
Copy link
Owner

tmds commented Dec 10, 2024

After this i have prepared an implementation for uploading from a stream i will create a new issue with a PR

Note that this one is a bigger challenge. In contrast to the Stream being downloaded to here, the source for an upload isn't read sequentially to enable pipelining the writes. We want to maintain the pipelining for FileStream and preferably also have it for MemoryStream. For an async Stream case, pipelining is not possible. Please create an issue for the feature, and if you make a PR for it, try to handle these different cases.

src/Tmds.Ssh/SftpChannel.cs Outdated Show resolved Hide resolved
@tmds tmds merged commit ace1795 into tmds:main Dec 10, 2024
1 check passed
@tmds
Copy link
Owner

tmds commented Dec 10, 2024

Thanks @yokrysty!

@tmds
Copy link
Owner

tmds commented Dec 10, 2024

If you'd like to use this feature before it's released, you can use a package from the CI feed: https://github.com/tmds/Tmds.Ssh?tab=readme-ov-file#ci-feed.

@tmds
Copy link
Owner

tmds commented Dec 12, 2024

This is part of 0.9.0 which was just uploaded to nuget.org.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support downloading to a Stream
2 participants