Archive Index
This month's Index
|
Subject: Re: libssh2_sftp_read reads a number of bytes smaller than both the file size and the specified buffer size
Re: libssh2_sftp_read reads a number of bytes smaller than both the file size and the specified buffer size
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 20 Apr 2012 09:56:21 +0200 (CEST)
On Thu, 19 Apr 2012, Adam Craig wrote:
> I found that, with the remote server, while larger packet sizes yielded some
Thanks for doing this!
Unfortunately I still believe there are too many unknowns in this equation and
For example:
A) you only used OpenSSH servers on Linux, possibly not even using very
B) what were the RTT times against these servers? SFTP will perform
C) which crypto backend and version was used in libssh2? I've seen people
D) how large buffers did you pass in to libssh2_sftp_read() when you ran these
> I noticed the following comment on the line defining the limit on
It is due to phrasing in the SSH and SFTP protocol specs, yes.
> I also noticed the following in sftp.c:
It is no magic "cutoff" really, it is just a way for libssh2 to detect
> If the spec says the max packet size is 35K, then it would make more sense
Then read the spec. Does it say 35K? And further, does 35K work against all
> and let users limit packet size further through the buffer sizes they pass
Then you have grossly missed the finer implementation details of the SFTP read
-- / daniel.haxx.se _______________________________________________ libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-develReceived on 2012-04-20 |