Improve handling max chunk size in sftp read/write functions
The !412 (closed) provided short-term and backportable solution for handling maximum SFTP packet size but for next release, we should provide more elaborate solution.
- We will have high-level API, which might need to enforce this limitations and user should not care about these (!383)
- We should have the support for
limits@openssh.comwhich will allow use to discover/negotiate the maximum size (!413 (closed)) - We could modify the
sftp_write()function to iterate over all provided data instead of returning smaller writes than requested as discussed in (!412 (closed))