diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/grpc++/channel_interface.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/grpc++/channel_interface.h b/include/grpc++/channel_interface.h index 65161275c6..335b6ccaae 100644 --- a/include/grpc++/channel_interface.h +++ b/include/grpc++/channel_interface.h @@ -69,10 +69,15 @@ class ChannelInterface : public CallHook, gpr_timespec deadline, CompletionQueue* cq, void* tag) = 0; - // Blocking wait for channel state change or deadline expires. + // Blocking wait for channel state change or deadline expiration. // GetState needs to called to get the current state. virtual bool WaitForStateChange(grpc_connectivity_state last_observed, gpr_timespec deadline) = 0; + + // Blocking wait for target state or deadline expriration. + virtual bool WaitForState(grpc_connectivity_state target_state, + gpr_timespec deadline) = 0; + #ifndef GRPC_CXX0X_NO_CHRONO virtual void NotifyOnStateChange( grpc_connectivity_state last_observed, @@ -81,6 +86,9 @@ class ChannelInterface : public CallHook, virtual bool WaitForStateChange( grpc_connectivity_state last_observed, const std::chrono::system_clock::time_point& deadline) = 0; + virtual bool WaitForState( + grpc_connectivity_state target_state, + const std::chrono::system_clock::time_point& deadline) = 0; #endif // !GRPC_CXX0X_NO_CHRONO }; |