diff options
author | Craig Tiller <ctiller@google.com> | 2015-07-20 13:42:22 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2015-07-20 13:42:22 -0700 |
commit | 1b22b9db94784bc589d372e2b30eb939d009c3d9 (patch) | |
tree | 77d06352dfbb71cf5afe6c7ffcfe08932a0b89e7 /src/core/client_config | |
parent | 698d00c60e91ebf8acf993cf6602d74c0032b5dc (diff) |
Add grpc_call_get_peer
Diffstat (limited to 'src/core/client_config')
-rw-r--r-- | src/core/client_config/subchannel.c | 6 | ||||
-rw-r--r-- | src/core/client_config/subchannel.h | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/core/client_config/subchannel.c b/src/core/client_config/subchannel.c index 35f172683a..2a12fbc86d 100644 --- a/src/core/client_config/subchannel.c +++ b/src/core/client_config/subchannel.c @@ -640,6 +640,12 @@ void grpc_subchannel_call_unref( } } +char *grpc_subchannel_call_get_peer(grpc_subchannel_call *call) { + grpc_call_stack *call_stack = SUBCHANNEL_CALL_TO_CALL_STACK(call); + grpc_call_element *top_elem = grpc_call_stack_element(call_stack, 0); + return top_elem->filter->get_peer(top_elem); +} + void grpc_subchannel_call_process_op(grpc_subchannel_call *call, grpc_transport_stream_op *op) { grpc_call_stack *call_stack = SUBCHANNEL_CALL_TO_CALL_STACK(call); diff --git a/src/core/client_config/subchannel.h b/src/core/client_config/subchannel.h index a23a623277..d1cd33b2af 100644 --- a/src/core/client_config/subchannel.h +++ b/src/core/client_config/subchannel.h @@ -100,6 +100,9 @@ void grpc_subchannel_del_interested_party(grpc_subchannel *channel, void grpc_subchannel_call_process_op(grpc_subchannel_call *subchannel_call, grpc_transport_stream_op *op); +/** continue querying for peer */ +char *grpc_subchannel_call_get_peer(grpc_subchannel_call *subchannel_call); + struct grpc_subchannel_args { /** Channel filters for this channel - wrapped factories will likely want to mutate this */ |