I am using NMSSH Framework version 2.2.0 to download files from the server. I found that the file chunk size is fixed to 2000 bytes libssh2_sftp_read() this method returns the fixed size. I have tried increasing buffer size but it will not increase the chunk read size. I want to increase the performance of the framework by increasing the Chunk size.
I have found a way to increase the chunk size. The chunk size is hard coded in the libssh2 library you have to download the source code from the libssh2 site and then edit the constant given in the sftp.h file i.e. #SFTP_READ_SIZE 8000 or the size you want but make sure it should not be more than your buffer size.
Then rebuild the library.