aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/transport
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-02-17 20:54:46 -0800
committerGravatar Craig Tiller <ctiller@google.com>2016-02-17 20:54:46 -0800
commit178edfae2be7014abce0998ca6c34babc65df499 (patch)
tree9ef0028ad1c54cf6729086a9067813da9c9d641f /src/core/transport
parentc15cd723ebabbab4825480032b56a2ddd9a8b76b (diff)
Decouple filter selection from channel construction
Allow plugins to extend the set of filters used by gRPC core: - plugins at construction time can register against the 'channel_init' system to be allowed to mutate a new channel_stack_builder type - channel_stack_builder provides a central and rather dynamic place to construct the list of filters required by a channel stack - ultimately we construct the channel stack in the fashion we always have This is also a prerequisite step to allowing filters to be implemented from wrapped languages.
Diffstat (limited to 'src/core/transport')
-rw-r--r--src/core/transport/chttp2_transport.c5
-rw-r--r--src/core/transport/transport_impl.h3
2 files changed, 6 insertions, 2 deletions
diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c
index 617d98875c..1901307d94 100644
--- a/src/core/transport/chttp2_transport.c
+++ b/src/core/transport/chttp2_transport.c
@@ -1713,8 +1713,9 @@ static char *chttp2_get_peer(grpc_exec_ctx *exec_ctx, grpc_transport *t) {
}
static const grpc_transport_vtable vtable = {
- sizeof(grpc_chttp2_stream), init_stream, set_pollset, perform_stream_op,
- perform_transport_op, destroy_stream, destroy_transport, chttp2_get_peer};
+ sizeof(grpc_chttp2_stream), "chttp2", init_stream, set_pollset,
+ perform_stream_op, perform_transport_op, destroy_stream, destroy_transport,
+ chttp2_get_peer};
grpc_transport *grpc_create_chttp2_transport(
grpc_exec_ctx *exec_ctx, const grpc_channel_args *channel_args,
diff --git a/src/core/transport/transport_impl.h b/src/core/transport/transport_impl.h
index 40bfb4b13a..16f7fd4d32 100644
--- a/src/core/transport/transport_impl.h
+++ b/src/core/transport/transport_impl.h
@@ -41,6 +41,9 @@ typedef struct grpc_transport_vtable {
layers and initialized by the transport */
size_t sizeof_stream; /* = sizeof(transport stream) */
+ /* name of this transport implementation */
+ const char *name;
+
/* implementation of grpc_transport_init_stream */
int (*init_stream)(grpc_exec_ctx *exec_ctx, grpc_transport *self,
grpc_stream *stream, grpc_stream_refcount *refcount,