aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/grpcpp/impl/codegen/interceptor.h
diff options
context:
space:
mode:
authorGravatar Yash Tibrewal <yashkt@google.com>2018-10-31 15:29:26 -0700
committerGravatar Yash Tibrewal <yashkt@google.com>2018-10-31 15:29:26 -0700
commit3ece34d45c2b6e0d98d9546b1367054c90a523a6 (patch)
tree1b869345cb694b8f9abc47e68a85289942b68ae4 /include/grpcpp/impl/codegen/interceptor.h
parentd3540ae832654491f321018f0a154c4ff2a0c5ab (diff)
Let us clean a few things before getting started
Diffstat (limited to 'include/grpcpp/impl/codegen/interceptor.h')
-rw-r--r--include/grpcpp/impl/codegen/interceptor.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/grpcpp/impl/codegen/interceptor.h b/include/grpcpp/impl/codegen/interceptor.h
index 15cab711e5..4fb322aa8e 100644
--- a/include/grpcpp/impl/codegen/interceptor.h
+++ b/include/grpcpp/impl/codegen/interceptor.h
@@ -56,6 +56,9 @@ enum class InterceptionHookPoints {
POST_RECV_MESSAGE,
POST_RECV_STATUS /* client only */,
POST_RECV_CLOSE /* server only */,
+ /* This is a special hook point available to both clients and servers. It is
+ illegal for an interceptor to block/delay this operation */
+ PRE_SEND_CANCEL,
NUM_INTERCEPTION_HOOKS
};
@@ -66,7 +69,9 @@ class InterceptorBatchMethods {
// of type \a type
virtual bool QueryInterceptionHookPoint(InterceptionHookPoints type) = 0;
// Calling this will signal that the interceptor is done intercepting the
- // current batch of the RPC
+ // current batch of the RPC.
+ // Proceed is a no-op if the batch contains PRE_SEND_CANCEL. Simply returning
+ // from the Intercept method does the job of continuing the RPC.
virtual void Proceed() = 0;
// Calling this indicates that the interceptor has hijacked the RPC (only
// valid if the batch contains send_initial_metadata on the client side)