aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/grpcpp/impl/codegen/interceptor.h
diff options
context:
space:
mode:
authorGravatar Yash Tibrewal <yashkt@google.com>2019-01-05 12:24:31 -0800
committerGravatar GitHub <noreply@github.com>2019-01-05 12:24:31 -0800
commit46bd2f7adb926053345665d5c487fa20acd2b5b0 (patch)
treef375e509e895f0d11888c930d44fdaee6f62b8cb /include/grpcpp/impl/codegen/interceptor.h
parent6de81f54bbba10caa79fc72a253c0ea53fa05273 (diff)
parent059459a9ee082538d79be65dda3a131ef634cef1 (diff)
Merge pull request #17179 from yashykt/failhijackedrecv
Add interceptor methods to fail recv msg for hijacked rpcs and set recv message to nullptr on failure
Diffstat (limited to 'include/grpcpp/impl/codegen/interceptor.h')
-rw-r--r--include/grpcpp/impl/codegen/interceptor.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/grpcpp/impl/codegen/interceptor.h b/include/grpcpp/impl/codegen/interceptor.h
index 519c65c717..a57a3fccbb 100644
--- a/include/grpcpp/impl/codegen/interceptor.h
+++ b/include/grpcpp/impl/codegen/interceptor.h
@@ -168,8 +168,13 @@ class InterceptorBatchMethods {
/// list.
virtual std::unique_ptr<ChannelInterface> GetInterceptedChannel() = 0;
- // On a hijacked RPC/ to-be hijacked RPC, this can be called to fail a SEND
- // MESSAGE op
+ /// On a hijacked RPC, an interceptor can decide to fail a PRE_RECV_MESSAGE
+ /// op. This would be a signal to the reader that there will be no more
+ /// messages, or the stream has failed or been cancelled.
+ virtual void FailHijackedRecvMessage() = 0;
+
+ /// On a hijacked RPC/ to-be hijacked RPC, this can be called to fail a SEND
+ /// MESSAGE op
virtual void FailHijackedSendMessage() = 0;
};