Subject: Re: [PATCH] Follow RFC4253 section 11.4

Re: [PATCH] Follow RFC4253 section 11.4

From: Henrik Nordström <henrik_at_henriknordstrom.net>
Date: Fri, 02 Mar 2012 20:43:50 +0100

fre 2012-03-02 klockan 10:41 -0700 skrev Steven Dake:
> To address this in my code which is nonblocking, should I avoid sending
> keepalive_send while a channel operation is in progress? Currently the
> nonblocking app sends the keepalive based upon a timer set by the return
> from the previous keepalive_send.

You don't need to worry that much about it. The UNIMPLEMENTED thing is a
small bug. But

* Don't call libssh2_keepalive_send() until authentication have finished
and the connection protocol is active. It's not valid to use before.

* Don't enable want_reply in libssh2_keepalive_config(). It's not really
implemented yet in libssh2 keepalive probes.

* Also do not cal libss2_keepalive_send() if you have written a lot of
data to several channels fast, or if you otherwise suspect there is a
risk that the keep-alive probe can not be immediately queued by the
transport socket.

I would advice to only call it while otherwise idle. This avoids all
other issues.

Regards
Henrik

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2012-03-02