@@ -34,15 +34,29 @@ type ClientParameters struct {
3434 // After a duration of this time if the client doesn't see any activity it
3535 // pings the server to see if the transport is still alive.
3636 // If set below 10s, a minimum value of 10s will be used instead.
37- Time time.Duration // The current default value is infinity.
37+ //
38+ // Note that gRPC servers have a default EnforcementPolicy.MinTime of 5
39+ // minutes (which means the client shouldn't ping more frequently than every
40+ // 5 minutes).
41+ //
42+ // Though not ideal, it's not a strong requirement for Time to be less than
43+ // EnforcementPolicy.MinTime. Time will automatically double if the server
44+ // disconnects due to its enforcement policy.
45+ //
46+ // For more details, see
47+ // https://github.com/grpc/proposal/blob/master/A8-client-side-keepalive.md
48+ Time time.Duration
3849 // After having pinged for keepalive check, the client waits for a duration
3950 // of Timeout and if no activity is seen even after that the connection is
4051 // closed.
41- Timeout time.Duration // The current default value is 20 seconds.
52+ //
53+ // If keepalive is enabled, and this value is not explicitly set, the default
54+ // is 20 seconds.
55+ Timeout time.Duration
4256 // If true, client sends keepalive pings even with no active RPCs. If false,
4357 // when there are no active RPCs, Time and Timeout will be ignored and no
4458 // keepalive pings will be sent.
45- PermitWithoutStream bool // false by default.
59+ PermitWithoutStream bool
4660}
4761
4862// ServerParameters is used to set keepalive and max-age parameters on the
0 commit comments