Subject: Re: [PATCH] Send internal packet priority

Re: [PATCH] Send internal packet priority

From: liuzl <xieepp_at_gmail.com>
Date: Tue, 13 Sep 2011 17:17:37 +0800

>
> sftp_read() {
>> 1,window_adjust;
>> 2,make READ packet;
>> 3,send READ packet;
>> 4,receive ACK packet;
>> }
>>
>> In the first call, it works fine. and we will send blocking in the step 3
>> and receive blocking step 4. In the second call, if the receiving_window is
>> small, we will always return in the step 1.
>>
>
> Exactly. But are you saying that is good or bad? Do you see any remaining
> problems with SFTP downloads after this has been applied?
>
> The "return in the step 1" is only valid for the cases where libssh2 can't
> completely send the window adjust packet over the channel, which shouldn't
> happen _that_ often. And when it does, it really needs to send it so we just
> have to live with it.

 I mean if we are blocking in step 3 in the first call of sftp_read() , and
we received many data in step 4,
 so we must expand receive window in the next call. but there is a half-left
user-data doesn't sent,
 so function will return BAD_USE in step 1 in the next call. and always
return in the later call.

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