api: Document A18 TCP_USER_TIMEOUT handling for keepalive · grpc/grpc-java@da70387 (original) (raw)

File tree

Original file line number Diff line number Diff line change
@@ -374,9 +374,17 @@ public T maxInboundMetadataSize(int bytes) {
374 374 * notice when they are causing excessive load. Clients are strongly encouraged to use only as
375 375 * small of a value as necessary.
376 376 *
377 + *

When the channel implementation supports TCP_USER_TIMEOUT, enabling keepalive will also

378 + * enable TCP_USER_TIMEOUT for the connection. This requires all sent packets to receive
379 + * a TCP acknowledgement before the keepalive timeout. The keepalive time is not used for
380 + * TCP_USER_TIMEOUT, except as a signal to enable the feature. grpc-netty supports
381 + * TCP_USER_TIMEOUT on Linux platforms supported by netty-transport-native-epoll.
382 + *
377 383 * @throws UnsupportedOperationException if unsupported
378 384 * @see gRFC A8
379 385 * Client-side Keepalive
386 + * @see gRFC A18
387 + * TCP User Timeout
380 388 * @since 1.7.0
381 389 */
382 390 public T keepAliveTime(long keepAliveTime, TimeUnit timeUnit) {
@@ -393,6 +401,8 @@ public T keepAliveTime(long keepAliveTime, TimeUnit timeUnit) {
393 401 * @throws UnsupportedOperationException if unsupported
394 402 * @see gRFC A8
395 403 * Client-side Keepalive
404 + * @see gRFC A18
405 + * TCP User Timeout
396 406 * @since 1.7.0
397 407 */
398 408 public T keepAliveTimeout(long keepAliveTimeout, TimeUnit timeUnit) {