On Fri, 11 Jun 2010, Peter Stuge wrote:
The buffer size of the app doesn't really matter now
I think they do, in the sense that if an app gives libssh2 a 64kb buffer
then I think that should be the payload of a single SSH packet.
64K is too large for a single packet so either we'd make libssh2 create more
than one packet in a single call, or we have the current solution where it
takes as much as it can to make one packet out of it. I can't think of any
particular benefit with do the first way.
I think the biggest drawback with having libssh2_sftp_write() map to a single
FXP packet like this, is when the app uses a very small buffer as then libssh2
will send a small packet instead of merging many small into fewer larger ones
which may become a significant overhead. I think a decent approach to this is
to document it so that apps will use as large buffers as possible.
Yep, and it'll work, but packet size is still stuck at the (32k-overhead)
limit in the transport layer, which I think is the real problem.
But the 32-34K something is a real limit imposed by the specs, it's not
something we have invented. I'm afraid I don't understand what other way to
approach this that you are suggesting.
--
/ daniel.haxx.se
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel