Go to the documentation of this file.
19 #ifndef GRPCPP_IMPL_CALL_OP_SET_H
20 #define GRPCPP_IMPL_CALL_OP_SET_H
26 #include "absl/log/absl_check.h"
27 #include "absl/log/absl_log.h"
57 const std::multimap<std::string, std::string>& metadata,
58 size_t* metadata_count,
const std::string& optional_error_details) {
59 *metadata_count = metadata.size() + (optional_error_details.empty() ? 0 : 1);
60 if (*metadata_count == 0) {
66 for (
auto iter = metadata.cbegin(); iter != metadata.cend(); ++iter, ++i) {
70 if (!optional_error_details.empty()) {
75 return metadata_array;
85 inline void Clear() { flags_ = 0; }
88 inline uint32_t
flags()
const {
return flags_; }
158 last_message_ =
true;
165 last_message_ =
false;
190 void SetBit(
const uint32_t mask) { flags_ |= mask; }
192 void ClearBit(
const uint32_t mask) { flags_ &= ~mask; }
194 bool GetBit(
const uint32_t mask)
const {
return (flags_ & mask) != 0; }
205 template <
int Unused>
315 if (msg_ ==
nullptr && !send_buf_.
Valid())
return;
317 serializer_ =
nullptr;
320 if (msg_ !=
nullptr) {
321 ABSL_CHECK(serializer_(msg_).ok());
323 serializer_ =
nullptr;
330 write_options_.
Clear();
333 if (msg_ ==
nullptr && !send_buf_.
Valid())
return;
335 if (hijacked_ && failed_send_) {
338 }
else if (!*status) {
346 if (msg_ ==
nullptr && !send_buf_.
Valid())
return;
349 interceptor_methods->
SetSendMessage(&send_buf_, &msg_, &failed_send_,
355 if (msg_ !=
nullptr || send_buf_.
Valid()) {
363 interceptor_methods->
SetSendMessage(
nullptr,
nullptr, &failed_send_,
372 const void* msg_ =
nullptr;
373 bool hijacked_ =
false;
374 bool failed_send_ =
false;
377 std::function<
Status(
const void*)> serializer_;
382 write_options_ = options;
386 message, send_buf_.bbuf_ptr(), &own_buf);
402 write_options_ = options;
404 serializer_ = [
this](
const void* message) {
411 *
static_cast<const M*
>(message), send_buf_.bbuf_ptr(), &own_buf);
437 if (message_ ==
nullptr || hijacked_)
return;
446 if (message_ ==
nullptr)
return;
447 if (recv_buf_.
Valid()) {
457 }
else if (hijacked_) {
458 if (hijacked_recv_message_failed_) {
459 FinishOpRecvMessageFailureHandler(status);
466 FinishOpRecvMessageFailureHandler(status);
472 if (message_ ==
nullptr)
return;
474 &hijacked_recv_message_failed_);
479 if (message_ ==
nullptr)
return;
486 if (message_ ==
nullptr)
return;
494 void FinishOpRecvMessageFailureHandler(
bool* status) {
496 if (!allow_not_getting_message_) {
501 R* message_ =
nullptr;
502 ByteBuffer recv_buf_;
503 bool allow_not_getting_message_ =
false;
504 bool hijacked_ =
false;
505 bool hijacked_recv_message_failed_ =
false;
535 deserialize_.reset(func);
546 if (!deserialize_ || hijacked_)
return;
555 if (!deserialize_)
return;
556 if (recv_buf_.
Valid()) {
559 *status = deserialize_->Deserialize(&recv_buf_).ok();
565 }
else if (hijacked_) {
566 if (hijacked_recv_message_failed_) {
567 FinishOpRecvMessageFailureHandler(status);
575 if (!allow_not_getting_message_) {
583 if (!deserialize_)
return;
585 &hijacked_recv_message_failed_);
590 if (!deserialize_)
return;
594 deserialize_.reset();
598 if (!deserialize_)
return;
606 void FinishOpRecvMessageFailureHandler(
bool* status) {
608 if (!allow_not_getting_message_) {
613 void* message_ =
nullptr;
614 std::unique_ptr<DeserializeFunc> deserialize_;
615 ByteBuffer recv_buf_;
616 bool allow_not_getting_message_ =
false;
617 bool hijacked_ =
false;
618 bool hijacked_recv_message_failed_ =
false;
629 if (!send_ || hijacked_)
return;
652 bool hijacked_ =
false;
661 std::multimap<std::string, std::string>* trailing_metadata,
664 metadata_map_ = trailing_metadata;
665 send_status_available_ =
true;
672 if (!send_status_available_ || hijacked_)
return;
674 *metadata_map_, &trailing_metadata_count_, send_error_details_);
678 trailing_metadata_count_;
683 send_error_message_.empty() ? nullptr : &error_message_slice_;
689 if (!send_status_available_ || hijacked_)
return;
691 send_status_available_ =
false;
696 if (!send_status_available_)
return;
700 interceptor_methods->
SetSendStatus(&send_status_code_, &send_error_details_,
701 &send_error_message_);
712 bool hijacked_ =
false;
713 bool send_status_available_;
715 std::string send_error_details_;
716 std::string send_error_message_;
717 size_t trailing_metadata_count_;
718 std::multimap<std::string, std::string>* metadata_map_;
728 context->initial_metadata_received_ =
true;
729 metadata_map_ = &context->recv_initial_metadata_;
734 if (metadata_map_ ==
nullptr || hijacked_)
return;
743 if (metadata_map_ ==
nullptr || hijacked_)
return;
753 if (metadata_map_ ==
nullptr)
return;
756 metadata_map_ =
nullptr;
761 if (metadata_map_ ==
nullptr)
return;
767 bool hijacked_ =
false;
774 : metadata_map_(nullptr),
775 recv_status_(nullptr),
776 debug_error_string_(nullptr) {}
779 client_context_ = context;
780 metadata_map_ = &client_context_->trailing_metadata_;
781 recv_status_ = status;
787 if (recv_status_ ==
nullptr || hijacked_)
return;
799 if (recv_status_ ==
nullptr || hijacked_)
return;
802 ABSL_DCHECK_EQ(debug_error_string_,
nullptr);
811 if (debug_error_string_ !=
nullptr) {
812 client_context_->set_debug_error_string(debug_error_string_);
813 gpr_free(
const_cast<char*
>(debug_error_string_));
829 if (recv_status_ ==
nullptr)
return;
832 recv_status_ =
nullptr;
837 if (recv_status_ ==
nullptr)
return;
843 bool hijacked_ =
false;
847 const char* debug_error_string_;
852 template <
class Op1 = CallNoOp<1>,
class Op2 = CallNoOp<2>,
853 class Op3 = CallNoOp<3>,
class Op4 = CallNoOp<4>,
854 class Op5 = CallNoOp<5>,
class Op6 = CallNoOp<6>>
863 template <
class Op1,
class Op2,
class Op3,
class Op4,
class Op5,
class Op6>
864 class CallOpSet :
public CallOpSetInterface,
877 : core_cq_tag_(this),
880 done_intercepting_(false),
884 if (&other ==
this) {
890 done_intercepting_ =
false;
896 done_intercepting_ =
false;
901 if (RunInterceptors()) {
910 if (done_intercepting_) {
912 call_.
cq()->CompleteAvalanching();
917 *status = saved_status_;
922 this->Op1::FinishOp(status);
923 this->Op2::FinishOp(status);
924 this->Op3::FinishOp(status);
925 this->Op4::FinishOp(status);
926 this->Op5::FinishOp(status);
927 this->Op6::FinishOp(status);
928 saved_status_ = *status;
929 if (RunInterceptorsPostRecv()) {
952 this->Op1::SetHijackingState(&interceptor_methods_);
953 this->Op2::SetHijackingState(&interceptor_methods_);
954 this->Op3::SetHijackingState(&interceptor_methods_);
955 this->Op4::SetHijackingState(&interceptor_methods_);
956 this->Op5::SetHijackingState(&interceptor_methods_);
957 this->Op6::SetHijackingState(&interceptor_methods_);
962 static const size_t MAX_OPS = 6;
965 this->Op1::AddOp(ops, &nops);
966 this->Op2::AddOp(ops, &nops);
967 this->Op3::AddOp(ops, &nops);
968 this->Op4::AddOp(ops, &nops);
969 this->Op5::AddOp(ops, &nops);
970 this->Op6::AddOp(ops, &nops);
988 done_intercepting_ =
true;
997 bool RunInterceptors() {
1000 interceptor_methods_.
SetCall(&call_);
1001 this->Op1::SetInterceptionHookPoint(&interceptor_methods_);
1002 this->Op2::SetInterceptionHookPoint(&interceptor_methods_);
1003 this->Op3::SetInterceptionHookPoint(&interceptor_methods_);
1004 this->Op4::SetInterceptionHookPoint(&interceptor_methods_);
1005 this->Op5::SetInterceptionHookPoint(&interceptor_methods_);
1006 this->Op6::SetInterceptionHookPoint(&interceptor_methods_);
1012 call_.
cq()->RegisterAvalanching();
1016 bool RunInterceptorsPostRecv() {
1020 this->Op1::SetFinishInterceptionHookPoint(&interceptor_methods_);
1021 this->Op2::SetFinishInterceptionHookPoint(&interceptor_methods_);
1022 this->Op3::SetFinishInterceptionHookPoint(&interceptor_methods_);
1023 this->Op4::SetFinishInterceptionHookPoint(&interceptor_methods_);
1024 this->Op5::SetFinishInterceptionHookPoint(&interceptor_methods_);
1025 this->Op6::SetFinishInterceptionHookPoint(&interceptor_methods_);
1032 bool done_intercepting_ =
false;
1033 InterceptorBatchMethodsImpl interceptor_methods_;
1040 #endif // GRPCPP_IMPL_CALL_OP_SET_H
void SetHijackingState(InterceptorBatchMethodsImpl *)
Definition: call_op_set.h:367
GPRAPI void * gpr_malloc(size_t size)
malloc.
grpc::CompletionQueue * cq() const
Definition: call.h:71
struct grpc_byte_buffer * send_message
This op takes ownership of the slices in send_message.
Definition: grpc_types.h:339
uint32_t flags
Write flags bitset for grpc_begin_messages.
Definition: grpc_types.h:315
void SetFinishInterceptionHookPoint(InterceptorBatchMethodsImpl *interceptor_methods)
Definition: call_op_set.h:477
GPRAPI grpc_slice grpc_empty_slice(void)
grpc_call_error
Result of a grpc call.
Definition: grpc_types.h:140
WriteOptions & clear_last_message()
Clears flag indicating that this is the last message in a stream, disabling coalescing.
Definition: call_op_set.h:164
WriteOptions & set_corked()
corked bit: aliases set_buffer_hint currently, with the intent that set_buffer_hint will be removed i...
Definition: call_op_set.h:140
bool get_buffer_hint() const
Get value for the flag indicating that the write may be buffered and need not go out on the wire imme...
Definition: call_op_set.h:136
void AddOp(grpc_op *ops, size_t *nops)
Definition: call_op_set.h:786
grpc_metadata_array * trailing_metadata
ownership of the array is with the caller, but ownership of the elements stays with the call object (...
Definition: grpc_types.h:372
Definition: call_op_set.h:621
grpc_status_code * status
Definition: grpc_types.h:373
void SetHijackingState(InterceptorBatchMethodsImpl *interceptor_methods)
Definition: call_op_set.h:484
void SetHijackingState(InterceptorBatchMethodsImpl *)
Definition: call_op_set.h:647
CallOpSet()
Definition: call_op_set.h:872
Definition: call_op_set.h:528
Definition: call_op_set.h:656
#define GRPC_SLICE_START_PTR(slice)
Definition: slice_type.h:99
void Duplicate()
Make a duplicate copy of the internals of this byte buffer so that we have our own owned version of i...
Definition: byte_buffer.h:140
@ PRE_SEND_INITIAL_METADATA
The first three in this list are for clients and servers.
void AddOp(grpc_op *ops, size_t *nops)
Definition: call_op_set.h:545
An Alarm posts the user-provided tag to its associated completion queue or invokes the user-provided ...
Definition: alarm.h:33
Primary implementation of CallOpSetInterface.
Definition: completion_queue.h:98
Definition: call_op_set.h:288
#define GRPC_SLICE_END_PTR(slice)
Definition: slice_type.h:108
struct grpc_op::grpc_op_data::grpc_op_send_initial_metadata send_initial_metadata
bool get_no_compression() const
Get value for the flag indicating whether compression for the next message write is forcefully disabl...
Definition: call_op_set.h:110
grpc_status_code
Definition: status.h:28
void SetRecvInitialMetadata(MetadataMap *map)
Definition: interceptor_common.h:175
WriteOptions & set_last_message()
last-message bit: indicates this is the last message in a stream client-side: makes Write the equival...
Definition: call_op_set.h:157
@ POST_RECV_INITIAL_METADATA
The following two are for all clients and servers.
void FinishOp(bool *status)
Definition: call_op_set.h:332
void * reserved
Reserved for future usage.
Definition: grpc_types.h:317
void SetCallOpSetInterface(CallOpSetInterface *ops)
Definition: interceptor_common.h:221
void RecvMessage(R *message)
Definition: call_op_set.h:531
bool is_write_through() const
Definition: call_op_set.h:187
void FillOps(Call *call) override
Definition: call_op_set.h:895
void SetCall(Call *call)
Definition: interceptor_common.h:217
bool InterceptorsListEmpty()
Definition: interceptor_common.h:225
void SetHijackingState(InterceptorBatchMethodsImpl *interceptor_methods)
Definition: call_op_set.h:835
void ClearState()
Definition: interceptor_common.h:203
CallOpSendMessage()
Definition: call_op_set.h:290
Straightforward wrapping of the C call object.
Definition: call.h:36
@ GRPC_CALL_OK
everything went ok
Definition: grpc_types.h:142
WriteOptions()
Definition: call_op_set.h:82
WriteOptions & set_write_through()
Guarantee that all bytes have been written to the socket before completing this write (usually writes...
Definition: call_op_set.h:177
void SetFinishInterceptionHookPoint(InterceptorBatchMethodsImpl *interceptor_methods)
Definition: call_op_set.h:827
void FinishOp(bool *)
Definition: call_op_set.h:635
void ServerSendStatus(std::multimap< std::string, std::string > *trailing_metadata, const Status &status)
Definition: call_op_set.h:660
CallOpClientRecvStatus()
Definition: call_op_set.h:773
void SetInterceptionHookPoint(InterceptorBatchMethodsImpl *)
Definition: call_op_set.h:210
GRPCAPI void grpc_call_ref(grpc_call *call)
Ref a call.
#define GRPC_WRITE_NO_COMPRESS
Force compression to be disabled for a particular write (start_write/add_metadata).
Definition: grpc_types.h:189
void SetHijackingState(InterceptorBatchMethodsImpl *)
Definition: call_op_set.h:214
void SetInterceptionHookPoint(InterceptorBatchMethodsImpl *interceptor_methods)
Definition: call_op_set.h:470
struct grpc_op::grpc_op_data::grpc_op_recv_message recv_message
void AddOp(grpc_op *ops, size_t *nops)
Definition: call_op_set.h:671
union grpc_op::grpc_op_data data
void FinishOp(bool *)
Definition: call_op_set.h:209
void FinishOp(bool *status)
Definition: call_op_set.h:445
CallOpSet(const CallOpSet &other)
Definition: call_op_set.h:876
uint32_t flags() const
Returns raw flags bitset.
Definition: call_op_set.h:88
GPRAPI void gpr_free(void *ptr)
free
void AddOp(grpc_op *, size_t *)
Definition: call_op_set.h:208
CallOpServerSendStatus()
Definition: call_op_set.h:658
void ContinueFillOpsAfterInterception() override
Definition: call_op_set.h:961
struct grpc_byte_buffer ** recv_message
Definition: grpc_types.h:364
Did it work? If it didn't, why?
Definition: status.h:34
Definition: call_op_set.h:508
void AddOp(grpc_op *ops, size_t *nops)
Definition: call_op_set.h:314
void SetSendStatus(grpc_status_code *code, std::string *error_details, std::string *error_message)
Definition: interceptor_common.h:158
void * core_cq_tag() override
Definition: call_op_set.h:941
void SetHijackingState(InterceptorBatchMethodsImpl *interceptor_methods)
Definition: call_op_set.h:596
@ GRPC_OP_RECV_INITIAL_METADATA
Receive initial metadata: one and only one MUST be made on the client, must not be made on the server...
Definition: grpc_types.h:288
bool got_message
Definition: call_op_set.h:433
GRPC_MUST_USE_RESULT Status SendMessage(const M &message, WriteOptions options)
Send message using options for the write.
@ GRPC_OP_SEND_STATUS_FROM_SERVER
Send status from the server: one and only one instance MUST be sent from the server unless the call w...
Definition: grpc_types.h:283
void ClientRecvStatus(grpc::ClientContext *context, Status *status)
Definition: call_op_set.h:778
#define GRPC_SLICE_IS_EMPTY(slice)
Definition: slice_type.h:110
@ OK
Not an error; returned on success.
Definition: status_code_enum.h:28
const char kBinaryErrorDetailsKey[]
Definition: metadata_map.h:32
GRPCAPI void grpc_call_unref(grpc_call *call)
Unref a call.
grpc_status_code status
Definition: grpc_types.h:344
const char ** error_string
If this is not nullptr, it will be populated with the full fidelity error string for debugging purpos...
Definition: grpc_types.h:378
WriteOptions & clear_write_through()
Definition: call_op_set.h:182
A ClientContext allows the person implementing a service client to:
Definition: client_context.h:195
void SetFinishInterceptionHookPoint(InterceptorBatchMethodsImpl *interceptor_methods)
Definition: call_op_set.h:588
bool is_corked() const
Definition: call_op_set.h:150
void Clear()
Remove all data.
Definition: byte_buffer.h:128
Definition: call_op_set.h:515
A sequence of bytes.
Definition: byte_buffer.h:60
GRPC_MUST_USE_RESULT Status SendMessagePtr(const M *message, WriteOptions options)
Send message using options for the write.
#define GRPC_WRITE_BUFFER_HINT
Write Flags:
Definition: grpc_types.h:186
void SetInterceptionHookPoint(InterceptorBatchMethodsImpl *interceptor_methods)
Definition: call_op_set.h:821
virtual ~DeserializeFunc()
Definition: call_op_set.h:511
Operation data: one field for each op type (except SEND_CLOSE_FROM_CLIENT which has no arguments)
Definition: grpc_types.h:311
void SetReverse()
Definition: interceptor_common.h:210
@ GRPC_OP_SEND_MESSAGE
Send a message: 0 or more of these operations can occur for each call.
Definition: grpc_types.h:273
void SetRecvStatus(Status *status)
Definition: interceptor_common.h:179
void SetInterceptionHookPoint(InterceptorBatchMethodsImpl *interceptor_methods)
Definition: call_op_set.h:637
void SetHijackingState() override
Definition: call_op_set.h:951
#define GRPC_WRITE_THROUGH
Force this message to be written to the socket before completing it.
Definition: grpc_types.h:191
grpc_metadata * trailing_metadata
Definition: grpc_types.h:343
void FinishOp(bool *)
Definition: call_op_set.h:798
A grpc_slice s, if initialized, represents the byte range s.bytes[0..s.length-1].
Definition: slice_type.h:63
std::string error_message() const
Return the instance's error message.
Definition: status.h:119
StatusCode
Definition: status_code_enum.h:26
Defines how to serialize and deserialize some type.
Definition: serialization_traits.h:58
void FinishOp(bool *status)
Definition: call_op_set.h:554
void AddOp(grpc_op *ops, size_t *nops)
Definition: call_op_set.h:436
grpc_op_type op
Operation type, as defined by grpc_op_type.
Definition: grpc_types.h:313
grpc_slice * status_details
Definition: grpc_types.h:374
DeserializeFuncType(R *message)
Definition: call_op_set.h:517
void SetRecvMessage(void *message, bool *hijacked_recv_message_failed)
Definition: interceptor_common.h:170
StatusCode error_code() const
Return the instance's error code.
Definition: status.h:117
Status Deserialize(ByteBuffer *buf) override
Definition: call_op_set.h:518
void set_output_tag(void *return_tag)
Definition: call_op_set.h:939
@ GRPC_OP_RECV_MESSAGE
Receive a message: 0 or more of these operations can occur for each call.
Definition: grpc_types.h:292
void AddOp(grpc_op *ops, size_t *nops)
Definition: call_op_set.h:628
Per-message write options.
Definition: call_op_set.h:80
void SetFinishInterceptionHookPoint(InterceptorBatchMethodsImpl *)
Definition: call_op_set.h:644
void SetFinishInterceptionHookPoint(InterceptorBatchMethodsImpl *)
Definition: call_op_set.h:212
struct grpc_op::grpc_op_data::grpc_op_send_status_from_server send_status_from_server
void SetInterceptionHookPoint(InterceptorBatchMethodsImpl *interceptor_methods)
Definition: call_op_set.h:694
void SetFinishInterceptionHookPoint(InterceptorBatchMethodsImpl *)
Definition: call_op_set.h:704
~DeserializeFuncType() override
Definition: call_op_set.h:522
GPRAPI grpc_slice grpc_slice_from_static_buffer(const void *source, size_t len)
Create a slice pointing to constant memory.
@ GRPC_OP_SEND_INITIAL_METADATA
Send initial metadata: one and only one instance MUST be sent for each call, unless the call was canc...
Definition: grpc_types.h:269
WriteOptions & clear_corked()
Definition: call_op_set.h:145
struct grpc_op::grpc_op_data::grpc_op_send_message send_message
void SetSendMessage(ByteBuffer *buf, const void **msg, bool *fail_send_message, std::function< Status(const void *)> serializer)
Definition: interceptor_common.h:144
grpc_call * call() const
Definition: call.h:70
CallOpSet & operator=(const CallOpSet &other)
Definition: call_op_set.h:883
struct grpc_op::grpc_op_data::grpc_op_recv_status_on_client recv_status_on_client
grpc_compression_level
Compression levels allow a party with knowledge of its peer's accepted encodings to request compressi...
Definition: compression_types.h:72
size_t trailing_metadata_count
Definition: grpc_types.h:342
bool FinalizeResult(void **tag, bool *status) override
Definition: call_op_set.h:909
Definition: call_op_set.h:771
WriteOptions & set_buffer_hint()
Sets flag indicating that the write may be buffered and need not go out on the wire immediately.
Definition: call_op_set.h:118
const GRPCAPI char * grpc_call_error_to_string(grpc_call_error error)
Convert grpc_call_error values to a string.
bool got_message
Definition: call_op_set.h:542
CallOpClientSendClose()
Definition: call_op_set.h:623
WriteOptions & clear_no_compression()
Clears flag for the disabling of compression for the next message write.
Definition: call_op_set.h:101
GPRAPI void grpc_slice_unref(grpc_slice s)
Decrement the ref count of s.
bool Valid() const
Is this ByteBuffer valid?
Definition: byte_buffer.h:159
void SetInterceptionHookPoint(InterceptorBatchMethodsImpl *interceptor_methods)
Definition: call_op_set.h:581
bool RunInterceptors()
Definition: interceptor_common.h:240
void Clear()
Clear all flags.
Definition: call_op_set.h:85
bool is_last_message() const
Get value for the flag indicating that this is the last message, and should be coalesced with trailin...
Definition: call_op_set.h:173
virtual Status Deserialize(ByteBuffer *buf)=0
Definition: call_op_set.h:426
void Release()
Forget underlying byte buffer without destroying Use this only for un-owned byte buffers.
Definition: byte_buffer.h:144
grpc_metadata * FillMetadataArray(const std::multimap< std::string, std::string > &metadata, size_t *metadata_count, const std::string &optional_error_details)
Definition: call_op_set.h:56
struct grpc_op::grpc_op_data::grpc_op_recv_initial_metadata recv_initial_metadata
grpc_slice * status_details
optional: set to NULL if no details need sending, non-NULL if they do pointer will not be retained pa...
Definition: grpc_types.h:348
void ClientSendClose()
Definition: call_op_set.h:625
@ GRPC_OP_RECV_STATUS_ON_CLIENT
Receive status on the client: one and only one must be made on the client.
Definition: grpc_types.h:298
void SetRecvTrailingMetadata(MetadataMap *map)
Definition: interceptor_common.h:181
void AllowNoMessage()
Definition: call_op_set.h:540
void SetSendInitialMetadata(std::multimap< std::string, std::string > *metadata)
Definition: interceptor_common.h:153
void FinishOp(bool *)
Definition: call_op_set.h:688
::absl::Status Status
Definition: config_protobuf.h:106
WriteOptions & set_no_compression()
Sets flag for the disabling of compression for the next message write.
Definition: call_op_set.h:93
void set_core_cq_tag(void *core_cq_tag)
set_core_cq_tag is used to provide a different core CQ tag than "this".
Definition: call_op_set.h:947
GRPCAPI grpc_call_error grpc_call_start_batch(grpc_call *call, const grpc_op *ops, size_t nops, void *tag, void *reserved)
Start a batch of operations defined in the array ops; when complete, post a completion of type 'tag' ...
void SetFinishInterceptionHookPoint(InterceptorBatchMethodsImpl *interceptor_methods)
Definition: call_op_set.h:353
Definition: interceptor_common.h:38
std::string error_details() const
Return the (binary) error details.
Definition: status.h:122
void SetSendTrailingMetadata(std::multimap< std::string, std::string > *metadata)
Definition: interceptor_common.h:165
void RecvMessage(R *message)
Definition: call_op_set.h:428
@ GRPC_OP_SEND_CLOSE_FROM_CLIENT
Send a close from the client: one and only one instance MUST be sent from the client,...
Definition: grpc_types.h:278
WriteOptions & clear_buffer_hint()
Clears flag indicating that the write may be buffered and need not go out on the wire immediately.
Definition: call_op_set.h:127
void AddInterceptionHookPoint(experimental::InterceptionHookPoints type)
Definition: interceptor_common.h:80
Default argument for CallOpSet.
Definition: call_op_set.h:206
void SetHijackingState(InterceptorBatchMethodsImpl *)
Definition: call_op_set.h:707
void AllowNoMessage()
Definition: call_op_set.h:431
grpc_slice SliceReferencingString(const std::string &str)
Definition: slice.h:132
void ContinueFinalizeResultAfterInterception() override
Definition: call_op_set.h:987
void SetInterceptionHookPoint(InterceptorBatchMethodsImpl *interceptor_methods)
Definition: call_op_set.h:344
@ PRE_RECV_INITIAL_METADATA
The following three are for hijacked clients only.