Subject: Re: writing to channel limited to 2 Mb?

Re: writing to channel limited to 2 Mb?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 11 Aug 2011 08:26:26 +0200 (CEST)

On Thu, 11 Aug 2011, Henrik Nordström wrote:

>> In order to reach a good flow and transfer speed, you never let the window
>> size reach zero. Of course there might still be cases where you really
>> cannot accept more data for the moment and then you tell the other side to
>> not send more by setting the window to 0.
>
> What is a good method to wait for the window to reopen in libssh2? Should
> ret = 0 be handled like EAGAIN? Or is some special handling needed?
>
> The examples seem to busywait if this happens.

Right, this function should only return 0 if it truly sent _something_.

It shouldn't repeatedly return 0 if the window size is 0 as then it probably
not send anything at all and return EAGAIN instead...

I'm not ruling out a bug but this window size theory is only a guess so far.

-- 
  / daniel.haxx.se

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