The patch make sftp_read() like this:
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.
In the other hand, libssh2 have many kind of internal-paket and different
levels of API.
It's a hard work to modify all the functions.
I think we should deal user-data and internal-data in different way.
Deal the internal-data in high priority.
If we are blocking in sending user-data,and we try to send internal-data
now,
we can try to send the left half user-data, and then send the internal-data.
That is not a BAT_USE.
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2011-09-13