As I understand keep-alive timeout is a server side property. I would like to configure keep-alive timeout in ktor. Here is the server:
embeddedServer(Netty, port = 8080, configure = {..}, ) { ... }
I see boolean tcpKeepAlive
property inside Netty specific configuration. And it definition is:
If set to true, enables TCP keep alive for connections so all dead client connections will be discarded. The timeout period is configured by the system so configure your host accordingly.
So for me it is not clear what does it mean configure your host accordingly.
I found this answer https://stackoverflow.com/a/29749938/3601615 which could tell how to close idle connections. But I have been supposing that it would be enough to use some single property to set keep-alive timeout, and the mentioned solution looks complicated.
I will appreciate any advices how to configure keep-alive timeout in ktor.