diff options
author | Muxi Yan <mxyan@google.com> | 2018-10-11 13:45:43 -0700 |
---|---|---|
committer | Muxi Yan <mxyan@google.com> | 2018-10-11 13:45:43 -0700 |
commit | 0d4ac971df9d2a795eac674e0a105d0c51f7387b (patch) | |
tree | f2ad0a7a8502e5b45abf84cea6803f4488aa3a6e /src/objective-c/GRPCClient/GRPCCallOptions.h | |
parent | 96709ecb8cde75f2750d96dc288167292790eb5a (diff) |
Restrict NSTimeInterval parameters to non-negative
Diffstat (limited to 'src/objective-c/GRPCClient/GRPCCallOptions.h')
-rw-r--r-- | src/objective-c/GRPCClient/GRPCCallOptions.h | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/src/objective-c/GRPCClient/GRPCCallOptions.h b/src/objective-c/GRPCClient/GRPCCallOptions.h index 1093044c0c..70dd7741fd 100644 --- a/src/objective-c/GRPCClient/GRPCCallOptions.h +++ b/src/objective-c/GRPCClient/GRPCCallOptions.h @@ -120,15 +120,15 @@ typedef NS_ENUM(NSInteger, GRPCTransportType) { */ @property(readonly) BOOL enableRetry; -/** - * HTTP/2 keep-alive feature. The parameter \a keepaliveInterval specifies the interval between two - * PING frames. The parameter \a keepaliveTimeout specifies the length of the period for which the - * call should wait for PING ACK. If PING ACK is not received after this period, the call fails. - */ +// HTTP/2 keep-alive feature. The parameter \a keepaliveInterval specifies the interval between two +// PING frames. The parameter \a keepaliveTimeout specifies the length of the period for which the +// call should wait for PING ACK. If PING ACK is not received after this period, the call fails. +// Negative values are not allowed. @property(readonly) NSTimeInterval keepaliveInterval; @property(readonly) NSTimeInterval keepaliveTimeout; -// Parameters for connection backoff. For details of gRPC's backoff behavior, refer to +// Parameters for connection backoff. Negative values are not allowed. +// For details of gRPC's backoff behavior, refer to // https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md @property(readonly) NSTimeInterval connectMinTimeout; @property(readonly) NSTimeInterval connectInitialBackoff; @@ -203,7 +203,8 @@ typedef NS_ENUM(NSInteger, GRPCTransportType) { /** * The timeout for the RPC call in seconds. If set to 0, the call will not timeout. If set to * positive, the gRPC call returns with status GRPCErrorCodeDeadlineExceeded if it is not completed - * within \a timeout seconds. A negative value is not allowed. + * within \a timeout seconds. Negative value is invalid; setting the parameter to negative value + * will reset the parameter to 0. */ @property(readwrite) NSTimeInterval timeout; @@ -249,15 +250,17 @@ typedef NS_ENUM(NSInteger, GRPCTransportType) { */ @property(readwrite) BOOL enableRetry; -/** - * HTTP/2 keep-alive feature. The parameter \a keepaliveInterval specifies the interval between two - * PING frames. The parameter \a keepaliveTimeout specifies the length of the period for which the - * call should wait for PING ACK. If PING ACK is not received after this period, the call fails. - */ +// HTTP/2 keep-alive feature. The parameter \a keepaliveInterval specifies the interval between two +// PING frames. The parameter \a keepaliveTimeout specifies the length of the period for which the +// call should wait for PING ACK. If PING ACK is not received after this period, the call fails. +// Negative values are invalid; setting these parameters to negative value will reset the +// corresponding parameter to 0. @property(readwrite) NSTimeInterval keepaliveInterval; @property(readwrite) NSTimeInterval keepaliveTimeout; -// Parameters for connection backoff. For details of gRPC's backoff behavior, refer to +// Parameters for connection backoff. Negative value is invalid; setting the parameters to negative +// value will reset corresponding parameter to 0. +// For details of gRPC's backoff behavior, refer to // https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md @property(readwrite) NSTimeInterval connectMinTimeout; @property(readwrite) NSTimeInterval connectInitialBackoff; |