server: set TCP_USER_TIMEOUT socket option for linux #5219
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implements proposal A18 (https://github.com/grpc/proposal/blob/master/A18-tcp-user-timeout.md).
Currently, TCP_USER_TIMEOUT can only be set on gRPC golang client.
The A18 proposal doesn't mention this should be restricted clients and the C-Core implementation does set TCP_USER_TIMEOUT on gRPC server (https://github.com/grpc/grpc/pull/16419/files#diff-b3242d6753e5e0f631f2aed3fc352e2f491696f5107ab2f1cc61d85b7926a192R169-R170)
So this PR adds the server part of #2307 and sets TCP_USER_TIMEOUT in the server transport.
RELEASE NOTES:
TCP_USER_TIMEOUT
ongrpc.Server
connections usingkeepalive.ServerParameters.Time