How to set KeepAlive for TCP connections #1835
Answered
by
robjtede
PragmaTwice
asked this question in
Q&A
-
I found that |
Beta Was this translation helpful? Give feedback.
Answered by
robjtede
Dec 17, 2020
Replies: 1 comment
-
So you can delegate to the OS keepalives with https://docs.rs/actix-http/2.2.0/actix_http/enum.KeepAlive.html. Otherwise you'll need to use |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
PragmaTwice
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So you can delegate to the OS keepalives with https://docs.rs/actix-http/2.2.0/actix_http/enum.KeepAlive.html. Otherwise you'll need to use
socket2
to create a socket that has the exact duration set up and pass it toHttpServer::listen
.