aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/grpcpp/impl/codegen/interceptor.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/grpcpp/impl/codegen/interceptor.h')
-rw-r--r--include/grpcpp/impl/codegen/interceptor.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/grpcpp/impl/codegen/interceptor.h b/include/grpcpp/impl/codegen/interceptor.h
index e449e44a23..154172dd81 100644
--- a/include/grpcpp/impl/codegen/interceptor.h
+++ b/include/grpcpp/impl/codegen/interceptor.h
@@ -41,9 +41,10 @@ class InterceptedMessage {
};
enum class InterceptionHookPoints {
- /* The first two in this list are for clients and servers */
+ /* The first three in this list are for clients and servers */
PRE_SEND_INITIAL_METADATA,
PRE_SEND_MESSAGE,
+ POST_SEND_MESSAGE,
PRE_SEND_STATUS /* server only */,
PRE_SEND_CLOSE /* client only */,
/* The following three are for hijacked clients only and can only be
@@ -85,6 +86,9 @@ class InterceptorBatchMethods {
// sent
virtual ByteBuffer* GetSendMessage() = 0;
+ // Checks whether the SEND MESSAGE op succeeded
+ virtual bool GetSendMessageStatus() = 0;
+
// Returns a modifiable multimap of the initial metadata to be sent
virtual std::multimap<grpc::string, grpc::string>*
GetSendInitialMetadata() = 0;
@@ -118,6 +122,10 @@ class InterceptorBatchMethods {
// only interceptors after the current interceptor are created from the
// factory objects registered with the channel.
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
+ virtual void FailHijackedSendMessage() = 0;
};
class Interceptor {