Subject: Re: [PATCH] Send internal packet priority

Re: [PATCH] Send internal packet priority

From: Peter Stuge <peter_at_stuge.se>
Date: Sun, 11 Sep 2011 13:01:11 +0200

Daniel Stenberg wrote:
>> I think we should move out the window_adjust calling from within
>> channel_read() to have it done more independently.
>
> Something like this should be a start.
>
> Thoughts?

I think this looks good.

What does OpenSSH do in their SFTP client? Also see the plans for
their GSoC project which had 8 or 9 bullet points for how to optimize
their SFTP performance.

> + * This function will first make sure there's a receive window enough to
> + * receive a full buffer's wort of contents. An application may choose to
> + * adjust the receive window more to increase transfer performance.
> */
> LIBSSH2_API ssize_t
> libssh2_channel_read_ex(LIBSSH2_CHANNEL *channel, int stream_id, char *buf,
> size_t buflen)

Maybe buflen should not be used blindly.. Or maybe it should? Hmm.
320MB window is a big one. OTOH I don't know if it actually does any
harm, and when considering that we now have send/recv callbacks it's
even possible that the SSH protocol is not being used over TCP in the
first place. (Do we still require getting passed a socket for some
reason, or is that optional with send and recv callbacks?)

//Peter
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2011-09-11