diff options
author | Jan Tattermusch <jtattermusch@google.com> | 2015-07-20 20:18:26 -0700 |
---|---|---|
committer | Jan Tattermusch <jtattermusch@google.com> | 2015-07-20 20:18:26 -0700 |
commit | 77415b63bbad2d8a6cbcf610c07da958d34f87f0 (patch) | |
tree | dc8c62d9e946d985236c20dcfacfb73a4c781d52 /src/csharp/ext | |
parent | ec50f281be54eb4f1017f01ef15faad5e6270454 (diff) |
some cleanup and better metadata support
Diffstat (limited to 'src/csharp/ext')
-rw-r--r-- | src/csharp/ext/grpc_csharp_ext.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/csharp/ext/grpc_csharp_ext.c b/src/csharp/ext/grpc_csharp_ext.c index d8996ae7a9..cfd96d15f1 100644 --- a/src/csharp/ext/grpc_csharp_ext.c +++ b/src/csharp/ext/grpc_csharp_ext.c @@ -175,7 +175,7 @@ grpcsharp_metadata_array_count(grpc_metadata_array *array) { GPR_EXPORT const grpc_metadata *GPR_CALLTYPE grpcsharp_metadata_array_get(grpc_metadata_array *array, size_t index) { GPR_ASSERT(index < array->count); - return array->metadata[index]; + return &(array->metadata[index]); } /* Move contents of metadata array */ @@ -230,7 +230,7 @@ GPR_EXPORT void GPR_CALLTYPE grpcsharp_batch_context_destroy(grpcsharp_batch_con } GPR_EXPORT const grpc_metadata_array *GPR_CALLTYPE -grpcsharp_batch_context_receive_initial_metadata( +grpcsharp_batch_context_recv_initial_metadata( const grpcsharp_batch_context *ctx) { return &(ctx->recv_initial_metadata); } @@ -294,6 +294,18 @@ grpcsharp_batch_context_server_rpc_new_method( return ctx->server_rpc_new.call_details.method; } +GPR_EXPORT const char *GPR_CALLTYPE +grpcsharp_batch_context_server_rpc_new_host( + const grpcsharp_batch_context *ctx) { + return ctx->server_rpc_new.call_details.host; +} + +GPR_EXPORT gpr_timespec GPR_CALLTYPE +grpcsharp_batch_context_server_rpc_new_deadline( + const grpcsharp_batch_context *ctx) { + return ctx->server_rpc_new.call_details.deadline; +} + GPR_EXPORT const grpc_metadata_array *GPR_CALLTYPE grpcsharp_batch_context_server_rpc_new_request_metadata( const grpcsharp_batch_context *ctx) { |