Subject: Re: Problem with random delay in terminal

Re: Problem with random delay in terminal

From: Lars Nordin <>
Date: Tue, 26 Jan 2016 21:40:26 +0100

On 2016-01-26 20:37, Daniel Stenberg wrote:
> On Tue, 26 Jan 2016, Lars Nordin wrote:
>> Have I missed any setting? I know local_echo is an option, but if
>> SecureCRT can, why not libssh2?
> Could it be as easy as setsockopt(... TCP_NODELAY ...) ?
> _______________________________________________
> libssh2-devel
I added the line, but no change...I'm on Windows and tried both the
ioctlsocket(... FIONBIO ... and now the setsockopt(... TCP_NODELAY ...)
         u_long flags = 1;

         //ioctlsocket(sock, FIONBIO, &flags); // tried both with and
         setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (char *) &flags,
sizeof (u_long));

Using my automatic character-sender I discovered a pattern, the ACK is
sent after 14 packetets, ie 7 characters sent and received. The delay is
100ms (as programmed) between each sent characters (with a reply in
less then 10ms) until the ACK , the ACK is sent efter 200ms delay and
then the next character after 100ms more. Summary 200ms of extra delay
each 7 characters sent.

Received on 2016-01-26