Closed Banyc closed 2 years ago
Keep-alive interval (and the peer responsible for sending keep-alives) should be generally specified as part of your application-layer protocol, so that peers aren't exposed to a risk of setting an idle timeout too low to begin with.
@Ralith Should both max_idle_timeout
and keep_alive_interval
be explicitly set in the application layer? Just to confirm my understanding.
Thanks!
That's usually a good idea, yeah. A getter on its own wouldn't be sufficient anyway, since connection configuration must generally be established before the connection is made. That could be mitigated by adding setters as needed as well, but that's a bunch of extra plumbing and API for a case that's simpler to address purely with good application layer design.
Huge thanks!
So that I can set
keep_alive_interval
accordingly.Alternatives
Or allow setting
keep_alive_interval
after the actual idle timeout is negotiated.