Subject: Re: Trying to understand keepalive

Re: Trying to understand keepalive

From: Henrik Nordström <henrik_at_henriknordstrom.net>
Date: Sun, 25 Dec 2011 16:56:53 +0100

sön 2011-12-25 klockan 14:48 +0100 skrev Fritz Elfert:

> EAGAIN is silently ignored in libssh2_keepalive_send(). Isn't that correct?

Correct, which fails badly if the keep alive packet itself was what
filled up the last available bits in the transport connection.

> Also: They *always* set want_reply to 1 -
> Wouldn't make much sense otherwise.

Well, we discussed this some time ago. There is some odd use cases for
keep-alive without want_reply.

> From that, my understanding is that the current implementation of
> libssh2 (regrding maintaining a single timestamp of last sent) is
> sufficient. The only thing that's missing is the timeouts-counter. Of
> course - since want_reply is optional in libssh2 - the counter should
> only be incremented if want_reply is set.

I don't really like counter based timeouts, but sure.

Regards
Henrik

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