bool grpc_add_connected_filter(grpc_channel_stack_builder *builder, void *arg_must_be_null) { GPR_ASSERT(arg_must_be_null == NULL); grpc_transport *t = grpc_channel_stack_builder_get_transport(builder); GPR_ASSERT(t != NULL); return grpc_channel_stack_builder_append_filter( builder, &connected_channel_filter, bind_transport, t); }
static bool maybe_add_http_filter(grpc_channel_stack_builder *builder, void *arg) { grpc_transport *t = grpc_channel_stack_builder_get_transport(builder); if (t && strstr(t->vtable->name, "http")) { return grpc_channel_stack_builder_prepend_filter( builder, (const grpc_channel_filter *)arg, NULL, NULL); } return true; }
static bool is_building_http_like_transport( grpc_channel_stack_builder *builder) { grpc_transport *t = grpc_channel_stack_builder_get_transport(builder); return t != NULL && strstr(t->vtable->name, "http"); }