make chunkSize a parameter
I have some issues with old (and maybe bad) servers.
Through a VPN when sending files, the only way to make an upload work without stopping it during the progress is to change the chunksize. I did it "hard" in the library source code, but with this branch, I could more easily set it.
I don't have much knowledge about network, and I don't know if I respect or not a standard or a convention with this branch.
But here is my little contribution.
Codecov Report
Merging #59 (00ce0fa) into master (f872cc2) will decrease coverage by
11.34%. The diff coverage is0.00%.
:exclamation: Current head 00ce0fa differs from pull request most recent head 354f533. Consider uploading reports for the commit 354f533 to get more accurate results
@@ Coverage Diff @@
## master #59 +/- ##
===========================================
- Coverage 44.08% 32.75% -11.34%
===========================================
Files 55 52 -3
Lines 3974 3774 -200
===========================================
- Hits 1752 1236 -516
- Misses 2222 2538 +316
| Impacted Files | Coverage Δ | |
|---|---|---|
| lib/src/sftp/sftp_client.dart | 0.00% <0.00%> (-26.67%) |
:arrow_down: |
| lib/src/sftp/sftp_stream_io.dart | 0.00% <0.00%> (-86.21%) |
:arrow_down: |
| lib/src/sftp/sftp_request_id.dart | 0.00% <0.00%> (-100.00%) |
:arrow_down: |
| lib/src/utils/async_queue.dart | 0.00% <0.00%> (-66.67%) |
:arrow_down: |
| lib/src/utils/stream.dart | 0.00% <0.00%> (-65.91%) |
:arrow_down: |
| lib/src/ssh_channel_id.dart | 8.33% <0.00%> (-58.34%) |
:arrow_down: |
| lib/src/sftp/sftp_file_open_mode.dart | 50.00% <0.00%> (-50.00%) |
:arrow_down: |
| lib/src/ssh_channel.dart | 0.00% <0.00%> (-47.90%) |
:arrow_down: |
| lib/src/utils/int.dart | 28.57% <0.00%> (-28.58%) |
:arrow_down: |
| ... and 12 more |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
@xtyxtyx What's next, regarding the coverage ?
SO sorry for the delayed response. I just got too many things to do at work...
Do you know the version of SSH server (for example OpenSSH_9.0p1) and VPN server that you have problems with when using dartssh2 ? From the specification it should be safe to set chunk size up to 32768 bytes. So I guess there may be other problems that causes the issue you encountered.
I will look for the SSH version soon.
However, it's going to be difficult regarding the VPN features, I already know it's a Cisco product called Anyconnect. I would try to find logs in this software.
For information, without this modification, the file upload does not work, it stops in progress.
I rebased this branch. But I saw so many updates.
Can you explain the goal of "resume/pause" in "_handleLocalData" ? It seems that this PR becomes useless. I'm going to try the new version to see if it's fixed my issues.