GRPC Core  0.11.0.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Fields
grpc_op Struct Reference

Operation data: one field for each op type (except SEND_CLOSE_FROM_CLIENT which has no arguments) More...

#include <grpc.h>

Data Fields

grpc_op_type op
 Operation type, as defined by grpc_op_type. More...
 
gpr_uint32 flags
 Write flags bitset for grpc_begin_messages. More...
 
void * reserved
 Reserved for future usage. More...
 
union {
   struct {
      void *   reserved [8]
 
   }   reserved
 Reserved for future usage. More...
 
   struct {
      size_t   count
 
      grpc_metadata *   metadata
 
   }   send_initial_metadata
 
   grpc_byte_buffer *   send_message
 
   struct {
      size_t   trailing_metadata_count
 
      grpc_metadata *   trailing_metadata
 
      grpc_status_code   status
 
      const char *   status_details
 
   }   send_status_from_server
 
   grpc_metadata_array *   recv_initial_metadata
 ownership of the array is with the caller, but ownership of the elements stays with the call object (ie key, value members are owned by the call object, recv_initial_metadata->array is owned by the caller). More...
 
   grpc_byte_buffer **   recv_message
 ownership of the byte buffer is moved to the caller; the caller must call grpc_byte_buffer_destroy on this value, or reuse it in a future op. More...
 
   struct {
      grpc_metadata_array *   trailing_metadata
 ownership of the array is with the caller, but ownership of the elements stays with the call object (ie key, value members are owned by the call object, trailing_metadata->array is owned by the caller). More...
 
      grpc_status_code *   status
 
      char **   status_details
 status_details is a buffer owned by the application before the op completes and after the op has completed. More...
 
      size_t *   status_details_capacity
 
   }   recv_status_on_client
 
   struct {
      int *   cancelled
 out argument, set to 1 if the call failed in any way (seen as a cancellation on the server), or 0 if the call succeeded More...
 
   }   recv_close_on_server
 
data
 

Detailed Description

Operation data: one field for each op type (except SEND_CLOSE_FROM_CLIENT which has no arguments)

Field Documentation

int* grpc_op::cancelled

out argument, set to 1 if the call failed in any way (seen as a cancellation on the server), or 0 if the call succeeded

size_t grpc_op::count
union { ... } grpc_op::data
gpr_uint32 grpc_op::flags

Write flags bitset for grpc_begin_messages.

grpc_metadata* grpc_op::metadata
grpc_op_type grpc_op::op

Operation type, as defined by grpc_op_type.

struct { ... } grpc_op::recv_close_on_server
grpc_metadata_array* grpc_op::recv_initial_metadata

ownership of the array is with the caller, but ownership of the elements stays with the call object (ie key, value members are owned by the call object, recv_initial_metadata->array is owned by the caller).

After the operation completes, call grpc_metadata_array_destroy on this value, or reuse it in a future op.

grpc_byte_buffer** grpc_op::recv_message

ownership of the byte buffer is moved to the caller; the caller must call grpc_byte_buffer_destroy on this value, or reuse it in a future op.

struct { ... } grpc_op::recv_status_on_client
void* grpc_op::reserved[8]

Reserved for future usage.

struct { ... } grpc_op::reserved

Reserved for future usage.

struct { ... } grpc_op::send_initial_metadata
grpc_byte_buffer* grpc_op::send_message
struct { ... } grpc_op::send_status_from_server
grpc_status_code grpc_op::status
grpc_status_code* grpc_op::status
const char* grpc_op::status_details
char** grpc_op::status_details

status_details is a buffer owned by the application before the op completes and after the op has completed.

During the operation status_details may be reallocated to a size larger than status_details_capacity, in which case *status_details_capacity will be updated with the new array capacity.

Pre-allocating space: size_t my_capacity = 8; char *my_details = gpr_malloc(my_capacity); x.status_details = x.status_details_capacity =

Not pre-allocating space: size_t my_capacity = 0; char *my_details = NULL; x.status_details = x.status_details_capacity =

After the call: gpr_free(my_details);

size_t* grpc_op::status_details_capacity
grpc_metadata* grpc_op::trailing_metadata
grpc_metadata_array* grpc_op::trailing_metadata

ownership of the array is with the caller, but ownership of the elements stays with the call object (ie key, value members are owned by the call object, trailing_metadata->array is owned by the caller).

After the operation completes, call grpc_metadata_array_destroy on this value, or reuse it in a future op.

size_t grpc_op::trailing_metadata_count

The documentation for this struct was generated from the following file: