Instance Property
keepAliveInterval
The interval at which the server sends keep-alive PING frames.
var keepAliveInterval: Duration?
Discussion
Each PING restarts both endpoints’ idle timers. The server’s idle timer is restarted when the PING is sent, and the peer’s idle timer is restarted when the PING is received. This prevents the connection from being closed by maxIdleTimeout.
Important
For keep-alive pings to be effective, the interval must be shorter than the negotiated idle timeout.
See Also
https://datatracker.ietf.org/doc/html/rfc9000#section-10.1.2