
The function sftp_read never return more then 2000 bytes (as it should when I asked Daniel). I increased the MAX_SFTP_READ_SIZE to 30000 but didn't get the same speed as a sftp read in SecureSSH. I analyzed the code and found that a return always was dona when a chunk has been read. I changed it to a sliding buffer and worked on all available chunks. I got an increase in speed and non of the test I have done has failed (both local net and over Internet). Please review and test. I think 30000 is still not the optimal MAX_SFTP_READ_SIZE, my next goal is to make an API to enable changing this value (The SecureSSH sftp_read has more complete filled packages when comparing the network traffic)
libssh2 - SSH2 library ====================== libssh2 is a library implementing the SSH2 protocol, available under the revised BSD license. Web site: http://www.libssh2.org/ Mailing list: http://cool.haxx.se/mailman/listinfo/libssh2-devel License: see COPYING Source code: https://github.com/libssh2/libssh2 Web site source code: https://github.com/libssh2/www Installation instructions are in: - docs/INSTALL_CMAKE for CMake - docs/INSTALL_AUTOTOOLS for Autotools
Description
Languages
C
85.7%
M4
4%
Makefile
3.4%
Shell
2.8%
CMake
2.4%
Other
1.6%