diff options
author | Nathaniel Manista <nathaniel@google.com> | 2015-02-17 23:10:16 -0800 |
---|---|---|
committer | Nathaniel Manista <nathaniel@google.com> | 2015-02-17 23:10:16 -0800 |
commit | 4ddf950c89e47850f233f42465f79b441ea91aad (patch) | |
tree | 0174c76d590c5febf89efb17cbe105def31b9f7b | |
parent | d3973499add7461460025f3ae184b85f84e31012 (diff) | |
parent | e7163ab6250ea6adc6b85ea36e67bd6c93ccaadc (diff) |
Merge pull request #562 from ctiller/dox3
More channel argument documentation.
-rw-r--r-- | include/grpc/grpc.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h index 621740e038..12949d569b 100644 --- a/include/grpc/grpc.h +++ b/include/grpc/grpc.h @@ -92,7 +92,12 @@ typedef struct { } value; } grpc_arg; -/* An array of arguments that can be passed around */ +/* An array of arguments that can be passed around. + Used to set optional channel-level configuration. + These configuration options are modelled as key-value pairs as defined + by grpc_arg; keys are strings to allow easy backwards-compatible extension + by arbitrary parties. + All evaluation is performed at channel creation time. */ typedef struct { size_t num_args; grpc_arg *args; @@ -411,7 +416,10 @@ grpc_call *grpc_channel_create_call(grpc_channel *channel, grpc_call_error grpc_call_start_batch(grpc_call *call, const grpc_op *ops, size_t nops, void *tag); -/* Create a client channel */ +/* Create a client channel to 'target'. Additional channel level configuration + MAY be provided by grpc_channel_args, though the expectation is that most + clients will want to simply pass NULL. See grpc_channel_args definition + for more on this. */ grpc_channel *grpc_channel_create(const char *target, const grpc_channel_args *args); @@ -576,7 +584,9 @@ grpc_call_error grpc_server_request_registered_call( grpc_byte_buffer **optional_payload, grpc_completion_queue *cq_bound_to_call, void *tag_new); -/* Create a server */ +/* Create a server. Additional configuration for each incoming channel can + be specified with args. If no additional configuration is needed, args can + be NULL. See grpc_channel_args for more. */ grpc_server *grpc_server_create(grpc_completion_queue *cq, const grpc_channel_args *args); |