Subject: RE: Packet drop on full socket problem

RE: Packet drop on full socket problem

From: Thomas Rauscher <>
Date: Thu, 7 Oct 2010 12:32:41 +0200

> When libssh2_channel_write_ex() returns 12K and thus inform the application
> that 12K data was indeed sent, the appliction will advance its pointer and the
> next call will be 12K further into the data.
> Thus, the application will deliver the rest of the data (again) and libssh2
> won't need to have it buffered anywhere. That buffer is only needed and used
> as long as it truly and only gets EAGAIN back from the socket.
> A short send() is very common for anything except very small files when sent
> over a slower network, so I don't think it is "just" that's required to
> trigger this.

You are right, the return value can't be the problem.

I'm not very familiar with SSH internals, so I may be wrong
with the following idea.

What happens when the same packet is encrypted twice?
Are the packets binary identical or has the internal
state of the crypt function changed? Could this confuse the
receiver then?

Received on 2010-10-07