Go to the documentation of this file.
30 #include "absl/strings/string_view.h"
104 static void operator delete(
void* , std::size_t
size) {
116 static void operator delete(
void*,
void*) { assert(0); }
195 interceptor_methods_.SetCall(&
call_);
196 interceptor_methods_.SetReverse();
197 interceptor_methods_.SetCallOpSetInterface(
this);
207 bool do_unref =
false;
208 bool has_tag =
false;
209 bool call_cancel =
false;
213 if (done_intercepting_) {
231 call_cancel = (cancelled_ != 0);
241 if (call_cancel && callback_controller_ !=
nullptr) {
242 callback_controller_->MaybeCallOnCancel();
245 interceptor_methods_.AddInterceptionHookPoint(
247 if (interceptor_methods_.RunInterceptors()) {
249 bool has_tag = has_tag_;
315 if (callback_controller !=
nullptr) {
349 "Cancelled on the server side",
nullptr);
374 const char* algorithm_name =
nullptr;
400 const std::vector<std::string>& cost_data) {
402 for (
const auto& cost_datum : cost_data) {
struct census_context census_context
const struct census_context * census_context() const
Get the census context associated with this server call.
internal::InterceptorBatchMethodsImpl interceptor_methods_
GRPCAPI void * grpc_call_arena_alloc(grpc_call *call, size_t size)
gpr_free(creds_file_name)
grpc_core::RefCount refs_
void AddTrailingMetadata(const std::string &key, const std::string &value)
std::multimap< std::string, std::string > trailing_metadata_
GRPCAPI char * grpc_call_get_peer(grpc_call *call)
static grpc::internal::GrpcLibraryInitializer g_gli_initializer
grpc_compression_algorithm
std::atomic_bool marked_cancelled_
ServerContextBase()
Constructors for use by derived classes.
grpc::CompletionQueue * cq_
The base class of ServerCallbackUnary etc.
grpc_compression_algorithm compression_algorithm_
void BeginCompletionOp(grpc::internal::Call *call, std::function< void(bool)> callback, grpc::internal::ServerCallbackCall *callback_controller)
GPRAPI gpr_timespec gpr_inf_future(gpr_clock_type type)
CompletionOp(internal::Call *call, grpc::internal::ServerCallbackCall *callback_controller)
std::chrono::system_clock::time_point deadline() const
Return the deadline for the server call.
grpc::internal::MetadataMap client_metadata_
GRPCAPI void grpc_call_ref(grpc_call *call)
void AddInitialMetadata(const std::string &key, const std::string &value)
grpc_core::ScopedArenaPtr arena
union grpc_op::grpc_op_data data
void * async_notify_when_done_tag_
#define GRPC_LB_COST_MD_KEY
Instantiating this class ensures the proper initialization of gRPC.
constexpr absl::remove_reference_t< T > && move(T &&t) noexcept
void CreateCallMetricRecorder()
constexpr size_type size() const noexcept
static void * tag(intptr_t t)
GRPCAPI int grpc_compression_algorithm_name(grpc_compression_algorithm algorithm, const char **name)
std::atomic_bool default_reactor_used_
GRPCAPI void grpc_call_unref(grpc_call *call)
GPRAPI void gpr_log(const char *file, int line, gpr_log_severity severity, const char *format,...) GPR_PRINT_FORMAT_CHECK(4
bool CheckCancelledAsync()
struct grpc_call grpc_call
experimental::ServerRpcInfo * server_rpc_info() const
std::multimap< std::string, std::string > initial_metadata_
grpc::internal::CompletionQueueTag * GetCompletionOpTag()
Return the tag queued by BeginCompletionOp()
void swap(Json::Value &a, Json::Value &b)
Specialize std::swap() for Json::Value.
bool CheckCancelledNoPluck()
void ContinueFillOpsAfterInterception() override
static void callback(void *arg, int status, int timeouts, struct hostent *host)
grpc::internal::CallbackWithSuccessTag completion_tag_
void ContinueFinalizeResultAfterInterception() override
void set_core_cq_tag(void *core_cq_tag)
void SetHijackingState() override
void RunInterceptor(experimental::InterceptorBatchMethods *interceptor_methods, size_t pos)
void SetLoadReportingCosts(const std::vector< std::string > &cost_data)
Set the serialized load reporting costs in cost_data for the call.
grpc_core::Arena * grpc_call_get_arena(grpc_call *call)
Straightforward wrapping of the C call object.
grpc::experimental::ServerRpcInfo * rpc_info_
grpc::internal::ServerCallbackCall *const callback_controller_
struct grpc_op::grpc_op_data::grpc_op_recv_close_on_server recv_close_on_server
#define GRPC_COMPRESSION_REQUEST_ALGORITHM_MD_KEY
void Set(grpc_call *call, std::function< void(bool)> f, CompletionQueueTag *ops, bool can_inline)
bool has_notify_when_done_tag_
bool CheckCancelled(CompletionQueue *cq)
@ GRPC_OP_RECV_CLOSE_ON_SERVER
absl::string_view grpc_call_server_authority(const grpc_call *call)
void * core_cq_tag() override
void FillOps(internal::Call *call) override
bool FinalizeResult(void **tag, bool *status) override
experimental::CallMetricRecorder * call_metric_recorder_
grpc::string_ref ExperimentalGetAuthority() const
GRPCAPI struct census_context * grpc_census_call_get_context(grpc_call *call)
virtual ~ServerContextBase()
An interface allowing implementors to process and filter event tags.
CompletionOp * completion_op_
constexpr const_pointer data() const noexcept
GRPCAPI grpc_call_error grpc_call_start_batch(grpc_call *call, const grpc_op *ops, size_t nops, void *tag, void *reserved)
std::vector< std::unique_ptr< experimental::Interceptor > > interceptors_
CompletionOp & operator=(const CompletionOp &)=delete
GRPCAPI grpc_call_error grpc_call_cancel_with_status(grpc_call *call, grpc_status_code status, const char *description, void *reserved)
static grpc_completion_queue * cq
void BindDeadlineAndMetadata(gpr_timespec deadline, grpc_metadata_array *arr)
std::aligned_storage< sizeof(Reactor), alignof(Reactor)>::type default_reactor_
void set_compression_algorithm(grpc_compression_algorithm algorithm)
grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:01:17