Skip to content
Snippets Groups Projects
Commit c56b2cb3 authored by Craig Tiller's avatar Craig Tiller
Browse files

Add comments

parent 98ad9bd6
No related branches found
No related tags found
No related merge requests found
...@@ -293,14 +293,39 @@ typedef struct grpc_op { ...@@ -293,14 +293,39 @@ typedef struct grpc_op {
const char *status_details; const char *status_details;
} send_status_from_server; } send_status_from_server;
/* ownership of the array is with the caller, but ownership of the elements /* ownership of the array is with the caller, but ownership of the elements
stays with the call object */ 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_metadata_array *recv_initial_metadata; grpc_metadata_array *recv_initial_metadata;
grpc_byte_buffer **recv_message; grpc_byte_buffer **recv_message;
struct { struct {
/* ownership of the array is with the caller, but ownership of the elements /* ownership of the array is with the caller, but ownership of the elements
stays with the call object */ 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. */
grpc_metadata_array *trailing_metadata; grpc_metadata_array *trailing_metadata;
grpc_status_code *status; grpc_status_code *status;
/* 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 = &my_details;
x.status_details_capacity = &my_capacity;
Not pre-allocating space:
size_t my_capacity = 0;
char *my_details = NULL;
x.status_details = &my_details;
x.status_details_capacity = &my_capacity;
After the call:
gpr_free(my_details); */
char **status_details; char **status_details;
size_t *status_details_capacity; size_t *status_details_capacity;
} recv_status_on_client; } recv_status_on_client;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment