server_context.cc
Go to the documentation of this file.
1 /*
2  *
3  * Copyright 2015 gRPC authors.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
19 #include <assert.h>
20 
21 #include <atomic>
22 #include <cstdlib>
23 #include <functional>
24 #include <map>
25 #include <new>
26 #include <string>
27 #include <utility>
28 #include <vector>
29 
30 #include "absl/strings/string_view.h"
31 
32 #include <grpc/compression.h>
33 #include <grpc/grpc.h>
37 #include <grpc/load_reporting.h>
38 #include <grpc/status.h>
39 #include <grpc/support/alloc.h>
40 #include <grpc/support/log.h>
41 #include <grpc/support/time.h>
44 #include <grpcpp/impl/call.h>
52 #include <grpcpp/server_context.h>
53 #include <grpcpp/support/config.h>
58 
63 
64 namespace grpc {
65 
67 
68 // CompletionOp
69 
72  public:
73  // initial refs: one in the server context, one in the cq
74  // must ref the call before calling constructor and after deleting this
76  grpc::internal::ServerCallbackCall* callback_controller)
77  : call_(*call),
78  callback_controller_(callback_controller),
79  has_tag_(false),
80  tag_(nullptr),
81  core_cq_tag_(this),
82  refs_(2),
84  cancelled_(0),
86 
87  // CompletionOp isn't copyable or movable
88  CompletionOp(const CompletionOp&) = delete;
89  CompletionOp& operator=(const CompletionOp&) = delete;
90  CompletionOp(CompletionOp&&) = delete;
91  CompletionOp& operator=(CompletionOp&&) = delete;
92 
93  ~CompletionOp() override {
94  if (call_.server_rpc_info()) {
96  }
97  }
98 
99  void FillOps(internal::Call* call) override;
100 
101  // This should always be arena allocated in the call, so override delete.
102  // But this class is not trivially destructible, so must actually call delete
103  // before allowing the arena to be freed
104  static void operator delete(void* /*ptr*/, std::size_t size) {
105  // Use size to avoid unused-parameter warning since assert seems to be
106  // compiled out and treated as unused in some gcc optimized versions.
107  (void)size;
108  assert(size == sizeof(CompletionOp));
109  }
110 
111  // This operator should never be called as the memory should be freed as part
112  // of the arena destruction. It only exists to provide a matching operator
113  // delete to the operator new so that some compilers will not complain (see
114  // https://github.com/grpc/grpc/issues/11301) Note at the time of adding this
115  // there are no tests catching the compiler warning.
116  static void operator delete(void*, void*) { assert(0); }
117 
118  bool FinalizeResult(void** tag, bool* status) override;
119 
121  cq->TryPluck(this);
122  return CheckCancelledNoPluck();
123  }
125 
126  void set_tag(void* tag) {
127  has_tag_ = true;
128  tag_ = tag;
129  }
130 
132 
133  void* core_cq_tag() override { return core_cq_tag_; }
134 
135  void Unref();
136 
137  // This will be called while interceptors are run if the RPC is a hijacked
138  // RPC. This should set hijacking state for each of the ops.
139  void SetHijackingState() override {
140  /* Servers don't allow hijacking */
141  GPR_ASSERT(false);
142  }
143 
144  /* Should be called after interceptors are done running */
146 
147  /* Should be called after interceptors are done running on the finalize result
148  * path */
150  done_intercepting_ = true;
151  if (!has_tag_) {
152  // We don't have a tag to return.
153  Unref();
154  // Unref can delete this, so do not access anything from this afterward.
155  return;
156  }
157  /* Start a phony op so that we can return the tag */
159  nullptr) == GRPC_CALL_OK);
160  }
161 
162  private:
164  grpc_core::MutexLock lock(&mu_);
165  return finalized_ ? (cancelled_ != 0) : false;
166  }
167 
170  bool has_tag_;
171  void* tag_;
176  int cancelled_; // This is an int (not bool) because it is passed to core
179 };
180 
182  if (refs_.Unref()) {
183  grpc_call* call = call_.call();
184  delete this;
186  }
187 }
188 
190  grpc_op ops;
192  ops.data.recv_close_on_server.cancelled = &cancelled_;
193  ops.flags = 0;
194  ops.reserved = nullptr;
195  interceptor_methods_.SetCall(&call_);
196  interceptor_methods_.SetReverse();
197  interceptor_methods_.SetCallOpSetInterface(this);
198  // The following call_start_batch is internally-generated so no need for an
199  // explanatory log on failure.
200  GPR_ASSERT(grpc_call_start_batch(call->call(), &ops, 1, core_cq_tag_,
201  nullptr) == GRPC_CALL_OK);
202  /* No interceptors to run here */
203 }
204 
206  // Decide whether to do the unref or call the cancel callback within the lock
207  bool do_unref = false;
208  bool has_tag = false;
209  bool call_cancel = false;
210 
211  {
212  grpc_core::MutexLock lock(&mu_);
213  if (done_intercepting_) {
214  // We are done intercepting.
215  has_tag = has_tag_;
216  if (has_tag) {
217  *tag = tag_;
218  }
219  // Release the lock before unreffing as Unref may delete this object
220  do_unref = true;
221  } else {
222  finalized_ = true;
223 
224  // If for some reason the incoming status is false, mark that as a
225  // cancellation.
226  // TODO(vjpai): does this ever happen?
227  if (!*status) {
228  cancelled_ = 1;
229  }
230 
231  call_cancel = (cancelled_ != 0);
232  // Release the lock since we may call a callback and interceptors.
233  }
234  }
235 
236  if (do_unref) {
237  Unref();
238  // Unref can delete this, so do not access anything from this afterward.
239  return has_tag;
240  }
241  if (call_cancel && callback_controller_ != nullptr) {
242  callback_controller_->MaybeCallOnCancel();
243  }
244  /* Add interception point and run through interceptors */
245  interceptor_methods_.AddInterceptionHookPoint(
247  if (interceptor_methods_.RunInterceptors()) {
248  // No interceptors were run
249  bool has_tag = has_tag_;
250  if (has_tag) {
251  *tag = tag_;
252  }
253  Unref();
254  // Unref can delete this, so do not access anything from this afterward.
255  return has_tag;
256  }
257  // There are interceptors to be run. Return false for now.
258  return false;
259 }
260 
261 // ServerContextBase body
262 
266 }
267 
269  grpc_metadata_array* arr)
270  : deadline_(deadline) {
271  std::swap(*client_metadata_.arr(), *arr);
272 }
273 
275  grpc_metadata_array* arr) {
277  std::swap(*client_metadata_.arr(), *arr);
278 }
279 
281  if (completion_op_) {
283  // Unref can delete completion_op_, so do not access it afterward.
284  }
285  if (rpc_info_) {
286  rpc_info_->Unref();
287  }
288  if (default_reactor_used_.load(std::memory_order_relaxed)) {
289  reinterpret_cast<Reactor*>(&default_reactor_)->~Reactor();
290  }
291  if (call_metric_recorder_ != nullptr) {
293  }
294 }
295 
297  if (call) {
298  // If the ServerContext is part of the call's arena, this could free the
299  // object itself.
301  }
302 }
303 
306  grpc::internal::ServerCallbackCall* callback_controller) {
308  if (rpc_info_) {
309  rpc_info_->Ref();
310  }
311  grpc_call_ref(call->call());
313  new (grpc_call_arena_alloc(call->call(), sizeof(CompletionOp)))
314  CompletionOp(call, callback_controller);
315  if (callback_controller != nullptr) {
317  true);
320  } else if (has_notify_when_done_tag_) {
322  }
323  call->PerformOps(completion_op_);
324 }
325 
327  return static_cast<internal::CompletionQueueTag*>(completion_op_);
328 }
329 
331  const std::string& value) {
332  initial_metadata_.insert(std::make_pair(key, value));
333 }
334 
336  const std::string& value) {
337  trailing_metadata_.insert(std::make_pair(key, value));
338 }
339 
342  if (rpc_info_) {
343  for (size_t i = 0; i < rpc_info_->interceptors_.size(); i++) {
344  rpc_info_->RunInterceptor(&cancel_methods, i);
345  }
346  }
349  "Cancelled on the server side", nullptr);
350  if (err != GRPC_CALL_OK) {
351  gpr_log(GPR_ERROR, "TryCancel failed with: %d", err);
352  }
353 }
354 
356  if (completion_tag_) {
357  // When using callback API, this result is always valid.
358  return marked_cancelled_.load(std::memory_order_acquire) ||
360  } else if (has_notify_when_done_tag_) {
361  // When using async API, the result is only valid
362  // if the tag has already been delivered at the completion queue
364  } else {
365  // when using sync API, the result is always valid
366  return marked_cancelled_.load(std::memory_order_acquire) ||
368  }
369 }
370 
372  grpc_compression_algorithm algorithm) {
373  compression_algorithm_ = algorithm;
374  const char* algorithm_name = nullptr;
375  if (!grpc_compression_algorithm_name(algorithm, &algorithm_name)) {
376  gpr_log(GPR_ERROR, "Name for compression algorithm '%d' unknown.",
377  algorithm);
378  abort();
379  }
380  GPR_ASSERT(algorithm_name != nullptr);
382 }
383 
386  if (call_.call) {
387  char* c_peer = grpc_call_get_peer(call_.call);
388  peer = c_peer;
389  gpr_free(c_peer);
390  }
391  return peer;
392 }
393 
395  return call_.call == nullptr ? nullptr
397 }
398 
400  const std::vector<std::string>& cost_data) {
401  if (call_.call == nullptr) return;
402  for (const auto& cost_datum : cost_data) {
404  }
405 }
406 
408  GPR_ASSERT(call_metric_recorder_ == nullptr);
411 }
412 
415  return grpc::string_ref(authority.data(), authority.size());
416 }
417 
418 } // namespace grpc
grpc::ServerContextBase::CompletionOp::mu_
grpc_core::Mutex mu_
Definition: server_context.cc:174
grpc::ServerContextBase::CompletionOp::finalized_
bool finalized_
Definition: server_context.cc:175
grpc::string_ref
Definition: grpcpp/impl/codegen/string_ref.h:43
grpc::ServerContextBase::CompletionOp::tag_
void * tag_
Definition: server_context.cc:171
census_context
struct census_context census_context
Definition: census.h:34
compression.h
grpc_op::flags
uint32_t flags
Definition: grpc_types.h:644
grpc::status
auto status
Definition: cpp/client/credentials_test.cc:200
load_reporting.h
grpc_call_error
grpc_call_error
Definition: grpc_types.h:464
grpc::ServerContextBase::census_context
const struct census_context * census_context() const
Get the census context associated with this server call.
Definition: server_context.cc:394
grpc::experimental::ServerRpcInfo::Unref
void Unref()
Definition: impl/codegen/server_interceptor.h:122
grpc::ServerContextBase::CompletionOp::cancelled_
int cancelled_
Definition: server_context.cc:176
log.h
grpc::ServerContextBase::CompletionOp::interceptor_methods_
internal::InterceptorBatchMethodsImpl interceptor_methods_
Definition: server_context.cc:178
grpc_call_arena_alloc
GRPCAPI void * grpc_call_arena_alloc(grpc_call *call, size_t size)
Definition: call.cc:1749
grpc::ServerContextBase::CompletionOp::set_tag
void set_tag(void *tag)
Definition: server_context.cc:126
interceptor.h
grpc::gpr_free
gpr_free(creds_file_name)
deadline_
Timestamp deadline_
Definition: channel_connectivity.cc:163
grpc::ServerContextBase::call_
CallWrapper call_
Definition: grpcpp/impl/codegen/server_context.h:463
grpc::ServerContextBase::CompletionOp::refs_
grpc_core::RefCount refs_
Definition: server_context.cc:173
grpc
Definition: grpcpp/alarm.h:33
grpc::ServerContextBase::CallWrapper::call
grpc_call * call
Definition: grpcpp/impl/codegen/server_context.h:456
grpc::ServerContextBase::CompletionOp::Unref
void Unref()
Definition: server_context.cc:181
interceptor_common.h
grpc::ServerContextBase::AddTrailingMetadata
void AddTrailingMetadata(const std::string &key, const std::string &value)
Definition: server_context.cc:335
false
#define false
Definition: setup_once.h:323
grpc::ServerContextBase::trailing_metadata_
std::multimap< std::string, std::string > trailing_metadata_
Definition: grpcpp/impl/codegen/server_context.h:476
grpc::internal::Call::call
grpc_call * call() const
Definition: include/grpcpp/impl/codegen/call.h:71
grpc::internal::GrpcLibraryInitializer::summon
int summon()
Definition: grpcpp/impl/grpc_library.h:54
grpc_call_get_peer
GRPCAPI char * grpc_call_get_peer(grpc_call *call)
Definition: call.cc:1774
grpc_metadata_array
Definition: grpc_types.h:579
grpc_core::MutexLock
Definition: src/core/lib/gprpp/sync.h:88
grpc::ServerContextBase::CompletionOp::call_
internal::Call call_
Definition: server_context.cc:168
grpc_op::reserved
void * reserved
Definition: grpc_types.h:646
grpc::g_gli_initializer
static grpc::internal::GrpcLibraryInitializer g_gli_initializer
Definition: channel_cc.cc:52
grpc_compression_algorithm
grpc_compression_algorithm
Definition: compression_types.h:60
grpc::internal::CallOpSetInterface
Definition: call_op_set_interface.h:36
absl::string_view
Definition: abseil-cpp/absl/strings/string_view.h:167
grpc::ServerContextBase::marked_cancelled_
std::atomic_bool marked_cancelled_
Definition: grpcpp/impl/codegen/server_context.h:545
grpc::ServerContextBase::ServerContextBase
ServerContextBase()
Constructors for use by derived classes.
Definition: server_context.cc:263
grpc::ServerContextBase::cq_
grpc::CompletionQueue * cq_
Definition: grpcpp/impl/codegen/server_context.h:471
grpc::ServerContextBase::IsCancelled
bool IsCancelled() const
Definition: server_context.cc:355
testing::internal::string
::std::string string
Definition: bloaty/third_party/protobuf/third_party/googletest/googletest/include/gtest/internal/gtest-port.h:881
grpc::ServerContextBase::peer
std::string peer() const
Definition: server_context.cc:384
error_ref_leak.err
err
Definition: error_ref_leak.py:35
grpc::internal::ServerCallbackCall
The base class of ServerCallbackUnary etc.
Definition: impl/codegen/server_callback.h:75
grpc::internal::InterceptorBatchMethodsImpl
Definition: interceptor_common.h:37
arena.h
GRPC_CALL_OK
@ GRPC_CALL_OK
Definition: grpc_types.h:466
grpc::ServerContextBase::compression_algorithm_
grpc_compression_algorithm compression_algorithm_
Definition: grpcpp/impl/codegen/server_context.h:480
grpc::ServerContextBase::BeginCompletionOp
void BeginCompletionOp(grpc::internal::Call *call, std::function< void(bool)> callback, grpc::internal::ServerCallbackCall *callback_controller)
Definition: server_context.cc:304
gpr_inf_future
GPRAPI gpr_timespec gpr_inf_future(gpr_clock_type type)
Definition: src/core/lib/gpr/time.cc:55
GRPC_STATUS_CANCELLED
@ GRPC_STATUS_CANCELLED
Definition: include/grpc/impl/codegen/status.h:33
time.h
grpc::ServerContextBase::CompletionOp::CompletionOp
CompletionOp(internal::Call *call, grpc::internal::ServerCallbackCall *callback_controller)
Definition: server_context.cc:75
grpc::ServerContextBase::deadline
std::chrono::system_clock::time_point deadline() const
Return the deadline for the server call.
Definition: grpcpp/impl/codegen/server_context.h:131
grpc::ServerContextBase::client_metadata_
grpc::internal::MetadataMap client_metadata_
Definition: grpcpp/impl/codegen/server_context.h:474
grpc::internal::MetadataMap::arr
grpc_metadata_array * arr()
Definition: grpcpp/impl/codegen/metadata_map.h:72
grpc::internal::CancelInterceptorBatchMethods
Definition: interceptor_common.h:411
grpc_call_ref
GRPCAPI void grpc_call_ref(grpc_call *call)
Definition: call.cc:1768
grpc::ServerContextBase::AddInitialMetadata
void AddInitialMetadata(const std::string &key, const std::string &value)
Definition: server_context.cc:330
grpc_core::Arena
Definition: src/core/lib/resource_quota/arena.h:45
grpc::ServerContextBase::CallWrapper::~CallWrapper
~CallWrapper()
Definition: server_context.cc:296
metadata_map.h
mu_
Mutex mu_
Definition: oob_backend_metric.cc:115
arena
grpc_core::ScopedArenaPtr arena
Definition: binder_transport_test.cc:237
call
FilterStackCall * call
Definition: call.cc:750
grpc_op::data
union grpc_op::grpc_op_data data
status.h
grpc_types.h
grpc::ServerContextBase::async_notify_when_done_tag_
void * async_notify_when_done_tag_
Definition: grpcpp/impl/codegen/server_context.h:467
GRPC_LB_COST_MD_KEY
#define GRPC_LB_COST_MD_KEY
Definition: load_reporting.h:42
grpc::internal::GrpcLibraryInitializer
Instantiating this class ensures the proper initialization of gRPC.
Definition: grpcpp/impl/grpc_library.h:39
grpc::ServerContextBase::CompletionOp::done_intercepting_
bool done_intercepting_
Definition: server_context.cc:177
grpc::experimental::ServerRpcInfo::Ref
void Ref()
Definition: impl/codegen/server_interceptor.h:121
grpc::ServerContextBase::CompletionOp::has_tag_
bool has_tag_
Definition: server_context.cc:170
absl::move
constexpr absl::remove_reference_t< T > && move(T &&t) noexcept
Definition: abseil-cpp/absl/utility/utility.h:221
GPR_ASSERT
#define GPR_ASSERT(x)
Definition: include/grpc/impl/codegen/log.h:94
grpc::ServerContextBase::CreateCallMetricRecorder
void CreateCallMetricRecorder()
Definition: server_context.cc:407
absl::string_view::size
constexpr size_type size() const noexcept
Definition: abseil-cpp/absl/strings/string_view.h:277
tag
static void * tag(intptr_t t)
Definition: bad_client.cc:318
grpc_compression_algorithm_name
GRPCAPI int grpc_compression_algorithm_name(grpc_compression_algorithm algorithm, const char **name)
Definition: compression.cc:56
grpc::ServerContextBase::default_reactor_used_
std::atomic_bool default_reactor_used_
Definition: grpcpp/impl/codegen/server_context.h:543
grpc_call_unref
GRPCAPI void grpc_call_unref(grpc_call *call)
Definition: call.cc:1770
gpr_log
GPRAPI void gpr_log(const char *file, int line, gpr_log_severity severity, const char *format,...) GPR_PRINT_FORMAT_CHECK(4
grpc::ServerContextBase::CompletionOp::CheckCancelledAsync
bool CheckCancelledAsync()
Definition: server_context.cc:124
grpc.h
grpc_call
struct grpc_call grpc_call
Definition: grpc_types.h:70
grpc::internal::Call::server_rpc_info
experimental::ServerRpcInfo * server_rpc_info() const
Definition: include/grpcpp/impl/codegen/call.h:80
grpc::ServerContextBase::initial_metadata_
std::multimap< std::string, std::string > initial_metadata_
Definition: grpcpp/impl/codegen/server_context.h:475
completion_queue.h
grpc::ServerContextBase::CompletionOp
Definition: server_context.cc:70
grpc_core::RefCount::Unref
bool Unref()
Definition: ref_counted.h:152
grpc_op
Definition: grpc_types.h:640
completion_queue_tag.h
grpc::ServerContextBase::GetCompletionOpTag
grpc::internal::CompletionQueueTag * GetCompletionOpTag()
Return the tag queued by BeginCompletionOp()
Definition: server_context.cc:326
grpc::ServerContextBase::CompletionOp::core_cq_tag_
void * core_cq_tag_
Definition: server_context.cc:172
std::swap
void swap(Json::Value &a, Json::Value &b)
Specialize std::swap() for Json::Value.
Definition: third_party/bloaty/third_party/protobuf/conformance/third_party/jsoncpp/json.h:1226
grpc::ServerContextBase::CompletionOp::CheckCancelledNoPluck
bool CheckCancelledNoPluck()
Definition: server_context.cc:163
grpc::ServerContextBase::deadline_
gpr_timespec deadline_
Definition: grpcpp/impl/codegen/server_context.h:470
grpc::experimental::CallMetricRecorder::~CallMetricRecorder
~CallMetricRecorder()
Definition: call_metric_recorder.cc:43
grpc::ServerContextBase::CompletionOp::ContinueFillOpsAfterInterception
void ContinueFillOpsAfterInterception() override
Definition: server_context.cc:145
callback
static void callback(void *arg, int status, int timeouts, struct hostent *host)
Definition: acountry.c:224
grpc::ServerContextBase::completion_tag_
grpc::internal::CallbackWithSuccessTag completion_tag_
Definition: grpcpp/impl/codegen/server_context.h:468
grpc::ServerContextBase::CompletionOp::ContinueFinalizeResultAfterInterception
void ContinueFinalizeResultAfterInterception() override
Definition: server_context.cc:149
GPR_ERROR
#define GPR_ERROR
Definition: include/grpc/impl/codegen/log.h:57
grpc::ServerContextBase::CompletionOp::set_core_cq_tag
void set_core_cq_tag(void *core_cq_tag)
Definition: server_context.cc:131
call_metric_recorder.h
grpc::ServerContextBase::CompletionOp::SetHijackingState
void SetHijackingState() override
Definition: server_context.cc:139
grpc::experimental::ServerRpcInfo::RunInterceptor
void RunInterceptor(experimental::InterceptorBatchMethods *interceptor_methods, size_t pos)
Definition: impl/codegen/server_interceptor.h:102
grpc::experimental::CallMetricRecorder
Definition: call_metric_recorder.h:52
grpc::ServerContextBase::SetLoadReportingCosts
void SetLoadReportingCosts(const std::vector< std::string > &cost_data)
Set the serialized load reporting costs in cost_data for the call.
Definition: server_context.cc:399
call_op_set_interface.h
config.h
grpc_call_get_arena
grpc_core::Arena * grpc_call_get_arena(grpc_call *call)
Definition: call.cc:1823
grpc::internal::Call
Straightforward wrapping of the C call object.
Definition: include/grpcpp/impl/codegen/call.h:37
grpc::ServerContextBase::rpc_info_
grpc::experimental::ServerRpcInfo * rpc_info_
Definition: grpcpp/impl/codegen/server_context.h:487
grpc::ServerContextBase::CompletionOp::callback_controller_
grpc::internal::ServerCallbackCall *const callback_controller_
Definition: server_context.cc:169
grpc::ServerContextBase::Reactor
Definition: grpcpp/impl/codegen/server_context.h:492
grpc_op::op
grpc_op_type op
Definition: grpc_types.h:642
server_interceptor.h
gpr_types.h
grpc::ServerContextBase::CompletionOp::~CompletionOp
~CompletionOp() override
Definition: server_context.cc:93
compression_types.h
server_callback.h
value
const char * value
Definition: hpack_parser_table.cc:165
grpc_op::grpc_op_data::recv_close_on_server
struct grpc_op::grpc_op_data::grpc_op_recv_close_on_server recv_close_on_server
grpc_core::Mutex
Definition: src/core/lib/gprpp/sync.h:61
callback_common.h
call.h
key
const char * key
Definition: hpack_parser_table.cc:164
GRPC_COMPRESSION_REQUEST_ALGORITHM_MD_KEY
#define GRPC_COMPRESSION_REQUEST_ALGORITHM_MD_KEY
Definition: compression_types.h:33
grpc_library.h
ref_counted.h
grpc::internal::CallbackWithSuccessTag::Set
void Set(grpc_call *call, std::function< void(bool)> f, CompletionQueueTag *ops, bool can_inline)
Definition: callback_common.h:164
grpc::ServerContextBase::has_notify_when_done_tag_
bool has_notify_when_done_tag_
Definition: grpcpp/impl/codegen/server_context.h:466
alloc.h
grpc::ServerContextBase::TryCancel
void TryCancel() const
Definition: server_context.cc:340
server_context.h
call_op_set.h
grpc::ServerContextBase::CompletionOp::CheckCancelled
bool CheckCancelled(CompletionQueue *cq)
Definition: server_context.cc:120
grpc::experimental::InterceptionHookPoints::POST_RECV_CLOSE
@ POST_RECV_CLOSE
GRPC_OP_RECV_CLOSE_ON_SERVER
@ GRPC_OP_RECV_CLOSE_ON_SERVER
Definition: grpc_types.h:633
grpc_call_server_authority
absl::string_view grpc_call_server_authority(const grpc_call *call)
Definition: call.cc:1880
grpc::ServerContextBase::CompletionOp::core_cq_tag
void * core_cq_tag() override
Definition: server_context.cc:133
grpc::ServerContextBase::CompletionOp::FillOps
void FillOps(internal::Call *call) override
Definition: server_context.cc:189
grpc::ServerContextBase::CompletionOp::FinalizeResult
bool FinalizeResult(void **tag, bool *status) override
Definition: server_context.cc:205
tag_
void * tag_
Definition: channel_connectivity.cc:211
grpc::ServerContextBase::call_metric_recorder_
experimental::CallMetricRecorder * call_metric_recorder_
Definition: grpcpp/impl/codegen/server_context.h:490
grpc::ServerContextBase::ExperimentalGetAuthority
grpc::string_ref ExperimentalGetAuthority() const
Definition: server_context.cc:413
grpc_census_call_get_context
GRPCAPI struct census_context * grpc_census_call_get_context(grpc_call *call)
Definition: grpc_context.cc:38
grpc::ServerContextBase::~ServerContextBase
virtual ~ServerContextBase()
Definition: server_context.cc:280
grpc::CompletionQueue
Definition: include/grpcpp/impl/codegen/completion_queue.h:104
gpr_timespec
Definition: gpr_types.h:50
grpc::internal::CompletionQueueTag
An interface allowing implementors to process and filter event tags.
Definition: grpcpp/impl/codegen/completion_queue_tag.h:28
function
std::function< bool(GrpcTool *, int, const char **, const CliCredentials &, GrpcToolOutputCallback)> function
Definition: grpc_tool.cc:250
size
voidpf void uLong size
Definition: bloaty/third_party/zlib/contrib/minizip/ioapi.h:136
GPR_CLOCK_REALTIME
@ GPR_CLOCK_REALTIME
Definition: gpr_types.h:39
grpc::ServerContextBase::completion_op_
CompletionOp * completion_op_
Definition: grpcpp/impl/codegen/server_context.h:465
absl::string_view::data
constexpr const_pointer data() const noexcept
Definition: abseil-cpp/absl/strings/string_view.h:336
grpc_core::RefCount
Definition: ref_counted.h:44
ops
static grpc_op ops[6]
Definition: test/core/fling/client.cc:39
grpc_call_start_batch
GRPCAPI grpc_call_error grpc_call_start_batch(grpc_call *call, const grpc_op *ops, size_t nops, void *tag, void *reserved)
Definition: call.cc:1831
grpc::experimental::ServerRpcInfo::interceptors_
std::vector< std::unique_ptr< experimental::Interceptor > > interceptors_
Definition: impl/codegen/server_interceptor.h:132
grpc::ServerContextBase::CompletionOp::operator=
CompletionOp & operator=(const CompletionOp &)=delete
grpc_call_cancel_with_status
GRPCAPI grpc_call_error grpc_call_cancel_with_status(grpc_call *call, grpc_status_code status, const char *description, void *reserved)
Definition: call.cc:1791
grpc_op::grpc_op_data::grpc_op_recv_close_on_server::cancelled
int * cancelled
Definition: grpc_types.h:714
cq
static grpc_completion_queue * cq
Definition: test/core/fling/client.cc:37
sync.h
call.h
string_ref.h
i
uint64_t i
Definition: abseil-cpp/absl/container/btree_benchmark.cc:230
grpc::ServerContextBase::BindDeadlineAndMetadata
void BindDeadlineAndMetadata(gpr_timespec deadline, grpc_metadata_array *arr)
Definition: server_context.cc:274
grpc::ServerContextBase::default_reactor_
std::aligned_storage< sizeof(Reactor), alignof(Reactor)>::type default_reactor_
Definition: grpcpp/impl/codegen/server_context.h:542
grpc::ServerContextBase::set_compression_algorithm
void set_compression_algorithm(grpc_compression_algorithm algorithm)
Definition: server_context.cc:371


grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:01:17