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: Wed, 10 Aug 2011 20:01:18 +0200 (CEST)

On Wed, 10 Aug 2011, Przemysław Szczygielski wrote:

(please don't top-post, it makes it hard to have a mail conversation)

> Wait, wait? What do you mean no payload was sent?

I meant that none of the bytes you provided in a buffer to libssh2 was sent.
libssh2 might've sent a few "control bytes" though. The return code says how
much of the provided data that was sent.

> I can see in my debug output how following 4096 byte packets get properly
> sent by writeData(const char* buff, qint64 len). Then when about 2Mb of
> bytes is sent the attached procedure will show:
>
> QxtSshChannel::writeData ******FKUP!!!! ssh wrote less than it should!!!
> (171/4096) // 171 is just some value, which shows that the packet fot
> partially written!

Right, this shows libssh2 only sent 171 bytes due to some reason. Possibly if
you build debug-enabled and enabling tracing you'll see more details and an
explanation to why it doesn't send more.

It almost looks as if there's no window given for the channel from the server
for libssh2 to use.

> So this also answers your question - after ret is 0 I keep writing packets,
> but I do this because I discovered only today, that writing to ssh channel
> fails. So I don't really know what else should I do ;-)

debug! =)

-- 
  / daniel.haxx.se

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