Skip to content

How to set KeepAlive for TCP connections #1835

Answered by robjtede
PragmaTwice asked this question in Q&A
Discussion options

You must be logged in to vote

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 to HttpServer::listen.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by PragmaTwice
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants