GRPC C++  1.66.0
grpc.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright 2015-2016 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 #ifndef GRPC_GRPC_H
20 #define GRPC_GRPC_H
21 
22 #include <stddef.h>
23 
24 #include <grpc/byte_buffer.h>
25 #include <grpc/impl/connectivity_state.h> // IWYU pragma: export
26 #include <grpc/impl/grpc_types.h> // IWYU pragma: export
28 #include <grpc/slice.h>
29 #include <grpc/status.h>
31 #include <grpc/support/time.h>
32 
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
46 
49 
58 GRPCAPI void grpc_init(void);
59 
70 GRPCAPI void grpc_shutdown(void);
71 
77 
80 
82 GRPCAPI const char* grpc_version_string(void);
83 
85 GRPCAPI const char* grpc_g_stands_for(void);
86 
91  const grpc_completion_queue_attributes* attributes);
92 
96  void* reserved);
97 
101  void* reserved);
102 
107  grpc_completion_queue_functor* shutdown_callback, void* reserved);
108 
111  const grpc_completion_queue_factory* factory,
112  const grpc_completion_queue_attributes* attributes, void* reserved);
113 
123  gpr_timespec deadline,
124  void* reserved);
125 
138  void* tag, gpr_timespec deadline,
139  void* reserved);
140 
143 #define GRPC_MAX_COMPLETION_QUEUE_PLUCKERS 6
144 
153 
157 
158 /*********** EXPERIMENTAL API ************/
165 
166 /*********** EXPERIMENTAL API ************/
173  grpc_completion_queue* cq, void** tag, int* ok);
174 
177  grpc_channel* channel, int try_to_connect);
178 
185  grpc_channel* channel, grpc_connectivity_state last_observed_state,
186  gpr_timespec deadline, grpc_completion_queue* cq, void* tag);
187 
190 
199  grpc_channel* channel, grpc_call* parent_call, uint32_t propagation_mask,
200  grpc_completion_queue* completion_queue, grpc_slice method,
201  const grpc_slice* host, gpr_timespec deadline, void* reserved);
202 
207  const char* method, const char* host,
208  void* reserved);
209 
213  grpc_channel* channel, grpc_call* parent_call, uint32_t propagation_mask,
214  grpc_completion_queue* completion_queue, void* registered_call_handle,
215  gpr_timespec deadline, void* reserved);
216 
219 GRPCAPI void* grpc_call_arena_alloc(grpc_call* call, size_t size);
220 
242  const grpc_op* ops, size_t nops,
243  void* tag, void* reserved);
244 
254 
255 struct census_context;
256 
260  struct census_context* context);
261 
264 
268 
274  const grpc_channel_info* channel_info);
275 
280 
288 
293 
300 
305 
313 GRPCAPI grpc_channel* grpc_channel_create(const char* target,
315  const grpc_channel_args* args);
316 
319  const char* target, grpc_status_code error_code, const char* error_message);
320 
323 
335 GRPCAPI grpc_call_error grpc_call_cancel(grpc_call* call, void* reserved);
336 
348  grpc_status_code status,
349  const char* description,
350  void* reserved);
351 
352 /* Returns whether or not the call's receive message operation failed because of
353  * an error (as opposed to a graceful end-of-stream) */
355 
358 GRPCAPI void grpc_call_ref(grpc_call* call);
359 
362 GRPCAPI void grpc_call_unref(grpc_call* call);
363 
365 
369  grpc_call_credentials* creds);
370 
380  grpc_server* server, grpc_call** call, grpc_call_details* details,
381  grpc_metadata_array* request_metadata,
382  grpc_completion_queue* cq_bound_to_call,
383  grpc_completion_queue* cq_for_notification, void* tag_new);
384 
386 typedef enum {
392 
401  grpc_server* server, const char* method, const char* host,
403  uint32_t flags);
404 
409  grpc_server* server, void* registered_method, grpc_call** call,
410  gpr_timespec* deadline, grpc_metadata_array* request_metadata,
411  grpc_byte_buffer** optional_payload,
412  grpc_completion_queue* cq_bound_to_call,
413  grpc_completion_queue* cq_for_notification, void* tag_new);
414 
423  void* reserved);
424 
431  void* reserved);
432 
433 // More members might be added in later, so users should take care to memset
434 // this to 0 before using it.
435 typedef struct {
437  const char* error_message;
439 
440 // There might be more methods added later, so users should take care to memset
441 // this to 0 before using it.
442 typedef struct {
443  void (*on_serving_status_update)(void* user_data, const char* uri,
445  void* user_data;
447 
449 
452  grpc_server_xds_status_notifier notifier, const grpc_channel_args* args);
453 
456  grpc_server_config_fetcher* config_fetcher);
457 
461  grpc_server* server, grpc_server_config_fetcher* config_fetcher);
462 
466 GRPCAPI int grpc_server_add_http2_port(grpc_server* server, const char* addr,
467  grpc_server_credentials* creds);
468 
471 
481  void* tag);
482 
486 
492 
501 GRPCAPI int grpc_tracer_set_enabled(const char* name, int enabled);
502 
505 
509 
512 
515 
518 
521 
524 
527  size_t new_size);
528 
531  grpc_resource_quota* resource_quota, int new_max_threads);
532 
536 
540 
541 /************* CHANNELZ API *************/
555 /* Gets all root channels (i.e. channels the application has directly
556  created). This does not include subchannels nor non-top level channels.
557  The returned string is allocated and must be freed by the application. */
558 GRPCAPI char* grpc_channelz_get_top_channels(intptr_t start_channel_id);
559 
560 /* Gets all servers that exist in the process. */
561 GRPCAPI char* grpc_channelz_get_servers(intptr_t start_server_id);
562 
563 /* Returns a single Server, or else a NOT_FOUND code. */
564 GRPCAPI char* grpc_channelz_get_server(intptr_t server_id);
565 
566 /* Gets all server sockets that exist in the server. */
567 GRPCAPI char* grpc_channelz_get_server_sockets(intptr_t server_id,
568  intptr_t start_socket_id,
569  intptr_t max_results);
570 
571 /* Returns a single Channel, or else a NOT_FOUND code. The returned string
572  is allocated and must be freed by the application. */
573 GRPCAPI char* grpc_channelz_get_channel(intptr_t channel_id);
574 
575 /* Returns a single Subchannel, or else a NOT_FOUND code. The returned string
576  is allocated and must be freed by the application. */
577 GRPCAPI char* grpc_channelz_get_subchannel(intptr_t subchannel_id);
578 
579 /* Returns a single Socket, or else a NOT_FOUND code. The returned string
580  is allocated and must be freed by the application. */
581 GRPCAPI char* grpc_channelz_get_socket(intptr_t socket_id);
582 
590 
591 #ifdef __cplusplus
592 }
593 #endif
594 
595 #endif /* GRPC_GRPC_H */
grpc_channelz_get_top_channels
GRPCAPI char * grpc_channelz_get_top_channels(intptr_t start_channel_id)
Channelz is under active development.
census_context
struct census_context census_context
A Census Context is a handle used by Census to represent the current tracing and stats collection inf...
Definition: census.h:33
GRPC_SRM_PAYLOAD_NONE
@ GRPC_SRM_PAYLOAD_NONE
Don't try to read the payload.
Definition: grpc.h:388
grpc_channel_support_connectivity_watcher
GRPCAPI int grpc_channel_support_connectivity_watcher(grpc_channel *channel)
Check whether a grpc channel supports connectivity watcher.
grpc_call_error
grpc_call_error
Result of a grpc call.
Definition: grpc_types.h:140
grpc_call_cancel
GRPCAPI grpc_call_error grpc_call_cancel(grpc_call *call, void *reserved)
Error handling for grpc_call Most grpc_call functions return a grpc_error.
grpc_call_details_destroy
GRPCAPI void grpc_call_details_destroy(grpc_call_details *details)
grpc_call_details_init
GRPCAPI void grpc_call_details_init(grpc_call_details *details)
grpc_call_arena_alloc
GRPCAPI void * grpc_call_arena_alloc(grpc_call *call, size_t size)
Allocate memory in the grpc_call arena: this memory is automatically discarded at call completion.
grpc_channel_get_info
GRPCAPI void grpc_channel_get_info(grpc_channel *channel, const grpc_channel_info *channel_info)
Request info about the channel.
grpc_completion_queue_create_for_callback
GRPCAPI grpc_completion_queue * grpc_completion_queue_create_for_callback(grpc_completion_queue_functor *shutdown_callback, void *reserved)
Helper function to create a completion queue with grpc_cq_completion_type of GRPC_CQ_CALLBACK and grp...
grpc_call_set_credentials
GRPCAPI grpc_call_error grpc_call_set_credentials(grpc_call *call, grpc_call_credentials *creds)
Sets a credentials to a call.
grpc_completion_queue_create_for_pluck
GRPCAPI grpc_completion_queue * grpc_completion_queue_create_for_pluck(void *reserved)
Helper function to create a completion queue with grpc_cq_completion_type of GRPC_CQ_PLUCK and grpc_c...
grpc_resource_quota
struct grpc_resource_quota grpc_resource_quota
Definition: grpc_types.h:400
grpc_channel_reset_connect_backoff
GRPCAPI void grpc_channel_reset_connect_backoff(grpc_channel *channel)
EXPERIMENTAL.
grpc_shutdown_blocking
GRPCAPI void grpc_shutdown_blocking(void)
DEPRECATED.
grpc_status_code
grpc_status_code
Definition: status.h:28
grpc_call_failed_before_recv_message
GRPCAPI int grpc_call_failed_before_recv_message(const grpc_call *c)
grpc_census_call_set_context
GRPCAPI void grpc_census_call_set_context(grpc_call *call, struct census_context *context)
Set census context for a call; Must be called before first call to grpc_call_start_batch().
grpc_header_key_is_legal
GRPCAPI int grpc_header_key_is_legal(grpc_slice slice)
Check whether a metadata key is legal (will be accepted by core)
GRPCAPI
#define GRPCAPI
Definition: port_platform.h:725
grpc_call_get_peer
GRPCAPI char * grpc_call_get_peer(grpc_call *call)
Returns a newly allocated string representing the endpoint to which this call is communicating with.
grpc_metadata_array
Definition: grpc_types.h:252
grpc_call_details
Definition: grpc_types.h:258
grpc_channelz_get_server
GRPCAPI char * grpc_channelz_get_server(intptr_t server_id)
grpc_channel_check_connectivity_state
GRPCAPI grpc_connectivity_state grpc_channel_check_connectivity_state(grpc_channel *channel, int try_to_connect)
Check the connectivity state of a channel.
grpc_lame_client_channel_create
GRPCAPI grpc_channel * grpc_lame_client_channel_create(const char *target, grpc_status_code error_code, const char *error_message)
Create a lame client: this client fails every operation attempted on it.
grpc_completion_queue_thread_local_cache_flush
GRPCAPI int grpc_completion_queue_thread_local_cache_flush(grpc_completion_queue *cq, void **tag, int *ok)
Flushes the thread local cache for cq.
grpc_server_config_fetcher_destroy
GRPCAPI void grpc_server_config_fetcher_destroy(grpc_server_config_fetcher *config_fetcher)
EXPERIMENTAL.
propagation_bits.h
grpc_server_create
GRPCAPI grpc_server * grpc_server_create(const grpc_channel_args *args, void *reserved)
Create a server.
grpc_channel_get_target
GRPCAPI char * grpc_channel_get_target(grpc_channel *channel)
Return a newly allocated string representing the target a channel was created for.
grpc_server_register_completion_queue
GRPCAPI void grpc_server_register_completion_queue(grpc_server *server, grpc_completion_queue *cq, void *reserved)
Register a completion queue with the server.
grpc_resource_quota_create
GRPCAPI grpc_resource_quota * grpc_resource_quota_create(const char *trace_name)
Create a buffer pool.
grpc_server_request_registered_call
GRPCAPI grpc_call_error grpc_server_request_registered_call(grpc_server *server, void *registered_method, grpc_call **call, gpr_timespec *deadline, grpc_metadata_array *request_metadata, grpc_byte_buffer **optional_payload, grpc_completion_queue *cq_bound_to_call, grpc_completion_queue *cq_for_notification, void *tag_new)
Request notification of a new pre-registered call.
grpc_server_config_fetcher
struct grpc_server_config_fetcher grpc_server_config_fetcher
Definition: grpc.h:448
grpc_call_ref
GRPCAPI void grpc_call_ref(grpc_call *call)
Ref a call.
grpc_completion_queue_create
GRPCAPI grpc_completion_queue * grpc_completion_queue_create(const grpc_completion_queue_factory *factory, const grpc_completion_queue_attributes *attributes, void *reserved)
Create a completion queue.
grpc_arg_pointer_vtable
Definition: grpc_types.h:84
grpc_channel_args
An array of arguments that can be passed around.
Definition: grpc_types.h:131
grpc_server_register_method_payload_handling
grpc_server_register_method_payload_handling
How to handle payloads for a registered method.
Definition: grpc.h:386
grpc_channelz_get_servers
GRPCAPI char * grpc_channelz_get_servers(intptr_t start_server_id)
grpc_authorization_policy_provider_arg_vtable
const GRPCAPI grpc_arg_pointer_vtable * grpc_authorization_policy_provider_arg_vtable(void)
EXPERIMENTAL - Subject to change.
grpc_serving_status_update::error_message
const char * error_message
Definition: grpc.h:437
grpc_channel_register_call
GRPCAPI void * grpc_channel_register_call(grpc_channel *channel, const char *method, const char *host, void *reserved)
Pre-register a method/host pair on a channel.
grpc_types.h
grpc_header_nonbin_value_is_legal
GRPCAPI int grpc_header_nonbin_value_is_legal(grpc_slice slice)
Check whether a non-binary metadata value is legal (will be accepted by core)
status.h
grpc_metadata_array_destroy
GRPCAPI void grpc_metadata_array_destroy(grpc_metadata_array *array)
grpc_completion_queue_thread_local_cache_init
GRPCAPI void grpc_completion_queue_thread_local_cache_init(grpc_completion_queue *cq)
Initializes a thread local cache for cq.
grpc_server_request_call
GRPCAPI grpc_call_error grpc_server_request_call(grpc_server *server, grpc_call **call, grpc_call_details *details, grpc_metadata_array *request_metadata, grpc_completion_queue *cq_bound_to_call, grpc_completion_queue *cq_for_notification, void *tag_new)
Request notification of a new call.
grpc_version_string
const GRPCAPI char * grpc_version_string(void)
Return a string representing the current version of grpc.
grpc_channelz_get_socket
GRPCAPI char * grpc_channelz_get_socket(intptr_t socket_id)
grpc_channel_credentials
struct grpc_channel_credentials grpc_channel_credentials
— grpc_channel_credentials object.
Definition: grpc.h:287
grpc_resource_quota_set_max_threads
GRPCAPI void grpc_resource_quota_set_max_threads(grpc_resource_quota *resource_quota, int new_max_threads)
Update the size of the maximum number of threads allowed.
grpc_server_config_fetcher_xds_create
GRPCAPI grpc_server_config_fetcher * grpc_server_config_fetcher_xds_create(grpc_server_xds_status_notifier notifier, const grpc_channel_args *args)
EXPERIMENTAL.
grpc_server_credentials_release
GRPCAPI void grpc_server_credentials_release(grpc_server_credentials *creds)
Releases a server_credentials object.
grpc_resource_quota_arg_vtable
const GRPCAPI grpc_arg_pointer_vtable * grpc_resource_quota_arg_vtable(void)
Fetch a vtable for a grpc_channel_arg that points to a grpc_resource_quota.
grpc_server_add_http2_port
GRPCAPI int grpc_server_add_http2_port(grpc_server *server, const char *addr, grpc_server_credentials *creds)
Add a HTTP2 over an encrypted link over tcp listener.
grpc_completion_queue_factory_lookup
const GRPCAPI grpc_completion_queue_factory * grpc_completion_queue_factory_lookup(const grpc_completion_queue_attributes *attributes)
Returns the completion queue factory based on the attributes.
grpc_call_unref
GRPCAPI void grpc_call_unref(grpc_call *call)
Unref a call.
grpc_event
The result of an operation.
Definition: grpc_types.h:237
grpc_connectivity_state
grpc_connectivity_state
Connectivity state of a channel.
Definition: connectivity_state.h:30
grpc_serving_status_update
Definition: grpc.h:435
grpc_call
struct grpc_call grpc_call
A Call represents an RPC.
Definition: grpc_types.h:69
grpc_byte_buffer
Definition: grpc_types.h:42
connectivity_state.h
grpc_call_credentials
struct grpc_call_credentials grpc_call_credentials
— grpc_call_credentials object —
Definition: credentials.h:38
grpc_channelz_get_subchannel
GRPCAPI char * grpc_channelz_get_subchannel(intptr_t subchannel_id)
grpc_op
Operation data: one field for each op type (except SEND_CLOSE_FROM_CLIENT which has no arguments)
Definition: grpc_types.h:311
grpc_slice
A grpc_slice s, if initialized, represents the byte range s.bytes[0..s.length-1].
Definition: slice_type.h:63
grpc_server
struct grpc_server grpc_server
A server listens to some port and responds to request calls.
Definition: grpc_types.h:64
grpc_server_destroy
GRPCAPI void grpc_server_destroy(grpc_server *server)
Destroy a server.
grpc_completion_queue_attributes
Definition: grpc_types.h:462
grpc_server_cancel_all_calls
GRPCAPI void grpc_server_cancel_all_calls(grpc_server *server)
Cancel all in-progress calls.
grpc_channel_create_registered_call
GRPCAPI grpc_call * grpc_channel_create_registered_call(grpc_channel *channel, grpc_call *parent_call, uint32_t propagation_mask, grpc_completion_queue *completion_queue, void *registered_call_handle, gpr_timespec deadline, void *reserved)
Create a call given a handle returned from grpc_channel_register_call.
grpc_channel_credentials_release
GRPCAPI void grpc_channel_credentials_release(grpc_channel_credentials *creds)
Releases a channel credentials object.
grpc_completion_queue_factory
struct grpc_completion_queue_factory grpc_completion_queue_factory
The completion queue factory structure is opaque to the callers of grpc.
Definition: grpc_types.h:482
grpc_channel_create_call
GRPCAPI grpc_call * grpc_channel_create_call(grpc_channel *channel, grpc_call *parent_call, uint32_t propagation_mask, grpc_completion_queue *completion_queue, grpc_slice method, const grpc_slice *host, gpr_timespec deadline, void *reserved)
Create a call given a grpc_channel, in order to call 'method'.
byte_buffer.h
grpc_channelz_get_channel
GRPCAPI char * grpc_channelz_get_channel(intptr_t channel_id)
grpc_completion_queue_pluck
GRPCAPI grpc_event grpc_completion_queue_pluck(grpc_completion_queue *cq, void *tag, gpr_timespec deadline, void *reserved)
Blocks until an event with tag 'tag' is available, the completion queue is being shutdown or deadline...
grpc_channel_create
GRPCAPI grpc_channel * grpc_channel_create(const char *target, grpc_channel_credentials *creds, const grpc_channel_args *args)
Creates a secure channel using the passed-in credentials.
grpc_is_initialized
GRPCAPI int grpc_is_initialized(void)
EXPERIMENTAL.
slice.h
grpc_resource_quota_resize
GRPCAPI void grpc_resource_quota_resize(grpc_resource_quota *resource_quota, size_t new_size)
Update the size of a buffer pool.
grpc_server_xds_status_notifier
Definition: grpc.h:442
grpc_completion_queue_destroy
GRPCAPI void grpc_completion_queue_destroy(grpc_completion_queue *cq)
Destroy a completion queue.
grpc_server_xds_status_notifier::user_data
void * user_data
Definition: grpc.h:445
grpc_resource_quota_unref
GRPCAPI void grpc_resource_quota_unref(grpc_resource_quota *resource_quota)
Drop a reference to a buffer pool.
grpc_channelz_get_server_sockets
GRPCAPI char * grpc_channelz_get_server_sockets(intptr_t server_id, intptr_t start_socket_id, intptr_t max_results)
grpc_serving_status_update::code
grpc_status_code code
Definition: grpc.h:436
grpc_server_shutdown_and_notify
GRPCAPI void grpc_server_shutdown_and_notify(grpc_server *server, grpc_completion_queue *cq, void *tag)
Begin shutting down a server.
grpc_is_binary_header
GRPCAPI int grpc_is_binary_header(grpc_slice slice)
Check whether a metadata key corresponds to a binary value.
grpc_completion_queue
struct grpc_completion_queue grpc_completion_queue
Completion Queues enable notification of the completion of asynchronous actions.
Definition: grpc_types.h:58
grpc_completion_queue_next
GRPCAPI grpc_event grpc_completion_queue_next(grpc_completion_queue *cq, gpr_timespec deadline, void *reserved)
Blocks until an event is available, the completion queue is being shut down, or deadline is reached.
grpc_completion_queue_shutdown
GRPCAPI void grpc_completion_queue_shutdown(grpc_completion_queue *cq)
Begin destruction of a completion queue.
grpc_completion_queue_functor
Specifies an interface class to be used as a tag for callback-based completion queues.
Definition: grpc_types.h:444
grpc_channel_destroy
GRPCAPI void grpc_channel_destroy(grpc_channel *channel)
Close and destroy a grpc channel.
grpc_call_error_to_string
const GRPCAPI char * grpc_call_error_to_string(grpc_call_error error)
Convert grpc_call_error values to a string.
grpc_channel
struct grpc_channel grpc_channel
The Channel interface allows creation of Call objects.
Definition: grpc_types.h:61
grpc_channel_watch_connectivity_state
GRPCAPI void grpc_channel_watch_connectivity_state(grpc_channel *channel, grpc_connectivity_state last_observed_state, gpr_timespec deadline, grpc_completion_queue *cq, void *tag)
Watch for a change in connectivity state.
grpc_server_set_config_fetcher
GRPCAPI void grpc_server_set_config_fetcher(grpc_server *server, grpc_server_config_fetcher *config_fetcher)
EXPERIMENTAL.
GRPC_SRM_PAYLOAD_READ_INITIAL_BYTE_BUFFER
@ GRPC_SRM_PAYLOAD_READ_INITIAL_BYTE_BUFFER
Read the initial payload as a byte buffer.
Definition: grpc.h:390
grpc_dump_xds_configs
GRPCAPI grpc_slice grpc_dump_xds_configs(void)
EXPERIMENTAL.
grpc_tracer_set_enabled
GRPCAPI int grpc_tracer_set_enabled(const char *name, int enabled)
Enable or disable a tracer.
grpc_resource_quota_ref
GRPCAPI void grpc_resource_quota_ref(grpc_resource_quota *resource_quota)
Add a reference to a buffer pool.
grpc_completion_queue_create_for_next
GRPCAPI grpc_completion_queue * grpc_completion_queue_create_for_next(void *reserved)
Helper function to create a completion queue with grpc_cq_completion_type of GRPC_CQ_NEXT and grpc_cq...
grpc_census_call_get_context
GRPCAPI struct census_context * grpc_census_call_get_context(grpc_call *call)
Retrieve the calls current census context.
gpr_timespec
Analogous to struct timespec.
Definition: time.h:48
grpc_server_credentials
struct grpc_server_credentials grpc_server_credentials
— grpc_server_credentials object.
Definition: grpc.h:299
grpc_init
GRPCAPI void grpc_init(void)
Initialize the grpc library.
grpc_server_start
GRPCAPI void grpc_server_start(grpc_server *server)
Start a server - tells all listeners to start listening.
grpc_g_stands_for
const GRPCAPI char * grpc_g_stands_for(void)
Return a string specifying what the 'g' in gRPC stands for.
grpc_channel_info
Information requested from the channel.
Definition: grpc_types.h:391
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)
Start a batch of operations defined in the array ops; when complete, post a completion of type 'tag' ...
grpc_shutdown
GRPCAPI void grpc_shutdown(void)
Shut down the grpc library.
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)
Cancel an RPC.
time.h
grpc_metadata_array_init
GRPCAPI void grpc_metadata_array_init(grpc_metadata_array *array)
grpc_server_register_method
GRPCAPI void * grpc_server_register_method(grpc_server *server, const char *method, const char *host, grpc_server_register_method_payload_handling payload_handling, uint32_t flags)
Registers a method in the server.
port_platform.h