Subject: Re: data overload

Re: data overload

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 19 Aug 2012 13:36:27 +0200 (CEST)

On Wed, 15 Aug 2012, Dave Hayden wrote:

> I added a "count" property to the list_head struct, incrementing it in
> _libssh2_list_add() and decrementing in _libssh2_list_remove(). In
> _libssh2_channel_read() instead of calling _libssh2_transport_read() once if
> session->packets is empty, I and session->packets->count is below a constant
> limit. (8 seems reasonable..?) A better solution might be to track the total
> size of the buffered data and place a limit on that instead.

Thanks for the patch Dave, I can see how this might be necessary. I'm curious
though, how is the channel window playing into this? I mean, the window is
only grown in libssh2_channel_read_ex() so won't you get a finite amount of
data that fills up the window?

Other than so, I really agree that a limit on amount of data would be much
better but that's also what we have the window for already so we need to find
the middle ground here if windowing isn't enough. Or improve the windowing
perhaps.

-- 
  / daniel.haxx.se
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2012-08-19