aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--BUILD125
-rw-r--r--CMakeLists.txt116
-rw-r--r--INSTALL.md2
-rw-r--r--Makefile394
-rwxr-xr-xRakefile6
-rw-r--r--binding.gyp5
-rw-r--r--build.yaml95
-rw-r--r--config.m45
-rw-r--r--doc/fail_fast.md16
-rw-r--r--doc/g_stands_for.md8
-rw-r--r--doc/http-grpc-status-mapping.md30
-rw-r--r--doc/wait-for-ready.md14
-rw-r--r--etc/README.md4
-rw-r--r--examples/csharp/.nuget/packages.config4
-rw-r--r--examples/csharp/helloworld-from-cli/Greeter/project.json4
-rw-r--r--examples/csharp/helloworld-from-cli/GreeterClient/project.json4
-rw-r--r--examples/csharp/helloworld-from-cli/GreeterServer/project.json4
-rw-r--r--examples/csharp/helloworld/Greeter/Greeter.csproj12
-rw-r--r--examples/csharp/helloworld/Greeter/packages.config12
-rw-r--r--examples/csharp/helloworld/GreeterClient/GreeterClient.csproj12
-rw-r--r--examples/csharp/helloworld/GreeterClient/packages.config10
-rw-r--r--examples/csharp/helloworld/GreeterServer/GreeterServer.csproj12
-rw-r--r--examples/csharp/helloworld/GreeterServer/packages.config10
-rw-r--r--examples/csharp/helloworld/generate_protos.bat4
-rw-r--r--examples/csharp/route_guide/RouteGuide/RouteGuide.csproj12
-rw-r--r--examples/csharp/route_guide/RouteGuide/packages.config10
-rw-r--r--examples/csharp/route_guide/RouteGuideClient/RouteGuideClient.csproj12
-rw-r--r--examples/csharp/route_guide/RouteGuideClient/packages.config10
-rw-r--r--examples/csharp/route_guide/RouteGuideServer/RouteGuideServer.csproj12
-rw-r--r--examples/csharp/route_guide/RouteGuideServer/packages.config12
-rw-r--r--examples/csharp/route_guide/generate_protos.bat4
-rw-r--r--examples/node/README.md2
-rwxr-xr-xexamples/php/run_greeter_client.sh2
-rw-r--r--examples/python/README.md57
-rw-r--r--examples/python/helloworld/README.md2
-rw-r--r--examples/python/multiplex/README.md2
-rw-r--r--gRPC-Core.podspec26
-rw-r--r--grpc.def125
-rwxr-xr-xgrpc.gemspec22
-rw-r--r--include/grpc++/create_channel.h1
-rw-r--r--include/grpc++/ext/reflection.grpc.pb.h2
-rw-r--r--include/grpc++/grpc++.h4
-rw-r--r--include/grpc++/impl/codegen/async_unary_call.h1
-rw-r--r--include/grpc++/impl/codegen/call.h10
-rw-r--r--include/grpc++/impl/codegen/client_context.h15
-rw-r--r--include/grpc++/impl/codegen/completion_queue.h13
-rw-r--r--include/grpc++/impl/codegen/core_codegen.h12
-rw-r--r--include/grpc++/impl/codegen/core_codegen_interface.h18
-rw-r--r--include/grpc++/impl/codegen/grpc_library.h1
-rw-r--r--include/grpc++/impl/codegen/method_handler_impl.h64
-rw-r--r--include/grpc++/impl/codegen/proto_utils.h3
-rw-r--r--include/grpc++/impl/codegen/rpc_method.h3
-rw-r--r--include/grpc++/impl/codegen/rpc_service_method.h6
-rw-r--r--include/grpc++/impl/codegen/server_context.h15
-rw-r--r--include/grpc++/impl/codegen/server_interface.h7
-rw-r--r--include/grpc++/impl/codegen/service_type.h11
-rw-r--r--include/grpc++/impl/codegen/status_helper.h47
-rw-r--r--include/grpc++/impl/codegen/sync_no_cxx11.h28
-rw-r--r--include/grpc++/impl/codegen/sync_stream.h139
-rw-r--r--include/grpc++/impl/codegen/thrift_serializer.h4
-rw-r--r--include/grpc++/impl/codegen/thrift_utils.h2
-rw-r--r--include/grpc++/impl/codegen/time.h4
-rw-r--r--include/grpc++/impl/server_builder_plugin.h5
-rw-r--r--include/grpc/byte_buffer.h65
-rw-r--r--include/grpc/compression.h3
-rw-r--r--include/grpc/grpc.h3
-rw-r--r--include/grpc/impl/codegen/byte_buffer.h122
-rw-r--r--include/grpc/impl/codegen/byte_buffer_reader.h8
-rw-r--r--include/grpc/impl/codegen/compression_types.h2
-rw-r--r--include/grpc/impl/codegen/gpr_types.h140
-rw-r--r--include/grpc/impl/codegen/grpc_types.h45
-rw-r--r--include/grpc/impl/codegen/log.h118
-rw-r--r--include/grpc/impl/codegen/port_platform.h11
-rw-r--r--include/grpc/impl/codegen/slice.h138
-rw-r--r--include/grpc/impl/codegen/slice_buffer.h104
-rw-r--r--include/grpc/impl/codegen/sync.h253
-rw-r--r--include/grpc/impl/codegen/time.h130
-rw-r--r--include/grpc/module.modulemap2
-rw-r--r--include/grpc/support/alloc.h37
-rw-r--r--include/grpc/support/log.h81
-rw-r--r--include/grpc/support/slice.h89
-rw-r--r--include/grpc/support/slice_buffer.h50
-rw-r--r--include/grpc/support/sync.h252
-rw-r--r--include/grpc/support/time.h68
-rw-r--r--package.xml25
-rw-r--r--setup.py4
-rw-r--r--src/compiler/cpp_generator.cc77
-rw-r--r--src/core/ext/census/gen/README.md4
-rw-r--r--src/core/ext/census/gen/trace_context.pb.c81
-rw-r--r--src/core/ext/census/gen/trace_context.pb.h99
-rw-r--r--src/core/ext/client_config/README.md4
-rw-r--r--src/core/ext/client_config/client_channel.c547
-rw-r--r--src/core/ext/client_config/lb_policy.c10
-rw-r--r--src/core/ext/client_config/lb_policy.h60
-rw-r--r--src/core/ext/client_config/lb_policy_factory.h15
-rw-r--r--src/core/ext/client_config/resolver.c4
-rw-r--r--src/core/ext/client_config/resolver.h12
-rw-r--r--src/core/ext/client_config/resolver_factory.h2
-rw-r--r--src/core/ext/client_config/resolver_result.c (renamed from src/core/ext/client_config/client_config.c)23
-rw-r--r--src/core/ext/client_config/resolver_result.h (renamed from src/core/ext/client_config/client_config.h)27
-rw-r--r--src/core/ext/client_config/subchannel_call_holder.c292
-rw-r--r--src/core/ext/client_config/subchannel_call_holder.h99
-rw-r--r--src/core/ext/lb_policy/grpclb/grpclb.c384
-rw-r--r--src/core/ext/lb_policy/grpclb/load_balancer_api.c5
-rw-r--r--src/core/ext/lb_policy/grpclb/load_balancer_api.h1
-rw-r--r--src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c8
-rw-r--r--src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h30
-rw-r--r--src/core/ext/lb_policy/pick_first/pick_first.c31
-rw-r--r--src/core/ext/lb_policy/round_robin/round_robin.c95
-rw-r--r--src/core/ext/resolver/dns/native/dns_resolver.c52
-rw-r--r--src/core/ext/resolver/sockaddr/sockaddr_resolver.c28
-rw-r--r--src/core/ext/transport/chttp2/transport/chttp2_transport.c13
-rw-r--r--src/core/ext/transport/chttp2/transport/frame.h2
-rw-r--r--src/core/ext/transport/chttp2/transport/hpack_encoder.c10
-rw-r--r--src/core/ext/transport/chttp2/transport/hpack_encoder.h1
-rw-r--r--src/core/ext/transport/chttp2/transport/internal.h2
-rw-r--r--src/core/ext/transport/chttp2/transport/writing.c12
-rw-r--r--src/core/ext/transport/cronet/transport/cronet_transport.c111
-rw-r--r--src/core/lib/channel/handshaker.c4
-rw-r--r--src/core/lib/channel/handshaker.h2
-rw-r--r--src/core/lib/channel/http_client_filter.c181
-rw-r--r--src/core/lib/channel/http_client_filter.h3
-rw-r--r--src/core/lib/channel/http_server_filter.c79
-rw-r--r--src/core/lib/iomgr/error.h3
-rw-r--r--src/core/lib/iomgr/ev_epoll_linux.c6
-rw-r--r--src/core/lib/security/context/security_context.c6
-rw-r--r--src/core/lib/security/context/security_context.h12
-rw-r--r--src/core/lib/security/credentials/jwt/json_token.c1
-rw-r--r--src/core/lib/support/percent_encoding.c180
-rw-r--r--src/core/lib/support/percent_encoding.h78
-rw-r--r--src/core/lib/support/time_posix.c2
-rw-r--r--src/core/lib/surface/server.c11
-rw-r--r--src/core/lib/surface/version.c2
-rw-r--r--src/core/lib/transport/metadata.c18
-rw-r--r--src/core/lib/transport/metadata.h2
-rw-r--r--src/core/lib/transport/static_metadata.c15
-rw-r--r--src/core/lib/transport/static_metadata.h98
-rw-r--r--src/core/lib/transport/transport.h1
-rw-r--r--src/cpp/client/channel_cc.cc (renamed from src/cpp/client/channel.cc)0
-rw-r--r--src/cpp/client/client_context.cc2
-rw-r--r--src/cpp/client/credentials_cc.cc (renamed from src/cpp/client/credentials.cc)0
-rw-r--r--src/cpp/common/channel_filter.h2
-rw-r--r--src/cpp/common/completion_queue_cc.cc (renamed from src/cpp/common/completion_queue.cc)0
-rw-r--r--src/cpp/common/core_codegen.cc27
-rw-r--r--src/cpp/server/server_builder.cc15
-rw-r--r--src/cpp/server/server_cc.cc (renamed from src/cpp/server/server.cc)0
-rw-r--r--src/cpp/util/byte_buffer_cc.cc (renamed from src/cpp/util/byte_buffer.cc)0
-rw-r--r--src/cpp/util/slice_cc.cc (renamed from src/cpp/util/slice.cc)0
-rw-r--r--src/cpp/util/time_cc.cc (renamed from src/cpp/util/time.cc)0
-rw-r--r--src/csharp/Grpc.Auth/Grpc.Auth.csproj18
-rw-r--r--src/csharp/Grpc.Auth/packages.config7
-rw-r--r--src/csharp/Grpc.Auth/project.json9
-rw-r--r--src/csharp/Grpc.Core.Tests/project.json11
-rw-r--r--src/csharp/Grpc.Core/GrpcEnvironment.cs14
-rw-r--r--src/csharp/Grpc.Core/Internal/NativeExtension.cs18
-rw-r--r--src/csharp/Grpc.Core/project.json4
-rw-r--r--src/csharp/Grpc.Examples.MathClient/project.json14
-rw-r--r--src/csharp/Grpc.Examples.MathServer/project.json14
-rw-r--r--src/csharp/Grpc.Examples.Tests/Grpc.Examples.Tests.csproj6
-rw-r--r--src/csharp/Grpc.Examples.Tests/packages.config4
-rw-r--r--src/csharp/Grpc.Examples.Tests/project.json11
-rw-r--r--src/csharp/Grpc.Examples/Grpc.Examples.csproj7
-rw-r--r--src/csharp/Grpc.Examples/packages.config4
-rw-r--r--src/csharp/Grpc.Examples/project.json16
-rw-r--r--src/csharp/Grpc.HealthCheck.Tests/Grpc.HealthCheck.Tests.csproj6
-rw-r--r--src/csharp/Grpc.HealthCheck.Tests/packages.config2
-rw-r--r--src/csharp/Grpc.HealthCheck.Tests/project.json11
-rw-r--r--src/csharp/Grpc.HealthCheck/Grpc.HealthCheck.csproj7
-rw-r--r--src/csharp/Grpc.HealthCheck/packages.config2
-rw-r--r--src/csharp/Grpc.HealthCheck/project.json5
-rw-r--r--src/csharp/Grpc.IntegrationTesting.Client/Grpc.IntegrationTesting.Client.csproj18
-rw-r--r--src/csharp/Grpc.IntegrationTesting.Client/packages.config7
-rw-r--r--src/csharp/Grpc.IntegrationTesting.Client/project.json22
-rw-r--r--src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json22
-rw-r--r--src/csharp/Grpc.IntegrationTesting.Server/Grpc.IntegrationTesting.Server.csproj18
-rw-r--r--src/csharp/Grpc.IntegrationTesting.Server/packages.config7
-rw-r--r--src/csharp/Grpc.IntegrationTesting.Server/project.json22
-rw-r--r--src/csharp/Grpc.IntegrationTesting.StressClient/project.json22
-rw-r--r--src/csharp/Grpc.IntegrationTesting/GeneratedClientTest.cs3
-rw-r--r--src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.csproj37
-rw-r--r--src/csharp/Grpc.IntegrationTesting/packages.config14
-rw-r--r--src/csharp/Grpc.IntegrationTesting/project.json28
-rw-r--r--src/csharp/Grpc.Tools.nuspec25
-rw-r--r--src/csharp/build_packages.bat8
-rwxr-xr-xsrc/csharp/build_packages_dotnetcli.sh (renamed from tools/run_tests/build_package_csharp_coreclr.sh)27
-rw-r--r--src/csharp/ext/grpc_csharp_ext.c6
-rw-r--r--src/node/README.md4
-rw-r--r--src/objective-c/GRPCClient/GRPCCall.m5
-rw-r--r--src/objective-c/GRPCClient/private/GRPCWrappedCall.m5
-rw-r--r--src/objective-c/RxLibrary/transformations/GRXMappingWriter.m8
-rw-r--r--src/php/ext/grpc/call.c25
-rw-r--r--src/php/ext/grpc/call_credentials.c26
-rw-r--r--src/php/ext/grpc/channel.c9
-rw-r--r--src/php/ext/grpc/channel_credentials.c16
-rw-r--r--src/php/ext/grpc/server.c18
-rw-r--r--src/php/ext/grpc/server_credentials.c4
-rw-r--r--src/php/ext/grpc/timeval.c22
-rw-r--r--src/php/lib/Grpc/AbstractCall.php37
-rw-r--r--src/php/lib/Grpc/BaseStub.php11
-rw-r--r--src/php/lib/Grpc/BidiStreamingCall.php10
-rw-r--r--src/php/lib/Grpc/ClientStreamingCall.php6
-rw-r--r--src/php/lib/Grpc/ServerStreamingCall.php12
-rw-r--r--src/php/lib/Grpc/UnaryCall.php4
-rwxr-xr-xsrc/php/tests/interop/interop_client.php39
-rw-r--r--src/php/tests/unit_tests/CallCredentials2Test.php65
-rw-r--r--src/php/tests/unit_tests/CallCredentials3Test.php135
-rw-r--r--src/php/tests/unit_tests/CallTest.php24
-rw-r--r--src/proto/census/trace_context.options0
-rw-r--r--src/proto/census/trace_context.proto48
-rw-r--r--src/proto/grpc/lb/v1/load_balancer.options4
-rw-r--r--src/proto/grpc/lb/v1/load_balancer.proto29
-rw-r--r--src/proto/grpc/testing/echo.proto2
-rw-r--r--src/python/grpcio/commands.py3
-rw-r--r--src/python/grpcio/grpc/__init__.py4
-rw-r--r--src/python/grpcio/grpc/_cython/_cygrpc/security.pyx.pxi2
-rw-r--r--src/python/grpcio/grpc/_cython/cygrpc.pxd16
-rw-r--r--src/python/grpcio/grpc/_cython/cygrpc.pyx16
-rw-r--r--src/python/grpcio/grpc_core_dependencies.py5
-rw-r--r--src/python/grpcio_tests/setup.py4
-rw-r--r--src/python/grpcio_tests/tests/unit/_cython/cygrpc_test.py3
-rw-r--r--src/ruby/ext/grpc/extconf.rb4
-rw-r--r--src/ruby/ext/grpc/rb_compression_options.c2
-rw-r--r--src/ruby/ext/grpc/rb_grpc_imports.generated.c250
-rw-r--r--src/ruby/ext/grpc/rb_grpc_imports.generated.h389
-rw-r--r--src/ruby/lib/grpc/generic/rpc_server.rb143
-rw-r--r--src/ruby/lib/grpc/grpc.rb11
-rw-r--r--src/ruby/spec/generic/rpc_server_pool_spec.rb138
-rw-r--r--src/ruby/spec/generic/rpc_server_spec.rb13
-rw-r--r--templates/grpc.gemspec.template1
-rw-r--r--templates/package.xml.template4
-rw-r--r--templates/src/core/lib/surface/version.c.template8
-rw-r--r--templates/src/csharp/Grpc.Auth/project.json.template9
-rw-r--r--templates/src/csharp/Grpc.Core.Tests/project.json.template6
-rw-r--r--templates/src/csharp/Grpc.Core/project.json.template4
-rw-r--r--templates/src/csharp/Grpc.Examples.MathClient/project.json.template9
-rw-r--r--templates/src/csharp/Grpc.Examples.MathServer/project.json.template9
-rw-r--r--templates/src/csharp/Grpc.Examples.Tests/project.json.template6
-rw-r--r--templates/src/csharp/Grpc.Examples/project.json.template11
-rw-r--r--templates/src/csharp/Grpc.HealthCheck.Tests/project.json.template6
-rw-r--r--templates/src/csharp/Grpc.HealthCheck/project.json.template5
-rw-r--r--templates/src/csharp/Grpc.IntegrationTesting.Client/project.json.template9
-rw-r--r--templates/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json.template9
-rw-r--r--templates/src/csharp/Grpc.IntegrationTesting.Server/project.json.template9
-rw-r--r--templates/src/csharp/Grpc.IntegrationTesting.StressClient/project.json.template9
-rw-r--r--templates/src/csharp/Grpc.IntegrationTesting/project.json.template15
-rw-r--r--templates/src/csharp/build_options.include21
-rw-r--r--templates/src/csharp/build_packages.bat.template8
-rwxr-xr-xtemplates/src/csharp/build_packages_dotnetcli.sh.template72
-rw-r--r--templates/tools/dockerfile/csharp_dotnetcli_deps.include13
-rw-r--r--templates/tools/dockerfile/interoptest/grpc_interop_csharpcoreclr/Dockerfile.template41
-rw-r--r--templates/tools/dockerfile/test/csharp_coreclr_x64/Dockerfile.template16
-rw-r--r--test/core/bad_client/tests/head_of_line_blocking.c2
-rw-r--r--test/core/bad_client/tests/large_metadata.c6
-rw-r--r--test/core/bad_client/tests/server_registered_method.c4
-rw-r--r--test/core/bad_client/tests/simple_request.c2
-rw-r--r--test/core/bad_ssl/bad_ssl_test.c2
-rwxr-xr-xtest/core/bad_ssl/gen_build_yaml.py3
-rw-r--r--test/core/client_config/lb_policies_test.c12
-rw-r--r--test/core/client_config/resolvers/dns_resolver_connectivity_test.c12
-rw-r--r--test/core/end2end/bad_server_response_test.c2
-rw-r--r--test/core/end2end/cq_verifier.c44
-rw-r--r--test/core/end2end/cq_verifier.h5
-rw-r--r--test/core/end2end/dualstack_socket_test.c8
-rw-r--r--test/core/end2end/end2end_nosec_tests.c16
-rw-r--r--test/core/end2end/end2end_tests.c16
-rw-r--r--test/core/end2end/end2end_tests.h1
-rw-r--r--test/core/end2end/fixtures/h2_proxy.c3
-rw-r--r--test/core/end2end/fixtures/h2_ssl_cert.c2
-rw-r--r--test/core/end2end/fixtures/h2_ssl_proxy.c1
-rw-r--r--test/core/end2end/fuzzers/api_fuzzer_corpus/22967e8ed837f03b76a980cc1d25054fb84b40e9bin0 -> 694 bytes
-rw-r--r--test/core/end2end/fuzzers/api_fuzzer_corpus/3f464011f8620f227309f6b2c84df6fffb8ed962bin0 -> 794 bytes
-rw-r--r--test/core/end2end/fuzzers/api_fuzzer_corpus/crash-15070b2a2719ed8a6cbbaac25da02b7085993648bin0 -> 304 bytes
-rw-r--r--test/core/end2end/fuzzers/hpack.dictionary1
-rwxr-xr-xtest/core/end2end/gen_build_yaml.py4
-rw-r--r--test/core/end2end/goaway_server_test.c22
-rw-r--r--test/core/end2end/invalid_call_argument_test.c10
-rw-r--r--test/core/end2end/no_server_test.c2
-rw-r--r--test/core/end2end/tests/bad_hostname.c4
-rw-r--r--test/core/end2end/tests/binary_metadata.c10
-rw-r--r--test/core/end2end/tests/call_creds.c12
-rw-r--r--test/core/end2end/tests/cancel_after_accept.c8
-rw-r--r--test/core/end2end/tests/cancel_after_client_done.c8
-rw-r--r--test/core/end2end/tests/cancel_after_invoke.c4
-rw-r--r--test/core/end2end/tests/cancel_before_invoke.c4
-rw-r--r--test/core/end2end/tests/cancel_in_a_vacuum.c2
-rw-r--r--test/core/end2end/tests/cancel_with_status.c4
-rw-r--r--test/core/end2end/tests/compressed_payload.c26
-rw-r--r--test/core/end2end/tests/connectivity.c10
-rw-r--r--test/core/end2end/tests/default_host.c8
-rw-r--r--test/core/end2end/tests/disappearing_server.c10
-rw-r--r--test/core/end2end/tests/empty_batch.c4
-rw-r--r--test/core/end2end/tests/filter_call_init_fails.c2
-rw-r--r--test/core/end2end/tests/filter_causes_close.c4
-rw-r--r--test/core/end2end/tests/graceful_server_shutdown.c10
-rw-r--r--test/core/end2end/tests/high_initial_seqno.c8
-rw-r--r--test/core/end2end/tests/hpack_size.c6
-rw-r--r--test/core/end2end/tests/idempotent_request.c8
-rw-r--r--test/core/end2end/tests/invoke_large_request.c52
-rw-r--r--test/core/end2end/tests/large_metadata.c10
-rw-r--r--test/core/end2end/tests/load_reporting_hook.c8
-rw-r--r--test/core/end2end/tests/max_concurrent_streams.c20
-rw-r--r--test/core/end2end/tests/max_message_length.c8
-rw-r--r--test/core/end2end/tests/negative_deadline.c4
-rw-r--r--test/core/end2end/tests/network_status_change.c10
-rw-r--r--test/core/end2end/tests/no_logging.c293
-rw-r--r--test/core/end2end/tests/no_op.c2
-rw-r--r--test/core/end2end/tests/payload.c10
-rw-r--r--test/core/end2end/tests/ping.c8
-rw-r--r--test/core/end2end/tests/ping_pong_streaming.c18
-rw-r--r--test/core/end2end/tests/registered_call.c8
-rw-r--r--test/core/end2end/tests/request_with_flags.c4
-rw-r--r--test/core/end2end/tests/request_with_payload.c10
-rw-r--r--test/core/end2end/tests/server_finishes_request.c8
-rw-r--r--test/core/end2end/tests/shutdown_finishes_calls.c10
-rw-r--r--test/core/end2end/tests/shutdown_finishes_tags.c6
-rw-r--r--test/core/end2end/tests/simple_cacheable_request.c276
-rw-r--r--test/core/end2end/tests/simple_delayed_request.c8
-rw-r--r--test/core/end2end/tests/simple_metadata.c10
-rw-r--r--test/core/end2end/tests/simple_request.c8
-rw-r--r--test/core/end2end/tests/streaming_error_response.c18
-rw-r--r--test/core/end2end/tests/trailing_metadata.c10
-rw-r--r--test/core/support/percent_decode_corpus/04cb8ccc553f9b2f5e52c421aff6d1c954d3dae61
-rw-r--r--test/core/support/percent_decode_corpus/0dd8f3a63745b3a2d39791559b5c1b311447b5371
-rw-r--r--test/core/support/percent_decode_corpus/17eeaca784409adbe43365c32ac87915d736bba32
-rw-r--r--test/core/support/percent_decode_corpus/2040c1ff65f52a7ae668c2c8f324de5dacc9d6951
-rw-r--r--test/core/support/percent_decode_corpus/26b0d1da23027ae54db96e125e4a9e98842d77fb1
-rw-r--r--test/core/support/percent_decode_corpus/2a089c0db45acdb4c6ed8e7ff81ca7235792c0b91
-rw-r--r--test/core/support/percent_decode_corpus/35b7b3bc3a740d5c3abca0d75b53f0e1e1ee998a1
-rw-r--r--test/core/support/percent_decode_corpus/36367ba1adba47a1cbc3a88707fde8cc7abdc2481
-rw-r--r--test/core/support/percent_decode_corpus/39c2ba51548a0beaf0d6d1164531f1447dc311b51
-rw-r--r--test/core/support/percent_decode_corpus/56d08fea787c041395c6697ce26cfbc0decbe6881
-rw-r--r--test/core/support/percent_decode_corpus/678d981fdabb9f0d6640235cf1719dd1e1e66ae91
-rw-r--r--test/core/support/percent_decode_corpus/68751961609ec010565de0aa87521dcbf0722c5d1
-rw-r--r--test/core/support/percent_decode_corpus/7875c06c6f03c9aa2f8e9c59f8d8957c8a32e7592
-rw-r--r--test/core/support/percent_decode_corpus/7b302090e090a5829b6d1dd7be30bd4e36a7e60f1
-rw-r--r--test/core/support/percent_decode_corpus/875e1022169c9e4c541a9ad894e69e989df22ba11
-rw-r--r--test/core/support/percent_decode_corpus/8c1051ce066f5a26de9a9d133180621d0da957b41
-rw-r--r--test/core/support/percent_decode_corpus/8e084e628ab83a18ac7ca7cb3506525263655c631
-rw-r--r--test/core/support/percent_decode_corpus/9d316c4675f40ddccaf8f1cc7aea94170b1e42231
-rw-r--r--test/core/support/percent_decode_corpus/ad1c7c11d18a7d116e2c2ef4d4c5afb1270836ae1
-rw-r--r--test/core/support/percent_decode_corpus/b471f94aa4facf502e622e4a248f1ba4063ae6811
-rw-r--r--test/core/support/percent_decode_corpus/bf52ece030f16136d46e0dc97f58d60a0d8a1f0b2
-rw-r--r--test/core/support/percent_decode_corpus/d5b2a7177339ba2b7ce2f60e5f4459bef1e727582
-rw-r--r--test/core/support/percent_decode_corpus/de867b64c54a7ed773dc611fc5cd2f17c54331132
-rw-r--r--test/core/support/percent_decode_corpus/e3948dbe004950591630dd5c52f4e0fcbd5e388a1
-rw-r--r--test/core/support/percent_decode_corpus/e7064f0b80f61dbc65915311032d27baa569ae2a1
-rw-r--r--test/core/support/percent_decode_corpus/xyz1
-rw-r--r--test/core/support/percent_decode_fuzzer.c66
-rw-r--r--test/core/support/percent_encode_corpus/0d3ee7fa54e6c66103965fd4409b044ba7db6c3f3
-rw-r--r--test/core/support/percent_encode_corpus/2e7ccf75e27b9501e3b28cf1c50ed0c45ab7c2261
-rw-r--r--test/core/support/percent_encode_corpus/55bb859f3942c462b03b7cbcf22ab4a0ac9705cf1
-rw-r--r--test/core/support/percent_encode_corpus/56070cecd54c845b6d4334953b17b712eb000d931
-rw-r--r--test/core/support/percent_encode_corpus/61f50e891bf7ff5eb7a7af206f1e25d77f8756e73
-rw-r--r--test/core/support/percent_encode_corpus/6e0c60cefc704c7940e475a87dd9ae423061cb5a3
-rw-r--r--test/core/support/percent_encode_corpus/7271ebcc6d22a0f186f7bc3c1973a7ed1bec8d8e4
-rw-r--r--test/core/support/percent_encode_corpus/74c83ece3e2920a67593a9be9c82468f16cbb9691
-rw-r--r--test/core/support/percent_encode_corpus/98e004fd2a9f141a7a019720820080e12d637c063
-rw-r--r--test/core/support/percent_encode_corpus/ba2c1e98227aa21ea3bb2ca4d0e504119717da8b3
-rw-r--r--test/core/support/percent_encode_corpus/c16b9fd45370d4afb5d3ebd307a6e263c25ffd452
-rw-r--r--test/core/support/percent_encode_corpus/d58c3cd4eab9b6d2343abfa1c25c90a383fe0ec31
-rw-r--r--test/core/support/percent_encode_corpus/e2619218ede30d2b7b8ecd601a9f0ae754b728b44
-rw-r--r--test/core/support/percent_encode_corpus/f93b3653e453f0e3eea3198001be6ce46e64bd215
-rw-r--r--test/core/support/percent_encode_corpus/fd41d029c7682ad3d1c40a9fd017a4c85b673a543
-rw-r--r--test/core/support/percent_encode_corpus/xyz1
-rw-r--r--test/core/support/percent_encode_fuzzer.c73
-rw-r--r--test/core/support/percent_encoding_test.c157
-rw-r--r--test/core/surface/lame_client_test.c4
-rw-r--r--test/core/surface/public_headers_must_be_c89.c6
-rw-r--r--test/core/transport/chttp2/hpack_encoder_test.c5
-rw-r--r--test/core/util/test_config.c1
-rw-r--r--test/cpp/codegen/codegen_test_full.cc1
-rw-r--r--test/cpp/codegen/compiler_test_golden43
-rw-r--r--test/cpp/end2end/async_end2end_test.cc4
-rw-r--r--test/cpp/end2end/client_crash_test.cc1
-rw-r--r--test/cpp/end2end/client_crash_test_server.cc2
-rw-r--r--test/cpp/end2end/end2end_test.cc5
-rw-r--r--test/cpp/end2end/hybrid_end2end_test.cc87
-rw-r--r--test/cpp/end2end/mock_test.cc10
-rw-r--r--test/cpp/end2end/server_crash_test.cc1
-rw-r--r--test/cpp/end2end/server_crash_test_client.cc2
-rw-r--r--test/cpp/end2end/shutdown_test.cc4
-rw-r--r--test/cpp/end2end/streaming_throughput_test.cc4
-rw-r--r--test/cpp/end2end/test_service_impl.cc3
-rw-r--r--test/cpp/grpclb/grpclb_api_test.cc44
-rw-r--r--test/cpp/grpclb/grpclb_test.cc174
-rw-r--r--test/cpp/interop/client.cc1
-rw-r--r--test/cpp/interop/interop_client.cc1
-rw-r--r--test/cpp/interop/metrics_client.cc1
-rw-r--r--test/cpp/interop/stress_interop_client.cc1
-rw-r--r--test/cpp/interop/stress_test.cc1
-rw-r--r--test/cpp/qps/client.h30
-rw-r--r--test/cpp/qps/driver.cc34
-rw-r--r--test/cpp/util/grpc_tool.cc22
-rw-r--r--test/cpp/util/grpc_tool.h2
-rw-r--r--test/cpp/util/metrics_server.cc1
-rw-r--r--test/cpp/util/proto_reflection_descriptor_database.h2
-rw-r--r--test/cpp/util/test_config_cc.cc (renamed from test/cpp/util/test_config.cc)0
-rw-r--r--test/cpp/util/test_credentials_provider.cc1
-rw-r--r--test/distrib/csharp/DistribTest/.gitignore1
-rw-r--r--test/distrib/csharp/DistribTest/DistribTest.csproj2
-rw-r--r--test/distrib/csharp/DistribTest/DistribTest.project.json11
-rw-r--r--test/distrib/csharp/DistribTest/packages.config4
-rw-r--r--test/distrib/csharp/DistribTest/project.json22
-rw-r--r--test/distrib/csharp/run_distrib_test.bat14
-rwxr-xr-xtest/distrib/csharp/run_distrib_test.sh2
-rwxr-xr-xtest/distrib/csharp/run_distrib_test_dotnetcli.sh58
-rwxr-xr-xtest/distrib/csharp/update_version.sh6
m---------third_party/nanopb0
m---------third_party/protobuf0
-rwxr-xr-xtools/codegen/core/gen_nano_proto.sh2
-rw-r--r--tools/codegen/core/gen_percent_encoding_tables.c (renamed from include/grpc/impl/codegen/alloc.h)74
-rwxr-xr-xtools/codegen/core/gen_static_metadata.py1
-rwxr-xr-xtools/distrib/c-ish/check_documentation.py91
-rw-r--r--tools/dockerfile/distribtest/csharp_centos7_x64/Dockerfile4
-rw-r--r--tools/dockerfile/distribtest/csharp_jessie_x64/Dockerfile3
-rw-r--r--tools/dockerfile/distribtest/csharp_jessie_x86/Dockerfile3
-rw-r--r--tools/dockerfile/distribtest/csharp_ubuntu1404_x64/Dockerfile20
-rw-r--r--tools/dockerfile/distribtest/csharp_ubuntu1504_x64/Dockerfile3
-rw-r--r--tools/dockerfile/distribtest/csharp_ubuntu1510_x64/Dockerfile3
-rw-r--r--tools/dockerfile/distribtest/csharp_ubuntu1604_x64/Dockerfile5
-rw-r--r--tools/dockerfile/distribtest/csharp_wheezy_x64/Dockerfile5
-rw-r--r--tools/dockerfile/interoptest/grpc_interop_csharpcoreclr/Dockerfile126
-rwxr-xr-xtools/dockerfile/interoptest/grpc_interop_csharpcoreclr/build_interop.sh43
-rw-r--r--tools/dockerfile/test/csharp_coreclr_x64/Dockerfile1
-rw-r--r--tools/doxygen/Doxyfile.c++7
-rw-r--r--tools/doxygen/Doxyfile.c++.internal25
-rw-r--r--tools/doxygen/Doxyfile.core13
-rw-r--r--tools/doxygen/Doxyfile.core.internal21
-rw-r--r--tools/fuzzer/runners/percent_decode_fuzzer.sh45
-rw-r--r--tools/fuzzer/runners/percent_encode_fuzzer.sh45
-rwxr-xr-xtools/gce/linux_performance_worker_init.sh5
-rwxr-xr-xtools/gource/gen-all-logs.sh2
-rwxr-xr-xtools/jenkins/run_full_cloud_prod.sh (renamed from tools/jenkins/run_full_interop.sh)9
-rwxr-xr-xtools/jenkins/run_sweep_performance.sh45
-rw-r--r--tools/run_tests/build_artifact_protoc.bat6
-rw-r--r--tools/run_tests/build_csharp_coreclr.bat2
-rw-r--r--tools/run_tests/distribtest_targets.py16
-rw-r--r--tools/run_tests/package_targets.py14
-rw-r--r--tools/run_tests/performance/scenario_config.py131
-rw-r--r--tools/run_tests/pre_build_csharp.bat3
-rwxr-xr-xtools/run_tests/pre_build_csharp.sh3
-rwxr-xr-xtools/run_tests/run_build_statistics.py17
-rwxr-xr-xtools/run_tests/run_interop_tests.py40
-rwxr-xr-xtools/run_tests/run_performance_tests.py112
-rwxr-xr-xtools/run_tests/run_tests.py14
-rwxr-xr-xtools/run_tests/sanity/check_sources_and_headers.py5
-rwxr-xr-xtools/run_tests/sanity/check_submodules.sh4
-rw-r--r--tools/run_tests/sources_and_headers.json187
-rw-r--r--tools/run_tests/tests.json2985
-rw-r--r--vsprojects/buildtests_c.sln46
-rw-r--r--vsprojects/grpc.sln21
-rw-r--r--vsprojects/vcxproj/gen_percent_encoding_tables/gen_percent_encoding_tables.vcxproj162
-rw-r--r--vsprojects/vcxproj/gen_percent_encoding_tables/gen_percent_encoding_tables.vcxproj.filters21
-rw-r--r--vsprojects/vcxproj/gpr/gpr.vcxproj8
-rw-r--r--vsprojects/vcxproj/gpr/gpr.vcxproj.filters17
-rw-r--r--vsprojects/vcxproj/grpc++/grpc++.vcxproj31
-rw-r--r--vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters45
-rw-r--r--vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj7
-rw-r--r--vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj.filters17
-rw-r--r--vsprojects/vcxproj/grpc++_test_config/grpc++_test_config.vcxproj2
-rw-r--r--vsprojects/vcxproj/grpc++_test_config/grpc++_test_config.vcxproj.filters2
-rw-r--r--vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj7
-rw-r--r--vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj.filters17
-rw-r--r--vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj31
-rw-r--r--vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters45
-rw-r--r--vsprojects/vcxproj/grpc/grpc.vcxproj18
-rw-r--r--vsprojects/vcxproj/grpc/grpc.vcxproj.filters34
-rw-r--r--vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj6
-rw-r--r--vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters14
-rw-r--r--vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj18
-rw-r--r--vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters34
-rw-r--r--vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj7
-rw-r--r--vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj.filters17
-rw-r--r--vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj7
-rw-r--r--vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj.filters17
-rw-r--r--vsprojects/vcxproj/test/end2end/fixtures/h2_census_nosec_test/h2_census_nosec_test.vcxproj11
-rw-r--r--vsprojects/vcxproj/test/end2end/fixtures/h2_compress_nosec_test/h2_compress_nosec_test.vcxproj11
-rw-r--r--vsprojects/vcxproj/test/end2end/fixtures/h2_full+trace_nosec_test/h2_full+trace_nosec_test.vcxproj11
-rw-r--r--vsprojects/vcxproj/test/end2end/fixtures/h2_full_nosec_test/h2_full_nosec_test.vcxproj11
-rw-r--r--vsprojects/vcxproj/test/end2end/fixtures/h2_load_reporting_nosec_test/h2_load_reporting_nosec_test.vcxproj11
-rw-r--r--vsprojects/vcxproj/test/end2end/fixtures/h2_proxy_nosec_test/h2_proxy_nosec_test.vcxproj11
-rw-r--r--vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair+trace_nosec_test/h2_sockpair+trace_nosec_test.vcxproj11
-rw-r--r--vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_1byte_nosec_test/h2_sockpair_1byte_nosec_test.vcxproj11
-rw-r--r--vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_nosec_test/h2_sockpair_nosec_test.vcxproj11
-rw-r--r--vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj4
-rw-r--r--vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters6
-rw-r--r--vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj4
-rw-r--r--vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters6
-rw-r--r--vsprojects/vcxproj/test/gpr_percent_encoding_test/gpr_percent_encoding_test.vcxproj193
-rw-r--r--vsprojects/vcxproj/test/gpr_percent_encoding_test/gpr_percent_encoding_test.vcxproj.filters21
-rw-r--r--vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj7
-rw-r--r--vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj.filters17
492 files changed, 11106 insertions, 4798 deletions
diff --git a/BUILD b/BUILD
index e3db970ee7..770a8a9c3f 100644
--- a/BUILD
+++ b/BUILD
@@ -52,6 +52,7 @@ cc_library(
"src/core/lib/support/block_annotate.h",
"src/core/lib/support/env.h",
"src/core/lib/support/murmur_hash.h",
+ "src/core/lib/support/percent_encoding.h",
"src/core/lib/support/stack_lockfree.h",
"src/core/lib/support/string.h",
"src/core/lib/support/string_windows.h",
@@ -79,6 +80,7 @@ cc_library(
"src/core/lib/support/log_posix.c",
"src/core/lib/support/log_windows.c",
"src/core/lib/support/murmur_hash.c",
+ "src/core/lib/support/percent_encoding.c",
"src/core/lib/support/slice.c",
"src/core/lib/support/slice_buffer.c",
"src/core/lib/support/stack_lockfree.c",
@@ -133,20 +135,17 @@ cc_library(
"include/grpc/support/tls_msvc.h",
"include/grpc/support/tls_pthread.h",
"include/grpc/support/useful.h",
- "include/grpc/impl/codegen/alloc.h",
"include/grpc/impl/codegen/atm.h",
"include/grpc/impl/codegen/atm_gcc_atomic.h",
"include/grpc/impl/codegen/atm_gcc_sync.h",
"include/grpc/impl/codegen/atm_windows.h",
- "include/grpc/impl/codegen/log.h",
+ "include/grpc/impl/codegen/gpr_types.h",
"include/grpc/impl/codegen/port_platform.h",
"include/grpc/impl/codegen/slice.h",
- "include/grpc/impl/codegen/slice_buffer.h",
"include/grpc/impl/codegen/sync.h",
"include/grpc/impl/codegen/sync_generic.h",
"include/grpc/impl/codegen/sync_posix.h",
"include/grpc/impl/codegen/sync_windows.h",
- "include/grpc/impl/codegen/time.h",
],
includes = [
"include",
@@ -288,7 +287,6 @@ cc_library(
"src/core/lib/tsi/transport_security_interface.h",
"src/core/ext/client_config/client_channel.h",
"src/core/ext/client_config/client_channel_factory.h",
- "src/core/ext/client_config/client_config.h",
"src/core/ext/client_config/connector.h",
"src/core/ext/client_config/initial_connect_string.h",
"src/core/ext/client_config/lb_policy.h",
@@ -298,8 +296,8 @@ cc_library(
"src/core/ext/client_config/resolver.h",
"src/core/ext/client_config/resolver_factory.h",
"src/core/ext/client_config/resolver_registry.h",
+ "src/core/ext/client_config/resolver_result.h",
"src/core/ext/client_config/subchannel.h",
- "src/core/ext/client_config/subchannel_call_holder.h",
"src/core/ext/client_config/subchannel_index.h",
"src/core/ext/client_config/uri_parser.h",
"src/core/ext/lb_policy/grpclb/grpclb.h",
@@ -312,6 +310,7 @@ cc_library(
"src/core/ext/census/census_interface.h",
"src/core/ext/census/census_rpc_stats.h",
"src/core/ext/census/gen/census.pb.h",
+ "src/core/ext/census/gen/trace_context.pb.h",
"src/core/ext/census/grpc_filter.h",
"src/core/ext/census/mlog.h",
"src/core/ext/census/resource.h",
@@ -461,7 +460,6 @@ cc_library(
"src/core/ext/client_config/channel_connectivity.c",
"src/core/ext/client_config/client_channel.c",
"src/core/ext/client_config/client_channel_factory.c",
- "src/core/ext/client_config/client_config.c",
"src/core/ext/client_config/client_config_plugin.c",
"src/core/ext/client_config/connector.c",
"src/core/ext/client_config/default_initial_connect_string.c",
@@ -473,8 +471,8 @@ cc_library(
"src/core/ext/client_config/resolver.c",
"src/core/ext/client_config/resolver_factory.c",
"src/core/ext/client_config/resolver_registry.c",
+ "src/core/ext/client_config/resolver_result.c",
"src/core/ext/client_config/subchannel.c",
- "src/core/ext/client_config/subchannel_call_holder.c",
"src/core/ext/client_config/subchannel_index.c",
"src/core/ext/client_config/uri_parser.c",
"src/core/ext/transport/chttp2/server/insecure/server_chttp2.c",
@@ -493,6 +491,7 @@ cc_library(
"src/core/ext/census/base_resources.c",
"src/core/ext/census/context.c",
"src/core/ext/census/gen/census.pb.c",
+ "src/core/ext/census/gen/trace_context.pb.c",
"src/core/ext/census/grpc_context.c",
"src/core/ext/census/grpc_filter.c",
"src/core/ext/census/grpc_plugin.c",
@@ -512,27 +511,23 @@ cc_library(
"include/grpc/grpc_posix.h",
"include/grpc/grpc_security_constants.h",
"include/grpc/status.h",
- "include/grpc/impl/codegen/byte_buffer.h",
"include/grpc/impl/codegen/byte_buffer_reader.h",
"include/grpc/impl/codegen/compression_types.h",
"include/grpc/impl/codegen/connectivity_state.h",
"include/grpc/impl/codegen/grpc_types.h",
"include/grpc/impl/codegen/propagation_bits.h",
"include/grpc/impl/codegen/status.h",
- "include/grpc/impl/codegen/alloc.h",
"include/grpc/impl/codegen/atm.h",
"include/grpc/impl/codegen/atm_gcc_atomic.h",
"include/grpc/impl/codegen/atm_gcc_sync.h",
"include/grpc/impl/codegen/atm_windows.h",
- "include/grpc/impl/codegen/log.h",
+ "include/grpc/impl/codegen/gpr_types.h",
"include/grpc/impl/codegen/port_platform.h",
"include/grpc/impl/codegen/slice.h",
- "include/grpc/impl/codegen/slice_buffer.h",
"include/grpc/impl/codegen/sync.h",
"include/grpc/impl/codegen/sync_generic.h",
"include/grpc/impl/codegen/sync_posix.h",
"include/grpc/impl/codegen/sync_windows.h",
- "include/grpc/impl/codegen/time.h",
"include/grpc/grpc_security.h",
"include/grpc/census.h",
],
@@ -660,7 +655,6 @@ cc_library(
"src/core/ext/transport/chttp2/alpn/alpn.h",
"src/core/ext/client_config/client_channel.h",
"src/core/ext/client_config/client_channel_factory.h",
- "src/core/ext/client_config/client_config.h",
"src/core/ext/client_config/connector.h",
"src/core/ext/client_config/initial_connect_string.h",
"src/core/ext/client_config/lb_policy.h",
@@ -670,8 +664,8 @@ cc_library(
"src/core/ext/client_config/resolver.h",
"src/core/ext/client_config/resolver_factory.h",
"src/core/ext/client_config/resolver_registry.h",
+ "src/core/ext/client_config/resolver_result.h",
"src/core/ext/client_config/subchannel.h",
- "src/core/ext/client_config/subchannel_call_holder.h",
"src/core/ext/client_config/subchannel_index.h",
"src/core/ext/client_config/uri_parser.h",
"src/core/lib/security/context/security_context.h",
@@ -817,7 +811,6 @@ cc_library(
"src/core/ext/client_config/channel_connectivity.c",
"src/core/ext/client_config/client_channel.c",
"src/core/ext/client_config/client_channel_factory.c",
- "src/core/ext/client_config/client_config.c",
"src/core/ext/client_config/client_config_plugin.c",
"src/core/ext/client_config/connector.c",
"src/core/ext/client_config/default_initial_connect_string.c",
@@ -829,8 +822,8 @@ cc_library(
"src/core/ext/client_config/resolver.c",
"src/core/ext/client_config/resolver_factory.c",
"src/core/ext/client_config/resolver_registry.c",
+ "src/core/ext/client_config/resolver_result.c",
"src/core/ext/client_config/subchannel.c",
- "src/core/ext/client_config/subchannel_call_holder.c",
"src/core/ext/client_config/subchannel_index.c",
"src/core/ext/client_config/uri_parser.c",
"src/core/lib/http/httpcli_security_connector.c",
@@ -871,27 +864,23 @@ cc_library(
"include/grpc/grpc_posix.h",
"include/grpc/grpc_security_constants.h",
"include/grpc/status.h",
- "include/grpc/impl/codegen/byte_buffer.h",
"include/grpc/impl/codegen/byte_buffer_reader.h",
"include/grpc/impl/codegen/compression_types.h",
"include/grpc/impl/codegen/connectivity_state.h",
"include/grpc/impl/codegen/grpc_types.h",
"include/grpc/impl/codegen/propagation_bits.h",
"include/grpc/impl/codegen/status.h",
- "include/grpc/impl/codegen/alloc.h",
"include/grpc/impl/codegen/atm.h",
"include/grpc/impl/codegen/atm_gcc_atomic.h",
"include/grpc/impl/codegen/atm_gcc_sync.h",
"include/grpc/impl/codegen/atm_windows.h",
- "include/grpc/impl/codegen/log.h",
+ "include/grpc/impl/codegen/gpr_types.h",
"include/grpc/impl/codegen/port_platform.h",
"include/grpc/impl/codegen/slice.h",
- "include/grpc/impl/codegen/slice_buffer.h",
"include/grpc/impl/codegen/sync.h",
"include/grpc/impl/codegen/sync_generic.h",
"include/grpc/impl/codegen/sync_posix.h",
"include/grpc/impl/codegen/sync_windows.h",
- "include/grpc/impl/codegen/time.h",
"include/grpc/grpc_cronet.h",
"include/grpc/grpc_security.h",
],
@@ -1013,7 +1002,6 @@ cc_library(
"src/core/ext/transport/chttp2/alpn/alpn.h",
"src/core/ext/client_config/client_channel.h",
"src/core/ext/client_config/client_channel_factory.h",
- "src/core/ext/client_config/client_config.h",
"src/core/ext/client_config/connector.h",
"src/core/ext/client_config/initial_connect_string.h",
"src/core/ext/client_config/lb_policy.h",
@@ -1023,8 +1011,8 @@ cc_library(
"src/core/ext/client_config/resolver.h",
"src/core/ext/client_config/resolver_factory.h",
"src/core/ext/client_config/resolver_registry.h",
+ "src/core/ext/client_config/resolver_result.h",
"src/core/ext/client_config/subchannel.h",
- "src/core/ext/client_config/subchannel_call_holder.h",
"src/core/ext/client_config/subchannel_index.h",
"src/core/ext/client_config/uri_parser.h",
"src/core/ext/load_reporting/load_reporting.h",
@@ -1037,6 +1025,7 @@ cc_library(
"src/core/ext/census/census_interface.h",
"src/core/ext/census/census_rpc_stats.h",
"src/core/ext/census/gen/census.pb.h",
+ "src/core/ext/census/gen/trace_context.pb.h",
"src/core/ext/census/grpc_filter.h",
"src/core/ext/census/mlog.h",
"src/core/ext/census/resource.h",
@@ -1161,7 +1150,6 @@ cc_library(
"src/core/ext/client_config/channel_connectivity.c",
"src/core/ext/client_config/client_channel.c",
"src/core/ext/client_config/client_channel_factory.c",
- "src/core/ext/client_config/client_config.c",
"src/core/ext/client_config/client_config_plugin.c",
"src/core/ext/client_config/connector.c",
"src/core/ext/client_config/default_initial_connect_string.c",
@@ -1173,8 +1161,8 @@ cc_library(
"src/core/ext/client_config/resolver.c",
"src/core/ext/client_config/resolver_factory.c",
"src/core/ext/client_config/resolver_registry.c",
+ "src/core/ext/client_config/resolver_result.c",
"src/core/ext/client_config/subchannel.c",
- "src/core/ext/client_config/subchannel_call_holder.c",
"src/core/ext/client_config/subchannel_index.c",
"src/core/ext/client_config/uri_parser.c",
"src/core/ext/resolver/dns/native/dns_resolver.c",
@@ -1189,6 +1177,7 @@ cc_library(
"src/core/ext/census/base_resources.c",
"src/core/ext/census/context.c",
"src/core/ext/census/gen/census.pb.c",
+ "src/core/ext/census/gen/trace_context.pb.c",
"src/core/ext/census/grpc_context.c",
"src/core/ext/census/grpc_filter.c",
"src/core/ext/census/grpc_plugin.c",
@@ -1208,27 +1197,23 @@ cc_library(
"include/grpc/grpc_posix.h",
"include/grpc/grpc_security_constants.h",
"include/grpc/status.h",
- "include/grpc/impl/codegen/byte_buffer.h",
"include/grpc/impl/codegen/byte_buffer_reader.h",
"include/grpc/impl/codegen/compression_types.h",
"include/grpc/impl/codegen/connectivity_state.h",
"include/grpc/impl/codegen/grpc_types.h",
"include/grpc/impl/codegen/propagation_bits.h",
"include/grpc/impl/codegen/status.h",
- "include/grpc/impl/codegen/alloc.h",
"include/grpc/impl/codegen/atm.h",
"include/grpc/impl/codegen/atm_gcc_atomic.h",
"include/grpc/impl/codegen/atm_gcc_sync.h",
"include/grpc/impl/codegen/atm_windows.h",
- "include/grpc/impl/codegen/log.h",
+ "include/grpc/impl/codegen/gpr_types.h",
"include/grpc/impl/codegen/port_platform.h",
"include/grpc/impl/codegen/slice.h",
- "include/grpc/impl/codegen/slice_buffer.h",
"include/grpc/impl/codegen/sync.h",
"include/grpc/impl/codegen/sync_generic.h",
"include/grpc/impl/codegen/sync_posix.h",
"include/grpc/impl/codegen/sync_windows.h",
- "include/grpc/impl/codegen/time.h",
"include/grpc/census.h",
],
includes = [
@@ -1337,39 +1322,39 @@ cc_library(
"src/core/lib/transport/timeout_encoding.h",
"src/core/lib/transport/transport.h",
"src/core/lib/transport/transport_impl.h",
+ "src/cpp/client/insecure_credentials.cc",
"src/cpp/client/secure_credentials.cc",
"src/cpp/common/auth_property_iterator.cc",
"src/cpp/common/secure_auth_context.cc",
"src/cpp/common/secure_channel_arguments.cc",
"src/cpp/common/secure_create_auth_context.cc",
+ "src/cpp/server/insecure_server_credentials.cc",
"src/cpp/server/secure_server_credentials.cc",
- "src/cpp/client/channel.cc",
+ "src/cpp/client/channel_cc.cc",
"src/cpp/client/client_context.cc",
"src/cpp/client/create_channel.cc",
"src/cpp/client/create_channel_internal.cc",
"src/cpp/client/create_channel_posix.cc",
- "src/cpp/client/credentials.cc",
+ "src/cpp/client/credentials_cc.cc",
"src/cpp/client/generic_stub.cc",
- "src/cpp/client/insecure_credentials.cc",
"src/cpp/common/channel_arguments.cc",
"src/cpp/common/channel_filter.cc",
- "src/cpp/common/completion_queue.cc",
+ "src/cpp/common/completion_queue_cc.cc",
"src/cpp/common/core_codegen.cc",
"src/cpp/common/rpc_method.cc",
"src/cpp/server/async_generic_service.cc",
"src/cpp/server/create_default_thread_pool.cc",
"src/cpp/server/dynamic_thread_pool.cc",
- "src/cpp/server/insecure_server_credentials.cc",
- "src/cpp/server/server.cc",
"src/cpp/server/server_builder.cc",
+ "src/cpp/server/server_cc.cc",
"src/cpp/server/server_context.cc",
"src/cpp/server/server_credentials.cc",
"src/cpp/server/server_posix.cc",
- "src/cpp/util/byte_buffer.cc",
- "src/cpp/util/slice.cc",
+ "src/cpp/util/byte_buffer_cc.cc",
+ "src/cpp/util/slice_cc.cc",
"src/cpp/util/status.cc",
"src/cpp/util/string_ref.cc",
- "src/cpp/util/time.cc",
+ "src/cpp/util/time_cc.cc",
"src/core/lib/channel/channel_args.c",
"src/core/lib/channel/channel_stack.c",
"src/core/lib/channel/channel_stack_builder.c",
@@ -1516,27 +1501,23 @@ cc_library(
"include/grpc/grpc_posix.h",
"include/grpc/grpc_security_constants.h",
"include/grpc/status.h",
- "include/grpc/impl/codegen/byte_buffer.h",
"include/grpc/impl/codegen/byte_buffer_reader.h",
"include/grpc/impl/codegen/compression_types.h",
"include/grpc/impl/codegen/connectivity_state.h",
"include/grpc/impl/codegen/grpc_types.h",
"include/grpc/impl/codegen/propagation_bits.h",
"include/grpc/impl/codegen/status.h",
- "include/grpc/impl/codegen/alloc.h",
"include/grpc/impl/codegen/atm.h",
"include/grpc/impl/codegen/atm_gcc_atomic.h",
"include/grpc/impl/codegen/atm_gcc_sync.h",
"include/grpc/impl/codegen/atm_windows.h",
- "include/grpc/impl/codegen/log.h",
+ "include/grpc/impl/codegen/gpr_types.h",
"include/grpc/impl/codegen/port_platform.h",
"include/grpc/impl/codegen/slice.h",
- "include/grpc/impl/codegen/slice_buffer.h",
"include/grpc/impl/codegen/sync.h",
"include/grpc/impl/codegen/sync_generic.h",
"include/grpc/impl/codegen/sync_posix.h",
"include/grpc/impl/codegen/sync_windows.h",
- "include/grpc/impl/codegen/time.h",
"include/grpc++/impl/codegen/async_stream.h",
"include/grpc++/impl/codegen/async_unary_call.h",
"include/grpc++/impl/codegen/call.h",
@@ -1560,6 +1541,7 @@ cc_library(
"include/grpc++/impl/codegen/service_type.h",
"include/grpc++/impl/codegen/status.h",
"include/grpc++/impl/codegen/status_code_enum.h",
+ "include/grpc++/impl/codegen/status_helper.h",
"include/grpc++/impl/codegen/string_ref.h",
"include/grpc++/impl/codegen/stub_options.h",
"include/grpc++/impl/codegen/sync.h",
@@ -1619,6 +1601,7 @@ cc_library(
"include/grpc++/impl/codegen/service_type.h",
"include/grpc++/impl/codegen/status.h",
"include/grpc++/impl/codegen/status_code_enum.h",
+ "include/grpc++/impl/codegen/status_helper.h",
"include/grpc++/impl/codegen/string_ref.h",
"include/grpc++/impl/codegen/stub_options.h",
"include/grpc++/impl/codegen/sync.h",
@@ -1626,27 +1609,23 @@ cc_library(
"include/grpc++/impl/codegen/sync_no_cxx11.h",
"include/grpc++/impl/codegen/sync_stream.h",
"include/grpc++/impl/codegen/time.h",
- "include/grpc/impl/codegen/byte_buffer.h",
"include/grpc/impl/codegen/byte_buffer_reader.h",
"include/grpc/impl/codegen/compression_types.h",
"include/grpc/impl/codegen/connectivity_state.h",
"include/grpc/impl/codegen/grpc_types.h",
"include/grpc/impl/codegen/propagation_bits.h",
"include/grpc/impl/codegen/status.h",
- "include/grpc/impl/codegen/alloc.h",
"include/grpc/impl/codegen/atm.h",
"include/grpc/impl/codegen/atm_gcc_atomic.h",
"include/grpc/impl/codegen/atm_gcc_sync.h",
"include/grpc/impl/codegen/atm_windows.h",
- "include/grpc/impl/codegen/log.h",
+ "include/grpc/impl/codegen/gpr_types.h",
"include/grpc/impl/codegen/port_platform.h",
"include/grpc/impl/codegen/slice.h",
- "include/grpc/impl/codegen/slice_buffer.h",
"include/grpc/impl/codegen/sync.h",
"include/grpc/impl/codegen/sync_generic.h",
"include/grpc/impl/codegen/sync_posix.h",
"include/grpc/impl/codegen/sync_windows.h",
- "include/grpc/impl/codegen/time.h",
"include/grpc++/impl/codegen/config_protobuf.h",
],
includes = [
@@ -1747,34 +1726,34 @@ cc_library(
"src/core/lib/transport/timeout_encoding.h",
"src/core/lib/transport/transport.h",
"src/core/lib/transport/transport_impl.h",
+ "src/cpp/client/insecure_credentials.cc",
"src/cpp/common/insecure_create_auth_context.cc",
- "src/cpp/client/channel.cc",
+ "src/cpp/server/insecure_server_credentials.cc",
+ "src/cpp/client/channel_cc.cc",
"src/cpp/client/client_context.cc",
"src/cpp/client/create_channel.cc",
"src/cpp/client/create_channel_internal.cc",
"src/cpp/client/create_channel_posix.cc",
- "src/cpp/client/credentials.cc",
+ "src/cpp/client/credentials_cc.cc",
"src/cpp/client/generic_stub.cc",
- "src/cpp/client/insecure_credentials.cc",
"src/cpp/common/channel_arguments.cc",
"src/cpp/common/channel_filter.cc",
- "src/cpp/common/completion_queue.cc",
+ "src/cpp/common/completion_queue_cc.cc",
"src/cpp/common/core_codegen.cc",
"src/cpp/common/rpc_method.cc",
"src/cpp/server/async_generic_service.cc",
"src/cpp/server/create_default_thread_pool.cc",
"src/cpp/server/dynamic_thread_pool.cc",
- "src/cpp/server/insecure_server_credentials.cc",
- "src/cpp/server/server.cc",
"src/cpp/server/server_builder.cc",
+ "src/cpp/server/server_cc.cc",
"src/cpp/server/server_context.cc",
"src/cpp/server/server_credentials.cc",
"src/cpp/server/server_posix.cc",
- "src/cpp/util/byte_buffer.cc",
- "src/cpp/util/slice.cc",
+ "src/cpp/util/byte_buffer_cc.cc",
+ "src/cpp/util/slice_cc.cc",
"src/cpp/util/status.cc",
"src/cpp/util/string_ref.cc",
- "src/cpp/util/time.cc",
+ "src/cpp/util/time_cc.cc",
"src/core/lib/channel/channel_args.c",
"src/core/lib/channel/channel_stack.c",
"src/core/lib/channel/channel_stack_builder.c",
@@ -1921,27 +1900,23 @@ cc_library(
"include/grpc/grpc_posix.h",
"include/grpc/grpc_security_constants.h",
"include/grpc/status.h",
- "include/grpc/impl/codegen/byte_buffer.h",
"include/grpc/impl/codegen/byte_buffer_reader.h",
"include/grpc/impl/codegen/compression_types.h",
"include/grpc/impl/codegen/connectivity_state.h",
"include/grpc/impl/codegen/grpc_types.h",
"include/grpc/impl/codegen/propagation_bits.h",
"include/grpc/impl/codegen/status.h",
- "include/grpc/impl/codegen/alloc.h",
"include/grpc/impl/codegen/atm.h",
"include/grpc/impl/codegen/atm_gcc_atomic.h",
"include/grpc/impl/codegen/atm_gcc_sync.h",
"include/grpc/impl/codegen/atm_windows.h",
- "include/grpc/impl/codegen/log.h",
+ "include/grpc/impl/codegen/gpr_types.h",
"include/grpc/impl/codegen/port_platform.h",
"include/grpc/impl/codegen/slice.h",
- "include/grpc/impl/codegen/slice_buffer.h",
"include/grpc/impl/codegen/sync.h",
"include/grpc/impl/codegen/sync_generic.h",
"include/grpc/impl/codegen/sync_posix.h",
"include/grpc/impl/codegen/sync_windows.h",
- "include/grpc/impl/codegen/time.h",
"include/grpc++/impl/codegen/async_stream.h",
"include/grpc++/impl/codegen/async_unary_call.h",
"include/grpc++/impl/codegen/call.h",
@@ -1965,6 +1940,7 @@ cc_library(
"include/grpc++/impl/codegen/service_type.h",
"include/grpc++/impl/codegen/status.h",
"include/grpc++/impl/codegen/status_code_enum.h",
+ "include/grpc++/impl/codegen/status_helper.h",
"include/grpc++/impl/codegen/string_ref.h",
"include/grpc++/impl/codegen/stub_options.h",
"include/grpc++/impl/codegen/sync.h",
@@ -2069,6 +2045,7 @@ objc_library(
"src/core/lib/support/log_posix.c",
"src/core/lib/support/log_windows.c",
"src/core/lib/support/murmur_hash.c",
+ "src/core/lib/support/percent_encoding.c",
"src/core/lib/support/slice.c",
"src/core/lib/support/slice_buffer.c",
"src/core/lib/support/stack_lockfree.c",
@@ -2123,25 +2100,23 @@ objc_library(
"include/grpc/support/tls_msvc.h",
"include/grpc/support/tls_pthread.h",
"include/grpc/support/useful.h",
- "include/grpc/impl/codegen/alloc.h",
"include/grpc/impl/codegen/atm.h",
"include/grpc/impl/codegen/atm_gcc_atomic.h",
"include/grpc/impl/codegen/atm_gcc_sync.h",
"include/grpc/impl/codegen/atm_windows.h",
- "include/grpc/impl/codegen/log.h",
+ "include/grpc/impl/codegen/gpr_types.h",
"include/grpc/impl/codegen/port_platform.h",
"include/grpc/impl/codegen/slice.h",
- "include/grpc/impl/codegen/slice_buffer.h",
"include/grpc/impl/codegen/sync.h",
"include/grpc/impl/codegen/sync_generic.h",
"include/grpc/impl/codegen/sync_posix.h",
"include/grpc/impl/codegen/sync_windows.h",
- "include/grpc/impl/codegen/time.h",
"src/core/lib/profiling/timers.h",
"src/core/lib/support/backoff.h",
"src/core/lib/support/block_annotate.h",
"src/core/lib/support/env.h",
"src/core/lib/support/murmur_hash.h",
+ "src/core/lib/support/percent_encoding.h",
"src/core/lib/support/stack_lockfree.h",
"src/core/lib/support/string.h",
"src/core/lib/support/string_windows.h",
@@ -2307,7 +2282,6 @@ objc_library(
"src/core/ext/client_config/channel_connectivity.c",
"src/core/ext/client_config/client_channel.c",
"src/core/ext/client_config/client_channel_factory.c",
- "src/core/ext/client_config/client_config.c",
"src/core/ext/client_config/client_config_plugin.c",
"src/core/ext/client_config/connector.c",
"src/core/ext/client_config/default_initial_connect_string.c",
@@ -2319,8 +2293,8 @@ objc_library(
"src/core/ext/client_config/resolver.c",
"src/core/ext/client_config/resolver_factory.c",
"src/core/ext/client_config/resolver_registry.c",
+ "src/core/ext/client_config/resolver_result.c",
"src/core/ext/client_config/subchannel.c",
- "src/core/ext/client_config/subchannel_call_holder.c",
"src/core/ext/client_config/subchannel_index.c",
"src/core/ext/client_config/uri_parser.c",
"src/core/ext/transport/chttp2/server/insecure/server_chttp2.c",
@@ -2339,6 +2313,7 @@ objc_library(
"src/core/ext/census/base_resources.c",
"src/core/ext/census/context.c",
"src/core/ext/census/gen/census.pb.c",
+ "src/core/ext/census/gen/trace_context.pb.c",
"src/core/ext/census/grpc_context.c",
"src/core/ext/census/grpc_filter.c",
"src/core/ext/census/grpc_plugin.c",
@@ -2358,27 +2333,23 @@ objc_library(
"include/grpc/grpc_posix.h",
"include/grpc/grpc_security_constants.h",
"include/grpc/status.h",
- "include/grpc/impl/codegen/byte_buffer.h",
"include/grpc/impl/codegen/byte_buffer_reader.h",
"include/grpc/impl/codegen/compression_types.h",
"include/grpc/impl/codegen/connectivity_state.h",
"include/grpc/impl/codegen/grpc_types.h",
"include/grpc/impl/codegen/propagation_bits.h",
"include/grpc/impl/codegen/status.h",
- "include/grpc/impl/codegen/alloc.h",
"include/grpc/impl/codegen/atm.h",
"include/grpc/impl/codegen/atm_gcc_atomic.h",
"include/grpc/impl/codegen/atm_gcc_sync.h",
"include/grpc/impl/codegen/atm_windows.h",
- "include/grpc/impl/codegen/log.h",
+ "include/grpc/impl/codegen/gpr_types.h",
"include/grpc/impl/codegen/port_platform.h",
"include/grpc/impl/codegen/slice.h",
- "include/grpc/impl/codegen/slice_buffer.h",
"include/grpc/impl/codegen/sync.h",
"include/grpc/impl/codegen/sync_generic.h",
"include/grpc/impl/codegen/sync_posix.h",
"include/grpc/impl/codegen/sync_windows.h",
- "include/grpc/impl/codegen/time.h",
"include/grpc/grpc_security.h",
"include/grpc/census.h",
"src/core/lib/channel/channel_args.h",
@@ -2508,7 +2479,6 @@ objc_library(
"src/core/lib/tsi/transport_security_interface.h",
"src/core/ext/client_config/client_channel.h",
"src/core/ext/client_config/client_channel_factory.h",
- "src/core/ext/client_config/client_config.h",
"src/core/ext/client_config/connector.h",
"src/core/ext/client_config/initial_connect_string.h",
"src/core/ext/client_config/lb_policy.h",
@@ -2518,8 +2488,8 @@ objc_library(
"src/core/ext/client_config/resolver.h",
"src/core/ext/client_config/resolver_factory.h",
"src/core/ext/client_config/resolver_registry.h",
+ "src/core/ext/client_config/resolver_result.h",
"src/core/ext/client_config/subchannel.h",
- "src/core/ext/client_config/subchannel_call_holder.h",
"src/core/ext/client_config/subchannel_index.h",
"src/core/ext/client_config/uri_parser.h",
"src/core/ext/lb_policy/grpclb/grpclb.h",
@@ -2532,6 +2502,7 @@ objc_library(
"src/core/ext/census/census_interface.h",
"src/core/ext/census/census_rpc_stats.h",
"src/core/ext/census/gen/census.pb.h",
+ "src/core/ext/census/gen/trace_context.pb.h",
"src/core/ext/census/grpc_filter.h",
"src/core/ext/census/mlog.h",
"src/core/ext/census/resource.h",
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fbcc6bbeae..6aa79917b6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -192,6 +192,7 @@ add_library(gpr
src/core/lib/support/log_posix.c
src/core/lib/support/log_windows.c
src/core/lib/support/murmur_hash.c
+ src/core/lib/support/percent_encoding.c
src/core/lib/support/slice.c
src/core/lib/support/slice_buffer.c
src/core/lib/support/stack_lockfree.c
@@ -257,20 +258,17 @@ foreach(_hdr
include/grpc/support/tls_msvc.h
include/grpc/support/tls_pthread.h
include/grpc/support/useful.h
- include/grpc/impl/codegen/alloc.h
include/grpc/impl/codegen/atm.h
include/grpc/impl/codegen/atm_gcc_atomic.h
include/grpc/impl/codegen/atm_gcc_sync.h
include/grpc/impl/codegen/atm_windows.h
- include/grpc/impl/codegen/log.h
+ include/grpc/impl/codegen/gpr_types.h
include/grpc/impl/codegen/port_platform.h
include/grpc/impl/codegen/slice.h
- include/grpc/impl/codegen/slice_buffer.h
include/grpc/impl/codegen/sync.h
include/grpc/impl/codegen/sync_generic.h
include/grpc/impl/codegen/sync_posix.h
include/grpc/impl/codegen/sync_windows.h
- include/grpc/impl/codegen/time.h
)
string(REPLACE "include/" "" _path ${_hdr})
get_filename_component(_path ${_path} PATH)
@@ -435,7 +433,6 @@ add_library(grpc
src/core/ext/client_config/channel_connectivity.c
src/core/ext/client_config/client_channel.c
src/core/ext/client_config/client_channel_factory.c
- src/core/ext/client_config/client_config.c
src/core/ext/client_config/client_config_plugin.c
src/core/ext/client_config/connector.c
src/core/ext/client_config/default_initial_connect_string.c
@@ -447,8 +444,8 @@ add_library(grpc
src/core/ext/client_config/resolver.c
src/core/ext/client_config/resolver_factory.c
src/core/ext/client_config/resolver_registry.c
+ src/core/ext/client_config/resolver_result.c
src/core/ext/client_config/subchannel.c
- src/core/ext/client_config/subchannel_call_holder.c
src/core/ext/client_config/subchannel_index.c
src/core/ext/client_config/uri_parser.c
src/core/ext/transport/chttp2/server/insecure/server_chttp2.c
@@ -470,6 +467,7 @@ add_library(grpc
src/core/ext/census/base_resources.c
src/core/ext/census/context.c
src/core/ext/census/gen/census.pb.c
+ src/core/ext/census/gen/trace_context.pb.c
src/core/ext/census/grpc_context.c
src/core/ext/census/grpc_filter.c
src/core/ext/census/grpc_plugin.c
@@ -506,27 +504,23 @@ foreach(_hdr
include/grpc/grpc_posix.h
include/grpc/grpc_security_constants.h
include/grpc/status.h
- include/grpc/impl/codegen/byte_buffer.h
include/grpc/impl/codegen/byte_buffer_reader.h
include/grpc/impl/codegen/compression_types.h
include/grpc/impl/codegen/connectivity_state.h
include/grpc/impl/codegen/grpc_types.h
include/grpc/impl/codegen/propagation_bits.h
include/grpc/impl/codegen/status.h
- include/grpc/impl/codegen/alloc.h
include/grpc/impl/codegen/atm.h
include/grpc/impl/codegen/atm_gcc_atomic.h
include/grpc/impl/codegen/atm_gcc_sync.h
include/grpc/impl/codegen/atm_windows.h
- include/grpc/impl/codegen/log.h
+ include/grpc/impl/codegen/gpr_types.h
include/grpc/impl/codegen/port_platform.h
include/grpc/impl/codegen/slice.h
- include/grpc/impl/codegen/slice_buffer.h
include/grpc/impl/codegen/sync.h
include/grpc/impl/codegen/sync_generic.h
include/grpc/impl/codegen/sync_posix.h
include/grpc/impl/codegen/sync_windows.h
- include/grpc/impl/codegen/time.h
include/grpc/grpc_security.h
include/grpc/census.h
)
@@ -667,7 +661,6 @@ add_library(grpc_cronet
src/core/ext/client_config/channel_connectivity.c
src/core/ext/client_config/client_channel.c
src/core/ext/client_config/client_channel_factory.c
- src/core/ext/client_config/client_config.c
src/core/ext/client_config/client_config_plugin.c
src/core/ext/client_config/connector.c
src/core/ext/client_config/default_initial_connect_string.c
@@ -679,8 +672,8 @@ add_library(grpc_cronet
src/core/ext/client_config/resolver.c
src/core/ext/client_config/resolver_factory.c
src/core/ext/client_config/resolver_registry.c
+ src/core/ext/client_config/resolver_result.c
src/core/ext/client_config/subchannel.c
- src/core/ext/client_config/subchannel_call_holder.c
src/core/ext/client_config/subchannel_index.c
src/core/ext/client_config/uri_parser.c
src/core/lib/http/httpcli_security_connector.c
@@ -737,27 +730,23 @@ foreach(_hdr
include/grpc/grpc_posix.h
include/grpc/grpc_security_constants.h
include/grpc/status.h
- include/grpc/impl/codegen/byte_buffer.h
include/grpc/impl/codegen/byte_buffer_reader.h
include/grpc/impl/codegen/compression_types.h
include/grpc/impl/codegen/connectivity_state.h
include/grpc/impl/codegen/grpc_types.h
include/grpc/impl/codegen/propagation_bits.h
include/grpc/impl/codegen/status.h
- include/grpc/impl/codegen/alloc.h
include/grpc/impl/codegen/atm.h
include/grpc/impl/codegen/atm_gcc_atomic.h
include/grpc/impl/codegen/atm_gcc_sync.h
include/grpc/impl/codegen/atm_windows.h
- include/grpc/impl/codegen/log.h
+ include/grpc/impl/codegen/gpr_types.h
include/grpc/impl/codegen/port_platform.h
include/grpc/impl/codegen/slice.h
- include/grpc/impl/codegen/slice_buffer.h
include/grpc/impl/codegen/sync.h
include/grpc/impl/codegen/sync_generic.h
include/grpc/impl/codegen/sync_posix.h
include/grpc/impl/codegen/sync_windows.h
- include/grpc/impl/codegen/time.h
include/grpc/grpc_cronet.h
include/grpc/grpc_security.h
)
@@ -899,7 +888,6 @@ add_library(grpc_unsecure
src/core/ext/client_config/channel_connectivity.c
src/core/ext/client_config/client_channel.c
src/core/ext/client_config/client_channel_factory.c
- src/core/ext/client_config/client_config.c
src/core/ext/client_config/client_config_plugin.c
src/core/ext/client_config/connector.c
src/core/ext/client_config/default_initial_connect_string.c
@@ -911,8 +899,8 @@ add_library(grpc_unsecure
src/core/ext/client_config/resolver.c
src/core/ext/client_config/resolver_factory.c
src/core/ext/client_config/resolver_registry.c
+ src/core/ext/client_config/resolver_result.c
src/core/ext/client_config/subchannel.c
- src/core/ext/client_config/subchannel_call_holder.c
src/core/ext/client_config/subchannel_index.c
src/core/ext/client_config/uri_parser.c
src/core/ext/resolver/dns/native/dns_resolver.c
@@ -930,6 +918,7 @@ add_library(grpc_unsecure
src/core/ext/census/base_resources.c
src/core/ext/census/context.c
src/core/ext/census/gen/census.pb.c
+ src/core/ext/census/gen/trace_context.pb.c
src/core/ext/census/grpc_context.c
src/core/ext/census/grpc_filter.c
src/core/ext/census/grpc_plugin.c
@@ -964,27 +953,23 @@ foreach(_hdr
include/grpc/grpc_posix.h
include/grpc/grpc_security_constants.h
include/grpc/status.h
- include/grpc/impl/codegen/byte_buffer.h
include/grpc/impl/codegen/byte_buffer_reader.h
include/grpc/impl/codegen/compression_types.h
include/grpc/impl/codegen/connectivity_state.h
include/grpc/impl/codegen/grpc_types.h
include/grpc/impl/codegen/propagation_bits.h
include/grpc/impl/codegen/status.h
- include/grpc/impl/codegen/alloc.h
include/grpc/impl/codegen/atm.h
include/grpc/impl/codegen/atm_gcc_atomic.h
include/grpc/impl/codegen/atm_gcc_sync.h
include/grpc/impl/codegen/atm_windows.h
- include/grpc/impl/codegen/log.h
+ include/grpc/impl/codegen/gpr_types.h
include/grpc/impl/codegen/port_platform.h
include/grpc/impl/codegen/slice.h
- include/grpc/impl/codegen/slice_buffer.h
include/grpc/impl/codegen/sync.h
include/grpc/impl/codegen/sync_generic.h
include/grpc/impl/codegen/sync_posix.h
include/grpc/impl/codegen/sync_windows.h
- include/grpc/impl/codegen/time.h
include/grpc/census.h
)
string(REPLACE "include/" "" _path ${_hdr})
@@ -1005,39 +990,39 @@ endif()
add_library(grpc++
+ src/cpp/client/insecure_credentials.cc
src/cpp/client/secure_credentials.cc
src/cpp/common/auth_property_iterator.cc
src/cpp/common/secure_auth_context.cc
src/cpp/common/secure_channel_arguments.cc
src/cpp/common/secure_create_auth_context.cc
+ src/cpp/server/insecure_server_credentials.cc
src/cpp/server/secure_server_credentials.cc
- src/cpp/client/channel.cc
+ src/cpp/client/channel_cc.cc
src/cpp/client/client_context.cc
src/cpp/client/create_channel.cc
src/cpp/client/create_channel_internal.cc
src/cpp/client/create_channel_posix.cc
- src/cpp/client/credentials.cc
+ src/cpp/client/credentials_cc.cc
src/cpp/client/generic_stub.cc
- src/cpp/client/insecure_credentials.cc
src/cpp/common/channel_arguments.cc
src/cpp/common/channel_filter.cc
- src/cpp/common/completion_queue.cc
+ src/cpp/common/completion_queue_cc.cc
src/cpp/common/core_codegen.cc
src/cpp/common/rpc_method.cc
src/cpp/server/async_generic_service.cc
src/cpp/server/create_default_thread_pool.cc
src/cpp/server/dynamic_thread_pool.cc
- src/cpp/server/insecure_server_credentials.cc
- src/cpp/server/server.cc
src/cpp/server/server_builder.cc
+ src/cpp/server/server_cc.cc
src/cpp/server/server_context.cc
src/cpp/server/server_credentials.cc
src/cpp/server/server_posix.cc
- src/cpp/util/byte_buffer.cc
- src/cpp/util/slice.cc
+ src/cpp/util/byte_buffer_cc.cc
+ src/cpp/util/slice_cc.cc
src/cpp/util/status.cc
src/cpp/util/string_ref.cc
- src/cpp/util/time.cc
+ src/cpp/util/time_cc.cc
src/core/lib/channel/channel_args.c
src/core/lib/channel/channel_stack.c
src/core/lib/channel/channel_stack_builder.c
@@ -1202,27 +1187,23 @@ foreach(_hdr
include/grpc/grpc_posix.h
include/grpc/grpc_security_constants.h
include/grpc/status.h
- include/grpc/impl/codegen/byte_buffer.h
include/grpc/impl/codegen/byte_buffer_reader.h
include/grpc/impl/codegen/compression_types.h
include/grpc/impl/codegen/connectivity_state.h
include/grpc/impl/codegen/grpc_types.h
include/grpc/impl/codegen/propagation_bits.h
include/grpc/impl/codegen/status.h
- include/grpc/impl/codegen/alloc.h
include/grpc/impl/codegen/atm.h
include/grpc/impl/codegen/atm_gcc_atomic.h
include/grpc/impl/codegen/atm_gcc_sync.h
include/grpc/impl/codegen/atm_windows.h
- include/grpc/impl/codegen/log.h
+ include/grpc/impl/codegen/gpr_types.h
include/grpc/impl/codegen/port_platform.h
include/grpc/impl/codegen/slice.h
- include/grpc/impl/codegen/slice_buffer.h
include/grpc/impl/codegen/sync.h
include/grpc/impl/codegen/sync_generic.h
include/grpc/impl/codegen/sync_posix.h
include/grpc/impl/codegen/sync_windows.h
- include/grpc/impl/codegen/time.h
include/grpc++/impl/codegen/async_stream.h
include/grpc++/impl/codegen/async_unary_call.h
include/grpc++/impl/codegen/call.h
@@ -1246,6 +1227,7 @@ foreach(_hdr
include/grpc++/impl/codegen/service_type.h
include/grpc++/impl/codegen/status.h
include/grpc++/impl/codegen/status_code_enum.h
+ include/grpc++/impl/codegen/status_helper.h
include/grpc++/impl/codegen/string_ref.h
include/grpc++/impl/codegen/stub_options.h
include/grpc++/impl/codegen/sync.h
@@ -1319,6 +1301,7 @@ foreach(_hdr
include/grpc++/impl/codegen/service_type.h
include/grpc++/impl/codegen/status.h
include/grpc++/impl/codegen/status_code_enum.h
+ include/grpc++/impl/codegen/status_helper.h
include/grpc++/impl/codegen/string_ref.h
include/grpc++/impl/codegen/stub_options.h
include/grpc++/impl/codegen/sync.h
@@ -1326,27 +1309,23 @@ foreach(_hdr
include/grpc++/impl/codegen/sync_no_cxx11.h
include/grpc++/impl/codegen/sync_stream.h
include/grpc++/impl/codegen/time.h
- include/grpc/impl/codegen/byte_buffer.h
include/grpc/impl/codegen/byte_buffer_reader.h
include/grpc/impl/codegen/compression_types.h
include/grpc/impl/codegen/connectivity_state.h
include/grpc/impl/codegen/grpc_types.h
include/grpc/impl/codegen/propagation_bits.h
include/grpc/impl/codegen/status.h
- include/grpc/impl/codegen/alloc.h
include/grpc/impl/codegen/atm.h
include/grpc/impl/codegen/atm_gcc_atomic.h
include/grpc/impl/codegen/atm_gcc_sync.h
include/grpc/impl/codegen/atm_windows.h
- include/grpc/impl/codegen/log.h
+ include/grpc/impl/codegen/gpr_types.h
include/grpc/impl/codegen/port_platform.h
include/grpc/impl/codegen/slice.h
- include/grpc/impl/codegen/slice_buffer.h
include/grpc/impl/codegen/sync.h
include/grpc/impl/codegen/sync_generic.h
include/grpc/impl/codegen/sync_posix.h
include/grpc/impl/codegen/sync_windows.h
- include/grpc/impl/codegen/time.h
include/grpc++/impl/codegen/config_protobuf.h
)
string(REPLACE "include/" "" _path ${_hdr})
@@ -1367,34 +1346,34 @@ endif()
add_library(grpc++_unsecure
+ src/cpp/client/insecure_credentials.cc
src/cpp/common/insecure_create_auth_context.cc
- src/cpp/client/channel.cc
+ src/cpp/server/insecure_server_credentials.cc
+ src/cpp/client/channel_cc.cc
src/cpp/client/client_context.cc
src/cpp/client/create_channel.cc
src/cpp/client/create_channel_internal.cc
src/cpp/client/create_channel_posix.cc
- src/cpp/client/credentials.cc
+ src/cpp/client/credentials_cc.cc
src/cpp/client/generic_stub.cc
- src/cpp/client/insecure_credentials.cc
src/cpp/common/channel_arguments.cc
src/cpp/common/channel_filter.cc
- src/cpp/common/completion_queue.cc
+ src/cpp/common/completion_queue_cc.cc
src/cpp/common/core_codegen.cc
src/cpp/common/rpc_method.cc
src/cpp/server/async_generic_service.cc
src/cpp/server/create_default_thread_pool.cc
src/cpp/server/dynamic_thread_pool.cc
- src/cpp/server/insecure_server_credentials.cc
- src/cpp/server/server.cc
src/cpp/server/server_builder.cc
+ src/cpp/server/server_cc.cc
src/cpp/server/server_context.cc
src/cpp/server/server_credentials.cc
src/cpp/server/server_posix.cc
- src/cpp/util/byte_buffer.cc
- src/cpp/util/slice.cc
+ src/cpp/util/byte_buffer_cc.cc
+ src/cpp/util/slice_cc.cc
src/cpp/util/status.cc
src/cpp/util/string_ref.cc
- src/cpp/util/time.cc
+ src/cpp/util/time_cc.cc
src/core/lib/channel/channel_args.c
src/core/lib/channel/channel_stack.c
src/core/lib/channel/channel_stack_builder.c
@@ -1558,27 +1537,23 @@ foreach(_hdr
include/grpc/grpc_posix.h
include/grpc/grpc_security_constants.h
include/grpc/status.h
- include/grpc/impl/codegen/byte_buffer.h
include/grpc/impl/codegen/byte_buffer_reader.h
include/grpc/impl/codegen/compression_types.h
include/grpc/impl/codegen/connectivity_state.h
include/grpc/impl/codegen/grpc_types.h
include/grpc/impl/codegen/propagation_bits.h
include/grpc/impl/codegen/status.h
- include/grpc/impl/codegen/alloc.h
include/grpc/impl/codegen/atm.h
include/grpc/impl/codegen/atm_gcc_atomic.h
include/grpc/impl/codegen/atm_gcc_sync.h
include/grpc/impl/codegen/atm_windows.h
- include/grpc/impl/codegen/log.h
+ include/grpc/impl/codegen/gpr_types.h
include/grpc/impl/codegen/port_platform.h
include/grpc/impl/codegen/slice.h
- include/grpc/impl/codegen/slice_buffer.h
include/grpc/impl/codegen/sync.h
include/grpc/impl/codegen/sync_generic.h
include/grpc/impl/codegen/sync_posix.h
include/grpc/impl/codegen/sync_windows.h
- include/grpc/impl/codegen/time.h
include/grpc++/impl/codegen/async_stream.h
include/grpc++/impl/codegen/async_unary_call.h
include/grpc++/impl/codegen/call.h
@@ -1602,6 +1577,7 @@ foreach(_hdr
include/grpc++/impl/codegen/service_type.h
include/grpc++/impl/codegen/status.h
include/grpc++/impl/codegen/status_code_enum.h
+ include/grpc++/impl/codegen/status_helper.h
include/grpc++/impl/codegen/string_ref.h
include/grpc++/impl/codegen/stub_options.h
include/grpc++/impl/codegen/sync.h
@@ -1751,6 +1727,30 @@ if (gRPC_INSTALL)
endif()
+add_executable(gen_percent_encoding_tables
+ tools/codegen/core/gen_percent_encoding_tables.c
+)
+
+target_include_directories(gen_percent_encoding_tables
+ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
+ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
+ PRIVATE ${BORINGSSL_ROOT_DIR}/include
+ PRIVATE ${PROTOBUF_ROOT_DIR}/src
+ PRIVATE ${ZLIB_ROOT_DIR}
+ PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib
+)
+
+
+
+if (gRPC_INSTALL)
+ install(TARGETS gen_percent_encoding_tables EXPORT gRPCTargets
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ )
+endif()
+
+
add_executable(grpc_create_jwt
test/core/security/create_jwt.c
)
diff --git a/INSTALL.md b/INSTALL.md
index 7bdb9b273f..686145566f 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -9,7 +9,7 @@ refer to these documents
* [Java](https://github.com/grpc/grpc-java)
* [Node](src/node): `npm install grpc`
* [Objective-C](src/objective-c)
- * [PHP](src/php): `pecl install grpc-beta`
+ * [PHP](src/php): `pecl install grpc`
* [Python](src/python/grpcio): `pip install grpcio`
* [Ruby](src/ruby): `gem install grpc`
diff --git a/Makefile b/Makefile
index c7622c0b9a..515e1fcb83 100644
--- a/Makefile
+++ b/Makefile
@@ -930,6 +930,7 @@ fling_stream_test: $(BINDIR)/$(CONFIG)/fling_stream_test
fling_test: $(BINDIR)/$(CONFIG)/fling_test
gen_hpack_tables: $(BINDIR)/$(CONFIG)/gen_hpack_tables
gen_legal_metadata_characters: $(BINDIR)/$(CONFIG)/gen_legal_metadata_characters
+gen_percent_encoding_tables: $(BINDIR)/$(CONFIG)/gen_percent_encoding_tables
goaway_server_test: $(BINDIR)/$(CONFIG)/goaway_server_test
gpr_avl_test: $(BINDIR)/$(CONFIG)/gpr_avl_test
gpr_backoff_test: $(BINDIR)/$(CONFIG)/gpr_backoff_test
@@ -939,6 +940,7 @@ gpr_env_test: $(BINDIR)/$(CONFIG)/gpr_env_test
gpr_histogram_test: $(BINDIR)/$(CONFIG)/gpr_histogram_test
gpr_host_port_test: $(BINDIR)/$(CONFIG)/gpr_host_port_test
gpr_log_test: $(BINDIR)/$(CONFIG)/gpr_log_test
+gpr_percent_encoding_test: $(BINDIR)/$(CONFIG)/gpr_percent_encoding_test
gpr_slice_buffer_test: $(BINDIR)/$(CONFIG)/gpr_slice_buffer_test
gpr_slice_test: $(BINDIR)/$(CONFIG)/gpr_slice_test
gpr_stack_lockfree_test: $(BINDIR)/$(CONFIG)/gpr_stack_lockfree_test
@@ -993,6 +995,8 @@ murmur_hash_test: $(BINDIR)/$(CONFIG)/murmur_hash_test
nanopb_fuzzer_response_test: $(BINDIR)/$(CONFIG)/nanopb_fuzzer_response_test
nanopb_fuzzer_serverlist_test: $(BINDIR)/$(CONFIG)/nanopb_fuzzer_serverlist_test
no_server_test: $(BINDIR)/$(CONFIG)/no_server_test
+percent_decode_fuzzer: $(BINDIR)/$(CONFIG)/percent_decode_fuzzer
+percent_encode_fuzzer: $(BINDIR)/$(CONFIG)/percent_encode_fuzzer
resolve_address_test: $(BINDIR)/$(CONFIG)/resolve_address_test
secure_channel_create_test: $(BINDIR)/$(CONFIG)/secure_channel_create_test
secure_endpoint_test: $(BINDIR)/$(CONFIG)/secure_endpoint_test
@@ -1118,9 +1122,7 @@ server_registered_method_bad_client_test: $(BINDIR)/$(CONFIG)/server_registered_
simple_request_bad_client_test: $(BINDIR)/$(CONFIG)/simple_request_bad_client_test
unknown_frame_bad_client_test: $(BINDIR)/$(CONFIG)/unknown_frame_bad_client_test
window_overflow_bad_client_test: $(BINDIR)/$(CONFIG)/window_overflow_bad_client_test
-bad_ssl_alpn_server: $(BINDIR)/$(CONFIG)/bad_ssl_alpn_server
bad_ssl_cert_server: $(BINDIR)/$(CONFIG)/bad_ssl_cert_server
-bad_ssl_alpn_test: $(BINDIR)/$(CONFIG)/bad_ssl_alpn_test
bad_ssl_cert_test: $(BINDIR)/$(CONFIG)/bad_ssl_cert_test
h2_census_test: $(BINDIR)/$(CONFIG)/h2_census_test
h2_compress_test: $(BINDIR)/$(CONFIG)/h2_compress_test
@@ -1159,6 +1161,8 @@ http_response_fuzzer_test_one_entry: $(BINDIR)/$(CONFIG)/http_response_fuzzer_te
json_fuzzer_test_one_entry: $(BINDIR)/$(CONFIG)/json_fuzzer_test_one_entry
nanopb_fuzzer_response_test_one_entry: $(BINDIR)/$(CONFIG)/nanopb_fuzzer_response_test_one_entry
nanopb_fuzzer_serverlist_test_one_entry: $(BINDIR)/$(CONFIG)/nanopb_fuzzer_serverlist_test_one_entry
+percent_decode_fuzzer_one_entry: $(BINDIR)/$(CONFIG)/percent_decode_fuzzer_one_entry
+percent_encode_fuzzer_one_entry: $(BINDIR)/$(CONFIG)/percent_encode_fuzzer_one_entry
server_fuzzer_one_entry: $(BINDIR)/$(CONFIG)/server_fuzzer_one_entry
uri_fuzzer_test_one_entry: $(BINDIR)/$(CONFIG)/uri_fuzzer_test_one_entry
@@ -1258,6 +1262,7 @@ buildtests_c: privatelibs_c \
$(BINDIR)/$(CONFIG)/gpr_histogram_test \
$(BINDIR)/$(CONFIG)/gpr_host_port_test \
$(BINDIR)/$(CONFIG)/gpr_log_test \
+ $(BINDIR)/$(CONFIG)/gpr_percent_encoding_test \
$(BINDIR)/$(CONFIG)/gpr_slice_buffer_test \
$(BINDIR)/$(CONFIG)/gpr_slice_test \
$(BINDIR)/$(CONFIG)/gpr_stack_lockfree_test \
@@ -1335,9 +1340,7 @@ buildtests_c: privatelibs_c \
$(BINDIR)/$(CONFIG)/simple_request_bad_client_test \
$(BINDIR)/$(CONFIG)/unknown_frame_bad_client_test \
$(BINDIR)/$(CONFIG)/window_overflow_bad_client_test \
- $(BINDIR)/$(CONFIG)/bad_ssl_alpn_server \
$(BINDIR)/$(CONFIG)/bad_ssl_cert_server \
- $(BINDIR)/$(CONFIG)/bad_ssl_alpn_test \
$(BINDIR)/$(CONFIG)/bad_ssl_cert_test \
$(BINDIR)/$(CONFIG)/h2_census_test \
$(BINDIR)/$(CONFIG)/h2_compress_test \
@@ -1376,6 +1379,8 @@ buildtests_c: privatelibs_c \
$(BINDIR)/$(CONFIG)/json_fuzzer_test_one_entry \
$(BINDIR)/$(CONFIG)/nanopb_fuzzer_response_test_one_entry \
$(BINDIR)/$(CONFIG)/nanopb_fuzzer_serverlist_test_one_entry \
+ $(BINDIR)/$(CONFIG)/percent_decode_fuzzer_one_entry \
+ $(BINDIR)/$(CONFIG)/percent_encode_fuzzer_one_entry \
$(BINDIR)/$(CONFIG)/server_fuzzer_one_entry \
$(BINDIR)/$(CONFIG)/uri_fuzzer_test_one_entry \
@@ -1592,6 +1597,8 @@ test_c: buildtests_c
$(Q) $(BINDIR)/$(CONFIG)/gpr_host_port_test || ( echo test gpr_host_port_test failed ; exit 1 )
$(E) "[RUN] Testing gpr_log_test"
$(Q) $(BINDIR)/$(CONFIG)/gpr_log_test || ( echo test gpr_log_test failed ; exit 1 )
+ $(E) "[RUN] Testing gpr_percent_encoding_test"
+ $(Q) $(BINDIR)/$(CONFIG)/gpr_percent_encoding_test || ( echo test gpr_percent_encoding_test failed ; exit 1 )
$(E) "[RUN] Testing gpr_slice_buffer_test"
$(Q) $(BINDIR)/$(CONFIG)/gpr_slice_buffer_test || ( echo test gpr_slice_buffer_test failed ; exit 1 )
$(E) "[RUN] Testing gpr_slice_test"
@@ -1732,8 +1739,6 @@ test_c: buildtests_c
$(Q) $(BINDIR)/$(CONFIG)/unknown_frame_bad_client_test || ( echo test unknown_frame_bad_client_test failed ; exit 1 )
$(E) "[RUN] Testing window_overflow_bad_client_test"
$(Q) $(BINDIR)/$(CONFIG)/window_overflow_bad_client_test || ( echo test window_overflow_bad_client_test failed ; exit 1 )
- $(E) "[RUN] Testing bad_ssl_alpn_test"
- $(Q) $(BINDIR)/$(CONFIG)/bad_ssl_alpn_test || ( echo test bad_ssl_alpn_test failed ; exit 1 )
$(E) "[RUN] Testing bad_ssl_cert_test"
$(Q) $(BINDIR)/$(CONFIG)/bad_ssl_cert_test || ( echo test bad_ssl_cert_test failed ; exit 1 )
@@ -1825,7 +1830,7 @@ test_python: static_c
tools: tools_c tools_cxx
-tools_c: privatelibs_c $(BINDIR)/$(CONFIG)/gen_hpack_tables $(BINDIR)/$(CONFIG)/gen_legal_metadata_characters $(BINDIR)/$(CONFIG)/grpc_create_jwt $(BINDIR)/$(CONFIG)/grpc_print_google_default_creds_token $(BINDIR)/$(CONFIG)/grpc_verify_jwt
+tools_c: privatelibs_c $(BINDIR)/$(CONFIG)/gen_hpack_tables $(BINDIR)/$(CONFIG)/gen_legal_metadata_characters $(BINDIR)/$(CONFIG)/gen_percent_encoding_tables $(BINDIR)/$(CONFIG)/grpc_create_jwt $(BINDIR)/$(CONFIG)/grpc_print_google_default_creds_token $(BINDIR)/$(CONFIG)/grpc_verify_jwt
tools_cxx: privatelibs_cxx
@@ -2374,6 +2379,7 @@ LIBGPR_SRC = \
src/core/lib/support/log_posix.c \
src/core/lib/support/log_windows.c \
src/core/lib/support/murmur_hash.c \
+ src/core/lib/support/percent_encoding.c \
src/core/lib/support/slice.c \
src/core/lib/support/slice_buffer.c \
src/core/lib/support/stack_lockfree.c \
@@ -2428,20 +2434,17 @@ PUBLIC_HEADERS_C += \
include/grpc/support/tls_msvc.h \
include/grpc/support/tls_pthread.h \
include/grpc/support/useful.h \
- include/grpc/impl/codegen/alloc.h \
include/grpc/impl/codegen/atm.h \
include/grpc/impl/codegen/atm_gcc_atomic.h \
include/grpc/impl/codegen/atm_gcc_sync.h \
include/grpc/impl/codegen/atm_windows.h \
- include/grpc/impl/codegen/log.h \
+ include/grpc/impl/codegen/gpr_types.h \
include/grpc/impl/codegen/port_platform.h \
include/grpc/impl/codegen/slice.h \
- include/grpc/impl/codegen/slice_buffer.h \
include/grpc/impl/codegen/sync.h \
include/grpc/impl/codegen/sync_generic.h \
include/grpc/impl/codegen/sync_posix.h \
include/grpc/impl/codegen/sync_windows.h \
- include/grpc/impl/codegen/time.h \
LIBGPR_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGPR_SRC))))
@@ -2651,7 +2654,6 @@ LIBGRPC_SRC = \
src/core/ext/client_config/channel_connectivity.c \
src/core/ext/client_config/client_channel.c \
src/core/ext/client_config/client_channel_factory.c \
- src/core/ext/client_config/client_config.c \
src/core/ext/client_config/client_config_plugin.c \
src/core/ext/client_config/connector.c \
src/core/ext/client_config/default_initial_connect_string.c \
@@ -2663,8 +2665,8 @@ LIBGRPC_SRC = \
src/core/ext/client_config/resolver.c \
src/core/ext/client_config/resolver_factory.c \
src/core/ext/client_config/resolver_registry.c \
+ src/core/ext/client_config/resolver_result.c \
src/core/ext/client_config/subchannel.c \
- src/core/ext/client_config/subchannel_call_holder.c \
src/core/ext/client_config/subchannel_index.c \
src/core/ext/client_config/uri_parser.c \
src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \
@@ -2686,6 +2688,7 @@ LIBGRPC_SRC = \
src/core/ext/census/base_resources.c \
src/core/ext/census/context.c \
src/core/ext/census/gen/census.pb.c \
+ src/core/ext/census/gen/trace_context.pb.c \
src/core/ext/census/grpc_context.c \
src/core/ext/census/grpc_filter.c \
src/core/ext/census/grpc_plugin.c \
@@ -2705,27 +2708,23 @@ PUBLIC_HEADERS_C += \
include/grpc/grpc_posix.h \
include/grpc/grpc_security_constants.h \
include/grpc/status.h \
- include/grpc/impl/codegen/byte_buffer.h \
include/grpc/impl/codegen/byte_buffer_reader.h \
include/grpc/impl/codegen/compression_types.h \
include/grpc/impl/codegen/connectivity_state.h \
include/grpc/impl/codegen/grpc_types.h \
include/grpc/impl/codegen/propagation_bits.h \
include/grpc/impl/codegen/status.h \
- include/grpc/impl/codegen/alloc.h \
include/grpc/impl/codegen/atm.h \
include/grpc/impl/codegen/atm_gcc_atomic.h \
include/grpc/impl/codegen/atm_gcc_sync.h \
include/grpc/impl/codegen/atm_windows.h \
- include/grpc/impl/codegen/log.h \
+ include/grpc/impl/codegen/gpr_types.h \
include/grpc/impl/codegen/port_platform.h \
include/grpc/impl/codegen/slice.h \
- include/grpc/impl/codegen/slice_buffer.h \
include/grpc/impl/codegen/sync.h \
include/grpc/impl/codegen/sync_generic.h \
include/grpc/impl/codegen/sync_posix.h \
include/grpc/impl/codegen/sync_windows.h \
- include/grpc/impl/codegen/time.h \
include/grpc/grpc_security.h \
include/grpc/census.h \
@@ -2901,7 +2900,6 @@ LIBGRPC_CRONET_SRC = \
src/core/ext/client_config/channel_connectivity.c \
src/core/ext/client_config/client_channel.c \
src/core/ext/client_config/client_channel_factory.c \
- src/core/ext/client_config/client_config.c \
src/core/ext/client_config/client_config_plugin.c \
src/core/ext/client_config/connector.c \
src/core/ext/client_config/default_initial_connect_string.c \
@@ -2913,8 +2911,8 @@ LIBGRPC_CRONET_SRC = \
src/core/ext/client_config/resolver.c \
src/core/ext/client_config/resolver_factory.c \
src/core/ext/client_config/resolver_registry.c \
+ src/core/ext/client_config/resolver_result.c \
src/core/ext/client_config/subchannel.c \
- src/core/ext/client_config/subchannel_call_holder.c \
src/core/ext/client_config/subchannel_index.c \
src/core/ext/client_config/uri_parser.c \
src/core/lib/http/httpcli_security_connector.c \
@@ -2955,27 +2953,23 @@ PUBLIC_HEADERS_C += \
include/grpc/grpc_posix.h \
include/grpc/grpc_security_constants.h \
include/grpc/status.h \
- include/grpc/impl/codegen/byte_buffer.h \
include/grpc/impl/codegen/byte_buffer_reader.h \
include/grpc/impl/codegen/compression_types.h \
include/grpc/impl/codegen/connectivity_state.h \
include/grpc/impl/codegen/grpc_types.h \
include/grpc/impl/codegen/propagation_bits.h \
include/grpc/impl/codegen/status.h \
- include/grpc/impl/codegen/alloc.h \
include/grpc/impl/codegen/atm.h \
include/grpc/impl/codegen/atm_gcc_atomic.h \
include/grpc/impl/codegen/atm_gcc_sync.h \
include/grpc/impl/codegen/atm_windows.h \
- include/grpc/impl/codegen/log.h \
+ include/grpc/impl/codegen/gpr_types.h \
include/grpc/impl/codegen/port_platform.h \
include/grpc/impl/codegen/slice.h \
- include/grpc/impl/codegen/slice_buffer.h \
include/grpc/impl/codegen/sync.h \
include/grpc/impl/codegen/sync_generic.h \
include/grpc/impl/codegen/sync_posix.h \
include/grpc/impl/codegen/sync_windows.h \
- include/grpc/impl/codegen/time.h \
include/grpc/grpc_cronet.h \
include/grpc/grpc_security.h \
@@ -3147,27 +3141,23 @@ PUBLIC_HEADERS_C += \
include/grpc/grpc_posix.h \
include/grpc/grpc_security_constants.h \
include/grpc/status.h \
- include/grpc/impl/codegen/byte_buffer.h \
include/grpc/impl/codegen/byte_buffer_reader.h \
include/grpc/impl/codegen/compression_types.h \
include/grpc/impl/codegen/connectivity_state.h \
include/grpc/impl/codegen/grpc_types.h \
include/grpc/impl/codegen/propagation_bits.h \
include/grpc/impl/codegen/status.h \
- include/grpc/impl/codegen/alloc.h \
include/grpc/impl/codegen/atm.h \
include/grpc/impl/codegen/atm_gcc_atomic.h \
include/grpc/impl/codegen/atm_gcc_sync.h \
include/grpc/impl/codegen/atm_windows.h \
- include/grpc/impl/codegen/log.h \
+ include/grpc/impl/codegen/gpr_types.h \
include/grpc/impl/codegen/port_platform.h \
include/grpc/impl/codegen/slice.h \
- include/grpc/impl/codegen/slice_buffer.h \
include/grpc/impl/codegen/sync.h \
include/grpc/impl/codegen/sync_generic.h \
include/grpc/impl/codegen/sync_posix.h \
include/grpc/impl/codegen/sync_windows.h \
- include/grpc/impl/codegen/time.h \
LIBGRPC_TEST_UTIL_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC_TEST_UTIL_SRC))))
@@ -3360,7 +3350,6 @@ LIBGRPC_UNSECURE_SRC = \
src/core/ext/client_config/channel_connectivity.c \
src/core/ext/client_config/client_channel.c \
src/core/ext/client_config/client_channel_factory.c \
- src/core/ext/client_config/client_config.c \
src/core/ext/client_config/client_config_plugin.c \
src/core/ext/client_config/connector.c \
src/core/ext/client_config/default_initial_connect_string.c \
@@ -3372,8 +3361,8 @@ LIBGRPC_UNSECURE_SRC = \
src/core/ext/client_config/resolver.c \
src/core/ext/client_config/resolver_factory.c \
src/core/ext/client_config/resolver_registry.c \
+ src/core/ext/client_config/resolver_result.c \
src/core/ext/client_config/subchannel.c \
- src/core/ext/client_config/subchannel_call_holder.c \
src/core/ext/client_config/subchannel_index.c \
src/core/ext/client_config/uri_parser.c \
src/core/ext/resolver/dns/native/dns_resolver.c \
@@ -3391,6 +3380,7 @@ LIBGRPC_UNSECURE_SRC = \
src/core/ext/census/base_resources.c \
src/core/ext/census/context.c \
src/core/ext/census/gen/census.pb.c \
+ src/core/ext/census/gen/trace_context.pb.c \
src/core/ext/census/grpc_context.c \
src/core/ext/census/grpc_filter.c \
src/core/ext/census/grpc_plugin.c \
@@ -3410,27 +3400,23 @@ PUBLIC_HEADERS_C += \
include/grpc/grpc_posix.h \
include/grpc/grpc_security_constants.h \
include/grpc/status.h \
- include/grpc/impl/codegen/byte_buffer.h \
include/grpc/impl/codegen/byte_buffer_reader.h \
include/grpc/impl/codegen/compression_types.h \
include/grpc/impl/codegen/connectivity_state.h \
include/grpc/impl/codegen/grpc_types.h \
include/grpc/impl/codegen/propagation_bits.h \
include/grpc/impl/codegen/status.h \
- include/grpc/impl/codegen/alloc.h \
include/grpc/impl/codegen/atm.h \
include/grpc/impl/codegen/atm_gcc_atomic.h \
include/grpc/impl/codegen/atm_gcc_sync.h \
include/grpc/impl/codegen/atm_windows.h \
- include/grpc/impl/codegen/log.h \
+ include/grpc/impl/codegen/gpr_types.h \
include/grpc/impl/codegen/port_platform.h \
include/grpc/impl/codegen/slice.h \
- include/grpc/impl/codegen/slice_buffer.h \
include/grpc/impl/codegen/sync.h \
include/grpc/impl/codegen/sync_generic.h \
include/grpc/impl/codegen/sync_posix.h \
include/grpc/impl/codegen/sync_windows.h \
- include/grpc/impl/codegen/time.h \
include/grpc/census.h \
LIBGRPC_UNSECURE_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC_UNSECURE_SRC))))
@@ -3549,39 +3535,39 @@ endif
LIBGRPC++_SRC = \
+ src/cpp/client/insecure_credentials.cc \
src/cpp/client/secure_credentials.cc \
src/cpp/common/auth_property_iterator.cc \
src/cpp/common/secure_auth_context.cc \
src/cpp/common/secure_channel_arguments.cc \
src/cpp/common/secure_create_auth_context.cc \
+ src/cpp/server/insecure_server_credentials.cc \
src/cpp/server/secure_server_credentials.cc \
- src/cpp/client/channel.cc \
+ src/cpp/client/channel_cc.cc \
src/cpp/client/client_context.cc \
src/cpp/client/create_channel.cc \
src/cpp/client/create_channel_internal.cc \
src/cpp/client/create_channel_posix.cc \
- src/cpp/client/credentials.cc \
+ src/cpp/client/credentials_cc.cc \
src/cpp/client/generic_stub.cc \
- src/cpp/client/insecure_credentials.cc \
src/cpp/common/channel_arguments.cc \
src/cpp/common/channel_filter.cc \
- src/cpp/common/completion_queue.cc \
+ src/cpp/common/completion_queue_cc.cc \
src/cpp/common/core_codegen.cc \
src/cpp/common/rpc_method.cc \
src/cpp/server/async_generic_service.cc \
src/cpp/server/create_default_thread_pool.cc \
src/cpp/server/dynamic_thread_pool.cc \
- src/cpp/server/insecure_server_credentials.cc \
- src/cpp/server/server.cc \
src/cpp/server/server_builder.cc \
+ src/cpp/server/server_cc.cc \
src/cpp/server/server_context.cc \
src/cpp/server/server_credentials.cc \
src/cpp/server/server_posix.cc \
- src/cpp/util/byte_buffer.cc \
- src/cpp/util/slice.cc \
+ src/cpp/util/byte_buffer_cc.cc \
+ src/cpp/util/slice_cc.cc \
src/cpp/util/status.cc \
src/cpp/util/string_ref.cc \
- src/cpp/util/time.cc \
+ src/cpp/util/time_cc.cc \
src/core/lib/channel/channel_args.c \
src/core/lib/channel/channel_stack.c \
src/core/lib/channel/channel_stack_builder.c \
@@ -3728,27 +3714,23 @@ PUBLIC_HEADERS_CXX += \
include/grpc/grpc_posix.h \
include/grpc/grpc_security_constants.h \
include/grpc/status.h \
- include/grpc/impl/codegen/byte_buffer.h \
include/grpc/impl/codegen/byte_buffer_reader.h \
include/grpc/impl/codegen/compression_types.h \
include/grpc/impl/codegen/connectivity_state.h \
include/grpc/impl/codegen/grpc_types.h \
include/grpc/impl/codegen/propagation_bits.h \
include/grpc/impl/codegen/status.h \
- include/grpc/impl/codegen/alloc.h \
include/grpc/impl/codegen/atm.h \
include/grpc/impl/codegen/atm_gcc_atomic.h \
include/grpc/impl/codegen/atm_gcc_sync.h \
include/grpc/impl/codegen/atm_windows.h \
- include/grpc/impl/codegen/log.h \
+ include/grpc/impl/codegen/gpr_types.h \
include/grpc/impl/codegen/port_platform.h \
include/grpc/impl/codegen/slice.h \
- include/grpc/impl/codegen/slice_buffer.h \
include/grpc/impl/codegen/sync.h \
include/grpc/impl/codegen/sync_generic.h \
include/grpc/impl/codegen/sync_posix.h \
include/grpc/impl/codegen/sync_windows.h \
- include/grpc/impl/codegen/time.h \
include/grpc++/impl/codegen/async_stream.h \
include/grpc++/impl/codegen/async_unary_call.h \
include/grpc++/impl/codegen/call.h \
@@ -3772,6 +3754,7 @@ PUBLIC_HEADERS_CXX += \
include/grpc++/impl/codegen/service_type.h \
include/grpc++/impl/codegen/status.h \
include/grpc++/impl/codegen/status_code_enum.h \
+ include/grpc++/impl/codegen/status_helper.h \
include/grpc++/impl/codegen/string_ref.h \
include/grpc++/impl/codegen/stub_options.h \
include/grpc++/impl/codegen/sync.h \
@@ -3877,6 +3860,7 @@ PUBLIC_HEADERS_CXX += \
include/grpc++/impl/codegen/service_type.h \
include/grpc++/impl/codegen/status.h \
include/grpc++/impl/codegen/status_code_enum.h \
+ include/grpc++/impl/codegen/status_helper.h \
include/grpc++/impl/codegen/string_ref.h \
include/grpc++/impl/codegen/stub_options.h \
include/grpc++/impl/codegen/sync.h \
@@ -3884,27 +3868,23 @@ PUBLIC_HEADERS_CXX += \
include/grpc++/impl/codegen/sync_no_cxx11.h \
include/grpc++/impl/codegen/sync_stream.h \
include/grpc++/impl/codegen/time.h \
- include/grpc/impl/codegen/byte_buffer.h \
include/grpc/impl/codegen/byte_buffer_reader.h \
include/grpc/impl/codegen/compression_types.h \
include/grpc/impl/codegen/connectivity_state.h \
include/grpc/impl/codegen/grpc_types.h \
include/grpc/impl/codegen/propagation_bits.h \
include/grpc/impl/codegen/status.h \
- include/grpc/impl/codegen/alloc.h \
include/grpc/impl/codegen/atm.h \
include/grpc/impl/codegen/atm_gcc_atomic.h \
include/grpc/impl/codegen/atm_gcc_sync.h \
include/grpc/impl/codegen/atm_windows.h \
- include/grpc/impl/codegen/log.h \
+ include/grpc/impl/codegen/gpr_types.h \
include/grpc/impl/codegen/port_platform.h \
include/grpc/impl/codegen/slice.h \
- include/grpc/impl/codegen/slice_buffer.h \
include/grpc/impl/codegen/sync.h \
include/grpc/impl/codegen/sync_generic.h \
include/grpc/impl/codegen/sync_posix.h \
include/grpc/impl/codegen/sync_windows.h \
- include/grpc/impl/codegen/time.h \
include/grpc++/impl/codegen/config_protobuf.h \
LIBGRPC++_REFLECTION_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC++_REFLECTION_SRC))))
@@ -4020,7 +4000,7 @@ endif
LIBGRPC++_TEST_CONFIG_SRC = \
- test/cpp/util/test_config.cc \
+ test/cpp/util/test_config_cc.cc \
PUBLIC_HEADERS_CXX += \
@@ -4104,6 +4084,7 @@ PUBLIC_HEADERS_CXX += \
include/grpc++/impl/codegen/service_type.h \
include/grpc++/impl/codegen/status.h \
include/grpc++/impl/codegen/status_code_enum.h \
+ include/grpc++/impl/codegen/status_helper.h \
include/grpc++/impl/codegen/string_ref.h \
include/grpc++/impl/codegen/stub_options.h \
include/grpc++/impl/codegen/sync.h \
@@ -4111,27 +4092,23 @@ PUBLIC_HEADERS_CXX += \
include/grpc++/impl/codegen/sync_no_cxx11.h \
include/grpc++/impl/codegen/sync_stream.h \
include/grpc++/impl/codegen/time.h \
- include/grpc/impl/codegen/byte_buffer.h \
include/grpc/impl/codegen/byte_buffer_reader.h \
include/grpc/impl/codegen/compression_types.h \
include/grpc/impl/codegen/connectivity_state.h \
include/grpc/impl/codegen/grpc_types.h \
include/grpc/impl/codegen/propagation_bits.h \
include/grpc/impl/codegen/status.h \
- include/grpc/impl/codegen/alloc.h \
include/grpc/impl/codegen/atm.h \
include/grpc/impl/codegen/atm_gcc_atomic.h \
include/grpc/impl/codegen/atm_gcc_sync.h \
include/grpc/impl/codegen/atm_windows.h \
- include/grpc/impl/codegen/log.h \
+ include/grpc/impl/codegen/gpr_types.h \
include/grpc/impl/codegen/port_platform.h \
include/grpc/impl/codegen/slice.h \
- include/grpc/impl/codegen/slice_buffer.h \
include/grpc/impl/codegen/sync.h \
include/grpc/impl/codegen/sync_generic.h \
include/grpc/impl/codegen/sync_posix.h \
include/grpc/impl/codegen/sync_windows.h \
- include/grpc/impl/codegen/time.h \
include/grpc++/impl/codegen/proto_utils.h \
include/grpc++/impl/codegen/config_protobuf.h \
include/grpc++/impl/codegen/thrift_serializer.h \
@@ -4189,34 +4166,34 @@ $(OBJDIR)/$(CONFIG)/src/cpp/codegen/codegen_init.o: $(GENDIR)/src/proto/grpc/tes
LIBGRPC++_UNSECURE_SRC = \
+ src/cpp/client/insecure_credentials.cc \
src/cpp/common/insecure_create_auth_context.cc \
- src/cpp/client/channel.cc \
+ src/cpp/server/insecure_server_credentials.cc \
+ src/cpp/client/channel_cc.cc \
src/cpp/client/client_context.cc \
src/cpp/client/create_channel.cc \
src/cpp/client/create_channel_internal.cc \
src/cpp/client/create_channel_posix.cc \
- src/cpp/client/credentials.cc \
+ src/cpp/client/credentials_cc.cc \
src/cpp/client/generic_stub.cc \
- src/cpp/client/insecure_credentials.cc \
src/cpp/common/channel_arguments.cc \
src/cpp/common/channel_filter.cc \
- src/cpp/common/completion_queue.cc \
+ src/cpp/common/completion_queue_cc.cc \
src/cpp/common/core_codegen.cc \
src/cpp/common/rpc_method.cc \
src/cpp/server/async_generic_service.cc \
src/cpp/server/create_default_thread_pool.cc \
src/cpp/server/dynamic_thread_pool.cc \
- src/cpp/server/insecure_server_credentials.cc \
- src/cpp/server/server.cc \
src/cpp/server/server_builder.cc \
+ src/cpp/server/server_cc.cc \
src/cpp/server/server_context.cc \
src/cpp/server/server_credentials.cc \
src/cpp/server/server_posix.cc \
- src/cpp/util/byte_buffer.cc \
- src/cpp/util/slice.cc \
+ src/cpp/util/byte_buffer_cc.cc \
+ src/cpp/util/slice_cc.cc \
src/cpp/util/status.cc \
src/cpp/util/string_ref.cc \
- src/cpp/util/time.cc \
+ src/cpp/util/time_cc.cc \
src/core/lib/channel/channel_args.c \
src/core/lib/channel/channel_stack.c \
src/core/lib/channel/channel_stack_builder.c \
@@ -4363,27 +4340,23 @@ PUBLIC_HEADERS_CXX += \
include/grpc/grpc_posix.h \
include/grpc/grpc_security_constants.h \
include/grpc/status.h \
- include/grpc/impl/codegen/byte_buffer.h \
include/grpc/impl/codegen/byte_buffer_reader.h \
include/grpc/impl/codegen/compression_types.h \
include/grpc/impl/codegen/connectivity_state.h \
include/grpc/impl/codegen/grpc_types.h \
include/grpc/impl/codegen/propagation_bits.h \
include/grpc/impl/codegen/status.h \
- include/grpc/impl/codegen/alloc.h \
include/grpc/impl/codegen/atm.h \
include/grpc/impl/codegen/atm_gcc_atomic.h \
include/grpc/impl/codegen/atm_gcc_sync.h \
include/grpc/impl/codegen/atm_windows.h \
- include/grpc/impl/codegen/log.h \
+ include/grpc/impl/codegen/gpr_types.h \
include/grpc/impl/codegen/port_platform.h \
include/grpc/impl/codegen/slice.h \
- include/grpc/impl/codegen/slice_buffer.h \
include/grpc/impl/codegen/sync.h \
include/grpc/impl/codegen/sync_generic.h \
include/grpc/impl/codegen/sync_posix.h \
include/grpc/impl/codegen/sync_windows.h \
- include/grpc/impl/codegen/time.h \
include/grpc++/impl/codegen/async_stream.h \
include/grpc++/impl/codegen/async_unary_call.h \
include/grpc++/impl/codegen/call.h \
@@ -4407,6 +4380,7 @@ PUBLIC_HEADERS_CXX += \
include/grpc++/impl/codegen/service_type.h \
include/grpc++/impl/codegen/status.h \
include/grpc++/impl/codegen/status_code_enum.h \
+ include/grpc++/impl/codegen/status_helper.h \
include/grpc++/impl/codegen/string_ref.h \
include/grpc++/impl/codegen/stub_options.h \
include/grpc++/impl/codegen/sync.h \
@@ -6770,6 +6744,7 @@ LIBEND2END_TESTS_SRC = \
test/core/end2end/tests/max_message_length.c \
test/core/end2end/tests/negative_deadline.c \
test/core/end2end/tests/network_status_change.c \
+ test/core/end2end/tests/no_logging.c \
test/core/end2end/tests/no_op.c \
test/core/end2end/tests/payload.c \
test/core/end2end/tests/ping.c \
@@ -6780,6 +6755,7 @@ LIBEND2END_TESTS_SRC = \
test/core/end2end/tests/server_finishes_request.c \
test/core/end2end/tests/shutdown_finishes_calls.c \
test/core/end2end/tests/shutdown_finishes_tags.c \
+ test/core/end2end/tests/simple_cacheable_request.c \
test/core/end2end/tests/simple_delayed_request.c \
test/core/end2end/tests/simple_metadata.c \
test/core/end2end/tests/simple_request.c \
@@ -6850,6 +6826,7 @@ LIBEND2END_NOSEC_TESTS_SRC = \
test/core/end2end/tests/max_message_length.c \
test/core/end2end/tests/negative_deadline.c \
test/core/end2end/tests/network_status_change.c \
+ test/core/end2end/tests/no_logging.c \
test/core/end2end/tests/no_op.c \
test/core/end2end/tests/payload.c \
test/core/end2end/tests/ping.c \
@@ -6860,6 +6837,7 @@ LIBEND2END_NOSEC_TESTS_SRC = \
test/core/end2end/tests/server_finishes_request.c \
test/core/end2end/tests/shutdown_finishes_calls.c \
test/core/end2end/tests/shutdown_finishes_tags.c \
+ test/core/end2end/tests/simple_cacheable_request.c \
test/core/end2end/tests/simple_delayed_request.c \
test/core/end2end/tests/simple_metadata.c \
test/core/end2end/tests/simple_request.c \
@@ -7884,6 +7862,38 @@ endif
endif
+GEN_PERCENT_ENCODING_TABLES_SRC = \
+ tools/codegen/core/gen_percent_encoding_tables.c \
+
+GEN_PERCENT_ENCODING_TABLES_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(GEN_PERCENT_ENCODING_TABLES_SRC))))
+ifeq ($(NO_SECURE),true)
+
+# You can't build secure targets if you don't have OpenSSL.
+
+$(BINDIR)/$(CONFIG)/gen_percent_encoding_tables: openssl_dep_error
+
+else
+
+
+
+$(BINDIR)/$(CONFIG)/gen_percent_encoding_tables: $(GEN_PERCENT_ENCODING_TABLES_OBJS)
+ $(E) "[LD] Linking $@"
+ $(Q) mkdir -p `dirname $@`
+ $(Q) $(LD) $(LDFLAGS) $(GEN_PERCENT_ENCODING_TABLES_OBJS) $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/gen_percent_encoding_tables
+
+endif
+
+$(OBJDIR)/$(CONFIG)/tools/codegen/core/gen_percent_encoding_tables.o:
+
+deps_gen_percent_encoding_tables: $(GEN_PERCENT_ENCODING_TABLES_OBJS:.o=.dep)
+
+ifneq ($(NO_SECURE),true)
+ifneq ($(NO_DEPS),true)
+-include $(GEN_PERCENT_ENCODING_TABLES_OBJS:.o=.dep)
+endif
+endif
+
+
GOAWAY_SERVER_TEST_SRC = \
test/core/end2end/goaway_server_test.c \
@@ -8172,6 +8182,38 @@ endif
endif
+GPR_PERCENT_ENCODING_TEST_SRC = \
+ test/core/support/percent_encoding_test.c \
+
+GPR_PERCENT_ENCODING_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(GPR_PERCENT_ENCODING_TEST_SRC))))
+ifeq ($(NO_SECURE),true)
+
+# You can't build secure targets if you don't have OpenSSL.
+
+$(BINDIR)/$(CONFIG)/gpr_percent_encoding_test: openssl_dep_error
+
+else
+
+
+
+$(BINDIR)/$(CONFIG)/gpr_percent_encoding_test: $(GPR_PERCENT_ENCODING_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
+ $(E) "[LD] Linking $@"
+ $(Q) mkdir -p `dirname $@`
+ $(Q) $(LD) $(LDFLAGS) $(GPR_PERCENT_ENCODING_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/gpr_percent_encoding_test
+
+endif
+
+$(OBJDIR)/$(CONFIG)/test/core/support/percent_encoding_test.o: $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
+
+deps_gpr_percent_encoding_test: $(GPR_PERCENT_ENCODING_TEST_OBJS:.o=.dep)
+
+ifneq ($(NO_SECURE),true)
+ifneq ($(NO_DEPS),true)
+-include $(GPR_PERCENT_ENCODING_TEST_OBJS:.o=.dep)
+endif
+endif
+
+
GPR_SLICE_BUFFER_TEST_SRC = \
test/core/support/slice_buffer_test.c \
@@ -9900,6 +9942,70 @@ endif
endif
+PERCENT_DECODE_FUZZER_SRC = \
+ test/core/support/percent_decode_fuzzer.c \
+
+PERCENT_DECODE_FUZZER_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(PERCENT_DECODE_FUZZER_SRC))))
+ifeq ($(NO_SECURE),true)
+
+# You can't build secure targets if you don't have OpenSSL.
+
+$(BINDIR)/$(CONFIG)/percent_decode_fuzzer: openssl_dep_error
+
+else
+
+
+
+$(BINDIR)/$(CONFIG)/percent_decode_fuzzer: $(PERCENT_DECODE_FUZZER_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
+ $(E) "[LD] Linking $@"
+ $(Q) mkdir -p `dirname $@`
+ $(Q) $(LDXX) $(LDFLAGS) $(PERCENT_DECODE_FUZZER_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -lFuzzer -o $(BINDIR)/$(CONFIG)/percent_decode_fuzzer
+
+endif
+
+$(OBJDIR)/$(CONFIG)/test/core/support/percent_decode_fuzzer.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
+
+deps_percent_decode_fuzzer: $(PERCENT_DECODE_FUZZER_OBJS:.o=.dep)
+
+ifneq ($(NO_SECURE),true)
+ifneq ($(NO_DEPS),true)
+-include $(PERCENT_DECODE_FUZZER_OBJS:.o=.dep)
+endif
+endif
+
+
+PERCENT_ENCODE_FUZZER_SRC = \
+ test/core/support/percent_encode_fuzzer.c \
+
+PERCENT_ENCODE_FUZZER_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(PERCENT_ENCODE_FUZZER_SRC))))
+ifeq ($(NO_SECURE),true)
+
+# You can't build secure targets if you don't have OpenSSL.
+
+$(BINDIR)/$(CONFIG)/percent_encode_fuzzer: openssl_dep_error
+
+else
+
+
+
+$(BINDIR)/$(CONFIG)/percent_encode_fuzzer: $(PERCENT_ENCODE_FUZZER_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
+ $(E) "[LD] Linking $@"
+ $(Q) mkdir -p `dirname $@`
+ $(Q) $(LDXX) $(LDFLAGS) $(PERCENT_ENCODE_FUZZER_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -lFuzzer -o $(BINDIR)/$(CONFIG)/percent_encode_fuzzer
+
+endif
+
+$(OBJDIR)/$(CONFIG)/test/core/support/percent_encode_fuzzer.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
+
+deps_percent_encode_fuzzer: $(PERCENT_ENCODE_FUZZER_OBJS:.o=.dep)
+
+ifneq ($(NO_SECURE),true)
+ifneq ($(NO_DEPS),true)
+-include $(PERCENT_ENCODE_FUZZER_OBJS:.o=.dep)
+endif
+endif
+
+
RESOLVE_ADDRESS_TEST_SRC = \
test/core/iomgr/resolve_address_test.c \
@@ -14181,38 +14287,6 @@ ifneq ($(NO_DEPS),true)
endif
-BAD_SSL_ALPN_SERVER_SRC = \
- test/core/bad_ssl/servers/alpn.c \
-
-BAD_SSL_ALPN_SERVER_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(BAD_SSL_ALPN_SERVER_SRC))))
-ifeq ($(NO_SECURE),true)
-
-# You can't build secure targets if you don't have OpenSSL.
-
-$(BINDIR)/$(CONFIG)/bad_ssl_alpn_server: openssl_dep_error
-
-else
-
-
-
-$(BINDIR)/$(CONFIG)/bad_ssl_alpn_server: $(BAD_SSL_ALPN_SERVER_OBJS) $(LIBDIR)/$(CONFIG)/libbad_ssl_test_server.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
- $(E) "[LD] Linking $@"
- $(Q) mkdir -p `dirname $@`
- $(Q) $(LD) $(LDFLAGS) $(BAD_SSL_ALPN_SERVER_OBJS) $(LIBDIR)/$(CONFIG)/libbad_ssl_test_server.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/bad_ssl_alpn_server
-
-endif
-
-$(OBJDIR)/$(CONFIG)/test/core/bad_ssl/servers/alpn.o: $(LIBDIR)/$(CONFIG)/libbad_ssl_test_server.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
-
-deps_bad_ssl_alpn_server: $(BAD_SSL_ALPN_SERVER_OBJS:.o=.dep)
-
-ifneq ($(NO_SECURE),true)
-ifneq ($(NO_DEPS),true)
--include $(BAD_SSL_ALPN_SERVER_OBJS:.o=.dep)
-endif
-endif
-
-
BAD_SSL_CERT_SERVER_SRC = \
test/core/bad_ssl/servers/cert.c \
@@ -14245,38 +14319,6 @@ endif
endif
-BAD_SSL_ALPN_TEST_SRC = \
- test/core/bad_ssl/bad_ssl_test.c \
-
-BAD_SSL_ALPN_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(BAD_SSL_ALPN_TEST_SRC))))
-ifeq ($(NO_SECURE),true)
-
-# You can't build secure targets if you don't have OpenSSL.
-
-$(BINDIR)/$(CONFIG)/bad_ssl_alpn_test: openssl_dep_error
-
-else
-
-
-
-$(BINDIR)/$(CONFIG)/bad_ssl_alpn_test: $(BAD_SSL_ALPN_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
- $(E) "[LD] Linking $@"
- $(Q) mkdir -p `dirname $@`
- $(Q) $(LD) $(LDFLAGS) $(BAD_SSL_ALPN_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/bad_ssl_alpn_test
-
-endif
-
-$(OBJDIR)/$(CONFIG)/test/core/bad_ssl/bad_ssl_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
-
-deps_bad_ssl_alpn_test: $(BAD_SSL_ALPN_TEST_OBJS:.o=.dep)
-
-ifneq ($(NO_SECURE),true)
-ifneq ($(NO_DEPS),true)
--include $(BAD_SSL_ALPN_TEST_OBJS:.o=.dep)
-endif
-endif
-
-
BAD_SSL_CERT_TEST_SRC = \
test/core/bad_ssl/bad_ssl_test.c \
@@ -15373,6 +15415,76 @@ endif
endif
+PERCENT_DECODE_FUZZER_ONE_ENTRY_SRC = \
+ test/core/support/percent_decode_fuzzer.c \
+ test/core/util/one_corpus_entry_fuzzer.c \
+
+PERCENT_DECODE_FUZZER_ONE_ENTRY_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(PERCENT_DECODE_FUZZER_ONE_ENTRY_SRC))))
+ifeq ($(NO_SECURE),true)
+
+# You can't build secure targets if you don't have OpenSSL.
+
+$(BINDIR)/$(CONFIG)/percent_decode_fuzzer_one_entry: openssl_dep_error
+
+else
+
+
+
+$(BINDIR)/$(CONFIG)/percent_decode_fuzzer_one_entry: $(PERCENT_DECODE_FUZZER_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
+ $(E) "[LD] Linking $@"
+ $(Q) mkdir -p `dirname $@`
+ $(Q) $(LD) $(LDFLAGS) $(PERCENT_DECODE_FUZZER_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/percent_decode_fuzzer_one_entry
+
+endif
+
+$(OBJDIR)/$(CONFIG)/test/core/support/percent_decode_fuzzer.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
+
+$(OBJDIR)/$(CONFIG)/test/core/util/one_corpus_entry_fuzzer.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
+
+deps_percent_decode_fuzzer_one_entry: $(PERCENT_DECODE_FUZZER_ONE_ENTRY_OBJS:.o=.dep)
+
+ifneq ($(NO_SECURE),true)
+ifneq ($(NO_DEPS),true)
+-include $(PERCENT_DECODE_FUZZER_ONE_ENTRY_OBJS:.o=.dep)
+endif
+endif
+
+
+PERCENT_ENCODE_FUZZER_ONE_ENTRY_SRC = \
+ test/core/support/percent_encode_fuzzer.c \
+ test/core/util/one_corpus_entry_fuzzer.c \
+
+PERCENT_ENCODE_FUZZER_ONE_ENTRY_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(PERCENT_ENCODE_FUZZER_ONE_ENTRY_SRC))))
+ifeq ($(NO_SECURE),true)
+
+# You can't build secure targets if you don't have OpenSSL.
+
+$(BINDIR)/$(CONFIG)/percent_encode_fuzzer_one_entry: openssl_dep_error
+
+else
+
+
+
+$(BINDIR)/$(CONFIG)/percent_encode_fuzzer_one_entry: $(PERCENT_ENCODE_FUZZER_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
+ $(E) "[LD] Linking $@"
+ $(Q) mkdir -p `dirname $@`
+ $(Q) $(LD) $(LDFLAGS) $(PERCENT_ENCODE_FUZZER_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/percent_encode_fuzzer_one_entry
+
+endif
+
+$(OBJDIR)/$(CONFIG)/test/core/support/percent_encode_fuzzer.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
+
+$(OBJDIR)/$(CONFIG)/test/core/util/one_corpus_entry_fuzzer.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
+
+deps_percent_encode_fuzzer_one_entry: $(PERCENT_ENCODE_FUZZER_ONE_ENTRY_OBJS:.o=.dep)
+
+ifneq ($(NO_SECURE),true)
+ifneq ($(NO_DEPS),true)
+-include $(PERCENT_ENCODE_FUZZER_ONE_ENTRY_OBJS:.o=.dep)
+endif
+endif
+
+
SERVER_FUZZER_ONE_ENTRY_SRC = \
test/core/end2end/fuzzers/server_fuzzer.c \
test/core/util/one_corpus_entry_fuzzer.c \
@@ -15535,7 +15647,7 @@ test/cpp/util/proto_file_parser.cc: $(OPENSSL_DEP)
test/cpp/util/proto_reflection_descriptor_database.cc: $(OPENSSL_DEP)
test/cpp/util/string_ref_helper.cc: $(OPENSSL_DEP)
test/cpp/util/subprocess.cc: $(OPENSSL_DEP)
-test/cpp/util/test_config.cc: $(OPENSSL_DEP)
+test/cpp/util/test_config_cc.cc: $(OPENSSL_DEP)
test/cpp/util/test_credentials_provider.cc: $(OPENSSL_DEP)
endif
diff --git a/Rakefile b/Rakefile
index 5b6f101d8f..cfd4181d7e 100755
--- a/Rakefile
+++ b/Rakefile
@@ -100,13 +100,15 @@ desc 'Build the native gem file under rake_compiler_dock'
task 'gem:native' do
verbose = ENV['V'] || '0'
+ grpc_config = ENV['GRPC_CONFIG'] || 'opt'
+
if RUBY_PLATFORM =~ /darwin/
FileUtils.touch 'grpc_c.32.ruby'
FileUtils.touch 'grpc_c.64.ruby'
- system "rake cross native gem RUBY_CC_VERSION=2.3.0:2.2.2:2.1.5:2.0.0 V=#{verbose}"
+ system "rake cross native gem RUBY_CC_VERSION=2.3.0:2.2.2:2.1.5:2.0.0 V=#{verbose} GRPC_CONFIG=#{grpc_config}"
else
Rake::Task['dlls'].execute
- docker_for_windows "bundle && rake cross native gem RUBY_CC_VERSION=2.3.0:2.2.2:2.1.5:2.0.0 V=#{verbose}"
+ docker_for_windows "bundle && rake cross native gem RUBY_CC_VERSION=2.3.0:2.2.2:2.1.5:2.0.0 V=#{verbose} GRPC_CONFIG=#{grpc_config}"
end
end
diff --git a/binding.gyp b/binding.gyp
index 17dbfc0d38..7cc8a58c01 100644
--- a/binding.gyp
+++ b/binding.gyp
@@ -516,6 +516,7 @@
'src/core/lib/support/log_posix.c',
'src/core/lib/support/log_windows.c',
'src/core/lib/support/murmur_hash.c',
+ 'src/core/lib/support/percent_encoding.c',
'src/core/lib/support/slice.c',
'src/core/lib/support/slice_buffer.c',
'src/core/lib/support/stack_lockfree.c',
@@ -707,7 +708,6 @@
'src/core/ext/client_config/channel_connectivity.c',
'src/core/ext/client_config/client_channel.c',
'src/core/ext/client_config/client_channel_factory.c',
- 'src/core/ext/client_config/client_config.c',
'src/core/ext/client_config/client_config_plugin.c',
'src/core/ext/client_config/connector.c',
'src/core/ext/client_config/default_initial_connect_string.c',
@@ -719,8 +719,8 @@
'src/core/ext/client_config/resolver.c',
'src/core/ext/client_config/resolver_factory.c',
'src/core/ext/client_config/resolver_registry.c',
+ 'src/core/ext/client_config/resolver_result.c',
'src/core/ext/client_config/subchannel.c',
- 'src/core/ext/client_config/subchannel_call_holder.c',
'src/core/ext/client_config/subchannel_index.c',
'src/core/ext/client_config/uri_parser.c',
'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c',
@@ -742,6 +742,7 @@
'src/core/ext/census/base_resources.c',
'src/core/ext/census/context.c',
'src/core/ext/census/gen/census.pb.c',
+ 'src/core/ext/census/gen/trace_context.pb.c',
'src/core/ext/census/grpc_context.c',
'src/core/ext/census/grpc_filter.c',
'src/core/ext/census/grpc_plugin.c',
diff --git a/build.yaml b/build.yaml
index 506a02920c..3b5255a423 100644
--- a/build.yaml
+++ b/build.yaml
@@ -2,11 +2,17 @@
'#2': It is used among other things to generate all of our project files.
'#3': Please refer to the templates directory for more information.
settings:
- '#1': The public version number of the library.
- '#2': Master always has a "-dev" suffix
- '#3': Use "-preN" suffixes to identify pre-release versions
- '#4': Per-language overrides are possible with (eg) ruby_version tag here
- '#5': See the expand_version.py for all the quirks here
+ '#01': The public version number of the library.
+ '#02': ===
+ '#03': Please update the 'g_stands_for' field periodically with a new g word
+ '#04': not listed in doc/g_stands_for.md - and update that document to list the
+ '#05': new word.
+ '#06': ===
+ '#07': Master always has a "-dev" suffix
+ '#08': Use "-preN" suffixes to identify pre-release versions
+ '#09': Per-language overrides are possible with (eg) ruby_version tag here
+ '#10': See the expand_version.py for all the quirks here
+ g_stands_for: good
version: 1.1.0-dev
filegroups:
- name: census
@@ -18,6 +24,7 @@ filegroups:
- src/core/ext/census/census_interface.h
- src/core/ext/census/census_rpc_stats.h
- src/core/ext/census/gen/census.pb.h
+ - src/core/ext/census/gen/trace_context.pb.h
- src/core/ext/census/grpc_filter.h
- src/core/ext/census/mlog.h
- src/core/ext/census/resource.h
@@ -26,6 +33,7 @@ filegroups:
- src/core/ext/census/base_resources.c
- src/core/ext/census/context.c
- src/core/ext/census/gen/census.pb.c
+ - src/core/ext/census/gen/trace_context.pb.c
- src/core/ext/census/grpc_context.c
- src/core/ext/census/grpc_filter.c
- src/core/ext/census/grpc_plugin.c
@@ -75,6 +83,7 @@ filegroups:
- src/core/lib/support/block_annotate.h
- src/core/lib/support/env.h
- src/core/lib/support/murmur_hash.h
+ - src/core/lib/support/percent_encoding.h
- src/core/lib/support/stack_lockfree.h
- src/core/lib/support/string.h
- src/core/lib/support/string_windows.h
@@ -103,6 +112,7 @@ filegroups:
- src/core/lib/support/log_posix.c
- src/core/lib/support/log_windows.c
- src/core/lib/support/murmur_hash.c
+ - src/core/lib/support/percent_encoding.c
- src/core/lib/support/slice.c
- src/core/lib/support/slice_buffer.c
- src/core/lib/support/stack_lockfree.c
@@ -131,20 +141,17 @@ filegroups:
- gpr_codegen
- name: gpr_codegen
public_headers:
- - include/grpc/impl/codegen/alloc.h
- include/grpc/impl/codegen/atm.h
- include/grpc/impl/codegen/atm_gcc_atomic.h
- include/grpc/impl/codegen/atm_gcc_sync.h
- include/grpc/impl/codegen/atm_windows.h
- - include/grpc/impl/codegen/log.h
+ - include/grpc/impl/codegen/gpr_types.h
- include/grpc/impl/codegen/port_platform.h
- include/grpc/impl/codegen/slice.h
- - include/grpc/impl/codegen/slice_buffer.h
- include/grpc/impl/codegen/sync.h
- include/grpc/impl/codegen/sync_generic.h
- include/grpc/impl/codegen/sync_posix.h
- include/grpc/impl/codegen/sync_windows.h
- - include/grpc/impl/codegen/time.h
- name: grpc_base
public_headers:
- include/grpc/byte_buffer.h
@@ -333,7 +340,6 @@ filegroups:
headers:
- src/core/ext/client_config/client_channel.h
- src/core/ext/client_config/client_channel_factory.h
- - src/core/ext/client_config/client_config.h
- src/core/ext/client_config/connector.h
- src/core/ext/client_config/initial_connect_string.h
- src/core/ext/client_config/lb_policy.h
@@ -343,15 +349,14 @@ filegroups:
- src/core/ext/client_config/resolver.h
- src/core/ext/client_config/resolver_factory.h
- src/core/ext/client_config/resolver_registry.h
+ - src/core/ext/client_config/resolver_result.h
- src/core/ext/client_config/subchannel.h
- - src/core/ext/client_config/subchannel_call_holder.h
- src/core/ext/client_config/subchannel_index.h
- src/core/ext/client_config/uri_parser.h
src:
- src/core/ext/client_config/channel_connectivity.c
- src/core/ext/client_config/client_channel.c
- src/core/ext/client_config/client_channel_factory.c
- - src/core/ext/client_config/client_config.c
- src/core/ext/client_config/client_config_plugin.c
- src/core/ext/client_config/connector.c
- src/core/ext/client_config/default_initial_connect_string.c
@@ -363,8 +368,8 @@ filegroups:
- src/core/ext/client_config/resolver.c
- src/core/ext/client_config/resolver_factory.c
- src/core/ext/client_config/resolver_registry.c
+ - src/core/ext/client_config/resolver_result.c
- src/core/ext/client_config/subchannel.c
- - src/core/ext/client_config/subchannel_call_holder.c
- src/core/ext/client_config/subchannel_index.c
- src/core/ext/client_config/uri_parser.c
plugin: grpc_client_config
@@ -372,7 +377,6 @@ filegroups:
- grpc_base
- name: grpc_codegen
public_headers:
- - include/grpc/impl/codegen/byte_buffer.h
- include/grpc/impl/codegen/byte_buffer_reader.h
- include/grpc/impl/codegen/compression_types.h
- include/grpc/impl/codegen/connectivity_state.h
@@ -696,33 +700,31 @@ filegroups:
- src/cpp/server/dynamic_thread_pool.h
- src/cpp/server/thread_pool_interface.h
src:
- - src/cpp/client/channel.cc
+ - src/cpp/client/channel_cc.cc
- src/cpp/client/client_context.cc
- src/cpp/client/create_channel.cc
- src/cpp/client/create_channel_internal.cc
- src/cpp/client/create_channel_posix.cc
- - src/cpp/client/credentials.cc
+ - src/cpp/client/credentials_cc.cc
- src/cpp/client/generic_stub.cc
- - src/cpp/client/insecure_credentials.cc
- src/cpp/common/channel_arguments.cc
- src/cpp/common/channel_filter.cc
- - src/cpp/common/completion_queue.cc
+ - src/cpp/common/completion_queue_cc.cc
- src/cpp/common/core_codegen.cc
- src/cpp/common/rpc_method.cc
- src/cpp/server/async_generic_service.cc
- src/cpp/server/create_default_thread_pool.cc
- src/cpp/server/dynamic_thread_pool.cc
- - src/cpp/server/insecure_server_credentials.cc
- - src/cpp/server/server.cc
- src/cpp/server/server_builder.cc
+ - src/cpp/server/server_cc.cc
- src/cpp/server/server_context.cc
- src/cpp/server/server_credentials.cc
- src/cpp/server/server_posix.cc
- - src/cpp/util/byte_buffer.cc
- - src/cpp/util/slice.cc
+ - src/cpp/util/byte_buffer_cc.cc
+ - src/cpp/util/slice_cc.cc
- src/cpp/util/status.cc
- src/cpp/util/string_ref.cc
- - src/cpp/util/time.cc
+ - src/cpp/util/time_cc.cc
uses:
- grpc_base
- grpc++_codegen_base
@@ -752,6 +754,7 @@ filegroups:
- include/grpc++/impl/codegen/service_type.h
- include/grpc++/impl/codegen/status.h
- include/grpc++/impl/codegen/status_code_enum.h
+ - include/grpc++/impl/codegen/status_helper.h
- include/grpc++/impl/codegen/string_ref.h
- include/grpc++/impl/codegen/stub_options.h
- include/grpc++/impl/codegen/sync.h
@@ -967,11 +970,13 @@ libs:
- src/cpp/common/secure_auth_context.h
- src/cpp/server/secure_server_credentials.h
src:
+ - src/cpp/client/insecure_credentials.cc
- src/cpp/client/secure_credentials.cc
- src/cpp/common/auth_property_iterator.cc
- src/cpp/common/secure_auth_context.cc
- src/cpp/common/secure_channel_arguments.cc
- src/cpp/common/secure_create_auth_context.cc
+ - src/cpp/server/insecure_server_credentials.cc
- src/cpp/server/secure_server_credentials.cc
deps:
- grpc
@@ -1008,7 +1013,7 @@ libs:
headers:
- test/cpp/util/test_config.h
src:
- - test/cpp/util/test_config.cc
+ - test/cpp/util/test_config_cc.cc
- name: grpc++_test_util
build: private
language: c++
@@ -1042,7 +1047,9 @@ libs:
build: all
language: c++
src:
+ - src/cpp/client/insecure_credentials.cc
- src/cpp/common/insecure_create_auth_context.cc
+ - src/cpp/server/insecure_server_credentials.cc
deps:
- gpr
- grpc_unsecure
@@ -1570,6 +1577,12 @@ targets:
src:
- tools/codegen/core/gen_legal_metadata_characters.c
deps: []
+- name: gen_percent_encoding_tables
+ build: tool
+ language: c
+ src:
+ - tools/codegen/core/gen_percent_encoding_tables.c
+ deps: []
- name: goaway_server_test
cpu_cost: 0.1
build: test
@@ -1649,6 +1662,14 @@ targets:
deps:
- gpr_test_util
- gpr
+- name: gpr_percent_encoding_test
+ build: test
+ language: c
+ src:
+ - test/core/support/percent_encoding_test.c
+ deps:
+ - gpr_test_util
+ - gpr
- name: gpr_slice_buffer_test
build: test
language: c
@@ -2210,6 +2231,32 @@ targets:
- grpc
- gpr_test_util
- gpr
+- name: percent_decode_fuzzer
+ build: fuzzer
+ language: c
+ src:
+ - test/core/support/percent_decode_fuzzer.c
+ deps:
+ - grpc_test_util
+ - grpc
+ - gpr_test_util
+ - gpr
+ corpus_dirs:
+ - test/core/support/percent_decode_corpus
+ maxlen: 32
+- name: percent_encode_fuzzer
+ build: fuzzer
+ language: c
+ src:
+ - test/core/support/percent_encode_fuzzer.c
+ deps:
+ - grpc_test_util
+ - grpc
+ - gpr_test_util
+ - gpr
+ corpus_dirs:
+ - test/core/support/percent_encode_corpus
+ maxlen: 32
- name: resolve_address_test
build: test
language: c
diff --git a/config.m4 b/config.m4
index b37658dc61..5384585dd6 100644
--- a/config.m4
+++ b/config.m4
@@ -57,6 +57,7 @@ if test "$PHP_GRPC" != "no"; then
src/core/lib/support/log_posix.c \
src/core/lib/support/log_windows.c \
src/core/lib/support/murmur_hash.c \
+ src/core/lib/support/percent_encoding.c \
src/core/lib/support/slice.c \
src/core/lib/support/slice_buffer.c \
src/core/lib/support/stack_lockfree.c \
@@ -226,7 +227,6 @@ if test "$PHP_GRPC" != "no"; then
src/core/ext/client_config/channel_connectivity.c \
src/core/ext/client_config/client_channel.c \
src/core/ext/client_config/client_channel_factory.c \
- src/core/ext/client_config/client_config.c \
src/core/ext/client_config/client_config_plugin.c \
src/core/ext/client_config/connector.c \
src/core/ext/client_config/default_initial_connect_string.c \
@@ -238,8 +238,8 @@ if test "$PHP_GRPC" != "no"; then
src/core/ext/client_config/resolver.c \
src/core/ext/client_config/resolver_factory.c \
src/core/ext/client_config/resolver_registry.c \
+ src/core/ext/client_config/resolver_result.c \
src/core/ext/client_config/subchannel.c \
- src/core/ext/client_config/subchannel_call_holder.c \
src/core/ext/client_config/subchannel_index.c \
src/core/ext/client_config/uri_parser.c \
src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \
@@ -261,6 +261,7 @@ if test "$PHP_GRPC" != "no"; then
src/core/ext/census/base_resources.c \
src/core/ext/census/context.c \
src/core/ext/census/gen/census.pb.c \
+ src/core/ext/census/gen/trace_context.pb.c \
src/core/ext/census/grpc_context.c \
src/core/ext/census/grpc_filter.c \
src/core/ext/census/grpc_plugin.c \
diff --git a/doc/fail_fast.md b/doc/fail_fast.md
index 3ed4297194..2dd5561fc6 100644
--- a/doc/fail_fast.md
+++ b/doc/fail_fast.md
@@ -1,15 +1 @@
-gRPC Fail Fast Semantics
-========================
-
-Fail fast requests allow terminating requests (with status UNAVAILABLE) prior
-to the deadline of the request being met.
-
-gRPC implementations of fail fast can terminate requests whenever a channel is
-in the TRANSIENT_FAILURE or SHUTDOWN states. If the channel is in any other
-state (CONNECTING, READY, or IDLE) the request should not be terminated.
-
-Fail fast SHOULD be the default for gRPC implementations, with an option to
-switch to non fail fast.
-
-The opposite of fail fast is 'ignore connectivity'.
-
+Moved to wait-for-ready.md
diff --git a/doc/g_stands_for.md b/doc/g_stands_for.md
new file mode 100644
index 0000000000..52f8eae05a
--- /dev/null
+++ b/doc/g_stands_for.md
@@ -0,0 +1,8 @@
+Each version of gRPC gets a new description of what the 'g' stands for, since
+we've never really been able to figure it out.
+
+Below is a list of already-used definitions (that should not be repeated in the
+future), and the corresponding version numbers that used them:
+
+- 1.0 'g' stands for 'gRPC'
+- 1.1 'g' stands for 'good'
diff --git a/doc/http-grpc-status-mapping.md b/doc/http-grpc-status-mapping.md
new file mode 100644
index 0000000000..928fe54420
--- /dev/null
+++ b/doc/http-grpc-status-mapping.md
@@ -0,0 +1,30 @@
+# HTTP to gRPC Status Code Mapping
+
+Since intermediaries are a common part of HTTP infrastructure some responses to
+gRPC requests may be received that do not include the grpc-status header. In
+some cases mapping error codes from an intermediary allows the gRPC client to
+behave more appropriately to the error situation without overloading the
+semantics of either error code.
+
+This table is to be used _only_ for clients that received a response that did
+not include grpc-status. If grpc-status was provided, it _must_ be used. Servers
+_must not_ use this table to determine an HTTP status code to use; the mappings
+are neither symmetric nor 1-to-1.
+
+| HTTP Status Code | gRPC Status Code |
+|----------------------------|--------------------|
+| 400 Bad Request | INTERNAL |
+| 401 Unauthorized | UNAUTHENTICATED |
+| 403 Forbidden | PERMISSION\_DENIED |
+| 404 Not Found | UNIMPLEMENTED |
+| 429 Too Many Requests | UNAVAILABLE |
+| 502 Bad Gateway | UNAVAILABLE |
+| 503 Service Unavailable | UNAVAILABLE |
+| 504 Gateway Timeout | UNAVAILABLE |
+| _All other codes_ | UNKNOWN |
+
+Technically, 1xx should have the entire header skipped and a subsequent header
+be read. See RFC 7540 §8.1.
+
+200 is UNKNOWN because there should be a grpc-status in case of truly OK
+response.
diff --git a/doc/wait-for-ready.md b/doc/wait-for-ready.md
new file mode 100644
index 0000000000..fd42604269
--- /dev/null
+++ b/doc/wait-for-ready.md
@@ -0,0 +1,14 @@
+gRPC Wait for Ready Semantics
+=============================
+
+If an RPC is issued but the channel is in `TRANSIENT_FAILURE` or `SHUTDOWN`
+states, the RPC is unable to be transmited promptly. By default, gRPC
+implementations SHOULD fail such RPCs immediately. This is known as "fail fast,"
+but usage of the term is historical. RPCs SHOULD NOT fail as a result of the
+channel being in other states (`CONNECTING`, `READY`, or `IDLE`).
+
+gRPC implementations MAY provide a per-RPC option to not fail RPCs as a result
+of the channel being in `TRANSIENT_FAILURE` state. Instead, the implementation
+queues the RPCs until the channel is `READY`. This is known as "wait for ready."
+The RPCs SHOULD still fail before `READY` if there are unrelated reasons, such
+as the channel is `SHUTDOWN` or the RPC's deadline is reached.
diff --git a/etc/README.md b/etc/README.md
new file mode 100644
index 0000000000..87af44f736
--- /dev/null
+++ b/etc/README.md
@@ -0,0 +1,4 @@
+The roots.pem file is periodically generated from:
+https://hg.mozilla.org/mozilla-central/raw-file/tip/security/nss/lib/ckfw/builtins/certdata.txt
+using
+https://github.com/agl/extract-nss-root-certs
diff --git a/examples/csharp/.nuget/packages.config b/examples/csharp/.nuget/packages.config
deleted file mode 100644
index b14373069f..0000000000
--- a/examples/csharp/.nuget/packages.config
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
- <package id="Grpc.Tools" version="0.6.0" />
-</packages> \ No newline at end of file
diff --git a/examples/csharp/helloworld-from-cli/Greeter/project.json b/examples/csharp/helloworld-from-cli/Greeter/project.json
index 8774941810..40fba7cf1f 100644
--- a/examples/csharp/helloworld-from-cli/Greeter/project.json
+++ b/examples/csharp/helloworld-from-cli/Greeter/project.json
@@ -5,8 +5,8 @@
"debugType": "portable",
},
"dependencies": {
- "Google.Protobuf": "3.0.0-beta3",
- "Grpc": "1.0.0-pre1",
+ "Google.Protobuf": "3.0.0",
+ "Grpc": "1.0.0",
},
"frameworks": {
"net45": {
diff --git a/examples/csharp/helloworld-from-cli/GreeterClient/project.json b/examples/csharp/helloworld-from-cli/GreeterClient/project.json
index c2bf694cd8..74962a90e9 100644
--- a/examples/csharp/helloworld-from-cli/GreeterClient/project.json
+++ b/examples/csharp/helloworld-from-cli/GreeterClient/project.json
@@ -6,8 +6,8 @@
"emitEntryPoint": "true"
},
"dependencies": {
- "Google.Protobuf": "3.0.0-beta3",
- "Grpc": "1.0.0-pre1",
+ "Google.Protobuf": "3.0.0",
+ "Grpc": "1.0.0",
"Greeter": {
"target": "project"
}
diff --git a/examples/csharp/helloworld-from-cli/GreeterServer/project.json b/examples/csharp/helloworld-from-cli/GreeterServer/project.json
index 29a10670f4..33af254481 100644
--- a/examples/csharp/helloworld-from-cli/GreeterServer/project.json
+++ b/examples/csharp/helloworld-from-cli/GreeterServer/project.json
@@ -6,8 +6,8 @@
"emitEntryPoint": "true"
},
"dependencies": {
- "Google.Protobuf": "3.0.0-beta3",
- "Grpc": "1.0.0-pre1",
+ "Google.Protobuf": "3.0.0",
+ "Grpc": "1.0.0",
"Greeter": {
"target": "project"
}
diff --git a/examples/csharp/helloworld/Greeter/Greeter.csproj b/examples/csharp/helloworld/Greeter/Greeter.csproj
index 20b85db8b6..54a41d1746 100644
--- a/examples/csharp/helloworld/Greeter/Greeter.csproj
+++ b/examples/csharp/helloworld/Greeter/Greeter.csproj
@@ -33,16 +33,16 @@
<ItemGroup>
<Reference Include="Google.Protobuf, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\Google.Protobuf.3.0.0-beta3\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
+ <HintPath>..\packages\Google.Protobuf.3.0.0\lib\net45\Google.Protobuf.dll</HintPath>
</Reference>
<Reference Include="Grpc.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\Grpc.Core.0.15.0\lib\net45\Grpc.Core.dll</HintPath>
+ <HintPath>..\packages\Grpc.Core.1.0.0\lib\net45\Grpc.Core.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Interactive.Async, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\Ix-Async.1.2.5\lib\net45\System.Interactive.Async.dll</HintPath>
+ <HintPath>..\packages\System.Interactive.Async.3.0.0\lib\net45\System.Interactive.Async.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
@@ -61,11 +61,11 @@
<None Include="packages.config" />
</ItemGroup>
<ItemGroup />
- <Import Project="..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets')" />
+ <Import Project="..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
- <Error Condition="!Exists('..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets'))" />
+ <Error Condition="!Exists('..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets'))" />
</Target>
-</Project> \ No newline at end of file
+</Project>
diff --git a/examples/csharp/helloworld/Greeter/packages.config b/examples/csharp/helloworld/Greeter/packages.config
index c94bb87307..46f7ddacb7 100644
--- a/examples/csharp/helloworld/Greeter/packages.config
+++ b/examples/csharp/helloworld/Greeter/packages.config
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
- <package id="Google.Protobuf" version="3.0.0-beta3" targetFramework="net45" />
- <package id="Grpc" version="0.15.0" targetFramework="net45" />
- <package id="Grpc.Core" version="0.15.0" targetFramework="net45" />
- <package id="Ix-Async" version="1.2.5" targetFramework="net45" />
- <package id="Grpc.Tools" version="0.15.0" targetFramework="net45" />
-</packages> \ No newline at end of file
+ <package id="Google.Protobuf" version="3.0.0" targetFramework="net45" />
+ <package id="Grpc" version="1.0.0" targetFramework="net45" />
+ <package id="Grpc.Core" version="1.0.0" targetFramework="net45" />
+ <package id="System.Interactive.Async" version="3.0.0" targetFramework="net45" />
+ <package id="Grpc.Tools" version="1.0.0" targetFramework="net45" />
+</packages>
diff --git a/examples/csharp/helloworld/GreeterClient/GreeterClient.csproj b/examples/csharp/helloworld/GreeterClient/GreeterClient.csproj
index 2b38ce290e..43d85e194c 100644
--- a/examples/csharp/helloworld/GreeterClient/GreeterClient.csproj
+++ b/examples/csharp/helloworld/GreeterClient/GreeterClient.csproj
@@ -33,16 +33,16 @@
<ItemGroup>
<Reference Include="Google.Protobuf, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\Google.Protobuf.3.0.0-beta3\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
+ <HintPath>..\packages\Google.Protobuf.3.0.0\lib\net45\Google.Protobuf.dll</HintPath>
</Reference>
<Reference Include="Grpc.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\Grpc.Core.0.15.0\lib\net45\Grpc.Core.dll</HintPath>
+ <HintPath>..\packages\Grpc.Core.1.0.0\lib\net45\Grpc.Core.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Interactive.Async, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\Ix-Async.1.2.5\lib\net45\System.Interactive.Async.dll</HintPath>
+ <HintPath>..\packages\System.Interactive.Async.3.0.0\lib\net45\System.Interactive.Async.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
@@ -59,11 +59,11 @@
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
- <Import Project="..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets')" />
+ <Import Project="..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
- <Error Condition="!Exists('..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets'))" />
+ <Error Condition="!Exists('..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets'))" />
</Target>
-</Project> \ No newline at end of file
+</Project>
diff --git a/examples/csharp/helloworld/GreeterClient/packages.config b/examples/csharp/helloworld/GreeterClient/packages.config
index ff9d6bbf73..9f5509769a 100644
--- a/examples/csharp/helloworld/GreeterClient/packages.config
+++ b/examples/csharp/helloworld/GreeterClient/packages.config
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
- <package id="Google.Protobuf" version="3.0.0-beta3" targetFramework="net45" />
- <package id="Grpc" version="0.15.0" targetFramework="net45" />
- <package id="Grpc.Core" version="0.15.0" targetFramework="net45" />
- <package id="Ix-Async" version="1.2.5" targetFramework="net45" />
-</packages> \ No newline at end of file
+ <package id="Google.Protobuf" version="3.0.0" targetFramework="net45" />
+ <package id="Grpc" version="1.0.0" targetFramework="net45" />
+ <package id="Grpc.Core" version="1.0.0" targetFramework="net45" />
+ <package id="System.Interactive.Async" version="3.0.0" targetFramework="net45" />
+</packages>
diff --git a/examples/csharp/helloworld/GreeterServer/GreeterServer.csproj b/examples/csharp/helloworld/GreeterServer/GreeterServer.csproj
index 43c633678b..5a3457fb7a 100644
--- a/examples/csharp/helloworld/GreeterServer/GreeterServer.csproj
+++ b/examples/csharp/helloworld/GreeterServer/GreeterServer.csproj
@@ -33,16 +33,16 @@
<ItemGroup>
<Reference Include="Google.Protobuf, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\Google.Protobuf.3.0.0-beta3\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
+ <HintPath>..\packages\Google.Protobuf.3.0.0\lib\net45\Google.Protobuf.dll</HintPath>
</Reference>
<Reference Include="Grpc.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\Grpc.Core.0.15.0\lib\net45\Grpc.Core.dll</HintPath>
+ <HintPath>..\packages\Grpc.Core.1.0.0\lib\net45\Grpc.Core.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Interactive.Async, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\Ix-Async.1.2.5\lib\net45\System.Interactive.Async.dll</HintPath>
+ <HintPath>..\packages\System.Interactive.Async.3.0.0\lib\net45\System.Interactive.Async.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
@@ -59,11 +59,11 @@
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
- <Import Project="..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets')" />
+ <Import Project="..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
- <Error Condition="!Exists('..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets'))" />
+ <Error Condition="!Exists('..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets'))" />
</Target>
-</Project> \ No newline at end of file
+</Project>
diff --git a/examples/csharp/helloworld/GreeterServer/packages.config b/examples/csharp/helloworld/GreeterServer/packages.config
index ff9d6bbf73..9f5509769a 100644
--- a/examples/csharp/helloworld/GreeterServer/packages.config
+++ b/examples/csharp/helloworld/GreeterServer/packages.config
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
- <package id="Google.Protobuf" version="3.0.0-beta3" targetFramework="net45" />
- <package id="Grpc" version="0.15.0" targetFramework="net45" />
- <package id="Grpc.Core" version="0.15.0" targetFramework="net45" />
- <package id="Ix-Async" version="1.2.5" targetFramework="net45" />
-</packages> \ No newline at end of file
+ <package id="Google.Protobuf" version="3.0.0" targetFramework="net45" />
+ <package id="Grpc" version="1.0.0" targetFramework="net45" />
+ <package id="Grpc.Core" version="1.0.0" targetFramework="net45" />
+ <package id="System.Interactive.Async" version="3.0.0" targetFramework="net45" />
+</packages>
diff --git a/examples/csharp/helloworld/generate_protos.bat b/examples/csharp/helloworld/generate_protos.bat
index a952bb46cd..28b7395635 100644
--- a/examples/csharp/helloworld/generate_protos.bat
+++ b/examples/csharp/helloworld/generate_protos.bat
@@ -34,8 +34,8 @@ setlocal
@rem enter this directory
cd /d %~dp0
-set TOOLS_PATH=packages\Grpc.Tools.0.15.0\tools\windows_x86
+set TOOLS_PATH=packages\Grpc.Tools.1.0.0\tools\windows_x86
%TOOLS_PATH%\protoc.exe -I../../protos --csharp_out Greeter ../../protos/helloworld.proto --grpc_out Greeter --plugin=protoc-gen-grpc=%TOOLS_PATH%\grpc_csharp_plugin.exe
-endlocal \ No newline at end of file
+endlocal
diff --git a/examples/csharp/route_guide/RouteGuide/RouteGuide.csproj b/examples/csharp/route_guide/RouteGuide/RouteGuide.csproj
index 942d94f66c..02bca2fc72 100644
--- a/examples/csharp/route_guide/RouteGuide/RouteGuide.csproj
+++ b/examples/csharp/route_guide/RouteGuide/RouteGuide.csproj
@@ -33,11 +33,11 @@
<ItemGroup>
<Reference Include="Google.Protobuf, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\Google.Protobuf.3.0.0-beta3\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
+ <HintPath>..\packages\Google.Protobuf.3.0.0\lib\net45\Google.Protobuf.dll</HintPath>
</Reference>
<Reference Include="Grpc.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\Grpc.Core.0.15.0\lib\net45\Grpc.Core.dll</HintPath>
+ <HintPath>..\packages\Grpc.Core.1.0.0\lib\net45\Grpc.Core.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
@@ -52,7 +52,7 @@
<Reference Include="System.Xml" />
<Reference Include="System.Interactive.Async, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\Ix-Async.1.2.5\lib\net45\System.Interactive.Async.dll</HintPath>
+ <HintPath>..\packages\System.Interactive.Async.3.0.0\lib\net45\System.Interactive.Async.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
@@ -74,12 +74,12 @@
</None>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <Import Project="..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets')" />
+ <Import Project="..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
- <Error Condition="!Exists('..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets'))" />
+ <Error Condition="!Exists('..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
@@ -88,4 +88,4 @@
<Target Name="AfterBuild">
</Target>
-->
-</Project> \ No newline at end of file
+</Project>
diff --git a/examples/csharp/route_guide/RouteGuide/packages.config b/examples/csharp/route_guide/RouteGuide/packages.config
index b962a7232a..4e8d3f236d 100644
--- a/examples/csharp/route_guide/RouteGuide/packages.config
+++ b/examples/csharp/route_guide/RouteGuide/packages.config
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
- <package id="Google.Protobuf" version="3.0.0-beta3" targetFramework="net45" />
- <package id="Grpc" version="0.15.0" targetFramework="net45" />
- <package id="Grpc.Core" version="0.15.0" targetFramework="net45" />
- <package id="Ix-Async" version="1.2.5" targetFramework="net45" />
+ <package id="Google.Protobuf" version="3.0.0" targetFramework="net45" />
+ <package id="Grpc" version="1.0.0" targetFramework="net45" />
+ <package id="Grpc.Core" version="1.0.0" targetFramework="net45" />
+ <package id="System.Interactive.Async" version="3.0.0" targetFramework="net45" />
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
-</packages> \ No newline at end of file
+</packages>
diff --git a/examples/csharp/route_guide/RouteGuideClient/RouteGuideClient.csproj b/examples/csharp/route_guide/RouteGuideClient/RouteGuideClient.csproj
index 6f5c0a50dd..4792c52874 100644
--- a/examples/csharp/route_guide/RouteGuideClient/RouteGuideClient.csproj
+++ b/examples/csharp/route_guide/RouteGuideClient/RouteGuideClient.csproj
@@ -35,11 +35,11 @@
<ItemGroup>
<Reference Include="Google.Protobuf, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\Google.Protobuf.3.0.0-beta3\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
+ <HintPath>..\packages\Google.Protobuf.3.0.0\lib\net45\Google.Protobuf.dll</HintPath>
</Reference>
<Reference Include="Grpc.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\Grpc.Core.0.15.0\lib\net45\Grpc.Core.dll</HintPath>
+ <HintPath>..\packages\Grpc.Core.1.0.0\lib\net45\Grpc.Core.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
@@ -49,7 +49,7 @@
<Reference Include="System.Core" />
<Reference Include="System.Interactive.Async, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\Ix-Async.1.2.5\lib\net45\System.Interactive.Async.dll</HintPath>
+ <HintPath>..\packages\System.Interactive.Async.3.0.0\lib\net45\System.Interactive.Async.dll</HintPath>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
@@ -71,12 +71,12 @@
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <Import Project="..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets')" />
+ <Import Project="..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
- <Error Condition="!Exists('..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets'))" />
+ <Error Condition="!Exists('..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
@@ -85,4 +85,4 @@
<Target Name="AfterBuild">
</Target>
-->
-</Project> \ No newline at end of file
+</Project>
diff --git a/examples/csharp/route_guide/RouteGuideClient/packages.config b/examples/csharp/route_guide/RouteGuideClient/packages.config
index b962a7232a..4e8d3f236d 100644
--- a/examples/csharp/route_guide/RouteGuideClient/packages.config
+++ b/examples/csharp/route_guide/RouteGuideClient/packages.config
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
- <package id="Google.Protobuf" version="3.0.0-beta3" targetFramework="net45" />
- <package id="Grpc" version="0.15.0" targetFramework="net45" />
- <package id="Grpc.Core" version="0.15.0" targetFramework="net45" />
- <package id="Ix-Async" version="1.2.5" targetFramework="net45" />
+ <package id="Google.Protobuf" version="3.0.0" targetFramework="net45" />
+ <package id="Grpc" version="1.0.0" targetFramework="net45" />
+ <package id="Grpc.Core" version="1.0.0" targetFramework="net45" />
+ <package id="System.Interactive.Async" version="3.0.0" targetFramework="net45" />
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
-</packages> \ No newline at end of file
+</packages>
diff --git a/examples/csharp/route_guide/RouteGuideServer/RouteGuideServer.csproj b/examples/csharp/route_guide/RouteGuideServer/RouteGuideServer.csproj
index 4ffc5ccca9..b35e576fb8 100644
--- a/examples/csharp/route_guide/RouteGuideServer/RouteGuideServer.csproj
+++ b/examples/csharp/route_guide/RouteGuideServer/RouteGuideServer.csproj
@@ -35,11 +35,11 @@
<ItemGroup>
<Reference Include="Google.Protobuf, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\Google.Protobuf.3.0.0-beta3\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
+ <HintPath>..\packages\Google.Protobuf.3.0.0\lib\net45\Google.Protobuf.dll</HintPath>
</Reference>
<Reference Include="Grpc.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\Grpc.Core.0.15.0\lib\net45\Grpc.Core.dll</HintPath>
+ <HintPath>..\packages\Grpc.Core.1.0.0\lib\net45\Grpc.Core.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
@@ -54,7 +54,7 @@
<Reference Include="System.Xml" />
<Reference Include="System.Interactive.Async, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\Ix-Async.1.2.5\lib\net45\System.Interactive.Async.dll</HintPath>
+ <HintPath>..\packages\System.Interactive.Async.3.0.0\lib\net45\System.Interactive.Async.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
@@ -72,12 +72,12 @@
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <Import Project="..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets')" />
+ <Import Project="..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
- <Error Condition="!Exists('..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets'))" />
+ <Error Condition="!Exists('..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
@@ -86,4 +86,4 @@
<Target Name="AfterBuild">
</Target>
-->
-</Project> \ No newline at end of file
+</Project>
diff --git a/examples/csharp/route_guide/RouteGuideServer/packages.config b/examples/csharp/route_guide/RouteGuideServer/packages.config
index 916fe4c01d..a742eb2ff1 100644
--- a/examples/csharp/route_guide/RouteGuideServer/packages.config
+++ b/examples/csharp/route_guide/RouteGuideServer/packages.config
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
- <package id="Google.Protobuf" version="3.0.0-beta3" targetFramework="net45" />
- <package id="Grpc" version="0.15.0" targetFramework="net45" />
- <package id="Grpc.Core" version="0.15.0" targetFramework="net45" />
- <package id="Ix-Async" version="1.2.5" targetFramework="net45" />
+ <package id="Google.Protobuf" version="3.0.0" targetFramework="net45" />
+ <package id="Grpc" version="1.0.0" targetFramework="net45" />
+ <package id="Grpc.Core" version="1.0.0" targetFramework="net45" />
+ <package id="System.Interactive.Async" version="3.0.0" targetFramework="net45" />
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
- <package id="Grpc.Tools" version="0.15.0" targetFramework="net45" />
-</packages> \ No newline at end of file
+ <package id="Grpc.Tools" version="1.0.0" targetFramework="net45" />
+</packages>
diff --git a/examples/csharp/route_guide/generate_protos.bat b/examples/csharp/route_guide/generate_protos.bat
index dbdbd1f172..69f5e0f4a3 100644
--- a/examples/csharp/route_guide/generate_protos.bat
+++ b/examples/csharp/route_guide/generate_protos.bat
@@ -34,8 +34,8 @@ setlocal
@rem enter this directory
cd /d %~dp0
-set TOOLS_PATH=packages\Grpc.Tools.0.15.0\tools\windows_x86
+set TOOLS_PATH=packages\Grpc.Tools.1.0.0\tools\windows_x86
%TOOLS_PATH%\protoc.exe -I../../protos --csharp_out RouteGuide ../../protos/route_guide.proto --grpc_out RouteGuide --plugin=protoc-gen-grpc=%TOOLS_PATH%\grpc_csharp_plugin.exe
-endlocal \ No newline at end of file
+endlocal
diff --git a/examples/node/README.md b/examples/node/README.md
index b92ca383c4..f29236c62a 100644
--- a/examples/node/README.md
+++ b/examples/node/README.md
@@ -39,7 +39,7 @@ There are two ways to generate the code needed to work with protocol buffers in
$ # from this directory
$ node ./dynamic_codegen/greeter_client.js
$ # OR
- $ node ./dynamic_codegen/greeter_client.js
+ $ node ./static_codegen/greeter_client.js
```
TUTORIAL
diff --git a/examples/php/run_greeter_client.sh b/examples/php/run_greeter_client.sh
index 1a6e9ee101..4d0be4f24f 100755
--- a/examples/php/run_greeter_client.sh
+++ b/examples/php/run_greeter_client.sh
@@ -30,5 +30,5 @@
set -e
cd $(dirname $0)
-php $extension_dir -d extension=grpc.so -d max_execution_time=300 \
+php -d extension=grpc.so -d max_execution_time=300 \
greeter_client.php $1
diff --git a/examples/python/README.md b/examples/python/README.md
index 9992baa842..d801d0dbca 100644
--- a/examples/python/README.md
+++ b/examples/python/README.md
@@ -1,56 +1 @@
-gRPC in 3 minutes (Python)
-========================
-
-Background
--------------
-For this sample, we've already generated the server and client stubs from
-[helloworld.proto][] and we'll be using a specific reference platform.
-
-
-Install gRPC:
-```sh
- $ pip install grpcio
-```
-Or, to install it system wide:
-```sh
- $ sudo pip install grpcio
-```
-
-If you're on Windows, make sure you installed the `pip.exe` component when you
-installed Python. Invoke as above but with `pip.exe` instead of `pip` (you may
-also need to invoke from a `cmd.exe` ran as administrator):
-```sh
- $ pip.exe install grpcio
-```
-
-Download the example
-```sh
- $ # Clone the repository to get the example code:
- $ git clone https://github.com/grpc/grpc
- $ # Navigate to the "hello, world" Python example:
- $ cd grpc/examples/python/helloworld
- ```
-
-Try it!
--------
-
-- Run the server
-
- ```sh
- $ python2.7 greeter_server.py &
- ```
-
-- Run the client
-
- ```sh
- $ python2.7 greeter_client.py
- ```
-
-Tutorial
---------
-
-You can find a more detailed tutorial in [gRPC Basics: Python][]
-
-[helloworld.proto]:../protos/helloworld.proto
-[Install gRPC Python]:../../src/python#installation
-[gRPC Basics: Python]:http://www.grpc.io/docs/tutorials/basic/python.html
+[This code's documentation lives on the grpc.io site.](http://www.grpc.io/docs/quickstart/python.html)
diff --git a/examples/python/helloworld/README.md b/examples/python/helloworld/README.md
index e889863a23..d801d0dbca 100644
--- a/examples/python/helloworld/README.md
+++ b/examples/python/helloworld/README.md
@@ -1 +1 @@
-[This code's documentation lives on the grpc.io site.](http://www.grpc.io/docs)
+[This code's documentation lives on the grpc.io site.](http://www.grpc.io/docs/quickstart/python.html)
diff --git a/examples/python/multiplex/README.md b/examples/python/multiplex/README.md
index bad3a42b37..5931be392a 100644
--- a/examples/python/multiplex/README.md
+++ b/examples/python/multiplex/README.md
@@ -1 +1,3 @@
An example showing two stubs sharing a channel and two servicers sharing a server.
+
+More complete documentation lives at [grpc.io](http://www.grpc.io/docs/tutorials/basic/python.html).
diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec
index 86b811a3ec..1fd96bb728 100644
--- a/gRPC-Core.podspec
+++ b/gRPC-Core.podspec
@@ -144,20 +144,17 @@ Pod::Spec.new do |s|
'include/grpc/support/tls_msvc.h',
'include/grpc/support/tls_pthread.h',
'include/grpc/support/useful.h',
- 'include/grpc/impl/codegen/alloc.h',
'include/grpc/impl/codegen/atm.h',
'include/grpc/impl/codegen/atm_gcc_atomic.h',
'include/grpc/impl/codegen/atm_gcc_sync.h',
'include/grpc/impl/codegen/atm_windows.h',
- 'include/grpc/impl/codegen/log.h',
+ 'include/grpc/impl/codegen/gpr_types.h',
'include/grpc/impl/codegen/port_platform.h',
'include/grpc/impl/codegen/slice.h',
- 'include/grpc/impl/codegen/slice_buffer.h',
'include/grpc/impl/codegen/sync.h',
'include/grpc/impl/codegen/sync_generic.h',
'include/grpc/impl/codegen/sync_posix.h',
'include/grpc/impl/codegen/sync_windows.h',
- 'include/grpc/impl/codegen/time.h',
'include/grpc/byte_buffer.h',
'include/grpc/byte_buffer_reader.h',
'include/grpc/compression.h',
@@ -165,27 +162,23 @@ Pod::Spec.new do |s|
'include/grpc/grpc_posix.h',
'include/grpc/grpc_security_constants.h',
'include/grpc/status.h',
- 'include/grpc/impl/codegen/byte_buffer.h',
'include/grpc/impl/codegen/byte_buffer_reader.h',
'include/grpc/impl/codegen/compression_types.h',
'include/grpc/impl/codegen/connectivity_state.h',
'include/grpc/impl/codegen/grpc_types.h',
'include/grpc/impl/codegen/propagation_bits.h',
'include/grpc/impl/codegen/status.h',
- 'include/grpc/impl/codegen/alloc.h',
'include/grpc/impl/codegen/atm.h',
'include/grpc/impl/codegen/atm_gcc_atomic.h',
'include/grpc/impl/codegen/atm_gcc_sync.h',
'include/grpc/impl/codegen/atm_windows.h',
- 'include/grpc/impl/codegen/log.h',
+ 'include/grpc/impl/codegen/gpr_types.h',
'include/grpc/impl/codegen/port_platform.h',
'include/grpc/impl/codegen/slice.h',
- 'include/grpc/impl/codegen/slice_buffer.h',
'include/grpc/impl/codegen/sync.h',
'include/grpc/impl/codegen/sync_generic.h',
'include/grpc/impl/codegen/sync_posix.h',
'include/grpc/impl/codegen/sync_windows.h',
- 'include/grpc/impl/codegen/time.h',
'include/grpc/grpc_security.h',
'include/grpc/census.h'
end
@@ -201,6 +194,7 @@ Pod::Spec.new do |s|
'src/core/lib/support/block_annotate.h',
'src/core/lib/support/env.h',
'src/core/lib/support/murmur_hash.h',
+ 'src/core/lib/support/percent_encoding.h',
'src/core/lib/support/stack_lockfree.h',
'src/core/lib/support/string.h',
'src/core/lib/support/string_windows.h',
@@ -228,6 +222,7 @@ Pod::Spec.new do |s|
'src/core/lib/support/log_posix.c',
'src/core/lib/support/log_windows.c',
'src/core/lib/support/murmur_hash.c',
+ 'src/core/lib/support/percent_encoding.c',
'src/core/lib/support/slice.c',
'src/core/lib/support/slice_buffer.c',
'src/core/lib/support/stack_lockfree.c',
@@ -379,7 +374,6 @@ Pod::Spec.new do |s|
'src/core/lib/tsi/transport_security_interface.h',
'src/core/ext/client_config/client_channel.h',
'src/core/ext/client_config/client_channel_factory.h',
- 'src/core/ext/client_config/client_config.h',
'src/core/ext/client_config/connector.h',
'src/core/ext/client_config/initial_connect_string.h',
'src/core/ext/client_config/lb_policy.h',
@@ -389,8 +383,8 @@ Pod::Spec.new do |s|
'src/core/ext/client_config/resolver.h',
'src/core/ext/client_config/resolver_factory.h',
'src/core/ext/client_config/resolver_registry.h',
+ 'src/core/ext/client_config/resolver_result.h',
'src/core/ext/client_config/subchannel.h',
- 'src/core/ext/client_config/subchannel_call_holder.h',
'src/core/ext/client_config/subchannel_index.h',
'src/core/ext/client_config/uri_parser.h',
'src/core/ext/lb_policy/grpclb/grpclb.h',
@@ -407,6 +401,7 @@ Pod::Spec.new do |s|
'src/core/ext/census/census_interface.h',
'src/core/ext/census/census_rpc_stats.h',
'src/core/ext/census/gen/census.pb.h',
+ 'src/core/ext/census/gen/trace_context.pb.h',
'src/core/ext/census/grpc_filter.h',
'src/core/ext/census/mlog.h',
'src/core/ext/census/resource.h',
@@ -556,7 +551,6 @@ Pod::Spec.new do |s|
'src/core/ext/client_config/channel_connectivity.c',
'src/core/ext/client_config/client_channel.c',
'src/core/ext/client_config/client_channel_factory.c',
- 'src/core/ext/client_config/client_config.c',
'src/core/ext/client_config/client_config_plugin.c',
'src/core/ext/client_config/connector.c',
'src/core/ext/client_config/default_initial_connect_string.c',
@@ -568,8 +562,8 @@ Pod::Spec.new do |s|
'src/core/ext/client_config/resolver.c',
'src/core/ext/client_config/resolver_factory.c',
'src/core/ext/client_config/resolver_registry.c',
+ 'src/core/ext/client_config/resolver_result.c',
'src/core/ext/client_config/subchannel.c',
- 'src/core/ext/client_config/subchannel_call_holder.c',
'src/core/ext/client_config/subchannel_index.c',
'src/core/ext/client_config/uri_parser.c',
'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c',
@@ -591,6 +585,7 @@ Pod::Spec.new do |s|
'src/core/ext/census/base_resources.c',
'src/core/ext/census/context.c',
'src/core/ext/census/gen/census.pb.c',
+ 'src/core/ext/census/gen/trace_context.pb.c',
'src/core/ext/census/grpc_context.c',
'src/core/ext/census/grpc_filter.c',
'src/core/ext/census/grpc_plugin.c',
@@ -607,6 +602,7 @@ Pod::Spec.new do |s|
'src/core/lib/support/block_annotate.h',
'src/core/lib/support/env.h',
'src/core/lib/support/murmur_hash.h',
+ 'src/core/lib/support/percent_encoding.h',
'src/core/lib/support/stack_lockfree.h',
'src/core/lib/support/string.h',
'src/core/lib/support/string_windows.h',
@@ -740,7 +736,6 @@ Pod::Spec.new do |s|
'src/core/lib/tsi/transport_security_interface.h',
'src/core/ext/client_config/client_channel.h',
'src/core/ext/client_config/client_channel_factory.h',
- 'src/core/ext/client_config/client_config.h',
'src/core/ext/client_config/connector.h',
'src/core/ext/client_config/initial_connect_string.h',
'src/core/ext/client_config/lb_policy.h',
@@ -750,8 +745,8 @@ Pod::Spec.new do |s|
'src/core/ext/client_config/resolver.h',
'src/core/ext/client_config/resolver_factory.h',
'src/core/ext/client_config/resolver_registry.h',
+ 'src/core/ext/client_config/resolver_result.h',
'src/core/ext/client_config/subchannel.h',
- 'src/core/ext/client_config/subchannel_call_holder.h',
'src/core/ext/client_config/subchannel_index.h',
'src/core/ext/client_config/uri_parser.h',
'src/core/ext/lb_policy/grpclb/grpclb.h',
@@ -768,6 +763,7 @@ Pod::Spec.new do |s|
'src/core/ext/census/census_interface.h',
'src/core/ext/census/census_rpc_stats.h',
'src/core/ext/census/gen/census.pb.h',
+ 'src/core/ext/census/gen/trace_context.pb.h',
'src/core/ext/census/grpc_filter.h',
'src/core/ext/census/mlog.h',
'src/core/ext/census/resource.h',
diff --git a/grpc.def b/grpc.def
index e2255df738..6e905a297e 100644
--- a/grpc.def
+++ b/grpc.def
@@ -1,4 +1,14 @@
EXPORTS
+ grpc_raw_byte_buffer_create
+ grpc_raw_compressed_byte_buffer_create
+ grpc_byte_buffer_copy
+ grpc_byte_buffer_length
+ grpc_byte_buffer_destroy
+ grpc_byte_buffer_reader_init
+ grpc_byte_buffer_reader_destroy
+ grpc_byte_buffer_reader_next
+ grpc_byte_buffer_reader_readall
+ grpc_raw_byte_buffer_from_reader
census_initialize
census_shutdown
census_supported
@@ -42,6 +52,7 @@ EXPORTS
grpc_init
grpc_shutdown
grpc_version_string
+ grpc_g_stands_for
grpc_completion_queue_create
grpc_completion_queue_next
grpc_completion_queue_pluck
@@ -125,21 +136,48 @@ EXPORTS
gpr_free_aligned
gpr_set_allocation_functions
gpr_get_allocation_functions
- grpc_raw_byte_buffer_create
- grpc_raw_compressed_byte_buffer_create
- grpc_byte_buffer_copy
- grpc_byte_buffer_length
- grpc_byte_buffer_destroy
- grpc_byte_buffer_reader_init
- grpc_byte_buffer_reader_destroy
- grpc_byte_buffer_reader_next
- grpc_byte_buffer_reader_readall
- grpc_raw_byte_buffer_from_reader
+ gpr_avl_create
+ gpr_avl_ref
+ gpr_avl_unref
+ gpr_avl_add
+ gpr_avl_remove
+ gpr_avl_get
+ gpr_avl_maybe_get
+ gpr_avl_is_empty
+ gpr_cmdline_create
+ gpr_cmdline_add_int
+ gpr_cmdline_add_flag
+ gpr_cmdline_add_string
+ gpr_cmdline_on_extra_arg
+ gpr_cmdline_set_survive_failure
+ gpr_cmdline_parse
+ gpr_cmdline_destroy
+ gpr_cmdline_usage_string
+ gpr_cpu_num_cores
+ gpr_cpu_current_cpu
+ gpr_histogram_create
+ gpr_histogram_destroy
+ gpr_histogram_add
+ gpr_histogram_merge
+ gpr_histogram_percentile
+ gpr_histogram_mean
+ gpr_histogram_stddev
+ gpr_histogram_variance
+ gpr_histogram_maximum
+ gpr_histogram_minimum
+ gpr_histogram_count
+ gpr_histogram_sum
+ gpr_histogram_sum_of_squares
+ gpr_histogram_get_contents
+ gpr_histogram_merge_contents
+ gpr_join_host_port
+ gpr_split_host_port
gpr_log
gpr_log_message
gpr_set_log_verbosity
gpr_log_verbosity_init
gpr_set_log_function
+ gpr_format_message
gpr_slice_ref
gpr_slice_unref
gpr_slice_new
@@ -169,6 +207,13 @@ EXPORTS
gpr_slice_buffer_trim_end
gpr_slice_buffer_move_first
gpr_slice_buffer_take_first
+ gpr_strdup
+ gpr_asprintf
+ gpr_subprocess_binary_extension
+ gpr_subprocess_create
+ gpr_subprocess_destroy
+ gpr_subprocess_join
+ gpr_subprocess_interrupt
gpr_mu_init
gpr_mu_destroy
gpr_mu_lock
@@ -192,6 +237,14 @@ EXPORTS
gpr_stats_init
gpr_stats_inc
gpr_stats_read
+ gpr_thd_new
+ gpr_thd_options_default
+ gpr_thd_options_set_detached
+ gpr_thd_options_set_joinable
+ gpr_thd_options_is_detached
+ gpr_thd_options_is_joinable
+ gpr_thd_currentid
+ gpr_thd_join
gpr_time_0
gpr_inf_future
gpr_inf_past
@@ -213,55 +266,3 @@ EXPORTS
gpr_time_similar
gpr_sleep_until
gpr_timespec_to_micros
- gpr_avl_create
- gpr_avl_ref
- gpr_avl_unref
- gpr_avl_add
- gpr_avl_remove
- gpr_avl_get
- gpr_avl_maybe_get
- gpr_avl_is_empty
- gpr_cmdline_create
- gpr_cmdline_add_int
- gpr_cmdline_add_flag
- gpr_cmdline_add_string
- gpr_cmdline_on_extra_arg
- gpr_cmdline_set_survive_failure
- gpr_cmdline_parse
- gpr_cmdline_destroy
- gpr_cmdline_usage_string
- gpr_cpu_num_cores
- gpr_cpu_current_cpu
- gpr_histogram_create
- gpr_histogram_destroy
- gpr_histogram_add
- gpr_histogram_merge
- gpr_histogram_percentile
- gpr_histogram_mean
- gpr_histogram_stddev
- gpr_histogram_variance
- gpr_histogram_maximum
- gpr_histogram_minimum
- gpr_histogram_count
- gpr_histogram_sum
- gpr_histogram_sum_of_squares
- gpr_histogram_get_contents
- gpr_histogram_merge_contents
- gpr_join_host_port
- gpr_split_host_port
- gpr_format_message
- gpr_strdup
- gpr_asprintf
- gpr_subprocess_binary_extension
- gpr_subprocess_create
- gpr_subprocess_destroy
- gpr_subprocess_join
- gpr_subprocess_interrupt
- gpr_thd_new
- gpr_thd_options_default
- gpr_thd_options_set_detached
- gpr_thd_options_set_joinable
- gpr_thd_options_is_detached
- gpr_thd_options_is_joinable
- gpr_thd_currentid
- gpr_thd_join
diff --git a/grpc.gemspec b/grpc.gemspec
index 8d74e36e7b..7f608e0998 100755
--- a/grpc.gemspec
+++ b/grpc.gemspec
@@ -29,6 +29,7 @@ Gem::Specification.new do |s|
s.add_dependency 'google-protobuf', '~> 3.0'
s.add_dependency 'googleauth', '~> 0.5.1'
+ s.add_dependency 'concurrent-ruby'
s.add_development_dependency 'bundler', '~> 1.9'
s.add_development_dependency 'facter', '~> 2.4'
@@ -71,25 +72,23 @@ Gem::Specification.new do |s|
s.files += %w( include/grpc/support/tls_msvc.h )
s.files += %w( include/grpc/support/tls_pthread.h )
s.files += %w( include/grpc/support/useful.h )
- s.files += %w( include/grpc/impl/codegen/alloc.h )
s.files += %w( include/grpc/impl/codegen/atm.h )
s.files += %w( include/grpc/impl/codegen/atm_gcc_atomic.h )
s.files += %w( include/grpc/impl/codegen/atm_gcc_sync.h )
s.files += %w( include/grpc/impl/codegen/atm_windows.h )
- s.files += %w( include/grpc/impl/codegen/log.h )
+ s.files += %w( include/grpc/impl/codegen/gpr_types.h )
s.files += %w( include/grpc/impl/codegen/port_platform.h )
s.files += %w( include/grpc/impl/codegen/slice.h )
- s.files += %w( include/grpc/impl/codegen/slice_buffer.h )
s.files += %w( include/grpc/impl/codegen/sync.h )
s.files += %w( include/grpc/impl/codegen/sync_generic.h )
s.files += %w( include/grpc/impl/codegen/sync_posix.h )
s.files += %w( include/grpc/impl/codegen/sync_windows.h )
- s.files += %w( include/grpc/impl/codegen/time.h )
s.files += %w( src/core/lib/profiling/timers.h )
s.files += %w( src/core/lib/support/backoff.h )
s.files += %w( src/core/lib/support/block_annotate.h )
s.files += %w( src/core/lib/support/env.h )
s.files += %w( src/core/lib/support/murmur_hash.h )
+ s.files += %w( src/core/lib/support/percent_encoding.h )
s.files += %w( src/core/lib/support/stack_lockfree.h )
s.files += %w( src/core/lib/support/string.h )
s.files += %w( src/core/lib/support/string_windows.h )
@@ -117,6 +116,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/support/log_posix.c )
s.files += %w( src/core/lib/support/log_windows.c )
s.files += %w( src/core/lib/support/murmur_hash.c )
+ s.files += %w( src/core/lib/support/percent_encoding.c )
s.files += %w( src/core/lib/support/slice.c )
s.files += %w( src/core/lib/support/slice_buffer.c )
s.files += %w( src/core/lib/support/stack_lockfree.c )
@@ -148,27 +148,23 @@ Gem::Specification.new do |s|
s.files += %w( include/grpc/grpc_posix.h )
s.files += %w( include/grpc/grpc_security_constants.h )
s.files += %w( include/grpc/status.h )
- s.files += %w( include/grpc/impl/codegen/byte_buffer.h )
s.files += %w( include/grpc/impl/codegen/byte_buffer_reader.h )
s.files += %w( include/grpc/impl/codegen/compression_types.h )
s.files += %w( include/grpc/impl/codegen/connectivity_state.h )
s.files += %w( include/grpc/impl/codegen/grpc_types.h )
s.files += %w( include/grpc/impl/codegen/propagation_bits.h )
s.files += %w( include/grpc/impl/codegen/status.h )
- s.files += %w( include/grpc/impl/codegen/alloc.h )
s.files += %w( include/grpc/impl/codegen/atm.h )
s.files += %w( include/grpc/impl/codegen/atm_gcc_atomic.h )
s.files += %w( include/grpc/impl/codegen/atm_gcc_sync.h )
s.files += %w( include/grpc/impl/codegen/atm_windows.h )
- s.files += %w( include/grpc/impl/codegen/log.h )
+ s.files += %w( include/grpc/impl/codegen/gpr_types.h )
s.files += %w( include/grpc/impl/codegen/port_platform.h )
s.files += %w( include/grpc/impl/codegen/slice.h )
- s.files += %w( include/grpc/impl/codegen/slice_buffer.h )
s.files += %w( include/grpc/impl/codegen/sync.h )
s.files += %w( include/grpc/impl/codegen/sync_generic.h )
s.files += %w( include/grpc/impl/codegen/sync_posix.h )
s.files += %w( include/grpc/impl/codegen/sync_windows.h )
- s.files += %w( include/grpc/impl/codegen/time.h )
s.files += %w( include/grpc/grpc_security.h )
s.files += %w( include/grpc/census.h )
s.files += %w( src/core/lib/channel/channel_args.h )
@@ -298,7 +294,6 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/tsi/transport_security_interface.h )
s.files += %w( src/core/ext/client_config/client_channel.h )
s.files += %w( src/core/ext/client_config/client_channel_factory.h )
- s.files += %w( src/core/ext/client_config/client_config.h )
s.files += %w( src/core/ext/client_config/connector.h )
s.files += %w( src/core/ext/client_config/initial_connect_string.h )
s.files += %w( src/core/ext/client_config/lb_policy.h )
@@ -308,8 +303,8 @@ Gem::Specification.new do |s|
s.files += %w( src/core/ext/client_config/resolver.h )
s.files += %w( src/core/ext/client_config/resolver_factory.h )
s.files += %w( src/core/ext/client_config/resolver_registry.h )
+ s.files += %w( src/core/ext/client_config/resolver_result.h )
s.files += %w( src/core/ext/client_config/subchannel.h )
- s.files += %w( src/core/ext/client_config/subchannel_call_holder.h )
s.files += %w( src/core/ext/client_config/subchannel_index.h )
s.files += %w( src/core/ext/client_config/uri_parser.h )
s.files += %w( src/core/ext/lb_policy/grpclb/grpclb.h )
@@ -326,6 +321,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/ext/census/census_interface.h )
s.files += %w( src/core/ext/census/census_rpc_stats.h )
s.files += %w( src/core/ext/census/gen/census.pb.h )
+ s.files += %w( src/core/ext/census/gen/trace_context.pb.h )
s.files += %w( src/core/ext/census/grpc_filter.h )
s.files += %w( src/core/ext/census/mlog.h )
s.files += %w( src/core/ext/census/resource.h )
@@ -475,7 +471,6 @@ Gem::Specification.new do |s|
s.files += %w( src/core/ext/client_config/channel_connectivity.c )
s.files += %w( src/core/ext/client_config/client_channel.c )
s.files += %w( src/core/ext/client_config/client_channel_factory.c )
- s.files += %w( src/core/ext/client_config/client_config.c )
s.files += %w( src/core/ext/client_config/client_config_plugin.c )
s.files += %w( src/core/ext/client_config/connector.c )
s.files += %w( src/core/ext/client_config/default_initial_connect_string.c )
@@ -487,8 +482,8 @@ Gem::Specification.new do |s|
s.files += %w( src/core/ext/client_config/resolver.c )
s.files += %w( src/core/ext/client_config/resolver_factory.c )
s.files += %w( src/core/ext/client_config/resolver_registry.c )
+ s.files += %w( src/core/ext/client_config/resolver_result.c )
s.files += %w( src/core/ext/client_config/subchannel.c )
- s.files += %w( src/core/ext/client_config/subchannel_call_holder.c )
s.files += %w( src/core/ext/client_config/subchannel_index.c )
s.files += %w( src/core/ext/client_config/uri_parser.c )
s.files += %w( src/core/ext/transport/chttp2/server/insecure/server_chttp2.c )
@@ -510,6 +505,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/ext/census/base_resources.c )
s.files += %w( src/core/ext/census/context.c )
s.files += %w( src/core/ext/census/gen/census.pb.c )
+ s.files += %w( src/core/ext/census/gen/trace_context.pb.c )
s.files += %w( src/core/ext/census/grpc_context.c )
s.files += %w( src/core/ext/census/grpc_filter.c )
s.files += %w( src/core/ext/census/grpc_plugin.c )
diff --git a/include/grpc++/create_channel.h b/include/grpc++/create_channel.h
index e9ccb51503..0537695ed2 100644
--- a/include/grpc++/create_channel.h
+++ b/include/grpc++/create_channel.h
@@ -48,7 +48,6 @@ namespace grpc {
/// \param target The URI of the endpoint to connect to.
/// \param creds Credentials to use for the created channel. If it does not hold
/// an object or is invalid, a lame channel is returned.
-/// \param args Options for channel creation.
std::shared_ptr<Channel> CreateChannel(
const grpc::string& target,
const std::shared_ptr<ChannelCredentials>& creds);
diff --git a/include/grpc++/ext/reflection.grpc.pb.h b/include/grpc++/ext/reflection.grpc.pb.h
index 0b4ef86147..064117e303 100644
--- a/include/grpc++/ext/reflection.grpc.pb.h
+++ b/include/grpc++/ext/reflection.grpc.pb.h
@@ -74,6 +74,7 @@
#include <grpc++/impl/codegen/async_stream.h>
#include <grpc++/impl/codegen/async_unary_call.h>
+#include <grpc++/impl/codegen/method_handler_impl.h>
#include <grpc++/impl/codegen/proto_utils.h>
#include <grpc++/impl/codegen/rpc_method.h>
#include <grpc++/impl/codegen/service_type.h>
@@ -174,6 +175,7 @@ class ServerReflection GRPC_FINAL {
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
};
+ typedef Service StreamedUnaryService;
};
} // namespace v1alpha
diff --git a/include/grpc++/grpc++.h b/include/grpc++/grpc++.h
index ef07e19975..afb1c555bb 100644
--- a/include/grpc++/grpc++.h
+++ b/include/grpc++/grpc++.h
@@ -51,6 +51,9 @@
#ifndef GRPCXX_GRPCXX_H
#define GRPCXX_GRPCXX_H
+// Pragma for http://include-what-you-use.org/ tool, tells that following
+// headers are not private for grpc++.h and are part of its interface.
+// IWYU pragma: begin_exports
#include <grpc/grpc.h>
#include <grpc++/channel.h>
@@ -62,5 +65,6 @@
#include <grpc++/server_builder.h>
#include <grpc++/server_context.h>
#include <grpc++/server_posix.h>
+// IWYU pragma: end_exports
#endif // GRPCXX_GRPCXX_H
diff --git a/include/grpc++/impl/codegen/async_unary_call.h b/include/grpc++/impl/codegen/async_unary_call.h
index 5ceab73cea..87c94d6507 100644
--- a/include/grpc++/impl/codegen/async_unary_call.h
+++ b/include/grpc++/impl/codegen/async_unary_call.h
@@ -40,7 +40,6 @@
#include <grpc++/impl/codegen/server_context.h>
#include <grpc++/impl/codegen/service_type.h>
#include <grpc++/impl/codegen/status.h>
-#include <grpc/impl/codegen/log.h>
namespace grpc {
diff --git a/include/grpc++/impl/codegen/call.h b/include/grpc++/impl/codegen/call.h
index dfac177970..20087289f8 100644
--- a/include/grpc++/impl/codegen/call.h
+++ b/include/grpc++/impl/codegen/call.h
@@ -46,9 +46,9 @@
#include <grpc++/impl/codegen/core_codegen_interface.h>
#include <grpc++/impl/codegen/serialization_traits.h>
#include <grpc++/impl/codegen/status.h>
+#include <grpc++/impl/codegen/status_helper.h>
#include <grpc++/impl/codegen/string_ref.h>
-#include <grpc/impl/codegen/alloc.h>
#include <grpc/impl/codegen/compression_types.h>
#include <grpc/impl/codegen/grpc_types.h>
@@ -434,7 +434,7 @@ class CallOpServerSendStatus {
trailing_metadata_count_ = trailing_metadata.size();
trailing_metadata_ = FillMetadataArray(trailing_metadata);
send_status_available_ = true;
- send_status_code_ = static_cast<grpc_status_code>(status.error_code());
+ send_status_code_ = static_cast<grpc_status_code>(GetCanonicalCode(status));
send_status_details_ = status.error_message();
}
@@ -662,10 +662,10 @@ class Call GRPC_FINAL {
call_hook_->PerformOpsOnCall(ops, this);
}
- grpc_call* call() { return call_; }
- CompletionQueue* cq() { return cq_; }
+ grpc_call* call() const { return call_; }
+ CompletionQueue* cq() const { return cq_; }
- int max_message_size() { return max_message_size_; }
+ int max_message_size() const { return max_message_size_; }
private:
CallHook* call_hook_;
diff --git a/include/grpc++/impl/codegen/client_context.h b/include/grpc++/impl/codegen/client_context.h
index 012bcc2bbe..387d807c4b 100644
--- a/include/grpc++/impl/codegen/client_context.h
+++ b/include/grpc++/impl/codegen/client_context.h
@@ -62,9 +62,7 @@
#include <grpc++/impl/codegen/sync.h>
#include <grpc++/impl/codegen/time.h>
#include <grpc/impl/codegen/compression_types.h>
-#include <grpc/impl/codegen/log.h>
#include <grpc/impl/codegen/propagation_bits.h>
-#include <grpc/impl/codegen/time.h>
struct census_context;
struct grpc_call;
@@ -225,6 +223,9 @@ class ClientContext {
/// EXPERIMENTAL: Set this request to be idempotent
void set_idempotent(bool idempotent) { idempotent_ = idempotent; }
+ /// EXPERIMENTAL: Set this request to be cacheable
+ void set_cacheable(bool cacheable) { cacheable_ = cacheable; }
+
/// EXPERIMENTAL: Trigger fail-fast or not on this request
void set_fail_fast(bool fail_fast) { fail_fast_ = fail_fast; }
@@ -271,7 +272,7 @@ class ClientContext {
/// Set \a algorithm to be the compression algorithm used for the client call.
///
- /// \param algorith The compression algorithm used for the client call.
+ /// \param algorithm The compression algorithm used for the client call.
void set_compression_algorithm(grpc_compression_algorithm algorithm);
/// Return the peer uri in a string.
@@ -307,6 +308,10 @@ class ClientContext {
};
static void SetGlobalCallbacks(GlobalCallbacks* callbacks);
+ // Should be used for framework-level extensions only.
+ // Applications never need to call this method.
+ grpc_call* c_call() { return call_; }
+
private:
// Disallow copy and assign.
ClientContext(const ClientContext&);
@@ -342,7 +347,8 @@ class ClientContext {
uint32_t initial_metadata_flags() const {
return (idempotent_ ? GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST : 0) |
- (fail_fast_ ? 0 : GRPC_INITIAL_METADATA_IGNORE_CONNECTIVITY);
+ (fail_fast_ ? 0 : GRPC_INITIAL_METADATA_IGNORE_CONNECTIVITY) |
+ (cacheable_ ? GRPC_INITIAL_METADATA_CACHEABLE_REQUEST : 0);
}
grpc::string authority() { return authority_; }
@@ -350,6 +356,7 @@ class ClientContext {
bool initial_metadata_received_;
bool fail_fast_;
bool idempotent_;
+ bool cacheable_;
std::shared_ptr<Channel> channel_;
grpc::mutex mu_;
grpc_call* call_;
diff --git a/include/grpc++/impl/codegen/completion_queue.h b/include/grpc++/impl/codegen/completion_queue.h
index 03009e0561..29bc97fdf7 100644
--- a/include/grpc++/impl/codegen/completion_queue.h
+++ b/include/grpc++/impl/codegen/completion_queue.h
@@ -52,7 +52,6 @@
#include <grpc++/impl/codegen/grpc_library.h>
#include <grpc++/impl/codegen/status.h>
#include <grpc++/impl/codegen/time.h>
-#include <grpc/impl/codegen/time.h>
struct grpc_completion_queue;
@@ -68,8 +67,10 @@ template <class R>
class ServerReader;
template <class W>
class ServerWriter;
+namespace internal {
template <class W, class R>
-class ServerReaderWriter;
+class ServerReaderWriterBody;
+}
template <class ServiceType, class RequestType, class ResponseType>
class RpcMethodHandler;
template <class ServiceType, class RequestType, class ResponseType>
@@ -178,15 +179,15 @@ class CompletionQueue : private GrpcLibraryCodegen {
template <class W>
friend class ::grpc::ServerWriter;
template <class W, class R>
- friend class ::grpc::ServerReaderWriter;
+ friend class ::grpc::internal::ServerReaderWriterBody;
template <class ServiceType, class RequestType, class ResponseType>
friend class RpcMethodHandler;
template <class ServiceType, class RequestType, class ResponseType>
friend class ClientStreamingHandler;
template <class ServiceType, class RequestType, class ResponseType>
friend class ServerStreamingHandler;
- template <class ServiceType, class RequestType, class ResponseType>
- friend class BidiStreamingHandler;
+ template <class Streamer, bool WriteNeeded>
+ friend class TemplatedBidiStreamingHandler;
friend class UnknownMethodHandler;
friend class ::grpc::Server;
friend class ::grpc::ServerContext;
@@ -217,7 +218,7 @@ class CompletionQueue : private GrpcLibraryCodegen {
/// Performs a single polling pluck on \a tag.
/// \warning Must not be mixed with calls to \a Next.
void TryPluck(CompletionQueueTag* tag) {
- auto deadline = gpr_time_0(GPR_CLOCK_REALTIME);
+ auto deadline = g_core_codegen_interface->gpr_time_0(GPR_CLOCK_REALTIME);
auto ev = g_core_codegen_interface->grpc_completion_queue_pluck(
cq_, tag, deadline, nullptr);
if (ev.type == GRPC_QUEUE_TIMEOUT) return;
diff --git a/include/grpc++/impl/codegen/core_codegen.h b/include/grpc++/impl/codegen/core_codegen.h
index 2586b94504..0ce009e69d 100644
--- a/include/grpc++/impl/codegen/core_codegen.h
+++ b/include/grpc++/impl/codegen/core_codegen.h
@@ -55,6 +55,17 @@ class CoreCodegen : public CoreCodegenInterface {
void* gpr_malloc(size_t size) GRPC_OVERRIDE;
void gpr_free(void* p) GRPC_OVERRIDE;
+ void gpr_mu_init(gpr_mu* mu) GRPC_OVERRIDE;
+ void gpr_mu_destroy(gpr_mu* mu) GRPC_OVERRIDE;
+ void gpr_mu_lock(gpr_mu* mu) GRPC_OVERRIDE;
+ void gpr_mu_unlock(gpr_mu* mu) GRPC_OVERRIDE;
+ void gpr_cv_init(gpr_cv* cv) GRPC_OVERRIDE;
+ void gpr_cv_destroy(gpr_cv* cv) GRPC_OVERRIDE;
+ int gpr_cv_wait(gpr_cv* cv, gpr_mu* mu,
+ gpr_timespec abs_deadline) GRPC_OVERRIDE;
+ void gpr_cv_signal(gpr_cv* cv) GRPC_OVERRIDE;
+ void gpr_cv_broadcast(gpr_cv* cv) GRPC_OVERRIDE;
+
void grpc_byte_buffer_destroy(grpc_byte_buffer* bb) GRPC_OVERRIDE;
int grpc_byte_buffer_reader_init(grpc_byte_buffer_reader* reader,
@@ -78,6 +89,7 @@ class CoreCodegen : public CoreCodegenInterface {
void grpc_metadata_array_destroy(grpc_metadata_array* array) GRPC_OVERRIDE;
gpr_timespec gpr_inf_future(gpr_clock_type type) GRPC_OVERRIDE;
+ gpr_timespec gpr_time_0(gpr_clock_type type) GRPC_OVERRIDE;
virtual const Status& ok() GRPC_OVERRIDE;
virtual const Status& cancelled() GRPC_OVERRIDE;
diff --git a/include/grpc++/impl/codegen/core_codegen_interface.h b/include/grpc++/impl/codegen/core_codegen_interface.h
index f9a8f9b980..68851f15c6 100644
--- a/include/grpc++/impl/codegen/core_codegen_interface.h
+++ b/include/grpc++/impl/codegen/core_codegen_interface.h
@@ -36,7 +36,13 @@
#include <grpc++/impl/codegen/config.h>
#include <grpc++/impl/codegen/status.h>
+#include <grpc/impl/codegen/byte_buffer_reader.h>
#include <grpc/impl/codegen/grpc_types.h>
+#include <grpc/impl/codegen/sync.h>
+
+extern "C" {
+struct grpc_byte_buffer;
+}
namespace grpc {
@@ -63,6 +69,17 @@ class CoreCodegenInterface {
virtual void* gpr_malloc(size_t size) = 0;
virtual void gpr_free(void* p) = 0;
+ virtual void gpr_mu_init(gpr_mu* mu) = 0;
+ virtual void gpr_mu_destroy(gpr_mu* mu) = 0;
+ virtual void gpr_mu_lock(gpr_mu* mu) = 0;
+ virtual void gpr_mu_unlock(gpr_mu* mu) = 0;
+ virtual void gpr_cv_init(gpr_cv* cv) = 0;
+ virtual void gpr_cv_destroy(gpr_cv* cv) = 0;
+ virtual int gpr_cv_wait(gpr_cv* cv, gpr_mu* mu,
+ gpr_timespec abs_deadline) = 0;
+ virtual void gpr_cv_signal(gpr_cv* cv) = 0;
+ virtual void gpr_cv_broadcast(gpr_cv* cv) = 0;
+
virtual void grpc_byte_buffer_destroy(grpc_byte_buffer* bb) = 0;
virtual int grpc_byte_buffer_reader_init(grpc_byte_buffer_reader* reader,
@@ -89,6 +106,7 @@ class CoreCodegenInterface {
virtual const Status& cancelled() = 0;
virtual gpr_timespec gpr_inf_future(gpr_clock_type type) = 0;
+ virtual gpr_timespec gpr_time_0(gpr_clock_type type) = 0;
};
extern CoreCodegenInterface* g_core_codegen_interface;
diff --git a/include/grpc++/impl/codegen/grpc_library.h b/include/grpc++/impl/codegen/grpc_library.h
index 3cdc6f3f7c..2b11aff214 100644
--- a/include/grpc++/impl/codegen/grpc_library.h
+++ b/include/grpc++/impl/codegen/grpc_library.h
@@ -35,7 +35,6 @@
#define GRPCXX_IMPL_CODEGEN_GRPC_LIBRARY_H
#include <grpc++/impl/codegen/core_codegen_interface.h>
-#include <grpc/impl/codegen/log.h>
namespace grpc {
diff --git a/include/grpc++/impl/codegen/method_handler_impl.h b/include/grpc++/impl/codegen/method_handler_impl.h
index 2f4be644ba..d989263252 100644
--- a/include/grpc++/impl/codegen/method_handler_impl.h
+++ b/include/grpc++/impl/codegen/method_handler_impl.h
@@ -167,20 +167,22 @@ class ServerStreamingHandler : public MethodHandler {
};
// A wrapper class of an application provided bidi-streaming handler.
-template <class ServiceType, class RequestType, class ResponseType>
-class BidiStreamingHandler : public MethodHandler {
+// This also applies to server-streamed implementation of a unary method
+// with the additional requirement that such methods must have done a
+// write for status to be ok
+// Since this is used by more than 1 class, the service is not passed in.
+// Instead, it is expected to be an implicitly-captured argument of func
+// (through bind or something along those lines)
+template <class Streamer, bool WriteNeeded>
+class TemplatedBidiStreamingHandler : public MethodHandler {
public:
- BidiStreamingHandler(
- std::function<Status(ServiceType*, ServerContext*,
- ServerReaderWriter<ResponseType, RequestType>*)>
- func,
- ServiceType* service)
- : func_(func), service_(service) {}
+ TemplatedBidiStreamingHandler(
+ std::function<Status(ServerContext*, Streamer*)> func)
+ : func_(func), write_needed_(WriteNeeded) {}
void RunHandler(const HandlerParameter& param) GRPC_FINAL {
- ServerReaderWriter<ResponseType, RequestType> stream(param.call,
- param.server_context);
- Status status = func_(service_, param.server_context, &stream);
+ Streamer stream(param.call, param.server_context);
+ Status status = func_(param.server_context, &stream);
CallOpSet<CallOpSendInitialMetadata, CallOpServerSendStatus> ops;
if (!param.server_context->sent_initial_metadata_) {
@@ -189,6 +191,12 @@ class BidiStreamingHandler : public MethodHandler {
if (param.server_context->compression_level_set()) {
ops.set_compression_level(param.server_context->compression_level());
}
+ if (write_needed_ && status.ok()) {
+ // If we needed a write but never did one, we need to mark the
+ // status as a fail
+ status = Status(StatusCode::INTERNAL,
+ "Service did not provide response message");
+ }
}
ops.ServerSendStatus(param.server_context->trailing_metadata_, status);
param.call->PerformOps(&ops);
@@ -196,10 +204,36 @@ class BidiStreamingHandler : public MethodHandler {
}
private:
- std::function<Status(ServiceType*, ServerContext*,
- ServerReaderWriter<ResponseType, RequestType>*)>
- func_;
- ServiceType* service_;
+ std::function<Status(ServerContext*, Streamer*)> func_;
+ const bool write_needed_;
+};
+
+template <class ServiceType, class RequestType, class ResponseType>
+class BidiStreamingHandler
+ : public TemplatedBidiStreamingHandler<
+ ServerReaderWriter<ResponseType, RequestType>, false> {
+ public:
+ BidiStreamingHandler(
+ std::function<Status(ServiceType*, ServerContext*,
+ ServerReaderWriter<ResponseType, RequestType>*)>
+ func,
+ ServiceType* service)
+ : TemplatedBidiStreamingHandler<
+ ServerReaderWriter<ResponseType, RequestType>, false>(std::bind(
+ func, service, std::placeholders::_1, std::placeholders::_2)) {}
+};
+
+template <class RequestType, class ResponseType>
+class StreamedUnaryHandler
+ : public TemplatedBidiStreamingHandler<
+ ServerUnaryStreamer<RequestType, ResponseType>, true> {
+ public:
+ explicit StreamedUnaryHandler(
+ std::function<Status(ServerContext*,
+ ServerUnaryStreamer<RequestType, ResponseType>*)>
+ func)
+ : TemplatedBidiStreamingHandler<
+ ServerUnaryStreamer<RequestType, ResponseType>, true>(func) {}
};
// Handle unknown method by returning UNIMPLEMENTED error.
diff --git a/include/grpc++/impl/codegen/proto_utils.h b/include/grpc++/impl/codegen/proto_utils.h
index d4599c5fff..d2e0f6fcdd 100644
--- a/include/grpc++/impl/codegen/proto_utils.h
+++ b/include/grpc++/impl/codegen/proto_utils.h
@@ -40,9 +40,8 @@
#include <grpc++/impl/codegen/core_codegen_interface.h>
#include <grpc++/impl/codegen/serialization_traits.h>
#include <grpc++/impl/codegen/status.h>
-#include <grpc/impl/codegen/byte_buffer.h>
#include <grpc/impl/codegen/byte_buffer_reader.h>
-#include <grpc/impl/codegen/log.h>
+#include <grpc/impl/codegen/grpc_types.h>
#include <grpc/impl/codegen/slice.h>
namespace grpc {
diff --git a/include/grpc++/impl/codegen/rpc_method.h b/include/grpc++/impl/codegen/rpc_method.h
index 39cb4f75df..4897428074 100644
--- a/include/grpc++/impl/codegen/rpc_method.h
+++ b/include/grpc++/impl/codegen/rpc_method.h
@@ -60,11 +60,12 @@ class RpcMethod {
const char* name() const { return name_; }
RpcType method_type() const { return method_type_; }
+ void SetMethodType(RpcType type) { method_type_ = type; }
void* channel_tag() const { return channel_tag_; }
private:
const char* const name_;
- const RpcType method_type_;
+ RpcType method_type_;
void* const channel_tag_;
};
diff --git a/include/grpc++/impl/codegen/rpc_service_method.h b/include/grpc++/impl/codegen/rpc_service_method.h
index 8b1f026c91..88da0965c8 100644
--- a/include/grpc++/impl/codegen/rpc_service_method.h
+++ b/include/grpc++/impl/codegen/rpc_service_method.h
@@ -43,7 +43,10 @@
#include <grpc++/impl/codegen/config.h>
#include <grpc++/impl/codegen/rpc_method.h>
#include <grpc++/impl/codegen/status.h>
-#include <grpc/impl/codegen/byte_buffer.h>
+
+extern "C" {
+struct grpc_byte_buffer;
+}
namespace grpc {
class ServerContext;
@@ -82,6 +85,7 @@ class RpcServiceMethod : public RpcMethod {
// if MethodHandler is nullptr, then this is an async method
MethodHandler* handler() const { return handler_.get(); }
void ResetHandler() { handler_.reset(); }
+ void SetHandler(MethodHandler* handler) { handler_.reset(handler); }
private:
void* server_tag_;
diff --git a/include/grpc++/impl/codegen/server_context.h b/include/grpc++/impl/codegen/server_context.h
index 08212af861..bce8d2c2f8 100644
--- a/include/grpc++/impl/codegen/server_context.h
+++ b/include/grpc++/impl/codegen/server_context.h
@@ -43,7 +43,6 @@
#include <grpc++/impl/codegen/string_ref.h>
#include <grpc++/impl/codegen/time.h>
#include <grpc/impl/codegen/compression_types.h>
-#include <grpc/impl/codegen/time.h>
struct gpr_timespec;
struct grpc_metadata;
@@ -65,8 +64,10 @@ template <class R>
class ServerReader;
template <class W>
class ServerWriter;
+namespace internal {
template <class W, class R>
-class ServerReaderWriter;
+class ServerReaderWriterBody;
+}
template <class ServiceType, class RequestType, class ResponseType>
class RpcMethodHandler;
template <class ServiceType, class RequestType, class ResponseType>
@@ -166,6 +167,10 @@ class ServerContext {
async_notify_when_done_tag_ = tag;
}
+ // Should be used for framework-level extensions only.
+ // Applications never need to call this method.
+ grpc_call* c_call() { return call_; }
+
private:
friend class ::grpc::testing::InteropServerContextInspector;
friend class ::grpc::ServerInterface;
@@ -183,15 +188,15 @@ class ServerContext {
template <class W>
friend class ::grpc::ServerWriter;
template <class W, class R>
- friend class ::grpc::ServerReaderWriter;
+ friend class ::grpc::internal::ServerReaderWriterBody;
template <class ServiceType, class RequestType, class ResponseType>
friend class RpcMethodHandler;
template <class ServiceType, class RequestType, class ResponseType>
friend class ClientStreamingHandler;
template <class ServiceType, class RequestType, class ResponseType>
friend class ServerStreamingHandler;
- template <class ServiceType, class RequestType, class ResponseType>
- friend class BidiStreamingHandler;
+ template <class Streamer, bool WriteNeeded>
+ friend class TemplatedBidiStreamingHandler;
friend class UnknownMethodHandler;
friend class ::grpc::ClientContext;
diff --git a/include/grpc++/impl/codegen/server_interface.h b/include/grpc++/impl/codegen/server_interface.h
index 3a3e052d9e..1f1b714cbf 100644
--- a/include/grpc++/impl/codegen/server_interface.h
+++ b/include/grpc++/impl/codegen/server_interface.h
@@ -52,6 +52,8 @@ class ServerCredentials;
class Service;
class ThreadPoolInterface;
+extern CoreCodegenInterface* g_core_codegen_interface;
+
/// Models a gRPC server.
///
/// Servers are configured and started via \a grpc::ServerBuilder.
@@ -78,7 +80,10 @@ class ServerInterface : public CallHook {
/// All completion queue associated with the server (for example, for async
/// serving) must be shutdown *after* this method has returned:
/// See \a ServerBuilder::AddCompletionQueue for details.
- void Shutdown() { ShutdownInternal(gpr_inf_future(GPR_CLOCK_MONOTONIC)); }
+ void Shutdown() {
+ ShutdownInternal(
+ g_core_codegen_interface->gpr_inf_future(GPR_CLOCK_MONOTONIC));
+ }
/// Block waiting for all work to complete.
///
diff --git a/include/grpc++/impl/codegen/service_type.h b/include/grpc++/impl/codegen/service_type.h
index c19dfc7d45..72b2225312 100644
--- a/include/grpc++/impl/codegen/service_type.h
+++ b/include/grpc++/impl/codegen/service_type.h
@@ -147,6 +147,17 @@ class Service {
methods_[index].reset();
}
+ void MarkMethodStreamedUnary(int index,
+ MethodHandler* streamed_unary_method) {
+ GPR_CODEGEN_ASSERT(methods_[index] && methods_[index]->handler() &&
+ "Cannot mark an async or generic method Streamed Unary");
+ methods_[index]->SetHandler(streamed_unary_method);
+
+ // From the server's point of view, streamed unary is a special
+ // case of BIDI_STREAMING that has 1 read and 1 write, in that order.
+ methods_[index]->SetMethodType(::grpc::RpcMethod::BIDI_STREAMING);
+ }
+
private:
friend class Server;
friend class ServerInterface;
diff --git a/include/grpc++/impl/codegen/status_helper.h b/include/grpc++/impl/codegen/status_helper.h
new file mode 100644
index 0000000000..bfe45d9e5b
--- /dev/null
+++ b/include/grpc++/impl/codegen/status_helper.h
@@ -0,0 +1,47 @@
+/*
+ *
+ * Copyright 2016, Google Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#ifndef GRPCXX_IMPL_CODEGEN_STATUS_HELPER_H
+#define GRPCXX_IMPL_CODEGEN_STATUS_HELPER_H
+
+#include <grpc++/impl/codegen/status.h>
+
+namespace grpc {
+
+inline StatusCode GetCanonicalCode(const Status& status) {
+ return status.error_code();
+}
+
+} // namespace grpc
+
+#endif // GRPCXX_IMPL_CODEGEN_STATUS_HELPER_H
diff --git a/include/grpc++/impl/codegen/sync_no_cxx11.h b/include/grpc++/impl/codegen/sync_no_cxx11.h
index 55c059ede7..87a6594f7d 100644
--- a/include/grpc++/impl/codegen/sync_no_cxx11.h
+++ b/include/grpc++/impl/codegen/sync_no_cxx11.h
@@ -34,18 +34,20 @@
#ifndef GRPCXX_IMPL_CODEGEN_SYNC_NO_CXX11_H
#define GRPCXX_IMPL_CODEGEN_SYNC_NO_CXX11_H
-#include <grpc/impl/codegen/sync.h>
+#include <grpc++/impl/codegen/core_codegen_interface.h>
namespace grpc {
+extern CoreCodegenInterface *g_core_codegen_interface;
+
template <class mutex>
class lock_guard;
class condition_variable;
class mutex {
public:
- mutex() { gpr_mu_init(&mu_); }
- ~mutex() { gpr_mu_destroy(&mu_); }
+ mutex() { g_core_codegen_interface->gpr_mu_init(&mu_); }
+ ~mutex() { g_core_codegen_interface->gpr_mu_destroy(&mu_); }
private:
::gpr_mu mu_;
@@ -57,16 +59,18 @@ class mutex {
template <class mutex>
class lock_guard {
public:
- lock_guard(mutex &mu) : mu_(mu), locked(true) { gpr_mu_lock(&mu.mu_); }
+ lock_guard(mutex &mu) : mu_(mu), locked(true) {
+ g_core_codegen_interface->gpr_mu_lock(&mu.mu_);
+ }
~lock_guard() { unlock_internal(); }
protected:
void lock_internal() {
- if (!locked) gpr_mu_lock(&mu_.mu_);
+ if (!locked) g_core_codegen_interface->gpr_mu_lock(&mu_.mu_);
locked = true;
}
void unlock_internal() {
- if (locked) gpr_mu_unlock(&mu_.mu_);
+ if (locked) g_core_codegen_interface->gpr_mu_unlock(&mu_.mu_);
locked = false;
}
@@ -86,15 +90,17 @@ class unique_lock : public lock_guard<mutex> {
class condition_variable {
public:
- condition_variable() { gpr_cv_init(&cv_); }
- ~condition_variable() { gpr_cv_destroy(&cv_); }
+ condition_variable() { g_core_codegen_interface->gpr_cv_init(&cv_); }
+ ~condition_variable() { g_core_codegen_interface->gpr_cv_destroy(&cv_); }
void wait(lock_guard<mutex> &mu) {
mu.locked = false;
- gpr_cv_wait(&cv_, &mu.mu_.mu_, gpr_inf_future(GPR_CLOCK_REALTIME));
+ g_core_codegen_interface->gpr_cv_wait(
+ &cv_, &mu.mu_.mu_,
+ g_core_codegen_interface->gpr_inf_future(GPR_CLOCK_REALTIME));
mu.locked = true;
}
- void notify_one() { gpr_cv_signal(&cv_); }
- void notify_all() { gpr_cv_broadcast(&cv_); }
+ void notify_one() { g_core_codegen_interface->gpr_cv_signal(&cv_); }
+ void notify_all() { g_core_codegen_interface->gpr_cv_broadcast(&cv_); }
private:
gpr_cv cv_;
diff --git a/include/grpc++/impl/codegen/sync_stream.h b/include/grpc++/impl/codegen/sync_stream.h
index b2b972760d..aba129811b 100644
--- a/include/grpc++/impl/codegen/sync_stream.h
+++ b/include/grpc++/impl/codegen/sync_stream.h
@@ -42,7 +42,6 @@
#include <grpc++/impl/codegen/server_context.h>
#include <grpc++/impl/codegen/service_type.h>
#include <grpc++/impl/codegen/status.h>
-#include <grpc/impl/codegen/log.h>
namespace grpc {
@@ -64,12 +63,24 @@ class ClientStreamingInterface {
virtual Status Finish() = 0;
};
+/// Common interface for all synchronous server side streaming.
+class ServerStreamingInterface {
+ public:
+ virtual ~ServerStreamingInterface() {}
+
+ /// Blocking send initial metadata to client.
+ virtual void SendInitialMetadata() = 0;
+};
+
/// An interface that yields a sequence of messages of type \a R.
template <class R>
class ReaderInterface {
public:
virtual ~ReaderInterface() {}
+ /// Upper bound on the next message size available for reading on this stream
+ virtual bool NextMessageSize(uint32_t* sz) = 0;
+
/// Blocking read a message and parse to \a msg. Returns \a true on success.
/// This is thread-safe with respect to \a Write or \WritesDone methods on
/// the same stream. It should not be called concurrently with another \a
@@ -148,6 +159,11 @@ class ClientReader GRPC_FINAL : public ClientReaderInterface<R> {
cq_.Pluck(&ops); /// status ignored
}
+ bool NextMessageSize(uint32_t* sz) GRPC_OVERRIDE {
+ *sz = call_.max_message_size();
+ return true;
+ }
+
bool Read(R* msg) GRPC_OVERRIDE {
CallOpSet<CallOpRecvInitialMetadata, CallOpRecvMessage<R>> ops;
if (!context_->initial_metadata_received_) {
@@ -293,6 +309,11 @@ class ClientReaderWriter GRPC_FINAL : public ClientReaderWriterInterface<W, R> {
cq_.Pluck(&ops); // status ignored
}
+ bool NextMessageSize(uint32_t* sz) GRPC_OVERRIDE {
+ *sz = call_.max_message_size();
+ return true;
+ }
+
bool Read(R* msg) GRPC_OVERRIDE {
CallOpSet<CallOpRecvInitialMetadata, CallOpRecvMessage<R>> ops;
if (!context_->initial_metadata_received_) {
@@ -336,12 +357,17 @@ class ClientReaderWriter GRPC_FINAL : public ClientReaderWriterInterface<W, R> {
Call call_;
};
+/// Server-side interface for streaming reads of message of type \a R.
+template <class R>
+class ServerReaderInterface : public ServerStreamingInterface,
+ public ReaderInterface<R> {};
+
template <class R>
-class ServerReader GRPC_FINAL : public ReaderInterface<R> {
+class ServerReader GRPC_FINAL : public ServerReaderInterface<R> {
public:
ServerReader(Call* call, ServerContext* ctx) : call_(call), ctx_(ctx) {}
- void SendInitialMetadata() {
+ void SendInitialMetadata() GRPC_OVERRIDE {
GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_);
CallOpSet<CallOpSendInitialMetadata> ops;
@@ -355,6 +381,11 @@ class ServerReader GRPC_FINAL : public ReaderInterface<R> {
call_->cq()->Pluck(&ops);
}
+ bool NextMessageSize(uint32_t* sz) GRPC_OVERRIDE {
+ *sz = call_->max_message_size();
+ return true;
+ }
+
bool Read(R* msg) GRPC_OVERRIDE {
CallOpSet<CallOpRecvMessage<R>> ops;
ops.RecvMessage(msg);
@@ -367,12 +398,17 @@ class ServerReader GRPC_FINAL : public ReaderInterface<R> {
ServerContext* const ctx_;
};
+/// Server-side interface for streaming writes of message of type \a W.
template <class W>
-class ServerWriter GRPC_FINAL : public WriterInterface<W> {
+class ServerWriterInterface : public ServerStreamingInterface,
+ public WriterInterface<W> {};
+
+template <class W>
+class ServerWriter GRPC_FINAL : public ServerWriterInterface<W> {
public:
ServerWriter(Call* call, ServerContext* ctx) : call_(call), ctx_(ctx) {}
- void SendInitialMetadata() {
+ void SendInitialMetadata() GRPC_OVERRIDE {
GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_);
CallOpSet<CallOpSendInitialMetadata> ops;
@@ -411,10 +447,17 @@ class ServerWriter GRPC_FINAL : public WriterInterface<W> {
/// Server-side interface for bi-directional streaming.
template <class W, class R>
-class ServerReaderWriter GRPC_FINAL : public WriterInterface<W>,
- public ReaderInterface<R> {
+class ServerReaderWriterInterface : public ServerStreamingInterface,
+ public WriterInterface<W>,
+ public ReaderInterface<R> {};
+
+// Actual implementation of bi-directional streaming
+namespace internal {
+template <class W, class R>
+class ServerReaderWriterBody GRPC_FINAL {
public:
- ServerReaderWriter(Call* call, ServerContext* ctx) : call_(call), ctx_(ctx) {}
+ ServerReaderWriterBody(Call* call, ServerContext* ctx)
+ : call_(call), ctx_(ctx) {}
void SendInitialMetadata() {
GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_);
@@ -430,15 +473,19 @@ class ServerReaderWriter GRPC_FINAL : public WriterInterface<W>,
call_->cq()->Pluck(&ops);
}
- bool Read(R* msg) GRPC_OVERRIDE {
+ bool NextMessageSize(uint32_t* sz) {
+ *sz = call_->max_message_size();
+ return true;
+ }
+
+ bool Read(R* msg) {
CallOpSet<CallOpRecvMessage<R>> ops;
ops.RecvMessage(msg);
call_->PerformOps(&ops);
return call_->cq()->Pluck(&ops) && ops.got_message;
}
- using WriterInterface<W>::Write;
- bool Write(const W& msg, const WriteOptions& options) GRPC_OVERRIDE {
+ bool Write(const W& msg, const WriteOptions& options) {
CallOpSet<CallOpSendInitialMetadata, CallOpSendMessage> ops;
if (!ops.SendMessage(msg, options).ok()) {
return false;
@@ -459,6 +506,76 @@ class ServerReaderWriter GRPC_FINAL : public WriterInterface<W>,
Call* const call_;
ServerContext* const ctx_;
};
+}
+
+// class to represent the user API for a bidirectional streaming call
+template <class W, class R>
+class ServerReaderWriter GRPC_FINAL : public ServerReaderWriterInterface<W, R> {
+ public:
+ ServerReaderWriter(Call* call, ServerContext* ctx) : body_(call, ctx) {}
+
+ void SendInitialMetadata() GRPC_OVERRIDE { body_.SendInitialMetadata(); }
+
+ bool NextMessageSize(uint32_t* sz) GRPC_OVERRIDE {
+ return body_.NextMessageSize(sz);
+ }
+
+ bool Read(R* msg) GRPC_OVERRIDE { return body_.Read(msg); }
+
+ using WriterInterface<W>::Write;
+ bool Write(const W& msg, const WriteOptions& options) GRPC_OVERRIDE {
+ return body_.Write(msg, options);
+ }
+
+ private:
+ internal::ServerReaderWriterBody<W, R> body_;
+};
+
+/// A class to represent a flow-controlled unary call. This is something
+/// of a hybrid between conventional unary and streaming. This is invoked
+/// through a unary call on the client side, but the server responds to it
+/// as though it were a single-ping-pong streaming call. The server can use
+/// the \a NextMessageSize method to determine an upper-bound on the size of
+/// the message.
+/// A key difference relative to streaming: ServerUnaryStreamer
+/// must have exactly 1 Read and exactly 1 Write, in that order, to function
+/// correctly. Otherwise, the RPC is in error.
+template <class RequestType, class ResponseType>
+class ServerUnaryStreamer GRPC_FINAL
+ : public ServerReaderWriterInterface<ResponseType, RequestType> {
+ public:
+ ServerUnaryStreamer(Call* call, ServerContext* ctx)
+ : body_(call, ctx), read_done_(false), write_done_(false) {}
+
+ void SendInitialMetadata() GRPC_OVERRIDE { body_.SendInitialMetadata(); }
+
+ bool NextMessageSize(uint32_t* sz) GRPC_OVERRIDE {
+ return body_.NextMessageSize(sz);
+ }
+
+ bool Read(RequestType* request) GRPC_OVERRIDE {
+ if (read_done_) {
+ return false;
+ }
+ read_done_ = true;
+ return body_.Read(request);
+ }
+
+ using WriterInterface<ResponseType>::Write;
+ bool Write(const ResponseType& response,
+ const WriteOptions& options) GRPC_OVERRIDE {
+ if (write_done_ || !read_done_) {
+ return false;
+ }
+ write_done_ = true;
+ return body_.Write(response, options);
+ }
+
+ private:
+ internal::ServerReaderWriterBody<ResponseType, RequestType> body_;
+ bool read_done_;
+ bool write_done_;
+};
} // namespace grpc
diff --git a/include/grpc++/impl/codegen/thrift_serializer.h b/include/grpc++/impl/codegen/thrift_serializer.h
index 7308a1577c..fd324a994f 100644
--- a/include/grpc++/impl/codegen/thrift_serializer.h
+++ b/include/grpc++/impl/codegen/thrift_serializer.h
@@ -34,10 +34,8 @@
#ifndef GRPCXX_IMPL_CODEGEN_THRIFT_SERIALIZER_H
#define GRPCXX_IMPL_CODEGEN_THRIFT_SERIALIZER_H
-#include <grpc/impl/codegen/byte_buffer.h>
#include <grpc/impl/codegen/byte_buffer_reader.h>
#include <grpc/impl/codegen/slice.h>
-#include <grpc/impl/codegen/slice_buffer.h>
#include <thrift/protocol/TBinaryProtocol.h>
#include <thrift/protocol/TCompactProtocol.h>
#include <thrift/protocol/TProtocolException.h>
@@ -216,4 +214,4 @@ typedef ThriftSerializer<void, TCompactProtocolT<TBufferBase>>
} // namespace thrift
} // namespace apache
-#endif \ No newline at end of file
+#endif
diff --git a/include/grpc++/impl/codegen/thrift_utils.h b/include/grpc++/impl/codegen/thrift_utils.h
index 7d19b247f4..be558c5789 100644
--- a/include/grpc++/impl/codegen/thrift_utils.h
+++ b/include/grpc++/impl/codegen/thrift_utils.h
@@ -40,10 +40,8 @@
#include <grpc++/impl/codegen/status.h>
#include <grpc++/impl/codegen/status_code_enum.h>
#include <grpc++/impl/codegen/thrift_serializer.h>
-#include <grpc/impl/codegen/byte_buffer.h>
#include <grpc/impl/codegen/byte_buffer_reader.h>
#include <grpc/impl/codegen/slice.h>
-#include <grpc/impl/codegen/slice_buffer.h>
#include <cstdint>
#include <cstdlib>
diff --git a/include/grpc++/impl/codegen/time.h b/include/grpc++/impl/codegen/time.h
index d9b19bce64..87c5112d0d 100644
--- a/include/grpc++/impl/codegen/time.h
+++ b/include/grpc++/impl/codegen/time.h
@@ -35,7 +35,7 @@
#define GRPCXX_IMPL_CODEGEN_TIME_H
#include <grpc++/impl/codegen/config.h>
-#include <grpc/impl/codegen/time.h>
+#include <grpc/impl/codegen/grpc_types.h>
namespace grpc {
@@ -79,7 +79,7 @@ class TimePoint<gpr_timespec> {
#include <chrono>
-#include <grpc/impl/codegen/time.h>
+#include <grpc/impl/codegen/grpc_types.h>
namespace grpc {
diff --git a/include/grpc++/impl/server_builder_plugin.h b/include/grpc++/impl/server_builder_plugin.h
index 1e157efa11..61632e32fa 100644
--- a/include/grpc++/impl/server_builder_plugin.h
+++ b/include/grpc++/impl/server_builder_plugin.h
@@ -41,6 +41,7 @@
namespace grpc {
class ServerInitializer;
+class ChannelArguments;
class ServerBuilderPlugin {
public:
@@ -58,6 +59,10 @@ class ServerBuilderPlugin {
// ServerBuilderOption::UpdatePlugins
virtual void ChangeArguments(const grpc::string& name, void* value) = 0;
+ // UpdateChannelArguments will be called in ServerBuilder::BuildAndStart(),
+ // before the Server instance is created.
+ virtual void UpdateChannelArguments(ChannelArguments* args) {}
+
virtual bool has_sync_methods() const { return false; }
virtual bool has_async_methods() const { return false; }
};
diff --git a/include/grpc/byte_buffer.h b/include/grpc/byte_buffer.h
index c3a394371d..f25c1d51d6 100644
--- a/include/grpc/byte_buffer.h
+++ b/include/grpc/byte_buffer.h
@@ -34,6 +34,69 @@
#ifndef GRPC_BYTE_BUFFER_H
#define GRPC_BYTE_BUFFER_H
-#include <grpc/impl/codegen/byte_buffer.h>
+#include <grpc/impl/codegen/grpc_types.h>
+#include <grpc/support/slice_buffer.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** Returns a RAW byte buffer instance over the given slices (up to \a nslices).
+ *
+ * Increases the reference count for all \a slices processed. The user is
+ * responsible for invoking grpc_byte_buffer_destroy on the returned instance.*/
+GRPCAPI grpc_byte_buffer *grpc_raw_byte_buffer_create(gpr_slice *slices,
+ size_t nslices);
+
+/** Returns a *compressed* RAW byte buffer instance over the given slices (up to
+ * \a nslices). The \a compression argument defines the compression algorithm
+ * used to generate the data in \a slices.
+ *
+ * Increases the reference count for all \a slices processed. The user is
+ * responsible for invoking grpc_byte_buffer_destroy on the returned instance.*/
+GRPCAPI grpc_byte_buffer *grpc_raw_compressed_byte_buffer_create(
+ gpr_slice *slices, size_t nslices, grpc_compression_algorithm compression);
+
+/** Copies input byte buffer \a bb.
+ *
+ * Increases the reference count of all the source slices. The user is
+ * responsible for calling grpc_byte_buffer_destroy over the returned copy. */
+GRPCAPI grpc_byte_buffer *grpc_byte_buffer_copy(grpc_byte_buffer *bb);
+
+/** Returns the size of the given byte buffer, in bytes. */
+GRPCAPI size_t grpc_byte_buffer_length(grpc_byte_buffer *bb);
+
+/** Destroys \a byte_buffer deallocating all its memory. */
+GRPCAPI void grpc_byte_buffer_destroy(grpc_byte_buffer *byte_buffer);
+
+/** Reader for byte buffers. Iterates over slices in the byte buffer */
+struct grpc_byte_buffer_reader;
+typedef struct grpc_byte_buffer_reader grpc_byte_buffer_reader;
+
+/** Initialize \a reader to read over \a buffer.
+ * Returns 1 upon success, 0 otherwise. */
+GRPCAPI int grpc_byte_buffer_reader_init(grpc_byte_buffer_reader *reader,
+ grpc_byte_buffer *buffer);
+
+/** Cleanup and destroy \a reader */
+GRPCAPI void grpc_byte_buffer_reader_destroy(grpc_byte_buffer_reader *reader);
+
+/** Updates \a slice with the next piece of data from from \a reader and returns
+ * 1. Returns 0 at the end of the stream. Caller is responsible for calling
+ * gpr_slice_unref on the result. */
+GRPCAPI int grpc_byte_buffer_reader_next(grpc_byte_buffer_reader *reader,
+ gpr_slice *slice);
+
+/** Merge all data from \a reader into single slice */
+GRPCAPI gpr_slice
+grpc_byte_buffer_reader_readall(grpc_byte_buffer_reader *reader);
+
+/** Returns a RAW byte buffer instance from the output of \a reader. */
+GRPCAPI grpc_byte_buffer *grpc_raw_byte_buffer_from_reader(
+ grpc_byte_buffer_reader *reader);
+
+#ifdef __cplusplus
+}
+#endif
#endif /* GRPC_BYTE_BUFFER_H */
diff --git a/include/grpc/compression.h b/include/grpc/compression.h
index 22bcf0e302..5f285cdcdf 100644
--- a/include/grpc/compression.h
+++ b/include/grpc/compression.h
@@ -36,9 +36,10 @@
#include <stdlib.h>
-#include <grpc/impl/codegen/compression_types.h>
#include <grpc/impl/codegen/port_platform.h>
+#include <grpc/impl/codegen/compression_types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h
index 4ca018edb3..587d86c98f 100644
--- a/include/grpc/grpc.h
+++ b/include/grpc/grpc.h
@@ -90,6 +90,9 @@ GRPCAPI void grpc_shutdown(void);
/** Return a string representing the current version of grpc */
GRPCAPI const char *grpc_version_string(void);
+/** Return a string specifying what the 'g' in gRPC stands for */
+GRPCAPI const char *grpc_g_stands_for(void);
+
/** Create a completion queue */
GRPCAPI grpc_completion_queue *grpc_completion_queue_create(void *reserved);
diff --git a/include/grpc/impl/codegen/byte_buffer.h b/include/grpc/impl/codegen/byte_buffer.h
deleted file mode 100644
index fe1e215979..0000000000
--- a/include/grpc/impl/codegen/byte_buffer.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- *
- * Copyright 2015-2016, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-#ifndef GRPC_IMPL_CODEGEN_BYTE_BUFFER_H
-#define GRPC_IMPL_CODEGEN_BYTE_BUFFER_H
-
-#include <grpc/impl/codegen/compression_types.h>
-#include <grpc/impl/codegen/slice_buffer.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef enum {
- GRPC_BB_RAW
- /* Future types may include GRPC_BB_PROTOBUF, etc. */
-} grpc_byte_buffer_type;
-
-struct grpc_byte_buffer {
- void *reserved;
- grpc_byte_buffer_type type;
- union {
- struct {
- void *reserved[8];
- } reserved;
- struct {
- grpc_compression_algorithm compression;
- gpr_slice_buffer slice_buffer;
- } raw;
- } data;
-};
-typedef struct grpc_byte_buffer grpc_byte_buffer;
-
-/** Returns a RAW byte buffer instance over the given slices (up to \a nslices).
- *
- * Increases the reference count for all \a slices processed. The user is
- * responsible for invoking grpc_byte_buffer_destroy on the returned instance.*/
-GRPCAPI grpc_byte_buffer *grpc_raw_byte_buffer_create(gpr_slice *slices,
- size_t nslices);
-
-/** Returns a *compressed* RAW byte buffer instance over the given slices (up to
- * \a nslices). The \a compression argument defines the compression algorithm
- * used to generate the data in \a slices.
- *
- * Increases the reference count for all \a slices processed. The user is
- * responsible for invoking grpc_byte_buffer_destroy on the returned instance.*/
-GRPCAPI grpc_byte_buffer *grpc_raw_compressed_byte_buffer_create(
- gpr_slice *slices, size_t nslices, grpc_compression_algorithm compression);
-
-/** Copies input byte buffer \a bb.
- *
- * Increases the reference count of all the source slices. The user is
- * responsible for calling grpc_byte_buffer_destroy over the returned copy. */
-GRPCAPI grpc_byte_buffer *grpc_byte_buffer_copy(grpc_byte_buffer *bb);
-
-/** Returns the size of the given byte buffer, in bytes. */
-GRPCAPI size_t grpc_byte_buffer_length(grpc_byte_buffer *bb);
-
-/** Destroys \a byte_buffer deallocating all its memory. */
-GRPCAPI void grpc_byte_buffer_destroy(grpc_byte_buffer *byte_buffer);
-
-/** Reader for byte buffers. Iterates over slices in the byte buffer */
-struct grpc_byte_buffer_reader;
-typedef struct grpc_byte_buffer_reader grpc_byte_buffer_reader;
-
-/** Initialize \a reader to read over \a buffer.
- * Returns 1 upon success, 0 otherwise. */
-GRPCAPI int grpc_byte_buffer_reader_init(grpc_byte_buffer_reader *reader,
- grpc_byte_buffer *buffer);
-
-/** Cleanup and destroy \a reader */
-GRPCAPI void grpc_byte_buffer_reader_destroy(grpc_byte_buffer_reader *reader);
-
-/** Updates \a slice with the next piece of data from from \a reader and returns
- * 1. Returns 0 at the end of the stream. Caller is responsible for calling
- * gpr_slice_unref on the result. */
-GRPCAPI int grpc_byte_buffer_reader_next(grpc_byte_buffer_reader *reader,
- gpr_slice *slice);
-
-/** Merge all data from \a reader into single slice */
-GRPCAPI gpr_slice
-grpc_byte_buffer_reader_readall(grpc_byte_buffer_reader *reader);
-
-/** Returns a RAW byte buffer instance from the output of \a reader. */
-GRPCAPI grpc_byte_buffer *grpc_raw_byte_buffer_from_reader(
- grpc_byte_buffer_reader *reader);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* GRPC_IMPL_CODEGEN_BYTE_BUFFER_H */
diff --git a/include/grpc/impl/codegen/byte_buffer_reader.h b/include/grpc/impl/codegen/byte_buffer_reader.h
index 10c382924e..85a4864140 100644
--- a/include/grpc/impl/codegen/byte_buffer_reader.h
+++ b/include/grpc/impl/codegen/byte_buffer_reader.h
@@ -34,15 +34,15 @@
#ifndef GRPC_IMPL_CODEGEN_BYTE_BUFFER_READER_H
#define GRPC_IMPL_CODEGEN_BYTE_BUFFER_READER_H
-#include <grpc/impl/codegen/byte_buffer.h>
-
#ifdef __cplusplus
extern "C" {
#endif
+struct grpc_byte_buffer;
+
struct grpc_byte_buffer_reader {
- grpc_byte_buffer *buffer_in;
- grpc_byte_buffer *buffer_out;
+ struct grpc_byte_buffer *buffer_in;
+ struct grpc_byte_buffer *buffer_out;
/* Different current objects correspond to different types of byte buffers */
union {
/* Index into a slice buffer's array of slices */
diff --git a/include/grpc/impl/codegen/compression_types.h b/include/grpc/impl/codegen/compression_types.h
index 3034182d4c..170d99f431 100644
--- a/include/grpc/impl/codegen/compression_types.h
+++ b/include/grpc/impl/codegen/compression_types.h
@@ -34,8 +34,8 @@
#ifndef GRPC_IMPL_CODEGEN_COMPRESSION_TYPES_H
#define GRPC_IMPL_CODEGEN_COMPRESSION_TYPES_H
-#include <grpc/impl/codegen/port_platform.h>
#include <stdbool.h>
+#include <stdint.h>
#ifdef __cplusplus
extern "C" {
diff --git a/include/grpc/impl/codegen/gpr_types.h b/include/grpc/impl/codegen/gpr_types.h
new file mode 100644
index 0000000000..c8f0815f0b
--- /dev/null
+++ b/include/grpc/impl/codegen/gpr_types.h
@@ -0,0 +1,140 @@
+/*
+ *
+ * Copyright 2016, Google Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#ifndef GRPC_IMPL_CODEGEN_GPR_TYPES_H
+#define GRPC_IMPL_CODEGEN_GPR_TYPES_H
+
+#include <grpc/impl/codegen/port_platform.h>
+
+#include <stddef.h>
+#include <stdint.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* The clocks we support. */
+typedef enum {
+ /* Monotonic clock. Epoch undefined. Always moves forwards. */
+ GPR_CLOCK_MONOTONIC = 0,
+ /* Realtime clock. May jump forwards or backwards. Settable by
+ the system administrator. Has its epoch at 0:00:00 UTC 1 Jan 1970. */
+ GPR_CLOCK_REALTIME,
+ /* CPU cycle time obtained by rdtsc instruction on x86 platforms. Epoch
+ undefined. Degrades to GPR_CLOCK_REALTIME on other platforms. */
+ GPR_CLOCK_PRECISE,
+ /* Unmeasurable clock type: no base, created by taking the difference
+ between two times */
+ GPR_TIMESPAN
+} gpr_clock_type;
+
+/* Analogous to struct timespec. On some machines, absolute times may be in
+ * local time. */
+typedef struct gpr_timespec {
+ int64_t tv_sec;
+ int32_t tv_nsec;
+ /** Against which clock was this time measured? (or GPR_TIMESPAN if
+ this is a relative time meaure) */
+ gpr_clock_type clock_type;
+} gpr_timespec;
+
+/* Slice API
+
+ A slice represents a contiguous reference counted array of bytes.
+ It is cheap to take references to a slice, and it is cheap to create a
+ slice pointing to a subset of another slice.
+
+ The data-structure for slices is exposed here to allow non-gpr code to
+ build slices from whatever data they have available.
+
+ When defining interfaces that handle slices, care should be taken to define
+ reference ownership semantics (who should call unref?) and mutability
+ constraints (is the callee allowed to modify the slice?) */
+
+/* Reference count container for gpr_slice. Contains function pointers to
+ increment and decrement reference counts. Implementations should cleanup
+ when the reference count drops to zero.
+ Typically client code should not touch this, and use gpr_slice_malloc,
+ gpr_slice_new, or gpr_slice_new_with_len instead. */
+typedef struct gpr_slice_refcount {
+ void (*ref)(void *);
+ void (*unref)(void *);
+} gpr_slice_refcount;
+
+#define GPR_SLICE_INLINED_SIZE (sizeof(size_t) + sizeof(uint8_t *) - 1)
+
+/* A gpr_slice s, if initialized, represents the byte range
+ s.bytes[0..s.length-1].
+
+ It can have an associated ref count which has a destruction routine to be run
+ when the ref count reaches zero (see gpr_slice_new() and grp_slice_unref()).
+ Multiple gpr_slice values may share a ref count.
+
+ If the slice does not have a refcount, it represents an inlined small piece
+ of data that is copied by value. */
+typedef struct gpr_slice {
+ struct gpr_slice_refcount *refcount;
+ union {
+ struct {
+ uint8_t *bytes;
+ size_t length;
+ } refcounted;
+ struct {
+ uint8_t length;
+ uint8_t bytes[GPR_SLICE_INLINED_SIZE];
+ } inlined;
+ } data;
+} gpr_slice;
+
+#define GRPC_SLICE_BUFFER_INLINE_ELEMENTS 8
+
+/* Represents an expandable array of slices, to be interpreted as a
+ single item. */
+typedef struct {
+ /* slices in the array */
+ gpr_slice *slices;
+ /* the number of slices in the array */
+ size_t count;
+ /* the number of slices allocated in the array */
+ size_t capacity;
+ /* the combined length of all slices in the array */
+ size_t length;
+ /* inlined elements to avoid allocations */
+ gpr_slice inlined[GRPC_SLICE_BUFFER_INLINE_ELEMENTS];
+} gpr_slice_buffer;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_IMPL_CODEGEN_GPR_TYPES_H */
diff --git a/include/grpc/impl/codegen/grpc_types.h b/include/grpc/impl/codegen/grpc_types.h
index e5a82883be..b2c48406df 100644
--- a/include/grpc/impl/codegen/grpc_types.h
+++ b/include/grpc/impl/codegen/grpc_types.h
@@ -34,15 +34,37 @@
#ifndef GRPC_IMPL_CODEGEN_GRPC_TYPES_H
#define GRPC_IMPL_CODEGEN_GRPC_TYPES_H
-#include <grpc/impl/codegen/byte_buffer.h>
+#include <grpc/impl/codegen/gpr_types.h>
+
+#include <grpc/impl/codegen/compression_types.h>
#include <grpc/impl/codegen/status.h>
#include <stddef.h>
+#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
+typedef enum {
+ GRPC_BB_RAW
+ /* Future types may include GRPC_BB_PROTOBUF, etc. */
+} grpc_byte_buffer_type;
+
+typedef struct grpc_byte_buffer {
+ void *reserved;
+ grpc_byte_buffer_type type;
+ union {
+ struct {
+ void *reserved[8];
+ } reserved;
+ struct {
+ grpc_compression_algorithm compression;
+ gpr_slice_buffer slice_buffer;
+ } raw;
+ } data;
+} grpc_byte_buffer;
+
/** Completion Queues enable notification of the completion of asynchronous
actions. */
typedef struct grpc_completion_queue grpc_completion_queue;
@@ -142,6 +164,11 @@ typedef struct {
/** How much memory to use for hpack encoding. Int valued, bytes. */
#define GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_ENCODER \
"grpc.http2.hpack_table_size.encoder"
+/** How big a frame are we willing to receive via HTTP2.
+ Min 16384, max 16777215.
+ Larger values give lower CPU usage for large messages, but more head of line
+ blocking for small messages. */
+#define GRPC_ARG_HTTP2_MAX_FRAME_SIZE "grpc.http2.max_frame_size"
/** Default authority to pass if none specified on call construction. A string.
* */
#define GRPC_ARG_DEFAULT_AUTHORITY "grpc.default_authority"
@@ -222,10 +249,14 @@ typedef enum grpc_call_error {
#define GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST (0x00000010u)
/** Signal that the call should not return UNAVAILABLE before it has started */
#define GRPC_INITIAL_METADATA_IGNORE_CONNECTIVITY (0x00000020u)
+/** Signal that the call is cacheable. GRPC is free to use GET verb */
+#define GRPC_INITIAL_METADATA_CACHEABLE_REQUEST (0x00000040u)
+
/** Mask of all valid flags */
-#define GRPC_INITIAL_METADATA_USED_MASK \
- (GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST | \
- GRPC_INITIAL_METADATA_IGNORE_CONNECTIVITY)
+#define GRPC_INITIAL_METADATA_USED_MASK \
+ (GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST | \
+ GRPC_INITIAL_METADATA_IGNORE_CONNECTIVITY | \
+ GRPC_INITIAL_METADATA_CACHEABLE_REQUEST)
/** A single metadata element */
typedef struct grpc_metadata {
@@ -327,6 +358,8 @@ typedef enum {
GRPC_OP_RECV_CLOSE_ON_SERVER
} grpc_op_type;
+struct grpc_byte_buffer;
+
/** Operation data: one field for each op type (except SEND_CLOSE_FROM_CLIENT
which has no arguments) */
typedef struct grpc_op {
@@ -351,7 +384,7 @@ typedef struct grpc_op {
grpc_compression_level level;
} maybe_compression_level;
} send_initial_metadata;
- grpc_byte_buffer *send_message;
+ struct grpc_byte_buffer *send_message;
struct {
size_t trailing_metadata_count;
grpc_metadata *trailing_metadata;
@@ -367,7 +400,7 @@ typedef struct grpc_op {
/** ownership of the byte buffer is moved to the caller; the caller must
call grpc_byte_buffer_destroy on this value, or reuse it in a future op.
*/
- grpc_byte_buffer **recv_message;
+ struct grpc_byte_buffer **recv_message;
struct {
/** ownership of the array is with the caller, but ownership of the
elements stays with the call object (ie key, value members are owned
diff --git a/include/grpc/impl/codegen/log.h b/include/grpc/impl/codegen/log.h
deleted file mode 100644
index e5010c29da..0000000000
--- a/include/grpc/impl/codegen/log.h
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- *
- * Copyright 2015, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-#ifndef GRPC_IMPL_CODEGEN_LOG_H
-#define GRPC_IMPL_CODEGEN_LOG_H
-
-#include <inttypes.h>
-#include <stdarg.h>
-#include <stdlib.h> /* for abort() */
-
-#include <grpc/impl/codegen/port_platform.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* GPR log API.
-
- Usage (within grpc):
-
- int argument1 = 3;
- char* argument2 = "hello";
- gpr_log(GPR_DEBUG, "format string %d", argument1);
- gpr_log(GPR_INFO, "hello world");
- gpr_log(GPR_ERROR, "%d %s!!", argument1, argument2); */
-
-/* The severity of a log message - use the #defines below when calling into
- gpr_log to additionally supply file and line data */
-typedef enum gpr_log_severity {
- GPR_LOG_SEVERITY_DEBUG,
- GPR_LOG_SEVERITY_INFO,
- GPR_LOG_SEVERITY_ERROR
-} gpr_log_severity;
-
-#define GPR_LOG_VERBOSITY_UNSET -1
-
-/* Returns a string representation of the log severity */
-const char *gpr_log_severity_string(gpr_log_severity severity);
-
-/* Macros to build log contexts at various severity levels */
-#define GPR_DEBUG __FILE__, __LINE__, GPR_LOG_SEVERITY_DEBUG
-#define GPR_INFO __FILE__, __LINE__, GPR_LOG_SEVERITY_INFO
-#define GPR_ERROR __FILE__, __LINE__, GPR_LOG_SEVERITY_ERROR
-
-/* Log a message. It's advised to use GPR_xxx above to generate the context
- * for each message */
-GPRAPI void gpr_log(const char *file, int line, gpr_log_severity severity,
- const char *format, ...) GPRC_PRINT_FORMAT_CHECK(4, 5);
-
-GPRAPI void gpr_log_message(const char *file, int line,
- gpr_log_severity severity, const char *message);
-
-/* Set global log verbosity */
-GPRAPI void gpr_set_log_verbosity(gpr_log_severity min_severity_to_print);
-
-GPRAPI void gpr_log_verbosity_init();
-
-/* Log overrides: applications can use this API to intercept logging calls
- and use their own implementations */
-
-typedef struct {
- const char *file;
- int line;
- gpr_log_severity severity;
- const char *message;
-} gpr_log_func_args;
-
-typedef void (*gpr_log_func)(gpr_log_func_args *args);
-GPRAPI void gpr_set_log_function(gpr_log_func func);
-
-/* abort() the process if x is zero, having written a line to the log.
-
- Intended for internal invariants. If the error can be recovered from,
- without the possibility of corruption, or might best be reflected via
- an exception in a higher-level language, consider returning error code. */
-#define GPR_ASSERT(x) \
- do { \
- if (!(x)) { \
- gpr_log(GPR_ERROR, "assertion failed: %s", #x); \
- abort(); \
- } \
- } while (0)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* GRPC_IMPL_CODEGEN_LOG_H */
diff --git a/include/grpc/impl/codegen/port_platform.h b/include/grpc/impl/codegen/port_platform.h
index 7c67bad5ae..f97e386289 100644
--- a/include/grpc/impl/codegen/port_platform.h
+++ b/include/grpc/impl/codegen/port_platform.h
@@ -234,6 +234,7 @@
#define GPR_ARCH_32 1
#endif /* _LP64 */
#elif defined(__APPLE__)
+#include <Availability.h>
#include <TargetConditionals.h>
#ifndef _BSD_SOURCE
#define _BSD_SOURCE
@@ -246,8 +247,18 @@
#define GPR_PTHREAD_TLS 1
#else /* TARGET_OS_IPHONE */
#define GPR_PLATFORM_STRING "osx"
+#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED
+#if __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_7
+#define GPR_CPU_IPHONE 1
+#define GPR_PTHREAD_TLS 1
+#else /* __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_7 */
+#define GPR_CPU_POSIX 1
+#define GPR_GCC_TLS 1
+#endif
+#else /* __MAC_OS_X_VERSION_MIN_REQUIRED */
#define GPR_CPU_POSIX 1
#define GPR_GCC_TLS 1
+#endif
#define GPR_POSIX_CRASH_HANDLER 1
#endif
#define GPR_GCC_ATOMIC 1
diff --git a/include/grpc/impl/codegen/slice.h b/include/grpc/impl/codegen/slice.h
index dfc0a774fc..a2637eea62 100644
--- a/include/grpc/impl/codegen/slice.h
+++ b/include/grpc/impl/codegen/slice.h
@@ -34,62 +34,8 @@
#ifndef GRPC_IMPL_CODEGEN_SLICE_H
#define GRPC_IMPL_CODEGEN_SLICE_H
-#include <grpc/impl/codegen/sync.h>
-
#include <stddef.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Slice API
-
- A slice represents a contiguous reference counted array of bytes.
- It is cheap to take references to a slice, and it is cheap to create a
- slice pointing to a subset of another slice.
-
- The data-structure for slices is exposed here to allow non-gpr code to
- build slices from whatever data they have available.
-
- When defining interfaces that handle slices, care should be taken to define
- reference ownership semantics (who should call unref?) and mutability
- constraints (is the callee allowed to modify the slice?) */
-
-/* Reference count container for gpr_slice. Contains function pointers to
- increment and decrement reference counts. Implementations should cleanup
- when the reference count drops to zero.
- Typically client code should not touch this, and use gpr_slice_malloc,
- gpr_slice_new, or gpr_slice_new_with_len instead. */
-typedef struct gpr_slice_refcount {
- void (*ref)(void *);
- void (*unref)(void *);
-} gpr_slice_refcount;
-
-#define GPR_SLICE_INLINED_SIZE (sizeof(size_t) + sizeof(uint8_t *) - 1)
-
-/* A gpr_slice s, if initialized, represents the byte range
- s.bytes[0..s.length-1].
-
- It can have an associated ref count which has a destruction routine to be run
- when the ref count reaches zero (see gpr_slice_new() and grp_slice_unref()).
- Multiple gpr_slice values may share a ref count.
-
- If the slice does not have a refcount, it represents an inlined small piece
- of data that is copied by value. */
-typedef struct gpr_slice {
- struct gpr_slice_refcount *refcount;
- union {
- struct {
- uint8_t *bytes;
- size_t length;
- } refcounted;
- struct {
- uint8_t length;
- uint8_t bytes[GPR_SLICE_INLINED_SIZE];
- } inlined;
- } data;
-} gpr_slice;
-
#define GPR_SLICE_START_PTR(slice) \
((slice).refcount ? (slice).data.refcounted.bytes \
: (slice).data.inlined.bytes)
@@ -103,88 +49,4 @@ typedef struct gpr_slice {
GPR_SLICE_START_PTR(slice) + GPR_SLICE_LENGTH(slice)
#define GPR_SLICE_IS_EMPTY(slice) (GPR_SLICE_LENGTH(slice) == 0)
-/* Increment the refcount of s. Requires slice is initialized.
- Returns s. */
-GPRAPI gpr_slice gpr_slice_ref(gpr_slice s);
-
-/* Decrement the ref count of s. If the ref count of s reaches zero, all
- slices sharing the ref count are destroyed, and considered no longer
- initialized. If s is ultimately derived from a call to gpr_slice_new(start,
- len, dest) where dest!=NULL , then (*dest)(start) is called, else if s is
- ultimately derived from a call to gpr_slice_new_with_len(start, len, dest)
- where dest!=NULL , then (*dest)(start, len). Requires s initialized. */
-GPRAPI void gpr_slice_unref(gpr_slice s);
-
-/* Create a slice pointing at some data. Calls malloc to allocate a refcount
- for the object, and arranges that destroy will be called with the pointer
- passed in at destruction. */
-GPRAPI gpr_slice gpr_slice_new(void *p, size_t len, void (*destroy)(void *));
-
-/* Equivalent to gpr_slice_new, but with a separate pointer that is
- passed to the destroy function. This function can be useful when
- the data is part of a larger structure that must be destroyed when
- the data is no longer needed. */
-GPRAPI gpr_slice gpr_slice_new_with_user_data(void *p, size_t len,
- void (*destroy)(void *),
- void *user_data);
-
-/* Equivalent to gpr_slice_new, but with a two argument destroy function that
- also takes the slice length. */
-GPRAPI gpr_slice gpr_slice_new_with_len(void *p, size_t len,
- void (*destroy)(void *, size_t));
-
-/* Equivalent to gpr_slice_new(malloc(len), len, free), but saves one malloc()
- call.
- Aborts if malloc() fails. */
-GPRAPI gpr_slice gpr_slice_malloc(size_t length);
-
-/* Create a slice by copying a string.
- Does not preserve null terminators.
- Equivalent to:
- size_t len = strlen(source);
- gpr_slice slice = gpr_slice_malloc(len);
- memcpy(slice->data, source, len); */
-GPRAPI gpr_slice gpr_slice_from_copied_string(const char *source);
-
-/* Create a slice by copying a buffer.
- Equivalent to:
- gpr_slice slice = gpr_slice_malloc(len);
- memcpy(slice->data, source, len); */
-GPRAPI gpr_slice gpr_slice_from_copied_buffer(const char *source, size_t len);
-
-/* Create a slice pointing to constant memory */
-GPRAPI gpr_slice gpr_slice_from_static_string(const char *source);
-
-/* Return a result slice derived from s, which shares a ref count with s, where
- result.data==s.data+begin, and result.length==end-begin.
- The ref count of s is increased by one.
- Requires s initialized, begin <= end, begin <= s.length, and
- end <= source->length. */
-GPRAPI gpr_slice gpr_slice_sub(gpr_slice s, size_t begin, size_t end);
-
-/* The same as gpr_slice_sub, but without altering the ref count */
-GPRAPI gpr_slice gpr_slice_sub_no_ref(gpr_slice s, size_t begin, size_t end);
-
-/* Splits s into two: modifies s to be s[0:split], and returns a new slice,
- sharing a refcount with s, that contains s[split:s.length].
- Requires s intialized, split <= s.length */
-GPRAPI gpr_slice gpr_slice_split_tail(gpr_slice *s, size_t split);
-
-/* Splits s into two: modifies s to be s[split:s.length], and returns a new
- slice, sharing a refcount with s, that contains s[0:split].
- Requires s intialized, split <= s.length */
-GPRAPI gpr_slice gpr_slice_split_head(gpr_slice *s, size_t split);
-
-GPRAPI gpr_slice gpr_empty_slice(void);
-
-/* Returns <0 if a < b, ==0 if a == b, >0 if a > b
- The order is arbitrary, and is not guaranteed to be stable across different
- versions of the API. */
-GPRAPI int gpr_slice_cmp(gpr_slice a, gpr_slice b);
-GPRAPI int gpr_slice_str_cmp(gpr_slice a, const char *b);
-
-#ifdef __cplusplus
-}
-#endif
-
#endif /* GRPC_IMPL_CODEGEN_SLICE_H */
diff --git a/include/grpc/impl/codegen/slice_buffer.h b/include/grpc/impl/codegen/slice_buffer.h
deleted file mode 100644
index 7858021600..0000000000
--- a/include/grpc/impl/codegen/slice_buffer.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- *
- * Copyright 2015, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-#ifndef GRPC_IMPL_CODEGEN_SLICE_BUFFER_H
-#define GRPC_IMPL_CODEGEN_SLICE_BUFFER_H
-
-#include <grpc/impl/codegen/slice.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define GRPC_SLICE_BUFFER_INLINE_ELEMENTS 8
-
-/* Represents an expandable array of slices, to be interpreted as a
- single item. */
-typedef struct {
- /* slices in the array */
- gpr_slice *slices;
- /* the number of slices in the array */
- size_t count;
- /* the number of slices allocated in the array */
- size_t capacity;
- /* the combined length of all slices in the array */
- size_t length;
- /* inlined elements to avoid allocations */
- gpr_slice inlined[GRPC_SLICE_BUFFER_INLINE_ELEMENTS];
-} gpr_slice_buffer;
-
-/* initialize a slice buffer */
-GPRAPI void gpr_slice_buffer_init(gpr_slice_buffer *sb);
-/* destroy a slice buffer - unrefs any held elements */
-GPRAPI void gpr_slice_buffer_destroy(gpr_slice_buffer *sb);
-/* Add an element to a slice buffer - takes ownership of the slice.
- This function is allowed to concatenate the passed in slice to the end of
- some other slice if desired by the slice buffer. */
-GPRAPI void gpr_slice_buffer_add(gpr_slice_buffer *sb, gpr_slice slice);
-/* add an element to a slice buffer - takes ownership of the slice and returns
- the index of the slice.
- Guarantees that the slice will not be concatenated at the end of another
- slice (i.e. the data for this slice will begin at the first byte of the
- slice at the returned index in sb->slices)
- The implementation MAY decide to concatenate data at the end of a small
- slice added in this fashion. */
-GPRAPI size_t gpr_slice_buffer_add_indexed(gpr_slice_buffer *sb,
- gpr_slice slice);
-GPRAPI void gpr_slice_buffer_addn(gpr_slice_buffer *sb, gpr_slice *slices,
- size_t n);
-/* add a very small (less than 8 bytes) amount of data to the end of a slice
- buffer: returns a pointer into which to add the data */
-GPRAPI uint8_t *gpr_slice_buffer_tiny_add(gpr_slice_buffer *sb, size_t len);
-/* pop the last buffer, but don't unref it */
-GPRAPI void gpr_slice_buffer_pop(gpr_slice_buffer *sb);
-/* clear a slice buffer, unref all elements */
-GPRAPI void gpr_slice_buffer_reset_and_unref(gpr_slice_buffer *sb);
-/* swap the contents of two slice buffers */
-GPRAPI void gpr_slice_buffer_swap(gpr_slice_buffer *a, gpr_slice_buffer *b);
-/* move all of the elements of src into dst */
-GPRAPI void gpr_slice_buffer_move_into(gpr_slice_buffer *src,
- gpr_slice_buffer *dst);
-/* remove n bytes from the end of a slice buffer */
-GPRAPI void gpr_slice_buffer_trim_end(gpr_slice_buffer *src, size_t n,
- gpr_slice_buffer *garbage);
-/* move the first n bytes of src into dst */
-GPRAPI void gpr_slice_buffer_move_first(gpr_slice_buffer *src, size_t n,
- gpr_slice_buffer *dst);
-/* take the first slice in the slice buffer */
-GPRAPI gpr_slice gpr_slice_buffer_take_first(gpr_slice_buffer *src);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* GRPC_IMPL_CODEGEN_SLICE_BUFFER_H */
diff --git a/include/grpc/impl/codegen/sync.h b/include/grpc/impl/codegen/sync.h
index 5542482ed8..96aec0c2c0 100644
--- a/include/grpc/impl/codegen/sync.h
+++ b/include/grpc/impl/codegen/sync.h
@@ -64,257 +64,4 @@
#error Unable to determine platform for sync
#endif
-#include <grpc/impl/codegen/time.h> /* for gpr_timespec */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* --- Mutex interface ---
-
- At most one thread may hold an exclusive lock on a mutex at any given time.
- Actions taken by a thread that holds a mutex exclusively happen after
- actions taken by all previous holders of the mutex. Variables of type
- gpr_mu are uninitialized when first declared. */
-
-/* Initialize *mu. Requires: *mu uninitialized. */
-GPRAPI void gpr_mu_init(gpr_mu *mu);
-
-/* Cause *mu no longer to be initialized, freeing any memory in use. Requires:
- *mu initialized; no other concurrent operation on *mu. */
-GPRAPI void gpr_mu_destroy(gpr_mu *mu);
-
-/* Wait until no thread has a lock on *mu, cause the calling thread to own an
- exclusive lock on *mu, then return. May block indefinitely or crash if the
- calling thread has a lock on *mu. Requires: *mu initialized. */
-GPRAPI void gpr_mu_lock(gpr_mu *mu);
-
-/* Release an exclusive lock on *mu held by the calling thread. Requires: *mu
- initialized; the calling thread holds an exclusive lock on *mu. */
-GPRAPI void gpr_mu_unlock(gpr_mu *mu);
-
-/* Without blocking, attempt to acquire an exclusive lock on *mu for the
- calling thread, then return non-zero iff success. Fail, if any thread holds
- the lock; succeeds with high probability if no thread holds the lock.
- Requires: *mu initialized. */
-GPRAPI int gpr_mu_trylock(gpr_mu *mu);
-
-/* --- Condition variable interface ---
-
- A while-loop should be used with gpr_cv_wait() when waiting for conditions
- to become true. See the example below. Variables of type gpr_cv are
- uninitialized when first declared. */
-
-/* Initialize *cv. Requires: *cv uninitialized. */
-GPRAPI void gpr_cv_init(gpr_cv *cv);
-
-/* Cause *cv no longer to be initialized, freeing any memory in use. Requires:
- *cv initialized; no other concurrent operation on *cv.*/
-GPRAPI void gpr_cv_destroy(gpr_cv *cv);
-
-/* Atomically release *mu and wait on *cv. When the calling thread is woken
- from *cv or the deadline abs_deadline is exceeded, execute gpr_mu_lock(mu)
- and return whether the deadline was exceeded. Use
- abs_deadline==gpr_inf_future for no deadline. abs_deadline can be either
- an absolute deadline, or a GPR_TIMESPAN. May return even when not
- woken explicitly. Requires: *mu and *cv initialized; the calling thread
- holds an exclusive lock on *mu. */
-GPRAPI int gpr_cv_wait(gpr_cv *cv, gpr_mu *mu, gpr_timespec abs_deadline);
-
-/* If any threads are waiting on *cv, wake at least one.
- Clients may treat this as an optimization of gpr_cv_broadcast()
- for use in the case where waking more than one waiter is not useful.
- Requires: *cv initialized. */
-GPRAPI void gpr_cv_signal(gpr_cv *cv);
-
-/* Wake all threads waiting on *cv. Requires: *cv initialized. */
-GPRAPI void gpr_cv_broadcast(gpr_cv *cv);
-
-/* --- One-time initialization ---
-
- gpr_once must be declared with static storage class, and initialized with
- GPR_ONCE_INIT. e.g.,
- static gpr_once once_var = GPR_ONCE_INIT; */
-
-/* Ensure that (*init_routine)() has been called exactly once (for the
- specified gpr_once instance) and then return.
- If multiple threads call gpr_once() on the same gpr_once instance, one of
- them will call (*init_routine)(), and the others will block until that call
- finishes.*/
-GPRAPI void gpr_once_init(gpr_once *once, void (*init_routine)(void));
-
-/* --- One-time event notification ---
-
- These operations act on a gpr_event, which should be initialized with
- gpr_ev_init(), or with GPR_EVENT_INIT if static, e.g.,
- static gpr_event event_var = GPR_EVENT_INIT;
- It requires no destruction. */
-
-/* Initialize *ev. */
-GPRAPI void gpr_event_init(gpr_event *ev);
-
-/* Set *ev so that gpr_event_get() and gpr_event_wait() will return value.
- Requires: *ev initialized; value != NULL; no prior or concurrent calls to
- gpr_event_set(ev, ...) since initialization. */
-GPRAPI void gpr_event_set(gpr_event *ev, void *value);
-
-/* Return the value set by gpr_event_set(ev, ...), or NULL if no such call has
- completed. If the result is non-NULL, all operations that occurred prior to
- the gpr_event_set(ev, ...) set will be visible after this call returns.
- Requires: *ev initialized. This operation is faster than acquiring a mutex
- on most platforms. */
-GPRAPI void *gpr_event_get(gpr_event *ev);
-
-/* Wait until *ev is set by gpr_event_set(ev, ...), or abs_deadline is
- exceeded, then return gpr_event_get(ev). Requires: *ev initialized. Use
- abs_deadline==gpr_inf_future for no deadline. When the event has been
- signalled before the call, this operation is faster than acquiring a mutex
- on most platforms. */
-GPRAPI void *gpr_event_wait(gpr_event *ev, gpr_timespec abs_deadline);
-
-/* --- Reference counting ---
-
- These calls act on the type gpr_refcount. It requires no destruction. */
-
-/* Initialize *r to value n. */
-GPRAPI void gpr_ref_init(gpr_refcount *r, int n);
-
-/* Increment the reference count *r. Requires *r initialized. */
-GPRAPI void gpr_ref(gpr_refcount *r);
-
-/* Increment the reference count *r. Requires *r initialized.
- Crashes if refcount is zero */
-GPRAPI void gpr_ref_non_zero(gpr_refcount *r);
-
-/* Increment the reference count *r by n. Requires *r initialized, n > 0. */
-GPRAPI void gpr_refn(gpr_refcount *r, int n);
-
-/* Decrement the reference count *r and return non-zero iff it has reached
- zero. . Requires *r initialized. */
-GPRAPI int gpr_unref(gpr_refcount *r);
-
-/* --- Stats counters ---
-
- These calls act on the integral type gpr_stats_counter. It requires no
- destruction. Static instances may be initialized with
- gpr_stats_counter c = GPR_STATS_INIT;
- Beware: These operations do not imply memory barriers. Do not use them to
- synchronize other events. */
-
-/* Initialize *c to the value n. */
-GPRAPI void gpr_stats_init(gpr_stats_counter *c, intptr_t n);
-
-/* *c += inc. Requires: *c initialized. */
-GPRAPI void gpr_stats_inc(gpr_stats_counter *c, intptr_t inc);
-
-/* Return *c. Requires: *c initialized. */
-GPRAPI intptr_t gpr_stats_read(const gpr_stats_counter *c);
-
-/* ==================Example use of interface===================
- A producer-consumer queue of up to N integers,
- illustrating the use of the calls in this interface. */
-#if 0
-
-#define N 4
-
- typedef struct queue {
- gpr_cv non_empty; /* Signalled when length becomes non-zero. */
- gpr_cv non_full; /* Signalled when length becomes non-N. */
- gpr_mu mu; /* Protects all fields below.
- (That is, except during initialization or
- destruction, the fields below should be accessed
- only by a thread that holds mu.) */
- int head; /* Index of head of queue 0..N-1. */
- int length; /* Number of valid elements in queue 0..N. */
- int elem[N]; /* elem[head .. head+length-1] are queue elements. */
- } queue;
-
- /* Initialize *q. */
- void queue_init(queue *q) {
- gpr_mu_init(&q->mu);
- gpr_cv_init(&q->non_empty);
- gpr_cv_init(&q->non_full);
- q->head = 0;
- q->length = 0;
- }
-
- /* Free storage associated with *q. */
- void queue_destroy(queue *q) {
- gpr_mu_destroy(&q->mu);
- gpr_cv_destroy(&q->non_empty);
- gpr_cv_destroy(&q->non_full);
- }
-
- /* Wait until there is room in *q, then append x to *q. */
- void queue_append(queue *q, int x) {
- gpr_mu_lock(&q->mu);
- /* To wait for a predicate without a deadline, loop on the negation of the
- predicate, and use gpr_cv_wait(..., gpr_inf_future) inside the loop
- to release the lock, wait, and reacquire on each iteration. Code that
- makes the condition true should use gpr_cv_broadcast() on the
- corresponding condition variable. The predicate must be on state
- protected by the lock. */
- while (q->length == N) {
- gpr_cv_wait(&q->non_full, &q->mu, gpr_inf_future);
- }
- if (q->length == 0) { /* Wake threads blocked in queue_remove(). */
- /* It's normal to use gpr_cv_broadcast() or gpr_signal() while
- holding the lock. */
- gpr_cv_broadcast(&q->non_empty);
- }
- q->elem[(q->head + q->length) % N] = x;
- q->length++;
- gpr_mu_unlock(&q->mu);
- }
-
- /* If it can be done without blocking, append x to *q and return non-zero.
- Otherwise return 0. */
- int queue_try_append(queue *q, int x) {
- int result = 0;
- if (gpr_mu_trylock(&q->mu)) {
- if (q->length != N) {
- if (q->length == 0) { /* Wake threads blocked in queue_remove(). */
- gpr_cv_broadcast(&q->non_empty);
- }
- q->elem[(q->head + q->length) % N] = x;
- q->length++;
- result = 1;
- }
- gpr_mu_unlock(&q->mu);
- }
- return result;
- }
-
- /* Wait until the *q is non-empty or deadline abs_deadline passes. If the
- queue is non-empty, remove its head entry, place it in *head, and return
- non-zero. Otherwise return 0. */
- int queue_remove(queue *q, int *head, gpr_timespec abs_deadline) {
- int result = 0;
- gpr_mu_lock(&q->mu);
- /* To wait for a predicate with a deadline, loop on the negation of the
- predicate or until gpr_cv_wait() returns true. Code that makes
- the condition true should use gpr_cv_broadcast() on the corresponding
- condition variable. The predicate must be on state protected by the
- lock. */
- while (q->length == 0 &&
- !gpr_cv_wait(&q->non_empty, &q->mu, abs_deadline)) {
- }
- if (q->length != 0) { /* Queue is non-empty. */
- result = 1;
- if (q->length == N) { /* Wake threads blocked in queue_append(). */
- gpr_cv_broadcast(&q->non_full);
- }
- *head = q->elem[q->head];
- q->head = (q->head + 1) % N;
- q->length--;
- } /* else deadline exceeded */
- gpr_mu_unlock(&q->mu);
- return result;
- }
-#endif /* 0 */
-
-#ifdef __cplusplus
-}
-#endif
-
#endif /* GRPC_IMPL_CODEGEN_SYNC_H */
diff --git a/include/grpc/impl/codegen/time.h b/include/grpc/impl/codegen/time.h
deleted file mode 100644
index 381e267259..0000000000
--- a/include/grpc/impl/codegen/time.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- *
- * Copyright 2015, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-#ifndef GRPC_IMPL_CODEGEN_TIME_H
-#define GRPC_IMPL_CODEGEN_TIME_H
-/* Time support.
- We use gpr_timespec, which is analogous to struct timespec. On some
- machines, absolute times may be in local time. */
-
-#include <grpc/impl/codegen/port_platform.h>
-#include <stddef.h>
-#include <time.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* The clocks we support. */
-typedef enum {
- /* Monotonic clock. Epoch undefined. Always moves forwards. */
- GPR_CLOCK_MONOTONIC = 0,
- /* Realtime clock. May jump forwards or backwards. Settable by
- the system administrator. Has its epoch at 0:00:00 UTC 1 Jan 1970. */
- GPR_CLOCK_REALTIME,
- /* CPU cycle time obtained by rdtsc instruction on x86 platforms. Epoch
- undefined. Degrades to GPR_CLOCK_REALTIME on other platforms. */
- GPR_CLOCK_PRECISE,
- /* Unmeasurable clock type: no base, created by taking the difference
- between two times */
- GPR_TIMESPAN
-} gpr_clock_type;
-
-typedef struct gpr_timespec {
- int64_t tv_sec;
- int32_t tv_nsec;
- /** Against which clock was this time measured? (or GPR_TIMESPAN if
- this is a relative time meaure) */
- gpr_clock_type clock_type;
-} gpr_timespec;
-
-/* Time constants. */
-GPRAPI gpr_timespec
-gpr_time_0(gpr_clock_type type); /* The zero time interval. */
-GPRAPI gpr_timespec gpr_inf_future(gpr_clock_type type); /* The far future */
-GPRAPI gpr_timespec gpr_inf_past(gpr_clock_type type); /* The far past. */
-
-#define GPR_MS_PER_SEC 1000
-#define GPR_US_PER_SEC 1000000
-#define GPR_NS_PER_SEC 1000000000
-#define GPR_NS_PER_MS 1000000
-#define GPR_NS_PER_US 1000
-#define GPR_US_PER_MS 1000
-
-/* initialize time subsystem */
-GPRAPI void gpr_time_init(void);
-
-/* Return the current time measured from the given clocks epoch. */
-GPRAPI gpr_timespec gpr_now(gpr_clock_type clock);
-
-/* Convert a timespec from one clock to another */
-GPRAPI gpr_timespec gpr_convert_clock_type(gpr_timespec t,
- gpr_clock_type target_clock);
-
-/* Return -ve, 0, or +ve according to whether a < b, a == b, or a > b
- respectively. */
-GPRAPI int gpr_time_cmp(gpr_timespec a, gpr_timespec b);
-
-GPRAPI gpr_timespec gpr_time_max(gpr_timespec a, gpr_timespec b);
-GPRAPI gpr_timespec gpr_time_min(gpr_timespec a, gpr_timespec b);
-
-/* Add and subtract times. Calculations saturate at infinities. */
-GPRAPI gpr_timespec gpr_time_add(gpr_timespec a, gpr_timespec b);
-GPRAPI gpr_timespec gpr_time_sub(gpr_timespec a, gpr_timespec b);
-
-/* Return a timespec representing a given number of time units. INT64_MIN is
- interpreted as gpr_inf_past, and INT64_MAX as gpr_inf_future. */
-GPRAPI gpr_timespec gpr_time_from_micros(int64_t x, gpr_clock_type clock_type);
-GPRAPI gpr_timespec gpr_time_from_nanos(int64_t x, gpr_clock_type clock_type);
-GPRAPI gpr_timespec gpr_time_from_millis(int64_t x, gpr_clock_type clock_type);
-GPRAPI gpr_timespec gpr_time_from_seconds(int64_t x, gpr_clock_type clock_type);
-GPRAPI gpr_timespec gpr_time_from_minutes(int64_t x, gpr_clock_type clock_type);
-GPRAPI gpr_timespec gpr_time_from_hours(int64_t x, gpr_clock_type clock_type);
-
-GPRAPI int32_t gpr_time_to_millis(gpr_timespec timespec);
-
-/* Return 1 if two times are equal or within threshold of each other,
- 0 otherwise */
-GPRAPI int gpr_time_similar(gpr_timespec a, gpr_timespec b,
- gpr_timespec threshold);
-
-/* Sleep until at least 'until' - an absolute timeout */
-GPRAPI void gpr_sleep_until(gpr_timespec until);
-
-GPRAPI double gpr_timespec_to_micros(gpr_timespec t);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* GRPC_IMPL_CODEGEN_TIME_H */
diff --git a/include/grpc/module.modulemap b/include/grpc/module.modulemap
index 02fb2f39b2..51bfef2cc9 100644
--- a/include/grpc/module.modulemap
+++ b/include/grpc/module.modulemap
@@ -4,8 +4,6 @@ framework module grpc {
header "byte_buffer_reader.h"
header "grpc_security.h"
header "grpc_security_constants.h"
- header "impl/codegen/alloc.h"
- header "impl/codegen/byte_buffer_reader.h"
header "support/alloc.h"
header "support/port_platform.h"
header "support/string_util.h"
diff --git a/include/grpc/support/alloc.h b/include/grpc/support/alloc.h
index 8d03af8424..327a9ff9f0 100644
--- a/include/grpc/support/alloc.h
+++ b/include/grpc/support/alloc.h
@@ -34,6 +34,41 @@
#ifndef GRPC_SUPPORT_ALLOC_H
#define GRPC_SUPPORT_ALLOC_H
-#include <grpc/impl/codegen/alloc.h>
+#include <stddef.h>
+
+#include <grpc/impl/codegen/port_platform.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct gpr_allocation_functions {
+ void *(*malloc_fn)(size_t size);
+ void *(*realloc_fn)(void *ptr, size_t size);
+ void (*free_fn)(void *ptr);
+} gpr_allocation_functions;
+
+/* malloc, never returns NULL */
+GPRAPI void *gpr_malloc(size_t size);
+/* free */
+GPRAPI void gpr_free(void *ptr);
+/* realloc, never returns NULL */
+GPRAPI void *gpr_realloc(void *p, size_t size);
+/* aligned malloc, never returns NULL, will align to 1 << alignment_log */
+GPRAPI void *gpr_malloc_aligned(size_t size, size_t alignment_log);
+/* free memory allocated by gpr_malloc_aligned */
+GPRAPI void gpr_free_aligned(void *ptr);
+
+/** Request the family of allocation functions in \a functions be used. NOTE
+ * that this request will be honored in a *best effort* basis and that no
+ * guarantees are made about the default functions (eg, malloc) being called. */
+GPRAPI void gpr_set_allocation_functions(gpr_allocation_functions functions);
+
+/** Return the family of allocation functions currently in effect. */
+GPRAPI gpr_allocation_functions gpr_get_allocation_functions();
+
+#ifdef __cplusplus
+}
+#endif
#endif /* GRPC_SUPPORT_ALLOC_H */
diff --git a/include/grpc/support/log.h b/include/grpc/support/log.h
index 3fdba04943..5acf17fc2c 100644
--- a/include/grpc/support/log.h
+++ b/include/grpc/support/log.h
@@ -34,6 +34,85 @@
#ifndef GRPC_SUPPORT_LOG_H
#define GRPC_SUPPORT_LOG_H
-#include <grpc/impl/codegen/log.h>
+#include <inttypes.h>
+#include <stdarg.h>
+#include <stdlib.h> /* for abort() */
+
+#include <grpc/impl/codegen/port_platform.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* GPR log API.
+
+ Usage (within grpc):
+
+ int argument1 = 3;
+ char* argument2 = "hello";
+ gpr_log(GPR_DEBUG, "format string %d", argument1);
+ gpr_log(GPR_INFO, "hello world");
+ gpr_log(GPR_ERROR, "%d %s!!", argument1, argument2); */
+
+/* The severity of a log message - use the #defines below when calling into
+ gpr_log to additionally supply file and line data */
+typedef enum gpr_log_severity {
+ GPR_LOG_SEVERITY_DEBUG,
+ GPR_LOG_SEVERITY_INFO,
+ GPR_LOG_SEVERITY_ERROR
+} gpr_log_severity;
+
+#define GPR_LOG_VERBOSITY_UNSET -1
+
+/* Returns a string representation of the log severity */
+const char *gpr_log_severity_string(gpr_log_severity severity);
+
+/* Macros to build log contexts at various severity levels */
+#define GPR_DEBUG __FILE__, __LINE__, GPR_LOG_SEVERITY_DEBUG
+#define GPR_INFO __FILE__, __LINE__, GPR_LOG_SEVERITY_INFO
+#define GPR_ERROR __FILE__, __LINE__, GPR_LOG_SEVERITY_ERROR
+
+/* Log a message. It's advised to use GPR_xxx above to generate the context
+ * for each message */
+GPRAPI void gpr_log(const char *file, int line, gpr_log_severity severity,
+ const char *format, ...) GPRC_PRINT_FORMAT_CHECK(4, 5);
+
+GPRAPI void gpr_log_message(const char *file, int line,
+ gpr_log_severity severity, const char *message);
+
+/* Set global log verbosity */
+GPRAPI void gpr_set_log_verbosity(gpr_log_severity min_severity_to_print);
+
+GPRAPI void gpr_log_verbosity_init();
+
+/* Log overrides: applications can use this API to intercept logging calls
+ and use their own implementations */
+
+typedef struct {
+ const char *file;
+ int line;
+ gpr_log_severity severity;
+ const char *message;
+} gpr_log_func_args;
+
+typedef void (*gpr_log_func)(gpr_log_func_args *args);
+GPRAPI void gpr_set_log_function(gpr_log_func func);
+
+/* abort() the process if x is zero, having written a line to the log.
+
+ Intended for internal invariants. If the error can be recovered from,
+ without the possibility of corruption, or might best be reflected via
+ an exception in a higher-level language, consider returning error code. */
+#define GPR_ASSERT(x) \
+ do { \
+ if (!(x)) { \
+ gpr_log(GPR_ERROR, "assertion failed: %s", #x); \
+ abort(); \
+ } \
+ } while (0)
+
+#ifdef __cplusplus
+}
+#endif
#endif /* GRPC_SUPPORT_LOG_H */
diff --git a/include/grpc/support/slice.h b/include/grpc/support/slice.h
index b45db03389..b31fe6c0c5 100644
--- a/include/grpc/support/slice.h
+++ b/include/grpc/support/slice.h
@@ -35,5 +35,94 @@
#define GRPC_SUPPORT_SLICE_H
#include <grpc/impl/codegen/slice.h>
+#include <grpc/support/sync.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Increment the refcount of s. Requires slice is initialized.
+ Returns s. */
+GPRAPI gpr_slice gpr_slice_ref(gpr_slice s);
+
+/* Decrement the ref count of s. If the ref count of s reaches zero, all
+ slices sharing the ref count are destroyed, and considered no longer
+ initialized. If s is ultimately derived from a call to gpr_slice_new(start,
+ len, dest) where dest!=NULL , then (*dest)(start) is called, else if s is
+ ultimately derived from a call to gpr_slice_new_with_len(start, len, dest)
+ where dest!=NULL , then (*dest)(start, len). Requires s initialized. */
+GPRAPI void gpr_slice_unref(gpr_slice s);
+
+/* Create a slice pointing at some data. Calls malloc to allocate a refcount
+ for the object, and arranges that destroy will be called with the pointer
+ passed in at destruction. */
+GPRAPI gpr_slice gpr_slice_new(void *p, size_t len, void (*destroy)(void *));
+
+/* Equivalent to gpr_slice_new, but with a separate pointer that is
+ passed to the destroy function. This function can be useful when
+ the data is part of a larger structure that must be destroyed when
+ the data is no longer needed. */
+GPRAPI gpr_slice gpr_slice_new_with_user_data(void *p, size_t len,
+ void (*destroy)(void *),
+ void *user_data);
+
+/* Equivalent to gpr_slice_new, but with a two argument destroy function that
+ also takes the slice length. */
+GPRAPI gpr_slice gpr_slice_new_with_len(void *p, size_t len,
+ void (*destroy)(void *, size_t));
+
+/* Equivalent to gpr_slice_new(malloc(len), len, free), but saves one malloc()
+ call.
+ Aborts if malloc() fails. */
+GPRAPI gpr_slice gpr_slice_malloc(size_t length);
+
+/* Create a slice by copying a string.
+ Does not preserve null terminators.
+ Equivalent to:
+ size_t len = strlen(source);
+ gpr_slice slice = gpr_slice_malloc(len);
+ memcpy(slice->data, source, len); */
+GPRAPI gpr_slice gpr_slice_from_copied_string(const char *source);
+
+/* Create a slice by copying a buffer.
+ Equivalent to:
+ gpr_slice slice = gpr_slice_malloc(len);
+ memcpy(slice->data, source, len); */
+GPRAPI gpr_slice gpr_slice_from_copied_buffer(const char *source, size_t len);
+
+/* Create a slice pointing to constant memory */
+GPRAPI gpr_slice gpr_slice_from_static_string(const char *source);
+
+/* Return a result slice derived from s, which shares a ref count with s, where
+ result.data==s.data+begin, and result.length==end-begin.
+ The ref count of s is increased by one.
+ Requires s initialized, begin <= end, begin <= s.length, and
+ end <= source->length. */
+GPRAPI gpr_slice gpr_slice_sub(gpr_slice s, size_t begin, size_t end);
+
+/* The same as gpr_slice_sub, but without altering the ref count */
+GPRAPI gpr_slice gpr_slice_sub_no_ref(gpr_slice s, size_t begin, size_t end);
+
+/* Splits s into two: modifies s to be s[0:split], and returns a new slice,
+ sharing a refcount with s, that contains s[split:s.length].
+ Requires s intialized, split <= s.length */
+GPRAPI gpr_slice gpr_slice_split_tail(gpr_slice *s, size_t split);
+
+/* Splits s into two: modifies s to be s[split:s.length], and returns a new
+ slice, sharing a refcount with s, that contains s[0:split].
+ Requires s intialized, split <= s.length */
+GPRAPI gpr_slice gpr_slice_split_head(gpr_slice *s, size_t split);
+
+GPRAPI gpr_slice gpr_empty_slice(void);
+
+/* Returns <0 if a < b, ==0 if a == b, >0 if a > b
+ The order is arbitrary, and is not guaranteed to be stable across different
+ versions of the API. */
+GPRAPI int gpr_slice_cmp(gpr_slice a, gpr_slice b);
+GPRAPI int gpr_slice_str_cmp(gpr_slice a, const char *b);
+
+#ifdef __cplusplus
+}
+#endif
#endif /* GRPC_SUPPORT_SLICE_H */
diff --git a/include/grpc/support/slice_buffer.h b/include/grpc/support/slice_buffer.h
index cf7a89f8f1..3920432b02 100644
--- a/include/grpc/support/slice_buffer.h
+++ b/include/grpc/support/slice_buffer.h
@@ -34,6 +34,54 @@
#ifndef GRPC_SUPPORT_SLICE_BUFFER_H
#define GRPC_SUPPORT_SLICE_BUFFER_H
-#include <grpc/impl/codegen/slice_buffer.h>
+#include <grpc/support/slice.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* initialize a slice buffer */
+GPRAPI void gpr_slice_buffer_init(gpr_slice_buffer *sb);
+/* destroy a slice buffer - unrefs any held elements */
+GPRAPI void gpr_slice_buffer_destroy(gpr_slice_buffer *sb);
+/* Add an element to a slice buffer - takes ownership of the slice.
+ This function is allowed to concatenate the passed in slice to the end of
+ some other slice if desired by the slice buffer. */
+GPRAPI void gpr_slice_buffer_add(gpr_slice_buffer *sb, gpr_slice slice);
+/* add an element to a slice buffer - takes ownership of the slice and returns
+ the index of the slice.
+ Guarantees that the slice will not be concatenated at the end of another
+ slice (i.e. the data for this slice will begin at the first byte of the
+ slice at the returned index in sb->slices)
+ The implementation MAY decide to concatenate data at the end of a small
+ slice added in this fashion. */
+GPRAPI size_t gpr_slice_buffer_add_indexed(gpr_slice_buffer *sb,
+ gpr_slice slice);
+GPRAPI void gpr_slice_buffer_addn(gpr_slice_buffer *sb, gpr_slice *slices,
+ size_t n);
+/* add a very small (less than 8 bytes) amount of data to the end of a slice
+ buffer: returns a pointer into which to add the data */
+GPRAPI uint8_t *gpr_slice_buffer_tiny_add(gpr_slice_buffer *sb, size_t len);
+/* pop the last buffer, but don't unref it */
+GPRAPI void gpr_slice_buffer_pop(gpr_slice_buffer *sb);
+/* clear a slice buffer, unref all elements */
+GPRAPI void gpr_slice_buffer_reset_and_unref(gpr_slice_buffer *sb);
+/* swap the contents of two slice buffers */
+GPRAPI void gpr_slice_buffer_swap(gpr_slice_buffer *a, gpr_slice_buffer *b);
+/* move all of the elements of src into dst */
+GPRAPI void gpr_slice_buffer_move_into(gpr_slice_buffer *src,
+ gpr_slice_buffer *dst);
+/* remove n bytes from the end of a slice buffer */
+GPRAPI void gpr_slice_buffer_trim_end(gpr_slice_buffer *src, size_t n,
+ gpr_slice_buffer *garbage);
+/* move the first n bytes of src into dst */
+GPRAPI void gpr_slice_buffer_move_first(gpr_slice_buffer *src, size_t n,
+ gpr_slice_buffer *dst);
+/* take the first slice in the slice buffer */
+GPRAPI gpr_slice gpr_slice_buffer_take_first(gpr_slice_buffer *src);
+
+#ifdef __cplusplus
+}
+#endif
#endif /* GRPC_SUPPORT_SLICE_BUFFER_H */
diff --git a/include/grpc/support/sync.h b/include/grpc/support/sync.h
index a0145803c2..a7bbb38c27 100644
--- a/include/grpc/support/sync.h
+++ b/include/grpc/support/sync.h
@@ -34,6 +34,258 @@
#ifndef GRPC_SUPPORT_SYNC_H
#define GRPC_SUPPORT_SYNC_H
+#include <grpc/impl/codegen/gpr_types.h> /* for gpr_timespec */
#include <grpc/impl/codegen/sync.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* --- Mutex interface ---
+
+ At most one thread may hold an exclusive lock on a mutex at any given time.
+ Actions taken by a thread that holds a mutex exclusively happen after
+ actions taken by all previous holders of the mutex. Variables of type
+ gpr_mu are uninitialized when first declared. */
+
+/* Initialize *mu. Requires: *mu uninitialized. */
+GPRAPI void gpr_mu_init(gpr_mu *mu);
+
+/* Cause *mu no longer to be initialized, freeing any memory in use. Requires:
+ *mu initialized; no other concurrent operation on *mu. */
+GPRAPI void gpr_mu_destroy(gpr_mu *mu);
+
+/* Wait until no thread has a lock on *mu, cause the calling thread to own an
+ exclusive lock on *mu, then return. May block indefinitely or crash if the
+ calling thread has a lock on *mu. Requires: *mu initialized. */
+GPRAPI void gpr_mu_lock(gpr_mu *mu);
+
+/* Release an exclusive lock on *mu held by the calling thread. Requires: *mu
+ initialized; the calling thread holds an exclusive lock on *mu. */
+GPRAPI void gpr_mu_unlock(gpr_mu *mu);
+
+/* Without blocking, attempt to acquire an exclusive lock on *mu for the
+ calling thread, then return non-zero iff success. Fail, if any thread holds
+ the lock; succeeds with high probability if no thread holds the lock.
+ Requires: *mu initialized. */
+GPRAPI int gpr_mu_trylock(gpr_mu *mu);
+
+/* --- Condition variable interface ---
+
+ A while-loop should be used with gpr_cv_wait() when waiting for conditions
+ to become true. See the example below. Variables of type gpr_cv are
+ uninitialized when first declared. */
+
+/* Initialize *cv. Requires: *cv uninitialized. */
+GPRAPI void gpr_cv_init(gpr_cv *cv);
+
+/* Cause *cv no longer to be initialized, freeing any memory in use. Requires:
+ *cv initialized; no other concurrent operation on *cv.*/
+GPRAPI void gpr_cv_destroy(gpr_cv *cv);
+
+/* Atomically release *mu and wait on *cv. When the calling thread is woken
+ from *cv or the deadline abs_deadline is exceeded, execute gpr_mu_lock(mu)
+ and return whether the deadline was exceeded. Use
+ abs_deadline==gpr_inf_future for no deadline. abs_deadline can be either
+ an absolute deadline, or a GPR_TIMESPAN. May return even when not
+ woken explicitly. Requires: *mu and *cv initialized; the calling thread
+ holds an exclusive lock on *mu. */
+GPRAPI int gpr_cv_wait(gpr_cv *cv, gpr_mu *mu, gpr_timespec abs_deadline);
+
+/* If any threads are waiting on *cv, wake at least one.
+ Clients may treat this as an optimization of gpr_cv_broadcast()
+ for use in the case where waking more than one waiter is not useful.
+ Requires: *cv initialized. */
+GPRAPI void gpr_cv_signal(gpr_cv *cv);
+
+/* Wake all threads waiting on *cv. Requires: *cv initialized. */
+GPRAPI void gpr_cv_broadcast(gpr_cv *cv);
+
+/* --- One-time initialization ---
+
+ gpr_once must be declared with static storage class, and initialized with
+ GPR_ONCE_INIT. e.g.,
+ static gpr_once once_var = GPR_ONCE_INIT; */
+
+/* Ensure that (*init_routine)() has been called exactly once (for the
+ specified gpr_once instance) and then return.
+ If multiple threads call gpr_once() on the same gpr_once instance, one of
+ them will call (*init_routine)(), and the others will block until that call
+ finishes.*/
+GPRAPI void gpr_once_init(gpr_once *once, void (*init_routine)(void));
+
+/* --- One-time event notification ---
+
+ These operations act on a gpr_event, which should be initialized with
+ gpr_ev_init(), or with GPR_EVENT_INIT if static, e.g.,
+ static gpr_event event_var = GPR_EVENT_INIT;
+ It requires no destruction. */
+
+/* Initialize *ev. */
+GPRAPI void gpr_event_init(gpr_event *ev);
+
+/* Set *ev so that gpr_event_get() and gpr_event_wait() will return value.
+ Requires: *ev initialized; value != NULL; no prior or concurrent calls to
+ gpr_event_set(ev, ...) since initialization. */
+GPRAPI void gpr_event_set(gpr_event *ev, void *value);
+
+/* Return the value set by gpr_event_set(ev, ...), or NULL if no such call has
+ completed. If the result is non-NULL, all operations that occurred prior to
+ the gpr_event_set(ev, ...) set will be visible after this call returns.
+ Requires: *ev initialized. This operation is faster than acquiring a mutex
+ on most platforms. */
+GPRAPI void *gpr_event_get(gpr_event *ev);
+
+/* Wait until *ev is set by gpr_event_set(ev, ...), or abs_deadline is
+ exceeded, then return gpr_event_get(ev). Requires: *ev initialized. Use
+ abs_deadline==gpr_inf_future for no deadline. When the event has been
+ signalled before the call, this operation is faster than acquiring a mutex
+ on most platforms. */
+GPRAPI void *gpr_event_wait(gpr_event *ev, gpr_timespec abs_deadline);
+
+/* --- Reference counting ---
+
+ These calls act on the type gpr_refcount. It requires no destruction. */
+
+/* Initialize *r to value n. */
+GPRAPI void gpr_ref_init(gpr_refcount *r, int n);
+
+/* Increment the reference count *r. Requires *r initialized. */
+GPRAPI void gpr_ref(gpr_refcount *r);
+
+/* Increment the reference count *r. Requires *r initialized.
+ Crashes if refcount is zero */
+GPRAPI void gpr_ref_non_zero(gpr_refcount *r);
+
+/* Increment the reference count *r by n. Requires *r initialized, n > 0. */
+GPRAPI void gpr_refn(gpr_refcount *r, int n);
+
+/* Decrement the reference count *r and return non-zero iff it has reached
+ zero. . Requires *r initialized. */
+GPRAPI int gpr_unref(gpr_refcount *r);
+
+/* --- Stats counters ---
+
+ These calls act on the integral type gpr_stats_counter. It requires no
+ destruction. Static instances may be initialized with
+ gpr_stats_counter c = GPR_STATS_INIT;
+ Beware: These operations do not imply memory barriers. Do not use them to
+ synchronize other events. */
+
+/* Initialize *c to the value n. */
+GPRAPI void gpr_stats_init(gpr_stats_counter *c, intptr_t n);
+
+/* *c += inc. Requires: *c initialized. */
+GPRAPI void gpr_stats_inc(gpr_stats_counter *c, intptr_t inc);
+
+/* Return *c. Requires: *c initialized. */
+GPRAPI intptr_t gpr_stats_read(const gpr_stats_counter *c);
+
+/* ==================Example use of interface===================
+ A producer-consumer queue of up to N integers,
+ illustrating the use of the calls in this interface. */
+#if 0
+
+#define N 4
+
+ typedef struct queue {
+ gpr_cv non_empty; /* Signalled when length becomes non-zero. */
+ gpr_cv non_full; /* Signalled when length becomes non-N. */
+ gpr_mu mu; /* Protects all fields below.
+ (That is, except during initialization or
+ destruction, the fields below should be accessed
+ only by a thread that holds mu.) */
+ int head; /* Index of head of queue 0..N-1. */
+ int length; /* Number of valid elements in queue 0..N. */
+ int elem[N]; /* elem[head .. head+length-1] are queue elements. */
+ } queue;
+
+ /* Initialize *q. */
+ void queue_init(queue *q) {
+ gpr_mu_init(&q->mu);
+ gpr_cv_init(&q->non_empty);
+ gpr_cv_init(&q->non_full);
+ q->head = 0;
+ q->length = 0;
+ }
+
+ /* Free storage associated with *q. */
+ void queue_destroy(queue *q) {
+ gpr_mu_destroy(&q->mu);
+ gpr_cv_destroy(&q->non_empty);
+ gpr_cv_destroy(&q->non_full);
+ }
+
+ /* Wait until there is room in *q, then append x to *q. */
+ void queue_append(queue *q, int x) {
+ gpr_mu_lock(&q->mu);
+ /* To wait for a predicate without a deadline, loop on the negation of the
+ predicate, and use gpr_cv_wait(..., gpr_inf_future) inside the loop
+ to release the lock, wait, and reacquire on each iteration. Code that
+ makes the condition true should use gpr_cv_broadcast() on the
+ corresponding condition variable. The predicate must be on state
+ protected by the lock. */
+ while (q->length == N) {
+ gpr_cv_wait(&q->non_full, &q->mu, gpr_inf_future);
+ }
+ if (q->length == 0) { /* Wake threads blocked in queue_remove(). */
+ /* It's normal to use gpr_cv_broadcast() or gpr_signal() while
+ holding the lock. */
+ gpr_cv_broadcast(&q->non_empty);
+ }
+ q->elem[(q->head + q->length) % N] = x;
+ q->length++;
+ gpr_mu_unlock(&q->mu);
+ }
+
+ /* If it can be done without blocking, append x to *q and return non-zero.
+ Otherwise return 0. */
+ int queue_try_append(queue *q, int x) {
+ int result = 0;
+ if (gpr_mu_trylock(&q->mu)) {
+ if (q->length != N) {
+ if (q->length == 0) { /* Wake threads blocked in queue_remove(). */
+ gpr_cv_broadcast(&q->non_empty);
+ }
+ q->elem[(q->head + q->length) % N] = x;
+ q->length++;
+ result = 1;
+ }
+ gpr_mu_unlock(&q->mu);
+ }
+ return result;
+ }
+
+ /* Wait until the *q is non-empty or deadline abs_deadline passes. If the
+ queue is non-empty, remove its head entry, place it in *head, and return
+ non-zero. Otherwise return 0. */
+ int queue_remove(queue *q, int *head, gpr_timespec abs_deadline) {
+ int result = 0;
+ gpr_mu_lock(&q->mu);
+ /* To wait for a predicate with a deadline, loop on the negation of the
+ predicate or until gpr_cv_wait() returns true. Code that makes
+ the condition true should use gpr_cv_broadcast() on the corresponding
+ condition variable. The predicate must be on state protected by the
+ lock. */
+ while (q->length == 0 &&
+ !gpr_cv_wait(&q->non_empty, &q->mu, abs_deadline)) {
+ }
+ if (q->length != 0) { /* Queue is non-empty. */
+ result = 1;
+ if (q->length == N) { /* Wake threads blocked in queue_append(). */
+ gpr_cv_broadcast(&q->non_full);
+ }
+ *head = q->elem[q->head];
+ q->head = (q->head + 1) % N;
+ q->length--;
+ } /* else deadline exceeded */
+ gpr_mu_unlock(&q->mu);
+ return result;
+ }
+#endif /* 0 */
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_SUPPORT_SYNC_H */
diff --git a/include/grpc/support/time.h b/include/grpc/support/time.h
index b3f2f8cd44..66bcfca6ed 100644
--- a/include/grpc/support/time.h
+++ b/include/grpc/support/time.h
@@ -34,6 +34,72 @@
#ifndef GRPC_SUPPORT_TIME_H
#define GRPC_SUPPORT_TIME_H
-#include <grpc/impl/codegen/time.h>
+#include <grpc/impl/codegen/gpr_types.h>
+
+#include <stddef.h>
+#include <time.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Time constants. */
+GPRAPI gpr_timespec
+gpr_time_0(gpr_clock_type type); /* The zero time interval. */
+GPRAPI gpr_timespec gpr_inf_future(gpr_clock_type type); /* The far future */
+GPRAPI gpr_timespec gpr_inf_past(gpr_clock_type type); /* The far past. */
+
+#define GPR_MS_PER_SEC 1000
+#define GPR_US_PER_SEC 1000000
+#define GPR_NS_PER_SEC 1000000000
+#define GPR_NS_PER_MS 1000000
+#define GPR_NS_PER_US 1000
+#define GPR_US_PER_MS 1000
+
+/* initialize time subsystem */
+GPRAPI void gpr_time_init(void);
+
+/* Return the current time measured from the given clocks epoch. */
+GPRAPI gpr_timespec gpr_now(gpr_clock_type clock);
+
+/* Convert a timespec from one clock to another */
+GPRAPI gpr_timespec gpr_convert_clock_type(gpr_timespec t,
+ gpr_clock_type target_clock);
+
+/* Return -ve, 0, or +ve according to whether a < b, a == b, or a > b
+ respectively. */
+GPRAPI int gpr_time_cmp(gpr_timespec a, gpr_timespec b);
+
+GPRAPI gpr_timespec gpr_time_max(gpr_timespec a, gpr_timespec b);
+GPRAPI gpr_timespec gpr_time_min(gpr_timespec a, gpr_timespec b);
+
+/* Add and subtract times. Calculations saturate at infinities. */
+GPRAPI gpr_timespec gpr_time_add(gpr_timespec a, gpr_timespec b);
+GPRAPI gpr_timespec gpr_time_sub(gpr_timespec a, gpr_timespec b);
+
+/* Return a timespec representing a given number of time units. INT64_MIN is
+ interpreted as gpr_inf_past, and INT64_MAX as gpr_inf_future. */
+GPRAPI gpr_timespec gpr_time_from_micros(int64_t x, gpr_clock_type clock_type);
+GPRAPI gpr_timespec gpr_time_from_nanos(int64_t x, gpr_clock_type clock_type);
+GPRAPI gpr_timespec gpr_time_from_millis(int64_t x, gpr_clock_type clock_type);
+GPRAPI gpr_timespec gpr_time_from_seconds(int64_t x, gpr_clock_type clock_type);
+GPRAPI gpr_timespec gpr_time_from_minutes(int64_t x, gpr_clock_type clock_type);
+GPRAPI gpr_timespec gpr_time_from_hours(int64_t x, gpr_clock_type clock_type);
+
+GPRAPI int32_t gpr_time_to_millis(gpr_timespec timespec);
+
+/* Return 1 if two times are equal or within threshold of each other,
+ 0 otherwise */
+GPRAPI int gpr_time_similar(gpr_timespec a, gpr_timespec b,
+ gpr_timespec threshold);
+
+/* Sleep until at least 'until' - an absolute timeout */
+GPRAPI void gpr_sleep_until(gpr_timespec until);
+
+GPRAPI double gpr_timespec_to_micros(gpr_timespec t);
+
+#ifdef __cplusplus
+}
+#endif
#endif /* GRPC_SUPPORT_TIME_H */
diff --git a/package.xml b/package.xml
index 387afc3498..8262ef607b 100644
--- a/package.xml
+++ b/package.xml
@@ -22,7 +22,7 @@
</stability>
<license>BSD</license>
<notes>
-- TBD
+- Reject metadata keys which are not legal #7881
</notes>
<contents>
<dir baseinstalldir="/" name="/">
@@ -79,25 +79,23 @@
<file baseinstalldir="/" name="include/grpc/support/tls_msvc.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/tls_pthread.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/useful.h" role="src" />
- <file baseinstalldir="/" name="include/grpc/impl/codegen/alloc.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/atm.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/atm_gcc_atomic.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/atm_gcc_sync.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/atm_windows.h" role="src" />
- <file baseinstalldir="/" name="include/grpc/impl/codegen/log.h" role="src" />
+ <file baseinstalldir="/" name="include/grpc/impl/codegen/gpr_types.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/port_platform.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/slice.h" role="src" />
- <file baseinstalldir="/" name="include/grpc/impl/codegen/slice_buffer.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/sync.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/sync_generic.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/sync_posix.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/sync_windows.h" role="src" />
- <file baseinstalldir="/" name="include/grpc/impl/codegen/time.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/profiling/timers.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/backoff.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/block_annotate.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/env.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/murmur_hash.h" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/support/percent_encoding.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/stack_lockfree.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/string.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/string_windows.h" role="src" />
@@ -125,6 +123,7 @@
<file baseinstalldir="/" name="src/core/lib/support/log_posix.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/log_windows.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/murmur_hash.c" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/support/percent_encoding.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/slice.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/slice_buffer.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/stack_lockfree.c" role="src" />
@@ -156,27 +155,23 @@
<file baseinstalldir="/" name="include/grpc/grpc_posix.h" role="src" />
<file baseinstalldir="/" name="include/grpc/grpc_security_constants.h" role="src" />
<file baseinstalldir="/" name="include/grpc/status.h" role="src" />
- <file baseinstalldir="/" name="include/grpc/impl/codegen/byte_buffer.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/byte_buffer_reader.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/compression_types.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/connectivity_state.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/grpc_types.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/propagation_bits.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/status.h" role="src" />
- <file baseinstalldir="/" name="include/grpc/impl/codegen/alloc.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/atm.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/atm_gcc_atomic.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/atm_gcc_sync.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/atm_windows.h" role="src" />
- <file baseinstalldir="/" name="include/grpc/impl/codegen/log.h" role="src" />
+ <file baseinstalldir="/" name="include/grpc/impl/codegen/gpr_types.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/port_platform.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/slice.h" role="src" />
- <file baseinstalldir="/" name="include/grpc/impl/codegen/slice_buffer.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/sync.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/sync_generic.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/sync_posix.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/sync_windows.h" role="src" />
- <file baseinstalldir="/" name="include/grpc/impl/codegen/time.h" role="src" />
<file baseinstalldir="/" name="include/grpc/grpc_security.h" role="src" />
<file baseinstalldir="/" name="include/grpc/census.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/channel/channel_args.h" role="src" />
@@ -306,7 +301,6 @@
<file baseinstalldir="/" name="src/core/lib/tsi/transport_security_interface.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/client_channel.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/client_channel_factory.h" role="src" />
- <file baseinstalldir="/" name="src/core/ext/client_config/client_config.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/connector.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/initial_connect_string.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/lb_policy.h" role="src" />
@@ -316,8 +310,8 @@
<file baseinstalldir="/" name="src/core/ext/client_config/resolver.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/resolver_factory.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/resolver_registry.h" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/client_config/resolver_result.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/subchannel.h" role="src" />
- <file baseinstalldir="/" name="src/core/ext/client_config/subchannel_call_holder.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/subchannel_index.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/uri_parser.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/lb_policy/grpclb/grpclb.h" role="src" />
@@ -334,6 +328,7 @@
<file baseinstalldir="/" name="src/core/ext/census/census_interface.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/census_rpc_stats.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/gen/census.pb.h" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/census/gen/trace_context.pb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/grpc_filter.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/mlog.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/resource.h" role="src" />
@@ -483,7 +478,6 @@
<file baseinstalldir="/" name="src/core/ext/client_config/channel_connectivity.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/client_channel.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/client_channel_factory.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/client_config/client_config.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/client_config_plugin.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/connector.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/default_initial_connect_string.c" role="src" />
@@ -495,8 +489,8 @@
<file baseinstalldir="/" name="src/core/ext/client_config/resolver.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/resolver_factory.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/resolver_registry.c" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/client_config/resolver_result.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/subchannel.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/client_config/subchannel_call_holder.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/subchannel_index.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/uri_parser.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/server/insecure/server_chttp2.c" role="src" />
@@ -518,6 +512,7 @@
<file baseinstalldir="/" name="src/core/ext/census/base_resources.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/context.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/gen/census.pb.c" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/census/gen/trace_context.pb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/grpc_context.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/grpc_filter.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/grpc_plugin.c" role="src" />
@@ -1181,7 +1176,7 @@ Update to wrap gRPC C Core version 0.10.0
<date>2016-08-22</date>
<license>BSD</license>
<notes>
-- TBD
+- Reject metadata keys which are not legal #7881
</notes>
</release>
</changelog>
diff --git a/setup.py b/setup.py
index f7280952fd..7a65698cbb 100644
--- a/setup.py
+++ b/setup.py
@@ -198,12 +198,14 @@ PACKAGE_DIRECTORIES = {
INSTALL_REQUIRES = (
'six>=1.5.2',
'enum34>=1.0.4',
- 'futures>=2.2.0',
# TODO(atash): eventually split the grpcio package into a metapackage
# depending on protobuf and the runtime component (independent of protobuf)
'protobuf>=3.0.0',
)
+if not PY3:
+ INSTALL_REQUIRES += ('futures>=2.2.0',)
+
SETUP_REQUIRES = INSTALL_REQUIRES + (
'sphinx>=1.3',
'sphinx_rtd_theme>=0.1.8',
diff --git a/src/compiler/cpp_generator.cc b/src/compiler/cpp_generator.cc
index c386115ec2..d0c35ea1ab 100644
--- a/src/compiler/cpp_generator.cc
+++ b/src/compiler/cpp_generator.cc
@@ -130,6 +130,7 @@ grpc::string GetHeaderIncludes(File *file, const Parameters &params) {
static const char *headers_strs[] = {
"grpc++/impl/codegen/async_stream.h",
"grpc++/impl/codegen/async_unary_call.h",
+ "grpc++/impl/codegen/method_handler_impl.h",
"grpc++/impl/codegen/proto_utils.h",
"grpc++/impl/codegen/rpc_method.h",
"grpc++/impl/codegen/service_type.h",
@@ -604,6 +605,57 @@ void PrintHeaderServerMethodAsync(Printer *printer, const Method *method,
printer->Print(*vars, "};\n");
}
+void PrintHeaderServerMethodStreamedUnary(
+ Printer *printer, const Method *method,
+ std::map<grpc::string, grpc::string> *vars) {
+ (*vars)["Method"] = method->name();
+ (*vars)["Request"] = method->input_type_name();
+ (*vars)["Response"] = method->output_type_name();
+ if (method->NoStreaming()) {
+ printer->Print(*vars, "template <class BaseClass>\n");
+ printer->Print(*vars,
+ "class WithStreamedUnaryMethod_$Method$ : "
+ "public BaseClass {\n");
+ printer->Print(
+ " private:\n"
+ " void BaseClassMustBeDerivedFromService(const Service *service) "
+ "{}\n");
+ printer->Print(" public:\n");
+ printer->Indent();
+ printer->Print(*vars,
+ "WithStreamedUnaryMethod_$Method$() {\n"
+ " ::grpc::Service::MarkMethodStreamedUnary($Idx$,\n"
+ " new ::grpc::StreamedUnaryHandler< $Request$, "
+ "$Response$>(std::bind"
+ "(&WithStreamedUnaryMethod_$Method$<BaseClass>::"
+ "Streamed$Method$, this, std::placeholders::_1, "
+ "std::placeholders::_2)));\n"
+ "}\n");
+ printer->Print(*vars,
+ "~WithStreamedUnaryMethod_$Method$() GRPC_OVERRIDE {\n"
+ " BaseClassMustBeDerivedFromService(this);\n"
+ "}\n");
+ printer->Print(
+ *vars,
+ "// disable regular version of this method\n"
+ "::grpc::Status $Method$("
+ "::grpc::ServerContext* context, const $Request$* request, "
+ "$Response$* response) GRPC_FINAL GRPC_OVERRIDE {\n"
+ " abort();\n"
+ " return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, \"\");\n"
+ "}\n");
+ printer->Print(*vars,
+ "// replace default version of method with streamed unary\n"
+ "virtual ::grpc::Status Streamed$Method$("
+ "::grpc::ServerContext* context, "
+ "::grpc::ServerUnaryStreamer< "
+ "$Request$,$Response$>* server_unary_streamer)"
+ " = 0;\n");
+ printer->Outdent();
+ printer->Print(*vars, "};\n");
+ }
+}
+
void PrintHeaderServerMethodGeneric(
Printer *printer, const Method *method,
std::map<grpc::string, grpc::string> *vars) {
@@ -770,6 +822,28 @@ void PrintHeaderService(Printer *printer, const Service *service,
PrintHeaderServerMethodGeneric(printer, service->method(i).get(), vars);
}
+ // Server side - Streamed Unary
+ for (int i = 0; i < service->method_count(); ++i) {
+ (*vars)["Idx"] = as_string(i);
+ PrintHeaderServerMethodStreamedUnary(printer, service->method(i).get(),
+ vars);
+ }
+
+ printer->Print("typedef ");
+ for (int i = 0; i < service->method_count(); ++i) {
+ (*vars)["method_name"] = service->method(i).get()->name();
+ if (service->method(i)->NoStreaming()) {
+ printer->Print(*vars, "WithStreamedUnaryMethod_$method_name$<");
+ }
+ }
+ printer->Print("Service");
+ for (int i = 0; i < service->method_count(); ++i) {
+ if (service->method(i)->NoStreaming()) {
+ printer->Print(" >");
+ }
+ }
+ printer->Print(" StreamedUnaryService;\n");
+
printer->Outdent();
printer->Print("};\n");
printer->Print(service->GetTrailingComments().c_str());
@@ -1080,6 +1154,9 @@ void PrintSourceService(Printer *printer, const Service *service,
(*vars)["Idx"] = as_string(i);
if (method->NoStreaming()) {
(*vars)["StreamingType"] = "NORMAL_RPC";
+ // NOTE: There is no reason to consider streamed-unary as a separate
+ // category here since this part is setting up the client-side stub
+ // and this appears as a NORMAL_RPC from the client-side.
} else if (method->ClientOnlyStreaming()) {
(*vars)["StreamingType"] = "CLIENT_STREAMING";
} else if (method->ServerOnlyStreaming()) {
diff --git a/src/core/ext/census/gen/README.md b/src/core/ext/census/gen/README.md
index 72bef6542d..fdbac1084c 100644
--- a/src/core/ext/census/gen/README.md
+++ b/src/core/ext/census/gen/README.md
@@ -4,3 +4,7 @@ Files generated for use by Census stats and trace recording subsystem.
* census.pb.{h,c} - Generated from src/core/ext/census/census.proto, using the
script `tools/codegen/core/gen_nano_proto.sh src/proto/census/census.proto
$PWD/src/core/ext/census/gen src/core/ext/census/gen`
+* trace_context.pb.{h,c} - Generated from
+ src/core/ext/census/trace_context.proto, using the script
+ `tools/codegen/core/gen_nano_proto.sh src/proto/census/trace_context.proto
+ $PWD/src/core/ext/census/gen src/core/ext/census/gen`
diff --git a/src/core/ext/census/gen/trace_context.pb.c b/src/core/ext/census/gen/trace_context.pb.c
new file mode 100644
index 0000000000..c8aea324ce
--- /dev/null
+++ b/src/core/ext/census/gen/trace_context.pb.c
@@ -0,0 +1,81 @@
+/*
+ *
+ * Copyright 2016, Google Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+/* Automatically generated nanopb constant definitions */
+/* Generated by nanopb-0.3.5-dev */
+
+#include "src/core/ext/census/gen/trace_context.pb.h"
+
+#if PB_PROTO_HEADER_VERSION != 30
+#error Regenerate this file with the current version of nanopb generator.
+#endif
+
+
+
+const pb_field_t google_trace_TraceId_fields[3] = {
+ PB_FIELD( 1, FIXED64 , OPTIONAL, STATIC , FIRST, google_trace_TraceId, hi, hi, 0),
+ PB_FIELD( 2, FIXED64 , OPTIONAL, STATIC , OTHER, google_trace_TraceId, lo, hi, 0),
+ PB_LAST_FIELD
+};
+
+const pb_field_t google_trace_TraceContext_fields[4] = {
+ PB_FIELD( 1, MESSAGE , OPTIONAL, STATIC , FIRST, google_trace_TraceContext, trace_id, trace_id, &google_trace_TraceId_fields),
+ PB_FIELD( 2, FIXED64 , OPTIONAL, STATIC , OTHER, google_trace_TraceContext, span_id, trace_id, 0),
+ PB_FIELD( 3, BOOL , OPTIONAL, STATIC , OTHER, google_trace_TraceContext, is_sampled, span_id, 0),
+ PB_LAST_FIELD
+};
+
+
+/* Check that field information fits in pb_field_t */
+#if !defined(PB_FIELD_32BIT)
+/* If you get an error here, it means that you need to define PB_FIELD_32BIT
+ * compile-time option. You can do that in pb.h or on compiler command line.
+ *
+ * The reason you need to do this is that some of your messages contain tag
+ * numbers or field sizes that are larger than what can fit in 8 or 16 bit
+ * field descriptors.
+ */
+PB_STATIC_ASSERT((pb_membersize(google_trace_TraceContext, trace_id) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_google_trace_TraceId_google_trace_TraceContext)
+#endif
+
+#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT)
+/* If you get an error here, it means that you need to define PB_FIELD_16BIT
+ * compile-time option. You can do that in pb.h or on compiler command line.
+ *
+ * The reason you need to do this is that some of your messages contain tag
+ * numbers or field sizes that are larger than what can fit in the default
+ * 8 bit descriptors.
+ */
+PB_STATIC_ASSERT((pb_membersize(google_trace_TraceContext, trace_id) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_google_trace_TraceId_google_trace_TraceContext)
+#endif
+
+
diff --git a/src/core/ext/census/gen/trace_context.pb.h b/src/core/ext/census/gen/trace_context.pb.h
new file mode 100644
index 0000000000..263c4c58cb
--- /dev/null
+++ b/src/core/ext/census/gen/trace_context.pb.h
@@ -0,0 +1,99 @@
+/*
+ *
+ * Copyright 2016, Google Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+/* Automatically generated nanopb header */
+/* Generated by nanopb-0.3.5-dev */
+
+#ifndef GRPC_CORE_EXT_CENSUS_GEN_TRACE_CONTEXT_PB_H
+#define GRPC_CORE_EXT_CENSUS_GEN_TRACE_CONTEXT_PB_H
+#include "third_party/nanopb/pb.h"
+#if PB_PROTO_HEADER_VERSION != 30
+#error Regenerate this file with the current version of nanopb generator.
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Struct definitions */
+typedef struct _google_trace_TraceId {
+ bool has_hi;
+ uint64_t hi;
+ bool has_lo;
+ uint64_t lo;
+} google_trace_TraceId;
+
+typedef struct _google_trace_TraceContext {
+ bool has_trace_id;
+ google_trace_TraceId trace_id;
+ bool has_span_id;
+ uint64_t span_id;
+ bool has_is_sampled;
+ bool is_sampled;
+} google_trace_TraceContext;
+
+/* Default values for struct fields */
+
+/* Initializer values for message structs */
+#define google_trace_TraceId_init_default {false, 0, false, 0}
+#define google_trace_TraceContext_init_default {false, google_trace_TraceId_init_default, false, 0, false, 0}
+#define google_trace_TraceId_init_zero {false, 0, false, 0}
+#define google_trace_TraceContext_init_zero {false, google_trace_TraceId_init_zero, false, 0, false, 0}
+
+/* Field tags (for use in manual encoding/decoding) */
+#define google_trace_TraceId_hi_tag 1
+#define google_trace_TraceId_lo_tag 2
+#define google_trace_TraceContext_trace_id_tag 1
+#define google_trace_TraceContext_span_id_tag 2
+#define google_trace_TraceContext_is_sampled_tag 3
+
+/* Struct field encoding specification for nanopb */
+extern const pb_field_t google_trace_TraceId_fields[3];
+extern const pb_field_t google_trace_TraceContext_fields[4];
+
+/* Maximum encoded size of messages (where known) */
+#define google_trace_TraceId_size 18
+#define google_trace_TraceContext_size 31
+
+/* Message IDs (where set with "msgid" option) */
+#ifdef PB_MSGID
+
+#define TRACE_CONTEXT_MESSAGES \
+
+
+#endif
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif
diff --git a/src/core/ext/client_config/README.md b/src/core/ext/client_config/README.md
index 7024fd540d..eda01e3e71 100644
--- a/src/core/ext/client_config/README.md
+++ b/src/core/ext/client_config/README.md
@@ -12,7 +12,7 @@ data might include:
- a load balancing policy to decide which server to send a request to
- a set of filters to mutate outgoing requests (say, by adding metadata)
-The resolver provides this data as a stream of grpc_client_config objects to
+The resolver provides this data as a stream of grpc_resolver_result objects to
the channel. We represent configuration as a stream so that it can be changed
by the resolver during execution, by reacting to external events (such as a
new configuration file being pushed to some store).
@@ -22,7 +22,7 @@ Load Balancing
--------------
Load balancing configuration is provided by a grpc_lb_policy object, stored as
-part of grpc_client_config.
+part of grpc_resolver_result.
The primary job of the load balancing policies is to pick a target server given only the
initial metadata for a request. It does this by providing a grpc_subchannel
diff --git a/src/core/ext/client_config/client_channel.c b/src/core/ext/client_config/client_channel.c
index 2c0c4abffc..58ef629be0 100644
--- a/src/core/ext/client_config/client_channel.c
+++ b/src/core/ext/client_config/client_channel.c
@@ -33,6 +33,7 @@
#include "src/core/ext/client_config/client_channel.h"
+#include <stdbool.h>
#include <stdio.h>
#include <string.h>
@@ -41,10 +42,11 @@
#include <grpc/support/sync.h>
#include <grpc/support/useful.h>
-#include "src/core/ext/client_config/subchannel_call_holder.h"
+#include "src/core/ext/client_config/subchannel.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/connected_channel.h"
#include "src/core/lib/iomgr/iomgr.h"
+#include "src/core/lib/iomgr/polling_entity.h"
#include "src/core/lib/profiling/timers.h"
#include "src/core/lib/support/string.h"
#include "src/core/lib/surface/channel.h"
@@ -52,30 +54,31 @@
/* Client channel implementation */
-typedef grpc_subchannel_call_holder call_data;
+/*************************************************************************
+ * CHANNEL-WIDE FUNCTIONS
+ */
typedef struct client_channel_channel_data {
/** resolver for this channel */
grpc_resolver *resolver;
/** have we started resolving this channel */
- int started_resolving;
+ bool started_resolving;
/** mutex protecting client configuration, including all
variables below in this data structure */
- gpr_mu mu_config;
- /** currently active load balancer - guarded by mu_config */
+ gpr_mu mu;
+ /** currently active load balancer - guarded by mu */
grpc_lb_policy *lb_policy;
- /** incoming configuration - set by resolver.next
- guarded by mu_config */
- grpc_client_config *incoming_configuration;
+ /** incoming resolver result - set by resolver.next(), guarded by mu */
+ grpc_resolver_result *resolver_result;
/** a list of closures that are all waiting for config to come in */
grpc_closure_list waiting_for_config_closures;
/** resolver callback */
- grpc_closure on_config_changed;
+ grpc_closure on_resolver_result_changed;
/** connectivity state being tracked */
grpc_connectivity_state_tracker state_tracker;
/** when an lb_policy arrives, should we try to exit idle */
- int exit_idle_when_lb_policy_arrives;
+ bool exit_idle_when_lb_policy_arrives;
/** owning stack */
grpc_channel_stack *owning_stack;
/** interested parties (owned) */
@@ -83,10 +86,8 @@ typedef struct client_channel_channel_data {
} channel_data;
/** We create one watcher for each new lb_policy that is returned from a
- resolver,
- to watch for state changes from the lb_policy. When a state change is seen,
- we
- update the channel, and create a new watcher */
+ resolver, to watch for state changes from the lb_policy. When a state
+ change is seen, we update the channel, and create a new watcher. */
typedef struct {
channel_data *chand;
grpc_closure on_changed;
@@ -94,22 +95,6 @@ typedef struct {
grpc_lb_policy *lb_policy;
} lb_policy_connectivity_watcher;
-typedef struct {
- grpc_closure closure;
- grpc_call_element *elem;
-} waiting_call;
-
-static char *cc_get_peer(grpc_exec_ctx *exec_ctx, grpc_call_element *elem) {
- return grpc_subchannel_call_holder_get_peer(exec_ctx, elem->call_data);
-}
-
-static void cc_start_transport_stream_op(grpc_exec_ctx *exec_ctx,
- grpc_call_element *elem,
- grpc_transport_stream_op *op) {
- GRPC_CALL_LOG_OP(GPR_INFO, elem, op);
- grpc_subchannel_call_holder_perform_op(exec_ctx, elem->call_data, op);
-}
-
static void watch_lb_policy(grpc_exec_ctx *exec_ctx, channel_data *chand,
grpc_lb_policy *lb_policy,
grpc_connectivity_state current_state);
@@ -156,9 +141,9 @@ static void on_lb_policy_state_changed(grpc_exec_ctx *exec_ctx, void *arg,
grpc_error *error) {
lb_policy_connectivity_watcher *w = arg;
- gpr_mu_lock(&w->chand->mu_config);
+ gpr_mu_lock(&w->chand->mu);
on_lb_policy_state_changed_locked(exec_ctx, w, error);
- gpr_mu_unlock(&w->chand->mu_config);
+ gpr_mu_unlock(&w->chand->mu);
GRPC_CHANNEL_STACK_UNREF(exec_ctx, w->chand->owning_stack, "watch_lb_policy");
gpr_free(w);
@@ -178,17 +163,17 @@ static void watch_lb_policy(grpc_exec_ctx *exec_ctx, channel_data *chand,
&w->on_changed);
}
-static void cc_on_config_changed(grpc_exec_ctx *exec_ctx, void *arg,
- grpc_error *error) {
+static void on_resolver_result_changed(grpc_exec_ctx *exec_ctx, void *arg,
+ grpc_error *error) {
channel_data *chand = arg;
grpc_lb_policy *lb_policy = NULL;
grpc_lb_policy *old_lb_policy;
grpc_connectivity_state state = GRPC_CHANNEL_TRANSIENT_FAILURE;
- int exit_idle = 0;
+ bool exit_idle = false;
grpc_error *state_error = GRPC_ERROR_CREATE("No load balancing policy");
- if (chand->incoming_configuration != NULL) {
- lb_policy = grpc_client_config_get_lb_policy(chand->incoming_configuration);
+ if (chand->resolver_result != NULL) {
+ lb_policy = grpc_resolver_result_get_lb_policy(chand->resolver_result);
if (lb_policy != NULL) {
GRPC_LB_POLICY_REF(lb_policy, "channel");
GRPC_LB_POLICY_REF(lb_policy, "config_change");
@@ -197,17 +182,17 @@ static void cc_on_config_changed(grpc_exec_ctx *exec_ctx, void *arg,
grpc_lb_policy_check_connectivity(exec_ctx, lb_policy, &state_error);
}
- grpc_client_config_unref(exec_ctx, chand->incoming_configuration);
+ grpc_resolver_result_unref(exec_ctx, chand->resolver_result);
}
- chand->incoming_configuration = NULL;
+ chand->resolver_result = NULL;
if (lb_policy != NULL) {
grpc_pollset_set_add_pollset_set(exec_ctx, lb_policy->interested_parties,
chand->interested_parties);
}
- gpr_mu_lock(&chand->mu_config);
+ gpr_mu_lock(&chand->mu);
old_lb_policy = chand->lb_policy;
chand->lb_policy = lb_policy;
if (lb_policy != NULL) {
@@ -222,8 +207,8 @@ static void cc_on_config_changed(grpc_exec_ctx *exec_ctx, void *arg,
}
if (lb_policy != NULL && chand->exit_idle_when_lb_policy_arrives) {
GRPC_LB_POLICY_REF(lb_policy, "exit_idle");
- exit_idle = 1;
- chand->exit_idle_when_lb_policy_arrives = 0;
+ exit_idle = true;
+ chand->exit_idle_when_lb_policy_arrives = false;
}
if (error == GRPC_ERROR_NONE && chand->resolver) {
@@ -233,10 +218,9 @@ static void cc_on_config_changed(grpc_exec_ctx *exec_ctx, void *arg,
watch_lb_policy(exec_ctx, chand, lb_policy, state);
}
GRPC_CHANNEL_STACK_REF(chand->owning_stack, "resolver");
- grpc_resolver_next(exec_ctx, chand->resolver,
- &chand->incoming_configuration,
- &chand->on_config_changed);
- gpr_mu_unlock(&chand->mu_config);
+ grpc_resolver_next(exec_ctx, chand->resolver, &chand->resolver_result,
+ &chand->on_resolver_result_changed);
+ gpr_mu_unlock(&chand->mu);
} else {
if (chand->resolver != NULL) {
grpc_resolver_shutdown(exec_ctx, chand->resolver);
@@ -249,7 +233,7 @@ static void cc_on_config_changed(grpc_exec_ctx *exec_ctx, void *arg,
GRPC_ERROR_CREATE_REFERENCING("Got config after disconnection", refs,
GPR_ARRAY_SIZE(refs)),
"resolver_gone");
- gpr_mu_unlock(&chand->mu_config);
+ gpr_mu_unlock(&chand->mu);
}
if (exit_idle) {
@@ -284,7 +268,7 @@ static void cc_start_transport_op(grpc_exec_ctx *exec_ctx,
op->bind_pollset);
}
- gpr_mu_lock(&chand->mu_config);
+ gpr_mu_lock(&chand->mu);
if (op->on_connectivity_state_change != NULL) {
grpc_connectivity_state_notify_on_state_change(
exec_ctx, &chand->state_tracker, op->connectivity_state,
@@ -329,7 +313,191 @@ static void cc_start_transport_op(grpc_exec_ctx *exec_ctx,
}
GRPC_ERROR_UNREF(op->disconnect_with_error);
}
- gpr_mu_unlock(&chand->mu_config);
+ gpr_mu_unlock(&chand->mu);
+}
+
+/* Constructor for channel_data */
+static void cc_init_channel_elem(grpc_exec_ctx *exec_ctx,
+ grpc_channel_element *elem,
+ grpc_channel_element_args *args) {
+ channel_data *chand = elem->channel_data;
+
+ memset(chand, 0, sizeof(*chand));
+
+ GPR_ASSERT(args->is_last);
+ GPR_ASSERT(elem->filter == &grpc_client_channel_filter);
+
+ gpr_mu_init(&chand->mu);
+ grpc_closure_init(&chand->on_resolver_result_changed,
+ on_resolver_result_changed, chand);
+ chand->owning_stack = args->channel_stack;
+
+ grpc_connectivity_state_init(&chand->state_tracker, GRPC_CHANNEL_IDLE,
+ "client_channel");
+ chand->interested_parties = grpc_pollset_set_create();
+}
+
+/* Destructor for channel_data */
+static void cc_destroy_channel_elem(grpc_exec_ctx *exec_ctx,
+ grpc_channel_element *elem) {
+ channel_data *chand = elem->channel_data;
+
+ if (chand->resolver != NULL) {
+ grpc_resolver_shutdown(exec_ctx, chand->resolver);
+ GRPC_RESOLVER_UNREF(exec_ctx, chand->resolver, "channel");
+ }
+ if (chand->lb_policy != NULL) {
+ grpc_pollset_set_del_pollset_set(exec_ctx,
+ chand->lb_policy->interested_parties,
+ chand->interested_parties);
+ GRPC_LB_POLICY_UNREF(exec_ctx, chand->lb_policy, "channel");
+ }
+ grpc_connectivity_state_destroy(exec_ctx, &chand->state_tracker);
+ grpc_pollset_set_destroy(chand->interested_parties);
+ gpr_mu_destroy(&chand->mu);
+}
+
+/*************************************************************************
+ * PER-CALL FUNCTIONS
+ */
+
+#define GET_CALL(call_data) \
+ ((grpc_subchannel_call *)(gpr_atm_acq_load(&(call_data)->subchannel_call)))
+
+#define CANCELLED_CALL ((grpc_subchannel_call *)1)
+
+typedef enum {
+ GRPC_SUBCHANNEL_CALL_HOLDER_NOT_CREATING,
+ GRPC_SUBCHANNEL_CALL_HOLDER_PICKING_SUBCHANNEL
+} subchannel_creation_phase;
+
+/** Call data. Holds a pointer to grpc_subchannel_call and the
+ associated machinery to create such a pointer.
+ Handles queueing of stream ops until a call object is ready, waiting
+ for initial metadata before trying to create a call object,
+ and handling cancellation gracefully. */
+typedef struct client_channel_call_data {
+ /** either 0 for no call, 1 for cancelled, or a pointer to a
+ grpc_subchannel_call */
+ gpr_atm subchannel_call;
+
+ gpr_mu mu;
+
+ subchannel_creation_phase creation_phase;
+ grpc_connected_subchannel *connected_subchannel;
+ grpc_polling_entity *pollent;
+
+ grpc_transport_stream_op *waiting_ops;
+ size_t waiting_ops_count;
+ size_t waiting_ops_capacity;
+
+ grpc_closure next_step;
+
+ grpc_call_stack *owning_call;
+
+ grpc_linked_mdelem lb_token_mdelem;
+} call_data;
+
+static void add_waiting_locked(call_data *calld, grpc_transport_stream_op *op) {
+ GPR_TIMER_BEGIN("add_waiting_locked", 0);
+ if (calld->waiting_ops_count == calld->waiting_ops_capacity) {
+ calld->waiting_ops_capacity = GPR_MAX(3, 2 * calld->waiting_ops_capacity);
+ calld->waiting_ops =
+ gpr_realloc(calld->waiting_ops,
+ calld->waiting_ops_capacity * sizeof(*calld->waiting_ops));
+ }
+ calld->waiting_ops[calld->waiting_ops_count++] = *op;
+ GPR_TIMER_END("add_waiting_locked", 0);
+}
+
+static void fail_locked(grpc_exec_ctx *exec_ctx, call_data *calld,
+ grpc_error *error) {
+ size_t i;
+ for (i = 0; i < calld->waiting_ops_count; i++) {
+ grpc_transport_stream_op_finish_with_failure(
+ exec_ctx, &calld->waiting_ops[i], GRPC_ERROR_REF(error));
+ }
+ calld->waiting_ops_count = 0;
+ GRPC_ERROR_UNREF(error);
+}
+
+typedef struct {
+ grpc_transport_stream_op *ops;
+ size_t nops;
+ grpc_subchannel_call *call;
+} retry_ops_args;
+
+static void retry_ops(grpc_exec_ctx *exec_ctx, void *args, grpc_error *error) {
+ retry_ops_args *a = args;
+ size_t i;
+ for (i = 0; i < a->nops; i++) {
+ grpc_subchannel_call_process_op(exec_ctx, a->call, &a->ops[i]);
+ }
+ GRPC_SUBCHANNEL_CALL_UNREF(exec_ctx, a->call, "retry_ops");
+ gpr_free(a->ops);
+ gpr_free(a);
+}
+
+static void retry_waiting_locked(grpc_exec_ctx *exec_ctx, call_data *calld) {
+ retry_ops_args *a = gpr_malloc(sizeof(*a));
+ a->ops = calld->waiting_ops;
+ a->nops = calld->waiting_ops_count;
+ a->call = GET_CALL(calld);
+ if (a->call == CANCELLED_CALL) {
+ gpr_free(a);
+ fail_locked(exec_ctx, calld, GRPC_ERROR_CANCELLED);
+ return;
+ }
+ calld->waiting_ops = NULL;
+ calld->waiting_ops_count = 0;
+ calld->waiting_ops_capacity = 0;
+ GRPC_SUBCHANNEL_CALL_REF(a->call, "retry_ops");
+ grpc_exec_ctx_sched(exec_ctx, grpc_closure_create(retry_ops, a),
+ GRPC_ERROR_NONE, NULL);
+}
+
+static void subchannel_ready(grpc_exec_ctx *exec_ctx, void *arg,
+ grpc_error *error) {
+ call_data *calld = arg;
+ gpr_mu_lock(&calld->mu);
+ GPR_ASSERT(calld->creation_phase ==
+ GRPC_SUBCHANNEL_CALL_HOLDER_PICKING_SUBCHANNEL);
+ calld->creation_phase = GRPC_SUBCHANNEL_CALL_HOLDER_NOT_CREATING;
+ if (calld->connected_subchannel == NULL) {
+ gpr_atm_no_barrier_store(&calld->subchannel_call, 1);
+ fail_locked(exec_ctx, calld, GRPC_ERROR_CREATE_REFERENCING(
+ "Failed to create subchannel", &error, 1));
+ } else if (1 == gpr_atm_acq_load(&calld->subchannel_call)) {
+ /* already cancelled before subchannel became ready */
+ fail_locked(exec_ctx, calld,
+ GRPC_ERROR_CREATE_REFERENCING(
+ "Cancelled before creating subchannel", &error, 1));
+ } else {
+ grpc_subchannel_call *subchannel_call = NULL;
+ grpc_error *new_error = grpc_connected_subchannel_create_call(
+ exec_ctx, calld->connected_subchannel, calld->pollent,
+ &subchannel_call);
+ if (new_error != GRPC_ERROR_NONE) {
+ new_error = grpc_error_add_child(new_error, error);
+ subchannel_call = CANCELLED_CALL;
+ fail_locked(exec_ctx, calld, new_error);
+ }
+ gpr_atm_rel_store(&calld->subchannel_call,
+ (gpr_atm)(uintptr_t)subchannel_call);
+ retry_waiting_locked(exec_ctx, calld);
+ }
+ gpr_mu_unlock(&calld->mu);
+ GRPC_CALL_STACK_UNREF(exec_ctx, calld->owning_call, "pick_subchannel");
+}
+
+static char *cc_get_peer(grpc_exec_ctx *exec_ctx, grpc_call_element *elem) {
+ call_data *calld = elem->call_data;
+ grpc_subchannel_call *subchannel_call = GET_CALL(calld);
+ if (subchannel_call == NULL || subchannel_call == CANCELLED_CALL) {
+ return NULL;
+ } else {
+ return grpc_subchannel_call_get_peer(exec_ctx, subchannel_call);
+ }
}
typedef struct {
@@ -341,11 +509,11 @@ typedef struct {
grpc_closure closure;
} continue_picking_args;
-static int cc_pick_subchannel(grpc_exec_ctx *exec_ctx, void *arg,
- grpc_metadata_batch *initial_metadata,
- uint32_t initial_metadata_flags,
- grpc_connected_subchannel **connected_subchannel,
- grpc_closure *on_ready);
+static bool pick_subchannel(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
+ grpc_metadata_batch *initial_metadata,
+ uint32_t initial_metadata_flags,
+ grpc_connected_subchannel **connected_subchannel,
+ grpc_closure *on_ready);
static void continue_picking(grpc_exec_ctx *exec_ctx, void *arg,
grpc_error *error) {
@@ -354,22 +522,21 @@ static void continue_picking(grpc_exec_ctx *exec_ctx, void *arg,
/* cancelled, do nothing */
} else if (error != GRPC_ERROR_NONE) {
grpc_exec_ctx_sched(exec_ctx, cpa->on_ready, GRPC_ERROR_REF(error), NULL);
- } else if (cc_pick_subchannel(exec_ctx, cpa->elem, cpa->initial_metadata,
- cpa->initial_metadata_flags,
- cpa->connected_subchannel, cpa->on_ready)) {
+ } else if (pick_subchannel(exec_ctx, cpa->elem, cpa->initial_metadata,
+ cpa->initial_metadata_flags,
+ cpa->connected_subchannel, cpa->on_ready)) {
grpc_exec_ctx_sched(exec_ctx, cpa->on_ready, GRPC_ERROR_NONE, NULL);
}
gpr_free(cpa);
}
-static int cc_pick_subchannel(grpc_exec_ctx *exec_ctx, void *elemp,
- grpc_metadata_batch *initial_metadata,
- uint32_t initial_metadata_flags,
- grpc_connected_subchannel **connected_subchannel,
- grpc_closure *on_ready) {
- GPR_TIMER_BEGIN("cc_pick_subchannel", 0);
+static bool pick_subchannel(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
+ grpc_metadata_batch *initial_metadata,
+ uint32_t initial_metadata_flags,
+ grpc_connected_subchannel **connected_subchannel,
+ grpc_closure *on_ready) {
+ GPR_TIMER_BEGIN("pick_subchannel", 0);
- grpc_call_element *elem = elemp;
channel_data *chand = elem->channel_data;
call_data *calld = elem->call_data;
continue_picking_args *cpa;
@@ -377,7 +544,7 @@ static int cc_pick_subchannel(grpc_exec_ctx *exec_ctx, void *elemp,
GPR_ASSERT(connected_subchannel);
- gpr_mu_lock(&chand->mu_config);
+ gpr_mu_lock(&chand->mu);
if (initial_metadata == NULL) {
if (chand->lb_policy != NULL) {
grpc_lb_policy_cancel_pick(exec_ctx, chand->lb_policy,
@@ -392,28 +559,29 @@ static int cc_pick_subchannel(grpc_exec_ctx *exec_ctx, void *elemp,
GRPC_ERROR_CREATE("Pick cancelled"), NULL);
}
}
- gpr_mu_unlock(&chand->mu_config);
- GPR_TIMER_END("cc_pick_subchannel", 0);
- return 1;
+ gpr_mu_unlock(&chand->mu);
+ GPR_TIMER_END("pick_subchannel", 0);
+ return true;
}
if (chand->lb_policy != NULL) {
grpc_lb_policy *lb_policy = chand->lb_policy;
int r;
- GRPC_LB_POLICY_REF(lb_policy, "cc_pick_subchannel");
- gpr_mu_unlock(&chand->mu_config);
- r = grpc_lb_policy_pick(exec_ctx, lb_policy, calld->pollent,
- initial_metadata, initial_metadata_flags,
- connected_subchannel, on_ready);
- GRPC_LB_POLICY_UNREF(exec_ctx, lb_policy, "cc_pick_subchannel");
- GPR_TIMER_END("cc_pick_subchannel", 0);
+ GRPC_LB_POLICY_REF(lb_policy, "pick_subchannel");
+ gpr_mu_unlock(&chand->mu);
+ const grpc_lb_policy_pick_args inputs = {calld->pollent, initial_metadata,
+ initial_metadata_flags,
+ &calld->lb_token_mdelem};
+ r = grpc_lb_policy_pick(exec_ctx, lb_policy, &inputs, connected_subchannel,
+ NULL, on_ready);
+ GRPC_LB_POLICY_UNREF(exec_ctx, lb_policy, "pick_subchannel");
+ GPR_TIMER_END("pick_subchannel", 0);
return r;
}
if (chand->resolver != NULL && !chand->started_resolving) {
- chand->started_resolving = 1;
+ chand->started_resolving = true;
GRPC_CHANNEL_STACK_REF(chand->owning_stack, "resolver");
- grpc_resolver_next(exec_ctx, chand->resolver,
- &chand->incoming_configuration,
- &chand->on_config_changed);
+ grpc_resolver_next(exec_ctx, chand->resolver, &chand->resolver_result,
+ &chand->on_resolver_result_changed);
}
if (chand->resolver != NULL) {
cpa = gpr_malloc(sizeof(*cpa));
@@ -429,67 +597,145 @@ static int cc_pick_subchannel(grpc_exec_ctx *exec_ctx, void *elemp,
grpc_exec_ctx_sched(exec_ctx, on_ready, GRPC_ERROR_CREATE("Disconnected"),
NULL);
}
- gpr_mu_unlock(&chand->mu_config);
+ gpr_mu_unlock(&chand->mu);
- GPR_TIMER_END("cc_pick_subchannel", 0);
- return 0;
+ GPR_TIMER_END("pick_subchannel", 0);
+ return false;
+}
+
+// The logic here is fairly complicated, due to (a) the fact that we
+// need to handle the case where we receive the send op before the
+// initial metadata op, and (b) the need for efficiency, especially in
+// the streaming case.
+// TODO(ctiller): Explain this more thoroughly.
+static void cc_start_transport_stream_op(grpc_exec_ctx *exec_ctx,
+ grpc_call_element *elem,
+ grpc_transport_stream_op *op) {
+ call_data *calld = elem->call_data;
+ GRPC_CALL_LOG_OP(GPR_INFO, elem, op);
+ /* try to (atomically) get the call */
+ grpc_subchannel_call *call = GET_CALL(calld);
+ GPR_TIMER_BEGIN("cc_start_transport_stream_op", 0);
+ if (call == CANCELLED_CALL) {
+ grpc_transport_stream_op_finish_with_failure(exec_ctx, op,
+ GRPC_ERROR_CANCELLED);
+ GPR_TIMER_END("cc_start_transport_stream_op", 0);
+ return;
+ }
+ if (call != NULL) {
+ grpc_subchannel_call_process_op(exec_ctx, call, op);
+ GPR_TIMER_END("cc_start_transport_stream_op", 0);
+ return;
+ }
+ /* we failed; lock and figure out what to do */
+ gpr_mu_lock(&calld->mu);
+retry:
+ /* need to recheck that another thread hasn't set the call */
+ call = GET_CALL(calld);
+ if (call == CANCELLED_CALL) {
+ gpr_mu_unlock(&calld->mu);
+ grpc_transport_stream_op_finish_with_failure(exec_ctx, op,
+ GRPC_ERROR_CANCELLED);
+ GPR_TIMER_END("cc_start_transport_stream_op", 0);
+ return;
+ }
+ if (call != NULL) {
+ gpr_mu_unlock(&calld->mu);
+ grpc_subchannel_call_process_op(exec_ctx, call, op);
+ GPR_TIMER_END("cc_start_transport_stream_op", 0);
+ return;
+ }
+ /* if this is a cancellation, then we can raise our cancelled flag */
+ if (op->cancel_error != GRPC_ERROR_NONE) {
+ if (!gpr_atm_rel_cas(&calld->subchannel_call, 0,
+ (gpr_atm)(uintptr_t)CANCELLED_CALL)) {
+ goto retry;
+ } else {
+ switch (calld->creation_phase) {
+ case GRPC_SUBCHANNEL_CALL_HOLDER_NOT_CREATING:
+ fail_locked(exec_ctx, calld, GRPC_ERROR_REF(op->cancel_error));
+ break;
+ case GRPC_SUBCHANNEL_CALL_HOLDER_PICKING_SUBCHANNEL:
+ pick_subchannel(exec_ctx, elem, NULL, 0, &calld->connected_subchannel,
+ NULL);
+ break;
+ }
+ gpr_mu_unlock(&calld->mu);
+ grpc_transport_stream_op_finish_with_failure(exec_ctx, op,
+ GRPC_ERROR_CANCELLED);
+ GPR_TIMER_END("cc_start_transport_stream_op", 0);
+ return;
+ }
+ }
+ /* if we don't have a subchannel, try to get one */
+ if (calld->creation_phase == GRPC_SUBCHANNEL_CALL_HOLDER_NOT_CREATING &&
+ calld->connected_subchannel == NULL &&
+ op->send_initial_metadata != NULL) {
+ calld->creation_phase = GRPC_SUBCHANNEL_CALL_HOLDER_PICKING_SUBCHANNEL;
+ grpc_closure_init(&calld->next_step, subchannel_ready, calld);
+ GRPC_CALL_STACK_REF(calld->owning_call, "pick_subchannel");
+ if (pick_subchannel(exec_ctx, elem, op->send_initial_metadata,
+ op->send_initial_metadata_flags,
+ &calld->connected_subchannel, &calld->next_step)) {
+ calld->creation_phase = GRPC_SUBCHANNEL_CALL_HOLDER_NOT_CREATING;
+ GRPC_CALL_STACK_UNREF(exec_ctx, calld->owning_call, "pick_subchannel");
+ }
+ }
+ /* if we've got a subchannel, then let's ask it to create a call */
+ if (calld->creation_phase == GRPC_SUBCHANNEL_CALL_HOLDER_NOT_CREATING &&
+ calld->connected_subchannel != NULL) {
+ grpc_subchannel_call *subchannel_call = NULL;
+ grpc_error *error = grpc_connected_subchannel_create_call(
+ exec_ctx, calld->connected_subchannel, calld->pollent,
+ &subchannel_call);
+ if (error != GRPC_ERROR_NONE) {
+ subchannel_call = CANCELLED_CALL;
+ fail_locked(exec_ctx, calld, GRPC_ERROR_REF(error));
+ grpc_transport_stream_op_finish_with_failure(exec_ctx, op, error);
+ }
+ gpr_atm_rel_store(&calld->subchannel_call,
+ (gpr_atm)(uintptr_t)subchannel_call);
+ retry_waiting_locked(exec_ctx, calld);
+ goto retry;
+ }
+ /* nothing to be done but wait */
+ add_waiting_locked(calld, op);
+ gpr_mu_unlock(&calld->mu);
+ GPR_TIMER_END("cc_start_transport_stream_op", 0);
}
/* Constructor for call_data */
-static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx,
- grpc_call_element *elem,
- grpc_call_element_args *args) {
- grpc_subchannel_call_holder_init(elem->call_data, cc_pick_subchannel, elem,
- args->call_stack);
+static grpc_error *cc_init_call_elem(grpc_exec_ctx *exec_ctx,
+ grpc_call_element *elem,
+ grpc_call_element_args *args) {
+ call_data *calld = elem->call_data;
+ gpr_atm_rel_store(&calld->subchannel_call, 0);
+ gpr_mu_init(&calld->mu);
+ calld->connected_subchannel = NULL;
+ calld->waiting_ops = NULL;
+ calld->waiting_ops_count = 0;
+ calld->waiting_ops_capacity = 0;
+ calld->creation_phase = GRPC_SUBCHANNEL_CALL_HOLDER_NOT_CREATING;
+ calld->owning_call = args->call_stack;
+ calld->pollent = NULL;
return GRPC_ERROR_NONE;
}
/* Destructor for call_data */
-static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
- const grpc_call_final_info *final_info,
- void *and_free_memory) {
- grpc_subchannel_call_holder_destroy(exec_ctx, elem->call_data);
- gpr_free(and_free_memory);
-}
-
-/* Constructor for channel_data */
-static void init_channel_elem(grpc_exec_ctx *exec_ctx,
- grpc_channel_element *elem,
- grpc_channel_element_args *args) {
- channel_data *chand = elem->channel_data;
-
- memset(chand, 0, sizeof(*chand));
-
- GPR_ASSERT(args->is_last);
- GPR_ASSERT(elem->filter == &grpc_client_channel_filter);
-
- gpr_mu_init(&chand->mu_config);
- grpc_closure_init(&chand->on_config_changed, cc_on_config_changed, chand);
- chand->owning_stack = args->channel_stack;
-
- grpc_connectivity_state_init(&chand->state_tracker, GRPC_CHANNEL_IDLE,
- "client_channel");
- chand->interested_parties = grpc_pollset_set_create();
-}
-
-/* Destructor for channel_data */
-static void destroy_channel_elem(grpc_exec_ctx *exec_ctx,
- grpc_channel_element *elem) {
- channel_data *chand = elem->channel_data;
-
- if (chand->resolver != NULL) {
- grpc_resolver_shutdown(exec_ctx, chand->resolver);
- GRPC_RESOLVER_UNREF(exec_ctx, chand->resolver, "channel");
- }
- if (chand->lb_policy != NULL) {
- grpc_pollset_set_del_pollset_set(exec_ctx,
- chand->lb_policy->interested_parties,
- chand->interested_parties);
- GRPC_LB_POLICY_UNREF(exec_ctx, chand->lb_policy, "channel");
+static void cc_destroy_call_elem(grpc_exec_ctx *exec_ctx,
+ grpc_call_element *elem,
+ const grpc_call_final_info *final_info,
+ void *and_free_memory) {
+ call_data *calld = elem->call_data;
+ grpc_subchannel_call *call = GET_CALL(calld);
+ if (call != NULL && call != CANCELLED_CALL) {
+ GRPC_SUBCHANNEL_CALL_UNREF(exec_ctx, call, "client_channel_destroy_call");
}
- grpc_connectivity_state_destroy(exec_ctx, &chand->state_tracker);
- grpc_pollset_set_destroy(chand->interested_parties);
- gpr_mu_destroy(&chand->mu_config);
+ GPR_ASSERT(calld->creation_phase == GRPC_SUBCHANNEL_CALL_HOLDER_NOT_CREATING);
+ gpr_mu_destroy(&calld->mu);
+ GPR_ASSERT(calld->waiting_ops_count == 0);
+ gpr_free(calld->waiting_ops);
+ gpr_free(and_free_memory);
}
static void cc_set_pollset_or_pollset_set(grpc_exec_ctx *exec_ctx,
@@ -499,16 +745,20 @@ static void cc_set_pollset_or_pollset_set(grpc_exec_ctx *exec_ctx,
calld->pollent = pollent;
}
+/*************************************************************************
+ * EXPORTED SYMBOLS
+ */
+
const grpc_channel_filter grpc_client_channel_filter = {
cc_start_transport_stream_op,
cc_start_transport_op,
sizeof(call_data),
- init_call_elem,
+ cc_init_call_elem,
cc_set_pollset_or_pollset_set,
- destroy_call_elem,
+ cc_destroy_call_elem,
sizeof(channel_data),
- init_channel_elem,
- destroy_channel_elem,
+ cc_init_channel_elem,
+ cc_destroy_channel_elem,
cc_get_peer,
"client-channel",
};
@@ -519,41 +769,40 @@ void grpc_client_channel_set_resolver(grpc_exec_ctx *exec_ctx,
/* post construction initialization: set the transport setup pointer */
grpc_channel_element *elem = grpc_channel_stack_last_element(channel_stack);
channel_data *chand = elem->channel_data;
- gpr_mu_lock(&chand->mu_config);
+ gpr_mu_lock(&chand->mu);
GPR_ASSERT(!chand->resolver);
chand->resolver = resolver;
GRPC_RESOLVER_REF(resolver, "channel");
if (!grpc_closure_list_empty(chand->waiting_for_config_closures) ||
chand->exit_idle_when_lb_policy_arrives) {
- chand->started_resolving = 1;
+ chand->started_resolving = true;
GRPC_CHANNEL_STACK_REF(chand->owning_stack, "resolver");
- grpc_resolver_next(exec_ctx, resolver, &chand->incoming_configuration,
- &chand->on_config_changed);
+ grpc_resolver_next(exec_ctx, resolver, &chand->resolver_result,
+ &chand->on_resolver_result_changed);
}
- gpr_mu_unlock(&chand->mu_config);
+ gpr_mu_unlock(&chand->mu);
}
grpc_connectivity_state grpc_client_channel_check_connectivity_state(
grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, int try_to_connect) {
channel_data *chand = elem->channel_data;
grpc_connectivity_state out;
- gpr_mu_lock(&chand->mu_config);
+ gpr_mu_lock(&chand->mu);
out = grpc_connectivity_state_check(&chand->state_tracker, NULL);
if (out == GRPC_CHANNEL_IDLE && try_to_connect) {
if (chand->lb_policy != NULL) {
grpc_lb_policy_exit_idle(exec_ctx, chand->lb_policy);
} else {
- chand->exit_idle_when_lb_policy_arrives = 1;
+ chand->exit_idle_when_lb_policy_arrives = true;
if (!chand->started_resolving && chand->resolver != NULL) {
GRPC_CHANNEL_STACK_REF(chand->owning_stack, "resolver");
- chand->started_resolving = 1;
- grpc_resolver_next(exec_ctx, chand->resolver,
- &chand->incoming_configuration,
- &chand->on_config_changed);
+ chand->started_resolving = true;
+ grpc_resolver_next(exec_ctx, chand->resolver, &chand->resolver_result,
+ &chand->on_resolver_result_changed);
}
}
}
- gpr_mu_unlock(&chand->mu_config);
+ gpr_mu_unlock(&chand->mu);
return out;
}
@@ -588,8 +837,8 @@ void grpc_client_channel_watch_connectivity_state(
grpc_closure_init(&w->my_closure, on_external_watch_complete, w);
GRPC_CHANNEL_STACK_REF(w->chand->owning_stack,
"external_connectivity_watcher");
- gpr_mu_lock(&chand->mu_config);
+ gpr_mu_lock(&chand->mu);
grpc_connectivity_state_notify_on_state_change(
exec_ctx, &chand->state_tracker, state, &w->my_closure);
- gpr_mu_unlock(&chand->mu_config);
+ gpr_mu_unlock(&chand->mu);
}
diff --git a/src/core/ext/client_config/lb_policy.c b/src/core/ext/client_config/lb_policy.c
index 8b980b2cca..903563ef6b 100644
--- a/src/core/ext/client_config/lb_policy.c
+++ b/src/core/ext/client_config/lb_policy.c
@@ -100,13 +100,11 @@ void grpc_lb_policy_weak_unref(grpc_exec_ctx *exec_ctx,
}
int grpc_lb_policy_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy,
- grpc_polling_entity *pollent,
- grpc_metadata_batch *initial_metadata,
- uint32_t initial_metadata_flags,
- grpc_connected_subchannel **target,
+ const grpc_lb_policy_pick_args *pick_args,
+ grpc_connected_subchannel **target, void **user_data,
grpc_closure *on_complete) {
- return policy->vtable->pick(exec_ctx, policy, pollent, initial_metadata,
- initial_metadata_flags, target, on_complete);
+ return policy->vtable->pick(exec_ctx, policy, pick_args, target, user_data,
+ on_complete);
}
void grpc_lb_policy_cancel_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy,
diff --git a/src/core/ext/client_config/lb_policy.h b/src/core/ext/client_config/lb_policy.h
index a2f5446fc6..37c93d707c 100644
--- a/src/core/ext/client_config/lb_policy.h
+++ b/src/core/ext/client_config/lb_policy.h
@@ -53,23 +53,38 @@ struct grpc_lb_policy {
grpc_pollset_set *interested_parties;
};
+/** Extra arguments for an LB pick */
+typedef struct grpc_lb_policy_pick_args {
+ /** Parties interested in the pick's progress */
+ grpc_polling_entity *pollent;
+ /** Initial metadata associated with the picking call. */
+ grpc_metadata_batch *initial_metadata;
+ /** See \a GRPC_INITIAL_METADATA_* in grpc_types.h */
+ uint32_t initial_metadata_flags;
+ /** Storage for LB token in \a initial_metadata, or NULL if not used */
+ grpc_linked_mdelem *lb_token_mdelem_storage;
+} grpc_lb_policy_pick_args;
+
struct grpc_lb_policy_vtable {
void (*destroy)(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy);
-
void (*shutdown)(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy);
- /** implement grpc_lb_policy_pick */
+ /** \see grpc_lb_policy_pick */
int (*pick)(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy,
- grpc_polling_entity *pollent,
- grpc_metadata_batch *initial_metadata,
- uint32_t initial_metadata_flags,
- grpc_connected_subchannel **target, grpc_closure *on_complete);
+ const grpc_lb_policy_pick_args *pick_args,
+ grpc_connected_subchannel **target, void **user_data,
+ grpc_closure *on_complete);
+
+ /** \see grpc_lb_policy_cancel_pick */
void (*cancel_pick)(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy,
grpc_connected_subchannel **target);
+
+ /** \see grpc_lb_policy_cancel_picks */
void (*cancel_picks)(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy,
uint32_t initial_metadata_flags_mask,
uint32_t initial_metadata_flags_eq);
+ /** \see grpc_lb_policy_ping_one */
void (*ping_one)(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy,
grpc_closure *closure);
@@ -83,8 +98,7 @@ struct grpc_lb_policy_vtable {
/** call notify when the connectivity state of a channel changes from *state.
Updates *state with the new state of the policy. Calling with a NULL \a
- state cancels the subscription.
- */
+ state cancels the subscription. */
void (*notify_on_state_change)(grpc_exec_ctx *exec_ctx,
grpc_lb_policy *policy,
grpc_connectivity_state *state,
@@ -124,26 +138,34 @@ void grpc_lb_policy_weak_unref(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy);
void grpc_lb_policy_init(grpc_lb_policy *policy,
const grpc_lb_policy_vtable *vtable);
-/** Given initial metadata in \a initial_metadata, find an appropriate
- target for this rpc, and 'return' it by calling \a on_complete after setting
- \a target.
- Picking can be asynchronous. Any IO should be done under \a pollent. */
+/** Find an appropriate target for this call, based on \a pick_args.
+ Picking can be synchronous or asynchronous. In the synchronous case, when a
+ pick is readily available, it'll be returned in \a target and a non-zero
+ value will be returned.
+ In the asynchronous case, zero is returned and \a on_complete will be called
+ once \a target and \a user_data have been set. Any IO should be done under
+ \a pick_args->pollent. The opaque \a user_data output argument corresponds
+ to information that may need be propagated from the LB policy. It may be
+ NULL. Errors are signaled by receiving a NULL \a *target. */
int grpc_lb_policy_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy,
- grpc_polling_entity *pollent,
- grpc_metadata_batch *initial_metadata,
- uint32_t initial_metadata_flags,
- grpc_connected_subchannel **target,
+ const grpc_lb_policy_pick_args *pick_args,
+ grpc_connected_subchannel **target, void **user_data,
grpc_closure *on_complete);
+/** Perform a connected subchannel ping (see \a grpc_connected_subchannel_ping)
+ against one of the connected subchannels managed by \a policy. */
void grpc_lb_policy_ping_one(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy,
grpc_closure *closure);
+/** Cancel picks for \a target.
+ The \a on_complete callback of the pending picks will be invoked with \a
+ *target set to NULL. */
void grpc_lb_policy_cancel_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy,
grpc_connected_subchannel **target);
-/** Cancel all pending picks which have:
- (initial_metadata_flags & initial_metadata_flags_mask) ==
- initial_metadata_flags_eq */
+/** Cancel all pending picks for which their \a initial_metadata_flags (as given
+ in the call to \a grpc_lb_policy_pick) matches \a initial_metadata_flags_eq
+ when AND'd with \a initial_metadata_flags_mask */
void grpc_lb_policy_cancel_picks(grpc_exec_ctx *exec_ctx,
grpc_lb_policy *policy,
uint32_t initial_metadata_flags_mask,
diff --git a/src/core/ext/client_config/lb_policy_factory.h b/src/core/ext/client_config/lb_policy_factory.h
index 1c89b28b59..7191ca7d89 100644
--- a/src/core/ext/client_config/lb_policy_factory.h
+++ b/src/core/ext/client_config/lb_policy_factory.h
@@ -43,14 +43,23 @@
typedef struct grpc_lb_policy_factory grpc_lb_policy_factory;
typedef struct grpc_lb_policy_factory_vtable grpc_lb_policy_factory_vtable;
-/** grpc_lb_policy provides grpc_client_config objects to grpc_channel
- objects */
struct grpc_lb_policy_factory {
const grpc_lb_policy_factory_vtable *vtable;
};
+/** A resolved address alongside any LB related information associated with it.
+ * \a user_data, if not NULL, contains opaque data meant to be consumed by the
+ * gRPC LB policy. Note that no all LB policies support \a user_data as input.
+ * Those who don't will simply ignore it and will correspondingly return NULL in
+ * their namesake pick() output argument. */
+typedef struct grpc_lb_address {
+ grpc_resolved_address *resolved_address;
+ void *user_data;
+} grpc_lb_address;
+
typedef struct grpc_lb_policy_args {
- grpc_resolved_addresses *addresses;
+ grpc_lb_address *addresses;
+ size_t num_addresses;
grpc_client_channel_factory *client_channel_factory;
} grpc_lb_policy_args;
diff --git a/src/core/ext/client_config/resolver.c b/src/core/ext/client_config/resolver.c
index eb004455bd..7534ea62af 100644
--- a/src/core/ext/client_config/resolver.c
+++ b/src/core/ext/client_config/resolver.c
@@ -76,7 +76,7 @@ void grpc_resolver_channel_saw_error(grpc_exec_ctx *exec_ctx,
}
void grpc_resolver_next(grpc_exec_ctx *exec_ctx, grpc_resolver *resolver,
- grpc_client_config **target_config,
+ grpc_resolver_result **result,
grpc_closure *on_complete) {
- resolver->vtable->next(exec_ctx, resolver, target_config, on_complete);
+ resolver->vtable->next(exec_ctx, resolver, result, on_complete);
}
diff --git a/src/core/ext/client_config/resolver.h b/src/core/ext/client_config/resolver.h
index 6ecb5d2774..88ac262d51 100644
--- a/src/core/ext/client_config/resolver.h
+++ b/src/core/ext/client_config/resolver.h
@@ -34,14 +34,14 @@
#ifndef GRPC_CORE_EXT_CLIENT_CONFIG_RESOLVER_H
#define GRPC_CORE_EXT_CLIENT_CONFIG_RESOLVER_H
-#include "src/core/ext/client_config/client_config.h"
+#include "src/core/ext/client_config/resolver_result.h"
#include "src/core/ext/client_config/subchannel.h"
#include "src/core/lib/iomgr/iomgr.h"
typedef struct grpc_resolver grpc_resolver;
typedef struct grpc_resolver_vtable grpc_resolver_vtable;
-/** grpc_resolver provides grpc_client_config objects to grpc_channel
+/** grpc_resolver provides grpc_resolver_result objects to grpc_channel
objects */
struct grpc_resolver {
const grpc_resolver_vtable *vtable;
@@ -53,7 +53,7 @@ struct grpc_resolver_vtable {
void (*shutdown)(grpc_exec_ctx *exec_ctx, grpc_resolver *resolver);
void (*channel_saw_error)(grpc_exec_ctx *exec_ctx, grpc_resolver *resolver);
void (*next)(grpc_exec_ctx *exec_ctx, grpc_resolver *resolver,
- grpc_client_config **target_config, grpc_closure *on_complete);
+ grpc_resolver_result **result, grpc_closure *on_complete);
};
#ifdef GRPC_RESOLVER_REFCOUNT_DEBUG
@@ -82,13 +82,13 @@ void grpc_resolver_channel_saw_error(grpc_exec_ctx *exec_ctx,
grpc_resolver *resolver);
/** Get the next client config. Called by the channel to fetch a new
- configuration. Expected to set *target_config with a new configuration,
+ configuration. Expected to set *result with a new configuration,
and then schedule on_complete for execution.
- If resolution is fatally broken, set *target_config to NULL and
+ If resolution is fatally broken, set *result to NULL and
schedule on_complete. */
void grpc_resolver_next(grpc_exec_ctx *exec_ctx, grpc_resolver *resolver,
- grpc_client_config **target_config,
+ grpc_resolver_result **result,
grpc_closure *on_complete);
#endif /* GRPC_CORE_EXT_CLIENT_CONFIG_RESOLVER_H */
diff --git a/src/core/ext/client_config/resolver_factory.h b/src/core/ext/client_config/resolver_factory.h
index 4eb6979aad..f69bf79564 100644
--- a/src/core/ext/client_config/resolver_factory.h
+++ b/src/core/ext/client_config/resolver_factory.h
@@ -41,7 +41,7 @@
typedef struct grpc_resolver_factory grpc_resolver_factory;
typedef struct grpc_resolver_factory_vtable grpc_resolver_factory_vtable;
-/** grpc_resolver provides grpc_client_config objects to grpc_channel
+/** grpc_resolver provides grpc_resolver_result objects to grpc_channel
objects */
struct grpc_resolver_factory {
const grpc_resolver_factory_vtable *vtable;
diff --git a/src/core/ext/client_config/client_config.c b/src/core/ext/client_config/resolver_result.c
index f9b8e68698..c6c4166e83 100644
--- a/src/core/ext/client_config/client_config.c
+++ b/src/core/ext/client_config/resolver_result.c
@@ -31,44 +31,45 @@
*
*/
-#include "src/core/ext/client_config/client_config.h"
+#include "src/core/ext/client_config/resolver_result.h"
#include <string.h>
#include <grpc/support/alloc.h>
-struct grpc_client_config {
+struct grpc_resolver_result {
gpr_refcount refs;
grpc_lb_policy *lb_policy;
};
-grpc_client_config *grpc_client_config_create() {
- grpc_client_config *c = gpr_malloc(sizeof(*c));
+grpc_resolver_result *grpc_resolver_result_create() {
+ grpc_resolver_result *c = gpr_malloc(sizeof(*c));
memset(c, 0, sizeof(*c));
gpr_ref_init(&c->refs, 1);
return c;
}
-void grpc_client_config_ref(grpc_client_config *c) { gpr_ref(&c->refs); }
+void grpc_resolver_result_ref(grpc_resolver_result *c) { gpr_ref(&c->refs); }
-void grpc_client_config_unref(grpc_exec_ctx *exec_ctx, grpc_client_config *c) {
+void grpc_resolver_result_unref(grpc_exec_ctx *exec_ctx,
+ grpc_resolver_result *c) {
if (gpr_unref(&c->refs)) {
if (c->lb_policy != NULL) {
- GRPC_LB_POLICY_UNREF(exec_ctx, c->lb_policy, "client_config");
+ GRPC_LB_POLICY_UNREF(exec_ctx, c->lb_policy, "resolver_result");
}
gpr_free(c);
}
}
-void grpc_client_config_set_lb_policy(grpc_client_config *c,
- grpc_lb_policy *lb_policy) {
+void grpc_resolver_result_set_lb_policy(grpc_resolver_result *c,
+ grpc_lb_policy *lb_policy) {
GPR_ASSERT(c->lb_policy == NULL);
if (lb_policy) {
- GRPC_LB_POLICY_REF(lb_policy, "client_config");
+ GRPC_LB_POLICY_REF(lb_policy, "resolver_result");
}
c->lb_policy = lb_policy;
}
-grpc_lb_policy *grpc_client_config_get_lb_policy(grpc_client_config *c) {
+grpc_lb_policy *grpc_resolver_result_get_lb_policy(grpc_resolver_result *c) {
return c->lb_policy;
}
diff --git a/src/core/ext/client_config/client_config.h b/src/core/ext/client_config/resolver_result.h
index a6290cbcf0..402f7dbd7e 100644
--- a/src/core/ext/client_config/client_config.h
+++ b/src/core/ext/client_config/resolver_result.h
@@ -31,23 +31,22 @@
*
*/
-#ifndef GRPC_CORE_EXT_CLIENT_CONFIG_CLIENT_CONFIG_H
-#define GRPC_CORE_EXT_CLIENT_CONFIG_CLIENT_CONFIG_H
+#ifndef GRPC_CORE_EXT_CLIENT_CONFIG_RESOLVER_RESULT_H
+#define GRPC_CORE_EXT_CLIENT_CONFIG_RESOLVER_RESULT_H
#include "src/core/ext/client_config/lb_policy.h"
-/** Total configuration for a client. Provided, and updated, by
- grpc_resolver */
-typedef struct grpc_client_config grpc_client_config;
+/** Results reported from a grpc_resolver. */
+typedef struct grpc_resolver_result grpc_resolver_result;
-grpc_client_config *grpc_client_config_create();
-void grpc_client_config_ref(grpc_client_config *client_config);
-void grpc_client_config_unref(grpc_exec_ctx *exec_ctx,
- grpc_client_config *client_config);
+grpc_resolver_result *grpc_resolver_result_create();
+void grpc_resolver_result_ref(grpc_resolver_result *client_config);
+void grpc_resolver_result_unref(grpc_exec_ctx *exec_ctx,
+ grpc_resolver_result *client_config);
-void grpc_client_config_set_lb_policy(grpc_client_config *client_config,
- grpc_lb_policy *lb_policy);
-grpc_lb_policy *grpc_client_config_get_lb_policy(
- grpc_client_config *client_config);
+void grpc_resolver_result_set_lb_policy(grpc_resolver_result *client_config,
+ grpc_lb_policy *lb_policy);
+grpc_lb_policy *grpc_resolver_result_get_lb_policy(
+ grpc_resolver_result *client_config);
-#endif /* GRPC_CORE_EXT_CLIENT_CONFIG_CLIENT_CONFIG_H */
+#endif /* GRPC_CORE_EXT_CLIENT_CONFIG_RESOLVER_RESULT_H */
diff --git a/src/core/ext/client_config/subchannel_call_holder.c b/src/core/ext/client_config/subchannel_call_holder.c
deleted file mode 100644
index be6d054af4..0000000000
--- a/src/core/ext/client_config/subchannel_call_holder.c
+++ /dev/null
@@ -1,292 +0,0 @@
-/*
- *
- * Copyright 2015, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-#include "src/core/ext/client_config/subchannel_call_holder.h"
-
-#include <grpc/support/alloc.h>
-
-#include "src/core/lib/profiling/timers.h"
-
-#define GET_CALL(holder) \
- ((grpc_subchannel_call *)(gpr_atm_acq_load(&(holder)->subchannel_call)))
-
-#define CANCELLED_CALL ((grpc_subchannel_call *)1)
-
-static void subchannel_ready(grpc_exec_ctx *exec_ctx, void *holder,
- grpc_error *error);
-static void retry_ops(grpc_exec_ctx *exec_ctx, void *retry_ops_args,
- grpc_error *error);
-
-static void add_waiting_locked(grpc_subchannel_call_holder *holder,
- grpc_transport_stream_op *op);
-static void fail_locked(grpc_exec_ctx *exec_ctx,
- grpc_subchannel_call_holder *holder, grpc_error *error);
-static void retry_waiting_locked(grpc_exec_ctx *exec_ctx,
- grpc_subchannel_call_holder *holder);
-
-void grpc_subchannel_call_holder_init(
- grpc_subchannel_call_holder *holder,
- grpc_subchannel_call_holder_pick_subchannel pick_subchannel,
- void *pick_subchannel_arg, grpc_call_stack *owning_call) {
- gpr_atm_rel_store(&holder->subchannel_call, 0);
- holder->pick_subchannel = pick_subchannel;
- holder->pick_subchannel_arg = pick_subchannel_arg;
- gpr_mu_init(&holder->mu);
- holder->connected_subchannel = NULL;
- holder->waiting_ops = NULL;
- holder->waiting_ops_count = 0;
- holder->waiting_ops_capacity = 0;
- holder->creation_phase = GRPC_SUBCHANNEL_CALL_HOLDER_NOT_CREATING;
- holder->owning_call = owning_call;
- holder->pollent = NULL;
-}
-
-void grpc_subchannel_call_holder_destroy(grpc_exec_ctx *exec_ctx,
- grpc_subchannel_call_holder *holder) {
- grpc_subchannel_call *call = GET_CALL(holder);
- if (call != NULL && call != CANCELLED_CALL) {
- GRPC_SUBCHANNEL_CALL_UNREF(exec_ctx, call, "holder");
- }
- GPR_ASSERT(holder->creation_phase ==
- GRPC_SUBCHANNEL_CALL_HOLDER_NOT_CREATING);
- gpr_mu_destroy(&holder->mu);
- GPR_ASSERT(holder->waiting_ops_count == 0);
- gpr_free(holder->waiting_ops);
-}
-
-// The logic here is fairly complicated, due to (a) the fact that we
-// need to handle the case where we receive the send op before the
-// initial metadata op, and (b) the need for efficiency, especially in
-// the streaming case.
-// TODO(ctiller): Explain this more thoroughly.
-void grpc_subchannel_call_holder_perform_op(grpc_exec_ctx *exec_ctx,
- grpc_subchannel_call_holder *holder,
- grpc_transport_stream_op *op) {
- /* try to (atomically) get the call */
- grpc_subchannel_call *call = GET_CALL(holder);
- GPR_TIMER_BEGIN("grpc_subchannel_call_holder_perform_op", 0);
- if (call == CANCELLED_CALL) {
- grpc_transport_stream_op_finish_with_failure(exec_ctx, op,
- GRPC_ERROR_CANCELLED);
- GPR_TIMER_END("grpc_subchannel_call_holder_perform_op", 0);
- return;
- }
- if (call != NULL) {
- grpc_subchannel_call_process_op(exec_ctx, call, op);
- GPR_TIMER_END("grpc_subchannel_call_holder_perform_op", 0);
- return;
- }
- /* we failed; lock and figure out what to do */
- gpr_mu_lock(&holder->mu);
-retry:
- /* need to recheck that another thread hasn't set the call */
- call = GET_CALL(holder);
- if (call == CANCELLED_CALL) {
- gpr_mu_unlock(&holder->mu);
- grpc_transport_stream_op_finish_with_failure(exec_ctx, op,
- GRPC_ERROR_CANCELLED);
- GPR_TIMER_END("grpc_subchannel_call_holder_perform_op", 0);
- return;
- }
- if (call != NULL) {
- gpr_mu_unlock(&holder->mu);
- grpc_subchannel_call_process_op(exec_ctx, call, op);
- GPR_TIMER_END("grpc_subchannel_call_holder_perform_op", 0);
- return;
- }
- /* if this is a cancellation, then we can raise our cancelled flag */
- if (op->cancel_error != GRPC_ERROR_NONE) {
- if (!gpr_atm_rel_cas(&holder->subchannel_call, 0,
- (gpr_atm)(uintptr_t)CANCELLED_CALL)) {
- goto retry;
- } else {
- switch (holder->creation_phase) {
- case GRPC_SUBCHANNEL_CALL_HOLDER_NOT_CREATING:
- fail_locked(exec_ctx, holder, GRPC_ERROR_REF(op->cancel_error));
- break;
- case GRPC_SUBCHANNEL_CALL_HOLDER_PICKING_SUBCHANNEL:
- holder->pick_subchannel(exec_ctx, holder->pick_subchannel_arg, NULL,
- 0, &holder->connected_subchannel, NULL);
- break;
- }
- gpr_mu_unlock(&holder->mu);
- grpc_transport_stream_op_finish_with_failure(exec_ctx, op,
- GRPC_ERROR_CANCELLED);
- GPR_TIMER_END("grpc_subchannel_call_holder_perform_op", 0);
- return;
- }
- }
- /* if we don't have a subchannel, try to get one */
- if (holder->creation_phase == GRPC_SUBCHANNEL_CALL_HOLDER_NOT_CREATING &&
- holder->connected_subchannel == NULL &&
- op->send_initial_metadata != NULL) {
- holder->creation_phase = GRPC_SUBCHANNEL_CALL_HOLDER_PICKING_SUBCHANNEL;
- grpc_closure_init(&holder->next_step, subchannel_ready, holder);
- GRPC_CALL_STACK_REF(holder->owning_call, "pick_subchannel");
- if (holder->pick_subchannel(
- exec_ctx, holder->pick_subchannel_arg, op->send_initial_metadata,
- op->send_initial_metadata_flags, &holder->connected_subchannel,
- &holder->next_step)) {
- holder->creation_phase = GRPC_SUBCHANNEL_CALL_HOLDER_NOT_CREATING;
- GRPC_CALL_STACK_UNREF(exec_ctx, holder->owning_call, "pick_subchannel");
- }
- }
- /* if we've got a subchannel, then let's ask it to create a call */
- if (holder->creation_phase == GRPC_SUBCHANNEL_CALL_HOLDER_NOT_CREATING &&
- holder->connected_subchannel != NULL) {
- grpc_subchannel_call *subchannel_call = NULL;
- grpc_error *error = grpc_connected_subchannel_create_call(
- exec_ctx, holder->connected_subchannel, holder->pollent,
- &subchannel_call);
- if (error != GRPC_ERROR_NONE) {
- subchannel_call = CANCELLED_CALL;
- fail_locked(exec_ctx, holder, GRPC_ERROR_REF(error));
- grpc_transport_stream_op_finish_with_failure(exec_ctx, op, error);
- }
- gpr_atm_rel_store(&holder->subchannel_call,
- (gpr_atm)(uintptr_t)subchannel_call);
- retry_waiting_locked(exec_ctx, holder);
- goto retry;
- }
- /* nothing to be done but wait */
- add_waiting_locked(holder, op);
- gpr_mu_unlock(&holder->mu);
- GPR_TIMER_END("grpc_subchannel_call_holder_perform_op", 0);
-}
-
-static void subchannel_ready(grpc_exec_ctx *exec_ctx, void *arg,
- grpc_error *error) {
- grpc_subchannel_call_holder *holder = arg;
- gpr_mu_lock(&holder->mu);
- GPR_ASSERT(holder->creation_phase ==
- GRPC_SUBCHANNEL_CALL_HOLDER_PICKING_SUBCHANNEL);
- holder->creation_phase = GRPC_SUBCHANNEL_CALL_HOLDER_NOT_CREATING;
- if (holder->connected_subchannel == NULL) {
- gpr_atm_no_barrier_store(&holder->subchannel_call, 1);
- fail_locked(exec_ctx, holder,
- GRPC_ERROR_CREATE_REFERENCING("Failed to create subchannel",
- &error, 1));
- } else if (1 == gpr_atm_acq_load(&holder->subchannel_call)) {
- /* already cancelled before subchannel became ready */
- fail_locked(exec_ctx, holder,
- GRPC_ERROR_CREATE_REFERENCING(
- "Cancelled before creating subchannel", &error, 1));
- } else {
- grpc_subchannel_call *subchannel_call = NULL;
- grpc_error *new_error = grpc_connected_subchannel_create_call(
- exec_ctx, holder->connected_subchannel, holder->pollent,
- &subchannel_call);
- if (new_error != GRPC_ERROR_NONE) {
- new_error = grpc_error_add_child(new_error, error);
- subchannel_call = CANCELLED_CALL;
- fail_locked(exec_ctx, holder, new_error);
- }
- gpr_atm_rel_store(&holder->subchannel_call,
- (gpr_atm)(uintptr_t)subchannel_call);
- retry_waiting_locked(exec_ctx, holder);
- }
- gpr_mu_unlock(&holder->mu);
- GRPC_CALL_STACK_UNREF(exec_ctx, holder->owning_call, "pick_subchannel");
-}
-
-typedef struct {
- grpc_transport_stream_op *ops;
- size_t nops;
- grpc_subchannel_call *call;
-} retry_ops_args;
-
-static void retry_waiting_locked(grpc_exec_ctx *exec_ctx,
- grpc_subchannel_call_holder *holder) {
- retry_ops_args *a = gpr_malloc(sizeof(*a));
- a->ops = holder->waiting_ops;
- a->nops = holder->waiting_ops_count;
- a->call = GET_CALL(holder);
- if (a->call == CANCELLED_CALL) {
- gpr_free(a);
- fail_locked(exec_ctx, holder, GRPC_ERROR_CANCELLED);
- return;
- }
- holder->waiting_ops = NULL;
- holder->waiting_ops_count = 0;
- holder->waiting_ops_capacity = 0;
- GRPC_SUBCHANNEL_CALL_REF(a->call, "retry_ops");
- grpc_exec_ctx_sched(exec_ctx, grpc_closure_create(retry_ops, a),
- GRPC_ERROR_NONE, NULL);
-}
-
-static void retry_ops(grpc_exec_ctx *exec_ctx, void *args, grpc_error *error) {
- retry_ops_args *a = args;
- size_t i;
- for (i = 0; i < a->nops; i++) {
- grpc_subchannel_call_process_op(exec_ctx, a->call, &a->ops[i]);
- }
- GRPC_SUBCHANNEL_CALL_UNREF(exec_ctx, a->call, "retry_ops");
- gpr_free(a->ops);
- gpr_free(a);
-}
-
-static void add_waiting_locked(grpc_subchannel_call_holder *holder,
- grpc_transport_stream_op *op) {
- GPR_TIMER_BEGIN("add_waiting_locked", 0);
- if (holder->waiting_ops_count == holder->waiting_ops_capacity) {
- holder->waiting_ops_capacity = GPR_MAX(3, 2 * holder->waiting_ops_capacity);
- holder->waiting_ops =
- gpr_realloc(holder->waiting_ops, holder->waiting_ops_capacity *
- sizeof(*holder->waiting_ops));
- }
- holder->waiting_ops[holder->waiting_ops_count++] = *op;
- GPR_TIMER_END("add_waiting_locked", 0);
-}
-
-static void fail_locked(grpc_exec_ctx *exec_ctx,
- grpc_subchannel_call_holder *holder,
- grpc_error *error) {
- size_t i;
- for (i = 0; i < holder->waiting_ops_count; i++) {
- grpc_transport_stream_op_finish_with_failure(
- exec_ctx, &holder->waiting_ops[i], GRPC_ERROR_REF(error));
- }
- holder->waiting_ops_count = 0;
- GRPC_ERROR_UNREF(error);
-}
-
-char *grpc_subchannel_call_holder_get_peer(
- grpc_exec_ctx *exec_ctx, grpc_subchannel_call_holder *holder) {
- grpc_subchannel_call *subchannel_call = GET_CALL(holder);
-
- if (subchannel_call == NULL || subchannel_call == CANCELLED_CALL) {
- return NULL;
- } else {
- return grpc_subchannel_call_get_peer(exec_ctx, subchannel_call);
- }
-}
diff --git a/src/core/ext/client_config/subchannel_call_holder.h b/src/core/ext/client_config/subchannel_call_holder.h
deleted file mode 100644
index 8d2deb02f3..0000000000
--- a/src/core/ext/client_config/subchannel_call_holder.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- *
- * Copyright 2015, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-#ifndef GRPC_CORE_EXT_CLIENT_CONFIG_SUBCHANNEL_CALL_HOLDER_H
-#define GRPC_CORE_EXT_CLIENT_CONFIG_SUBCHANNEL_CALL_HOLDER_H
-
-#include "src/core/ext/client_config/subchannel.h"
-#include "src/core/lib/iomgr/polling_entity.h"
-
-/** Pick a subchannel for grpc_subchannel_call_holder;
- Return 1 if subchannel is available immediately (in which case on_ready
- should not be called), or 0 otherwise (in which case on_ready should be
- called when the subchannel is available) */
-typedef int (*grpc_subchannel_call_holder_pick_subchannel)(
- grpc_exec_ctx *exec_ctx, void *arg, grpc_metadata_batch *initial_metadata,
- uint32_t initial_metadata_flags,
- grpc_connected_subchannel **connected_subchannel, grpc_closure *on_ready);
-
-typedef enum {
- GRPC_SUBCHANNEL_CALL_HOLDER_NOT_CREATING,
- GRPC_SUBCHANNEL_CALL_HOLDER_PICKING_SUBCHANNEL
-} grpc_subchannel_call_holder_creation_phase;
-
-/** Wrapper for holding a pointer to grpc_subchannel_call, and the
- associated machinery to create such a pointer.
- Handles queueing of stream ops until a call object is ready, waiting
- for initial metadata before trying to create a call object,
- and handling cancellation gracefully.
-
- The channel filter uses this as their call_data. */
-typedef struct grpc_subchannel_call_holder {
- /** either 0 for no call, 1 for cancelled, or a pointer to a
- grpc_subchannel_call */
- gpr_atm subchannel_call;
- /** Helper function to choose the subchannel on which to create
- the call object. Channel filter delegates to the load
- balancing policy (once it's ready). */
- grpc_subchannel_call_holder_pick_subchannel pick_subchannel;
- void *pick_subchannel_arg;
-
- gpr_mu mu;
-
- grpc_subchannel_call_holder_creation_phase creation_phase;
- grpc_connected_subchannel *connected_subchannel;
- grpc_polling_entity *pollent;
-
- grpc_transport_stream_op *waiting_ops;
- size_t waiting_ops_count;
- size_t waiting_ops_capacity;
-
- grpc_closure next_step;
-
- grpc_call_stack *owning_call;
-} grpc_subchannel_call_holder;
-
-void grpc_subchannel_call_holder_init(
- grpc_subchannel_call_holder *holder,
- grpc_subchannel_call_holder_pick_subchannel pick_subchannel,
- void *pick_subchannel_arg, grpc_call_stack *owning_call);
-void grpc_subchannel_call_holder_destroy(grpc_exec_ctx *exec_ctx,
- grpc_subchannel_call_holder *holder);
-
-void grpc_subchannel_call_holder_perform_op(grpc_exec_ctx *exec_ctx,
- grpc_subchannel_call_holder *holder,
- grpc_transport_stream_op *op);
-char *grpc_subchannel_call_holder_get_peer(grpc_exec_ctx *exec_ctx,
- grpc_subchannel_call_holder *holder);
-
-#endif /* GRPC_CORE_EXT_CLIENT_CONFIG_SUBCHANNEL_CALL_HOLDER_H */
diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c
index af913d8a9d..cf32658333 100644
--- a/src/core/ext/lb_policy/grpclb/grpclb.c
+++ b/src/core/ext/lb_policy/grpclb/grpclb.c
@@ -76,9 +76,9 @@
* operations in progress over the old RR instance. This is done by
* decreasing the reference count on the old policy. The moment no more
* references are held on the old RR policy, it'll be destroyed and \a
- * rr_connectivity_changed notified with a \a GRPC_CHANNEL_SHUTDOWN state.
- * At this point we can transition to a new RR instance safely, which is done
- * once again via \a rr_handover().
+ * glb_rr_connectivity_changed notified with a \a GRPC_CHANNEL_SHUTDOWN
+ * state. At this point we can transition to a new RR instance safely, which
+ * is done once again via \a rr_handover().
*
*
* Once a RR policy instance is in place (and getting updated as described),
@@ -96,6 +96,8 @@
* - Implement LB service forwarding (point 2c. in the doc's diagram).
*/
+#include <errno.h>
+
#include <string.h>
#include <grpc/byte_buffer_reader.h>
@@ -109,18 +111,57 @@
#include "src/core/ext/client_config/parse_address.h"
#include "src/core/ext/lb_policy/grpclb/grpclb.h"
#include "src/core/ext/lb_policy/grpclb/load_balancer_api.h"
+#include "src/core/lib/iomgr/sockaddr.h"
#include "src/core/lib/iomgr/sockaddr_utils.h"
#include "src/core/lib/support/string.h"
#include "src/core/lib/surface/call.h"
#include "src/core/lib/surface/channel.h"
+#include "src/core/lib/transport/static_metadata.h"
int grpc_lb_glb_trace = 0;
+static void lb_addrs_destroy(grpc_lb_address *lb_addresses,
+ size_t num_addresses) {
+ /* free "resolved" addresses memblock */
+ gpr_free(lb_addresses->resolved_address);
+ for (size_t i = 0; i < num_addresses; ++i) {
+ if (lb_addresses[i].user_data != NULL) {
+ GRPC_MDELEM_UNREF(lb_addresses[i].user_data);
+ }
+ }
+ gpr_free(lb_addresses);
+}
+
+/* add lb_token of selected subchannel (address) to the call's initial
+ * metadata */
+static void initial_metadata_add_lb_token(
+ grpc_metadata_batch *initial_metadata,
+ grpc_linked_mdelem *lb_token_mdelem_storage, grpc_mdelem *lb_token) {
+ GPR_ASSERT(lb_token_mdelem_storage != NULL);
+ GPR_ASSERT(lb_token != NULL);
+ grpc_metadata_batch_add_tail(initial_metadata, lb_token_mdelem_storage,
+ lb_token);
+}
+
typedef struct wrapped_rr_closure_arg {
/* the original closure. Usually a on_complete/notify cb for pick() and ping()
* calls against the internal RR instance, respectively. */
grpc_closure *wrapped_closure;
+ /* the pick's initial metadata, kept in order to append the LB token for the
+ * pick */
+ grpc_metadata_batch *initial_metadata;
+
+ /* the picked target, used to determine which LB token to add to the pick's
+ * initial metadata */
+ grpc_connected_subchannel **target;
+
+ /* the LB token associated with the pick */
+ grpc_mdelem *lb_token;
+
+ /* storage for the lb token initial metadata mdelem */
+ grpc_linked_mdelem *lb_token_mdelem_storage;
+
/* The RR instance related to the closure */
grpc_lb_policy *rr_policy;
@@ -143,6 +184,11 @@ static void wrapped_rr_closure(grpc_exec_ctx *exec_ctx, void *arg,
GRPC_LB_POLICY_UNREF(exec_ctx, wc_arg->rr_policy, "wrapped_rr_closure");
}
GPR_ASSERT(wc_arg->wrapped_closure != NULL);
+
+ initial_metadata_add_lb_token(wc_arg->initial_metadata,
+ wc_arg->lb_token_mdelem_storage,
+ GRPC_MDELEM_REF(wc_arg->lb_token));
+
grpc_exec_ctx_sched(exec_ctx, wc_arg->wrapped_closure, error, NULL);
gpr_free(wc_arg->owning_pending_node);
}
@@ -164,6 +210,9 @@ typedef struct pending_pick {
/* the initial metadata for the pick. See grpc_lb_policy_pick() */
grpc_metadata_batch *initial_metadata;
+ /* storage for the lb token initial metadata mdelem */
+ grpc_linked_mdelem *lb_token_mdelem_storage;
+
/* bitmask passed to pick() and used for selective cancelling. See
* grpc_lb_policy_cancel_picks() */
uint32_t initial_metadata_flags;
@@ -180,20 +229,23 @@ typedef struct pending_pick {
wrapped_rr_closure_arg wrapped_on_complete_arg;
} pending_pick;
-static void add_pending_pick(pending_pick **root, grpc_polling_entity *pollent,
- grpc_metadata_batch *initial_metadata,
- uint32_t initial_metadata_flags,
+static void add_pending_pick(pending_pick **root,
+ const grpc_lb_policy_pick_args *pick_args,
grpc_connected_subchannel **target,
grpc_closure *on_complete) {
pending_pick *pp = gpr_malloc(sizeof(*pp));
memset(pp, 0, sizeof(pending_pick));
memset(&pp->wrapped_on_complete_arg, 0, sizeof(wrapped_rr_closure_arg));
pp->next = *root;
- pp->pollent = pollent;
+ pp->pollent = pick_args->pollent;
pp->target = target;
- pp->initial_metadata = initial_metadata;
- pp->initial_metadata_flags = initial_metadata_flags;
+ pp->initial_metadata = pick_args->initial_metadata;
+ pp->initial_metadata_flags = pick_args->initial_metadata_flags;
+ pp->lb_token_mdelem_storage = pick_args->lb_token_mdelem_storage;
pp->wrapped_on_complete_arg.wrapped_closure = on_complete;
+ pp->wrapped_on_complete_arg.initial_metadata = pick_args->initial_metadata;
+ pp->wrapped_on_complete_arg.lb_token_mdelem_storage =
+ pick_args->lb_token_mdelem_storage;
grpc_closure_init(&pp->wrapped_on_complete, wrapped_rr_closure,
&pp->wrapped_on_complete_arg);
*root = pp;
@@ -252,6 +304,12 @@ typedef struct glb_lb_policy {
* response has arrived. */
grpc_grpclb_serverlist *serverlist;
+ /** total number of valid addresses received in \a serverlist */
+ size_t num_ok_serverlist_addresses;
+
+ /** LB addresses from \a serverlist, \a num_ok_serverlist_addresses of them */
+ grpc_lb_address *lb_addresses;
+
/** list of picks that are waiting on RR's policy connectivity */
pending_pick *pending_picks;
@@ -279,58 +337,142 @@ struct rr_connectivity_data {
glb_lb_policy *glb_policy;
};
-static grpc_lb_policy *create_rr(grpc_exec_ctx *exec_ctx,
- const grpc_grpclb_serverlist *serverlist,
- glb_lb_policy *glb_policy) {
- /* TODO(dgq): support mixed ip version */
- GPR_ASSERT(serverlist != NULL && serverlist->num_servers > 0);
- char **host_ports = gpr_malloc(sizeof(char *) * serverlist->num_servers);
- for (size_t i = 0; i < serverlist->num_servers; ++i) {
- gpr_join_host_port(&host_ports[i], serverlist->servers[i]->ip_address,
- serverlist->servers[i]->port);
+static bool is_server_valid(const grpc_grpclb_server *server, size_t idx,
+ bool log) {
+ const grpc_grpclb_ip_address *ip = &server->ip_address;
+ if (server->port >> 16 != 0) {
+ if (log) {
+ gpr_log(GPR_ERROR,
+ "Invalid port '%d' at index %zu of serverlist. Ignoring.",
+ server->port, idx);
+ }
+ return false;
}
- size_t uri_path_len;
- char *concat_ipports = gpr_strjoin_sep(
- (const char **)host_ports, serverlist->num_servers, ",", &uri_path_len);
+ if (ip->size != 4 && ip->size != 16) {
+ if (log) {
+ gpr_log(GPR_ERROR,
+ "Expected IP to be 4 or 16 bytes, got %d at index %zu of "
+ "serverlist. Ignoring",
+ ip->size, idx);
+ }
+ return false;
+ }
+ return true;
+}
- grpc_lb_policy_args args;
- args.client_channel_factory = glb_policy->cc_factory;
- args.addresses = gpr_malloc(sizeof(grpc_resolved_addresses));
- args.addresses->naddrs = serverlist->num_servers;
- args.addresses->addrs =
- gpr_malloc(sizeof(grpc_resolved_address) * args.addresses->naddrs);
- size_t out_addrs_idx = 0;
+/* populate \a addresses according to \a serverlist. Returns the number of
+ * addresses successfully parsed and added to \a addresses */
+static size_t process_serverlist(const grpc_grpclb_serverlist *serverlist,
+ grpc_lb_address **lb_addresses) {
+ size_t num_valid = 0;
+ /* first pass: count how many are valid in order to allocate the necessary
+ * memory in a single block */
for (size_t i = 0; i < serverlist->num_servers; ++i) {
- grpc_uri uri;
- struct sockaddr_storage sa;
- size_t sa_len;
- uri.path = host_ports[i];
- if (parse_ipv4(&uri, &sa, &sa_len)) { /* TODO(dgq): add support for ipv6 */
- memcpy(args.addresses->addrs[out_addrs_idx].addr, &sa, sa_len);
- args.addresses->addrs[out_addrs_idx].len = sa_len;
- ++out_addrs_idx;
+ if (is_server_valid(serverlist->servers[i], i, true)) ++num_valid;
+ }
+ if (num_valid == 0) {
+ return 0;
+ }
+
+ /* allocate the memory block for the "resolved" addresses. */
+ grpc_resolved_address *r_addrs_memblock =
+ gpr_malloc(sizeof(grpc_resolved_address) * num_valid);
+ memset(r_addrs_memblock, 0, sizeof(grpc_resolved_address) * num_valid);
+ grpc_lb_address *lb_addrs = gpr_malloc(sizeof(grpc_lb_address) * num_valid);
+ memset(lb_addrs, 0, sizeof(grpc_lb_address) * num_valid);
+
+ /* second pass: actually populate the addresses and LB tokens (aka user data
+ * to the outside world) to be read by the RR policy during its creation.
+ * Given that the validity tests are very cheap, they are performed again
+ * instead of marking the valid ones during the first pass, as this would
+ * incurr in an allocation due to the arbitrary number of server */
+ size_t addr_idx = 0;
+ for (size_t sl_idx = 0; sl_idx < serverlist->num_servers; ++sl_idx) {
+ GPR_ASSERT(addr_idx < num_valid);
+ const grpc_grpclb_server *server = serverlist->servers[sl_idx];
+ if (!is_server_valid(serverlist->servers[sl_idx], sl_idx, false)) continue;
+ grpc_lb_address *const lb_addr = &lb_addrs[addr_idx];
+
+ /* address processing */
+ const uint16_t netorder_port = htons((uint16_t)server->port);
+ /* the addresses are given in binary format (a in(6)_addr struct) in
+ * server->ip_address.bytes. */
+ const grpc_grpclb_ip_address *ip = &server->ip_address;
+
+ lb_addr->resolved_address = &r_addrs_memblock[addr_idx];
+ struct sockaddr_storage *sa =
+ (struct sockaddr_storage *)lb_addr->resolved_address->addr;
+ size_t *sa_len = &lb_addr->resolved_address->len;
+ *sa_len = 0;
+ if (ip->size == 4) {
+ struct sockaddr_in *addr4 = (struct sockaddr_in *)sa;
+ *sa_len = sizeof(struct sockaddr_in);
+ memset(addr4, 0, *sa_len);
+ addr4->sin_family = AF_INET;
+ memcpy(&addr4->sin_addr, ip->bytes, ip->size);
+ addr4->sin_port = netorder_port;
+ } else if (ip->size == 16) {
+ struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *)sa;
+ *sa_len = sizeof(struct sockaddr_in6);
+ memset(addr6, 0, *sa_len);
+ addr6->sin6_family = AF_INET;
+ memcpy(&addr6->sin6_addr, ip->bytes, ip->size);
+ addr6->sin6_port = netorder_port;
+ }
+ GPR_ASSERT(*sa_len > 0);
+
+ /* lb token processing */
+ if (server->has_load_balance_token) {
+ const size_t lb_token_size =
+ GPR_ARRAY_SIZE(server->load_balance_token) - 1;
+ grpc_mdstr *lb_token_mdstr = grpc_mdstr_from_buffer(
+ (uint8_t *)server->load_balance_token, lb_token_size);
+ lb_addr->user_data = grpc_mdelem_from_metadata_strings(
+ GRPC_MDSTR_LOAD_REPORTING_INITIAL, lb_token_mdstr);
} else {
- gpr_log(GPR_ERROR, "Invalid LB service address '%s', ignoring.",
- host_ports[i]);
+ gpr_log(GPR_ERROR,
+ "Missing LB token for backend address '%s'. The empty token will "
+ "be used instead",
+ grpc_sockaddr_to_uri((struct sockaddr *)sa));
+ lb_addr->user_data = GRPC_MDELEM_LOAD_REPORTING_INITIAL_EMPTY;
}
+ ++addr_idx;
}
+ GPR_ASSERT(addr_idx == num_valid);
+ *lb_addresses = lb_addrs;
+ return num_valid;
+}
+
+static grpc_lb_policy *create_rr(grpc_exec_ctx *exec_ctx,
+ const grpc_grpclb_serverlist *serverlist,
+ glb_lb_policy *glb_policy) {
+ GPR_ASSERT(serverlist != NULL && serverlist->num_servers > 0);
+
+ grpc_lb_policy_args args;
+ memset(&args, 0, sizeof(args));
+ args.client_channel_factory = glb_policy->cc_factory;
+ const size_t num_ok_addresses =
+ process_serverlist(serverlist, &args.addresses);
+ args.num_addresses = num_ok_addresses;
grpc_lb_policy *rr = grpc_lb_policy_create(exec_ctx, "round_robin", &args);
- gpr_free(concat_ipports);
- for (size_t i = 0; i < serverlist->num_servers; i++) {
- gpr_free(host_ports[i]);
+ if (glb_policy->lb_addresses != NULL) {
+ /* dispose of the previous version */
+ lb_addrs_destroy(glb_policy->lb_addresses,
+ glb_policy->num_ok_serverlist_addresses);
}
- gpr_free(host_ports);
- gpr_free(args.addresses->addrs);
- gpr_free(args.addresses);
+ glb_policy->num_ok_serverlist_addresses = num_ok_addresses;
+ glb_policy->lb_addresses = args.addresses;
+
return rr;
}
static void rr_handover(grpc_exec_ctx *exec_ctx, glb_lb_policy *glb_policy,
grpc_error *error) {
- GRPC_ERROR_REF(error);
+ GPR_ASSERT(glb_policy->serverlist != NULL &&
+ glb_policy->serverlist->num_servers > 0);
glb_policy->rr_policy =
create_rr(exec_ctx, glb_policy->serverlist, glb_policy);
@@ -345,8 +487,8 @@ static void rr_handover(grpc_exec_ctx *exec_ctx, glb_lb_policy *glb_policy,
exec_ctx, glb_policy->rr_policy, &glb_policy->rr_connectivity->state,
&glb_policy->rr_connectivity->on_change);
grpc_connectivity_state_set(exec_ctx, &glb_policy->state_tracker,
- glb_policy->rr_connectivity->state, error,
- "rr_handover");
+ glb_policy->rr_connectivity->state,
+ GRPC_ERROR_REF(error), "rr_handover");
grpc_lb_policy_exit_idle(exec_ctx, glb_policy->rr_policy);
/* flush pending ops */
@@ -359,9 +501,12 @@ static void rr_handover(grpc_exec_ctx *exec_ctx, glb_lb_policy *glb_policy,
gpr_log(GPR_INFO, "Pending pick about to PICK from 0x%" PRIxPTR "",
(intptr_t)glb_policy->rr_policy);
}
- grpc_lb_policy_pick(exec_ctx, glb_policy->rr_policy, pp->pollent,
- pp->initial_metadata, pp->initial_metadata_flags,
- pp->target, &pp->wrapped_on_complete);
+ const grpc_lb_policy_pick_args pick_args = {
+ pp->pollent, pp->initial_metadata, pp->initial_metadata_flags,
+ pp->lb_token_mdelem_storage};
+ grpc_lb_policy_pick(exec_ctx, glb_policy->rr_policy, &pick_args, pp->target,
+ (void **)&pp->wrapped_on_complete_arg.lb_token,
+ &pp->wrapped_on_complete);
pp->wrapped_on_complete_arg.owning_pending_node = pp;
}
@@ -378,13 +523,13 @@ static void rr_handover(grpc_exec_ctx *exec_ctx, glb_lb_policy *glb_policy,
&pping->wrapped_notify);
pping->wrapped_notify_arg.owning_pending_node = pping;
}
- GRPC_ERROR_UNREF(error);
}
-static void rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg,
- grpc_error *error) {
+static void glb_rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg,
+ grpc_error *error) {
rr_connectivity_data *rr_conn_data = arg;
glb_lb_policy *glb_policy = rr_conn_data->glb_policy;
+
if (rr_conn_data->state == GRPC_CHANNEL_SHUTDOWN) {
if (glb_policy->serverlist != NULL) {
/* a RR policy is shutting down but there's a serverlist available ->
@@ -398,8 +543,8 @@ static void rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg,
if (error == GRPC_ERROR_NONE) {
/* RR not shutting down. Mimic the RR's policy state */
grpc_connectivity_state_set(exec_ctx, &glb_policy->state_tracker,
- rr_conn_data->state, error,
- "rr_connectivity_changed");
+ rr_conn_data->state, GRPC_ERROR_REF(error),
+ "glb_rr_connectivity_changed");
/* resubscribe */
grpc_lb_policy_notify_on_state_change(exec_ctx, glb_policy->rr_policy,
&rr_conn_data->state,
@@ -408,7 +553,6 @@ static void rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg,
gpr_free(rr_conn_data);
}
}
- GRPC_ERROR_UNREF(error);
}
static grpc_lb_policy *glb_create(grpc_exec_ctx *exec_ctx,
@@ -418,31 +562,43 @@ static grpc_lb_policy *glb_create(grpc_exec_ctx *exec_ctx,
memset(glb_policy, 0, sizeof(*glb_policy));
/* All input addresses in args->addresses come from a resolver that claims
- * they are LB services. It's the resolver's responsibility to make sure this
+ * they are LB services. It's the resolver's responsibility to make sure
+ * this
* policy is only instantiated and used in that case.
*
* Create a client channel over them to communicate with a LB service */
glb_policy->cc_factory = args->client_channel_factory;
GPR_ASSERT(glb_policy->cc_factory != NULL);
- if (args->addresses->naddrs == 0) {
+ if (args->num_addresses == 0) {
return NULL;
}
- /* construct a target from the args->addresses, in the form
+ if (args->addresses[0].user_data != NULL) {
+ gpr_log(GPR_ERROR,
+ "This LB policy doesn't support user data. It will be ignored");
+ }
+
+ /* construct a target from the addresses in args, given in the form
* ipvX://ip1:port1,ip2:port2,...
* TODO(dgq): support mixed ip version */
- char **addr_strs = gpr_malloc(sizeof(char *) * args->addresses->naddrs);
- addr_strs[0] =
- grpc_sockaddr_to_uri((const struct sockaddr *)&args->addresses->addrs[0]);
- for (size_t i = 1; i < args->addresses->naddrs; i++) {
- GPR_ASSERT(grpc_sockaddr_to_string(
- &addr_strs[i],
- (const struct sockaddr *)&args->addresses->addrs[i],
- true) == 0);
+ char **addr_strs = gpr_malloc(sizeof(char *) * args->num_addresses);
+ addr_strs[0] = grpc_sockaddr_to_uri(
+ (const struct sockaddr *)&args->addresses[0].resolved_address->addr);
+ for (size_t i = 1; i < args->num_addresses; i++) {
+ if (args->addresses[i].user_data != NULL) {
+ gpr_log(GPR_ERROR,
+ "This LB policy doesn't support user data. It will be ignored");
+ }
+
+ GPR_ASSERT(
+ grpc_sockaddr_to_string(
+ &addr_strs[i],
+ (const struct sockaddr *)&args->addresses[i].resolved_address->addr,
+ true) == 0);
}
size_t uri_path_len;
char *target_uri_str = gpr_strjoin_sep(
- (const char **)addr_strs, args->addresses->naddrs, ",", &uri_path_len);
+ (const char **)addr_strs, args->num_addresses, ",", &uri_path_len);
/* will pick using pick_first */
glb_policy->lb_channel = grpc_client_channel_factory_create_channel(
@@ -450,7 +606,7 @@ static grpc_lb_policy *glb_create(grpc_exec_ctx *exec_ctx,
GRPC_CLIENT_CHANNEL_TYPE_LOAD_BALANCING, NULL);
gpr_free(target_uri_str);
- for (size_t i = 0; i < args->addresses->naddrs; i++) {
+ for (size_t i = 0; i < args->num_addresses; i++) {
gpr_free(addr_strs[i]);
}
gpr_free(addr_strs);
@@ -463,7 +619,7 @@ static grpc_lb_policy *glb_create(grpc_exec_ctx *exec_ctx,
rr_connectivity_data *rr_connectivity =
gpr_malloc(sizeof(rr_connectivity_data));
memset(rr_connectivity, 0, sizeof(rr_connectivity_data));
- grpc_closure_init(&rr_connectivity->on_change, rr_connectivity_changed,
+ grpc_closure_init(&rr_connectivity->on_change, glb_rr_connectivity_changed,
rr_connectivity);
rr_connectivity->glb_policy = glb_policy;
glb_policy->rr_connectivity = rr_connectivity;
@@ -486,6 +642,9 @@ static void glb_destroy(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) {
grpc_grpclb_destroy_serverlist(glb_policy->serverlist);
}
gpr_mu_destroy(&glb_policy->mu);
+
+ lb_addrs_destroy(glb_policy->lb_addresses,
+ glb_policy->num_ok_serverlist_addresses);
gpr_free(glb_policy);
}
@@ -546,7 +705,6 @@ static void glb_cancel_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
*target = NULL;
grpc_exec_ctx_sched(exec_ctx, &pp->wrapped_on_complete,
GRPC_ERROR_CANCELLED, NULL);
- gpr_free(pp);
} else {
pp->next = glb_policy->pending_picks;
glb_policy->pending_picks = pp;
@@ -576,7 +734,6 @@ static void glb_cancel_picks(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
exec_ctx, pp->pollent, glb_policy->base.interested_parties);
grpc_exec_ctx_sched(exec_ctx, &pp->wrapped_on_complete,
GRPC_ERROR_CANCELLED, NULL);
- gpr_free(pp);
} else {
pp->next = glb_policy->pending_picks;
glb_policy->pending_picks = pp;
@@ -603,12 +760,21 @@ static void glb_exit_idle(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) {
}
static int glb_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
- grpc_polling_entity *pollent,
- grpc_metadata_batch *initial_metadata,
- uint32_t initial_metadata_flags,
- grpc_connected_subchannel **target,
+ const grpc_lb_policy_pick_args *pick_args,
+ grpc_connected_subchannel **target, void **user_data,
grpc_closure *on_complete) {
glb_lb_policy *glb_policy = (glb_lb_policy *)pol;
+
+ if (pick_args->lb_token_mdelem_storage == NULL) {
+ *target = NULL;
+ grpc_exec_ctx_sched(
+ exec_ctx, on_complete,
+ GRPC_ERROR_CREATE("No mdelem storage for the LB token. Load reporting "
+ "won't work without it. Failing"),
+ NULL);
+ return 1;
+ }
+
gpr_mu_lock(&glb_policy->mu);
int r;
@@ -621,28 +787,34 @@ static int glb_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
memset(&glb_policy->wc_arg, 0, sizeof(wrapped_rr_closure_arg));
glb_policy->wc_arg.rr_policy = glb_policy->rr_policy;
glb_policy->wc_arg.wrapped_closure = on_complete;
+ glb_policy->wc_arg.lb_token_mdelem_storage =
+ pick_args->lb_token_mdelem_storage;
+ glb_policy->wc_arg.initial_metadata = pick_args->initial_metadata;
+ glb_policy->wc_arg.owning_pending_node = NULL;
grpc_closure_init(&glb_policy->wrapped_on_complete, wrapped_rr_closure,
&glb_policy->wc_arg);
- r = grpc_lb_policy_pick(exec_ctx, glb_policy->rr_policy, pollent,
- initial_metadata, initial_metadata_flags, target,
+
+ r = grpc_lb_policy_pick(exec_ctx, glb_policy->rr_policy, pick_args, target,
+ (void **)&glb_policy->wc_arg.lb_token,
&glb_policy->wrapped_on_complete);
if (r != 0) {
- /* the call to grpc_lb_policy_pick has been sychronous. Unreffing the RR
- * policy and notify the original callback */
- glb_policy->wc_arg.wrapped_closure = NULL;
+ /* synchronous grpc_lb_policy_pick call. Unref the RR policy. */
if (grpc_lb_glb_trace) {
gpr_log(GPR_INFO, "Unreffing RR (0x%" PRIxPTR ")",
(intptr_t)glb_policy->wc_arg.rr_policy);
}
GRPC_LB_POLICY_UNREF(exec_ctx, glb_policy->wc_arg.rr_policy, "glb_pick");
- grpc_exec_ctx_sched(exec_ctx, glb_policy->wc_arg.wrapped_closure,
- GRPC_ERROR_NONE, NULL);
+
+ /* add the load reporting initial metadata */
+ initial_metadata_add_lb_token(
+ pick_args->initial_metadata, pick_args->lb_token_mdelem_storage,
+ GRPC_MDELEM_REF(glb_policy->wc_arg.lb_token));
}
} else {
- grpc_polling_entity_add_to_pollset_set(exec_ctx, pollent,
+ grpc_polling_entity_add_to_pollset_set(exec_ctx, pick_args->pollent,
glb_policy->base.interested_parties);
- add_pending_pick(&glb_policy->pending_picks, pollent, initial_metadata,
- initial_metadata_flags, target, on_complete);
+ add_pending_pick(&glb_policy->pending_picks, pick_args, target,
+ on_complete);
if (!glb_policy->started_picking) {
start_picking(exec_ctx, glb_policy);
@@ -702,9 +874,6 @@ typedef struct lb_client_data {
/* called once initial metadata's been sent */
grpc_closure md_sent;
- /* called once initial metadata's been received */
- grpc_closure md_rcvd;
-
/* called once the LoadBalanceRequest has been sent to the LB server. See
* src/proto/grpc/.../load_balancer.proto */
grpc_closure req_sent;
@@ -741,7 +910,6 @@ typedef struct lb_client_data {
} lb_client_data;
static void md_sent_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error);
-static void md_recv_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error);
static void req_sent_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error);
static void res_recv_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error);
static void close_sent_cb(grpc_exec_ctx *exec_ctx, void *arg,
@@ -756,7 +924,6 @@ static lb_client_data *lb_client_data_create(glb_lb_policy *glb_policy) {
gpr_mu_init(&lb_client->mu);
grpc_closure_init(&lb_client->md_sent, md_sent_cb, lb_client);
- grpc_closure_init(&lb_client->md_rcvd, md_recv_cb, lb_client);
grpc_closure_init(&lb_client->req_sent, req_sent_cb, lb_client);
grpc_closure_init(&lb_client->res_rcvd, res_recv_cb, lb_client);
grpc_closure_init(&lb_client->close_sent, close_sent_cb, lb_client);
@@ -855,23 +1022,6 @@ static void md_sent_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) {
grpc_op ops[1];
memset(ops, 0, sizeof(ops));
grpc_op *op = ops;
- op->op = GRPC_OP_RECV_INITIAL_METADATA;
- op->data.recv_initial_metadata = &lb_client->initial_metadata_recv;
- op->flags = 0;
- op->reserved = NULL;
- op++;
- grpc_call_error call_error = grpc_call_start_batch_and_execute(
- exec_ctx, lb_client->lb_call, ops, (size_t)(op - ops),
- &lb_client->md_rcvd);
- GPR_ASSERT(GRPC_CALL_OK == call_error);
-}
-
-static void md_recv_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) {
- lb_client_data *lb_client = arg;
- GPR_ASSERT(lb_client->lb_call);
- grpc_op ops[1];
- memset(ops, 0, sizeof(ops));
- grpc_op *op = ops;
op->op = GRPC_OP_SEND_MESSAGE;
op->data.send_message = lb_client->request_payload;
@@ -886,11 +1036,18 @@ static void md_recv_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) {
static void req_sent_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) {
lb_client_data *lb_client = arg;
+ GPR_ASSERT(lb_client->lb_call);
- grpc_op ops[1];
+ grpc_op ops[2];
memset(ops, 0, sizeof(ops));
grpc_op *op = ops;
+ op->op = GRPC_OP_RECV_INITIAL_METADATA;
+ op->data.recv_initial_metadata = &lb_client->initial_metadata_recv;
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+
op->op = GRPC_OP_RECV_MESSAGE;
op->data.recv_message = &lb_client->response_payload;
op->flags = 0;
@@ -909,8 +1066,7 @@ static void res_recv_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) {
grpc_op *op = ops;
if (lb_client->response_payload != NULL) {
/* Received data from the LB server. Look inside
- * lb_client->response_payload, for
- * a serverlist. */
+ * lb_client->response_payload, for a serverlist. */
grpc_byte_buffer_reader bbr;
grpc_byte_buffer_reader_init(&bbr, lb_client->response_payload);
gpr_slice response_slice = grpc_byte_buffer_reader_readall(&bbr);
@@ -947,7 +1103,7 @@ static void res_recv_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) {
} else {
/* unref the RR policy, eventually leading to its substitution with a
* new one constructed from the received serverlist (see
- * rr_connectivity_changed) */
+ * glb_rr_connectivity_changed) */
GRPC_LB_POLICY_UNREF(exec_ctx, lb_client->glb_policy->rr_policy,
"serverlist_received");
}
@@ -1010,8 +1166,8 @@ static void srv_status_rcvd_cb(grpc_exec_ctx *exec_ctx, void *arg,
lb_client->status, lb_client->status_details,
lb_client->status_details_capacity);
}
- /* TODO(dgq): deal with stream termination properly (fire up another one? fail
- * the original call?) */
+ /* TODO(dgq): deal with stream termination properly (fire up another one?
+ * fail the original call?) */
}
/* Code wiring the policy with the rest of the core */
diff --git a/src/core/ext/lb_policy/grpclb/load_balancer_api.c b/src/core/ext/lb_policy/grpclb/load_balancer_api.c
index f4720a1345..a8881004a0 100644
--- a/src/core/ext/lb_policy/grpclb/load_balancer_api.c
+++ b/src/core/ext/lb_policy/grpclb/load_balancer_api.c
@@ -57,6 +57,7 @@ static bool decode_serverlist(pb_istream_t *stream, const pb_field_t *field,
if (dec_arg->first_pass) { /* count how many server do we have */
grpc_grpclb_server server;
if (!pb_decode(stream, grpc_lb_v1_Server_fields, &server)) {
+ gpr_log(GPR_ERROR, "nanopb error: %s", PB_GET_ERROR(stream));
return false;
}
dec_arg->num_servers++;
@@ -69,6 +70,7 @@ static bool decode_serverlist(pb_istream_t *stream, const pb_field_t *field,
gpr_malloc(sizeof(grpc_grpclb_server *) * dec_arg->num_servers);
}
if (!pb_decode(stream, grpc_lb_v1_Server_fields, server)) {
+ gpr_log(GPR_ERROR, "nanopb error: %s", PB_GET_ERROR(stream));
return false;
}
dec_arg->servers[dec_arg->decoding_idx++] = server;
@@ -118,6 +120,7 @@ grpc_grpclb_initial_response *grpc_grpclb_initial_response_parse(
grpc_grpclb_response res;
memset(&res, 0, sizeof(grpc_grpclb_response));
if (!pb_decode(&stream, grpc_lb_v1_LoadBalanceResponse_fields, &res)) {
+ gpr_log(GPR_ERROR, "nanopb error: %s", PB_GET_ERROR(&stream));
return NULL;
}
grpc_grpclb_initial_response *initial_res =
@@ -145,6 +148,7 @@ grpc_grpclb_serverlist *grpc_grpclb_response_parse_serverlist(
arg.first_pass = true;
status = pb_decode(&stream, grpc_lb_v1_LoadBalanceResponse_fields, &res);
if (!status) {
+ gpr_log(GPR_ERROR, "nanopb error: %s", PB_GET_ERROR(&stream));
return NULL;
}
@@ -152,6 +156,7 @@ grpc_grpclb_serverlist *grpc_grpclb_response_parse_serverlist(
status =
pb_decode(&stream_at_start, grpc_lb_v1_LoadBalanceResponse_fields, &res);
if (!status) {
+ gpr_log(GPR_ERROR, "nanopb error: %s", PB_GET_ERROR(&stream));
return NULL;
}
diff --git a/src/core/ext/lb_policy/grpclb/load_balancer_api.h b/src/core/ext/lb_policy/grpclb/load_balancer_api.h
index 9726c87a37..c1e73d08ef 100644
--- a/src/core/ext/lb_policy/grpclb/load_balancer_api.h
+++ b/src/core/ext/lb_policy/grpclb/load_balancer_api.h
@@ -45,6 +45,7 @@ extern "C" {
#define GRPC_GRPCLB_SERVICE_NAME_MAX_LENGTH 128
+typedef grpc_lb_v1_Server_ip_address_t grpc_grpclb_ip_address;
typedef grpc_lb_v1_LoadBalanceRequest grpc_grpclb_request;
typedef grpc_lb_v1_InitialLoadBalanceResponse grpc_grpclb_initial_response;
typedef grpc_lb_v1_Server grpc_grpclb_server;
diff --git a/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c b/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c
index 52e11c40bb..2676714175 100644
--- a/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c
+++ b/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c
@@ -31,10 +31,11 @@
*
*/
/* Automatically generated nanopb constant definitions */
-/* Generated by nanopb-0.3.5-dev */
+/* Generated by nanopb-0.3.7-dev */
#include "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h"
+/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
@@ -72,7 +73,7 @@ const pb_field_t grpc_lb_v1_LoadBalanceResponse_fields[3] = {
};
const pb_field_t grpc_lb_v1_InitialLoadBalanceResponse_fields[3] = {
- PB_FIELD( 2, STRING , OPTIONAL, STATIC , FIRST, grpc_lb_v1_InitialLoadBalanceResponse, load_balancer_delegate, load_balancer_delegate, 0),
+ PB_FIELD( 1, STRING , OPTIONAL, STATIC , FIRST, grpc_lb_v1_InitialLoadBalanceResponse, load_balancer_delegate, load_balancer_delegate, 0),
PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, grpc_lb_v1_InitialLoadBalanceResponse, client_stats_report_interval, load_balancer_delegate, &grpc_lb_v1_Duration_fields),
PB_LAST_FIELD
};
@@ -84,7 +85,7 @@ const pb_field_t grpc_lb_v1_ServerList_fields[3] = {
};
const pb_field_t grpc_lb_v1_Server_fields[5] = {
- PB_FIELD( 1, STRING , OPTIONAL, STATIC , FIRST, grpc_lb_v1_Server, ip_address, ip_address, 0),
+ PB_FIELD( 1, BYTES , OPTIONAL, STATIC , FIRST, grpc_lb_v1_Server, ip_address, ip_address, 0),
PB_FIELD( 2, INT32 , OPTIONAL, STATIC , OTHER, grpc_lb_v1_Server, port, ip_address, 0),
PB_FIELD( 3, STRING , OPTIONAL, STATIC , OTHER, grpc_lb_v1_Server, load_balance_token, port, 0),
PB_FIELD( 4, BOOL , OPTIONAL, STATIC , OTHER, grpc_lb_v1_Server, drop_request, load_balance_token, 0),
@@ -116,3 +117,4 @@ PB_STATIC_ASSERT((pb_membersize(grpc_lb_v1_LoadBalanceRequest, initial_request)
#endif
+/* @@protoc_insertion_point(eof) */
diff --git a/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h b/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h
index 46fe588f72..4f1031ec7b 100644
--- a/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h
+++ b/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h
@@ -31,11 +31,12 @@
*
*/
/* Automatically generated nanopb header */
-/* Generated by nanopb-0.3.5-dev */
+/* Generated by nanopb-0.3.7-dev */
-#ifndef GRPC_CORE_EXT_LB_POLICY_GRPCLB_PROTO_GRPC_LB_V1_LOAD_BALANCER_PB_H
-#define GRPC_CORE_EXT_LB_POLICY_GRPCLB_PROTO_GRPC_LB_V1_LOAD_BALANCER_PB_H
+#ifndef PB_GRPC_LB_V1_LOAD_BALANCER_PB_H_INCLUDED
+#define PB_GRPC_LB_V1_LOAD_BALANCER_PB_H_INCLUDED
#include "third_party/nanopb/pb.h"
+/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
@@ -52,6 +53,7 @@ typedef struct _grpc_lb_v1_ClientStats {
int64_t client_rpc_errors;
bool has_dropped_requests;
int64_t dropped_requests;
+/* @@protoc_insertion_point(struct:grpc_lb_v1_ClientStats) */
} grpc_lb_v1_ClientStats;
typedef struct _grpc_lb_v1_Duration {
@@ -59,22 +61,26 @@ typedef struct _grpc_lb_v1_Duration {
int64_t seconds;
bool has_nanos;
int32_t nanos;
+/* @@protoc_insertion_point(struct:grpc_lb_v1_Duration) */
} grpc_lb_v1_Duration;
typedef struct _grpc_lb_v1_InitialLoadBalanceRequest {
bool has_name;
char name[128];
+/* @@protoc_insertion_point(struct:grpc_lb_v1_InitialLoadBalanceRequest) */
} grpc_lb_v1_InitialLoadBalanceRequest;
+typedef PB_BYTES_ARRAY_T(16) grpc_lb_v1_Server_ip_address_t;
typedef struct _grpc_lb_v1_Server {
bool has_ip_address;
- char ip_address[46];
+ grpc_lb_v1_Server_ip_address_t ip_address;
bool has_port;
int32_t port;
bool has_load_balance_token;
- char load_balance_token[64];
+ char load_balance_token[65];
bool has_drop_request;
bool drop_request;
+/* @@protoc_insertion_point(struct:grpc_lb_v1_Server) */
} grpc_lb_v1_Server;
typedef struct _grpc_lb_v1_InitialLoadBalanceResponse {
@@ -82,6 +88,7 @@ typedef struct _grpc_lb_v1_InitialLoadBalanceResponse {
char load_balancer_delegate[64];
bool has_client_stats_report_interval;
grpc_lb_v1_Duration client_stats_report_interval;
+/* @@protoc_insertion_point(struct:grpc_lb_v1_InitialLoadBalanceResponse) */
} grpc_lb_v1_InitialLoadBalanceResponse;
typedef struct _grpc_lb_v1_LoadBalanceRequest {
@@ -89,12 +96,14 @@ typedef struct _grpc_lb_v1_LoadBalanceRequest {
grpc_lb_v1_InitialLoadBalanceRequest initial_request;
bool has_client_stats;
grpc_lb_v1_ClientStats client_stats;
+/* @@protoc_insertion_point(struct:grpc_lb_v1_LoadBalanceRequest) */
} grpc_lb_v1_LoadBalanceRequest;
typedef struct _grpc_lb_v1_ServerList {
pb_callback_t servers;
bool has_expiration_interval;
grpc_lb_v1_Duration expiration_interval;
+/* @@protoc_insertion_point(struct:grpc_lb_v1_ServerList) */
} grpc_lb_v1_ServerList;
typedef struct _grpc_lb_v1_LoadBalanceResponse {
@@ -102,6 +111,7 @@ typedef struct _grpc_lb_v1_LoadBalanceResponse {
grpc_lb_v1_InitialLoadBalanceResponse initial_response;
bool has_server_list;
grpc_lb_v1_ServerList server_list;
+/* @@protoc_insertion_point(struct:grpc_lb_v1_LoadBalanceResponse) */
} grpc_lb_v1_LoadBalanceResponse;
/* Default values for struct fields */
@@ -114,7 +124,7 @@ typedef struct _grpc_lb_v1_LoadBalanceResponse {
#define grpc_lb_v1_LoadBalanceResponse_init_default {false, grpc_lb_v1_InitialLoadBalanceResponse_init_default, false, grpc_lb_v1_ServerList_init_default}
#define grpc_lb_v1_InitialLoadBalanceResponse_init_default {false, "", false, grpc_lb_v1_Duration_init_default}
#define grpc_lb_v1_ServerList_init_default {{{NULL}, NULL}, false, grpc_lb_v1_Duration_init_default}
-#define grpc_lb_v1_Server_init_default {false, "", false, 0, false, "", false, 0}
+#define grpc_lb_v1_Server_init_default {false, {0, {0}}, false, 0, false, "", false, 0}
#define grpc_lb_v1_Duration_init_zero {false, 0, false, 0}
#define grpc_lb_v1_LoadBalanceRequest_init_zero {false, grpc_lb_v1_InitialLoadBalanceRequest_init_zero, false, grpc_lb_v1_ClientStats_init_zero}
#define grpc_lb_v1_InitialLoadBalanceRequest_init_zero {false, ""}
@@ -122,7 +132,7 @@ typedef struct _grpc_lb_v1_LoadBalanceResponse {
#define grpc_lb_v1_LoadBalanceResponse_init_zero {false, grpc_lb_v1_InitialLoadBalanceResponse_init_zero, false, grpc_lb_v1_ServerList_init_zero}
#define grpc_lb_v1_InitialLoadBalanceResponse_init_zero {false, "", false, grpc_lb_v1_Duration_init_zero}
#define grpc_lb_v1_ServerList_init_zero {{{NULL}, NULL}, false, grpc_lb_v1_Duration_init_zero}
-#define grpc_lb_v1_Server_init_zero {false, "", false, 0, false, "", false, 0}
+#define grpc_lb_v1_Server_init_zero {false, {0, {0}}, false, 0, false, "", false, 0}
/* Field tags (for use in manual encoding/decoding) */
#define grpc_lb_v1_ClientStats_total_requests_tag 1
@@ -135,7 +145,7 @@ typedef struct _grpc_lb_v1_LoadBalanceResponse {
#define grpc_lb_v1_Server_port_tag 2
#define grpc_lb_v1_Server_load_balance_token_tag 3
#define grpc_lb_v1_Server_drop_request_tag 4
-#define grpc_lb_v1_InitialLoadBalanceResponse_load_balancer_delegate_tag 2
+#define grpc_lb_v1_InitialLoadBalanceResponse_load_balancer_delegate_tag 1
#define grpc_lb_v1_InitialLoadBalanceResponse_client_stats_report_interval_tag 3
#define grpc_lb_v1_LoadBalanceRequest_initial_request_tag 1
#define grpc_lb_v1_LoadBalanceRequest_client_stats_tag 2
@@ -161,7 +171,8 @@ extern const pb_field_t grpc_lb_v1_Server_fields[5];
#define grpc_lb_v1_ClientStats_size 33
#define grpc_lb_v1_LoadBalanceResponse_size (98 + grpc_lb_v1_ServerList_size)
#define grpc_lb_v1_InitialLoadBalanceResponse_size 90
-#define grpc_lb_v1_Server_size 127
+/* grpc_lb_v1_ServerList_size depends on runtime parameters */
+#define grpc_lb_v1_Server_size 98
/* Message IDs (where set with "msgid" option) */
#ifdef PB_MSGID
@@ -174,5 +185,6 @@ extern const pb_field_t grpc_lb_v1_Server_fields[5];
#ifdef __cplusplus
} /* extern "C" */
#endif
+/* @@protoc_insertion_point(eof) */
#endif
diff --git a/src/core/ext/lb_policy/pick_first/pick_first.c b/src/core/ext/lb_policy/pick_first/pick_first.c
index 9decf70692..9513078dce 100644
--- a/src/core/ext/lb_policy/pick_first/pick_first.c
+++ b/src/core/ext/lb_policy/pick_first/pick_first.c
@@ -199,10 +199,8 @@ static void pf_exit_idle(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) {
}
static int pf_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
- grpc_polling_entity *pollent,
- grpc_metadata_batch *initial_metadata,
- uint32_t initial_metadata_flags,
- grpc_connected_subchannel **target,
+ const grpc_lb_policy_pick_args *pick_args,
+ grpc_connected_subchannel **target, void **user_data,
grpc_closure *on_complete) {
pick_first_lb_policy *p = (pick_first_lb_policy *)pol;
pending_pick *pp;
@@ -225,13 +223,13 @@ static int pf_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
if (!p->started_picking) {
start_picking(exec_ctx, p);
}
- grpc_polling_entity_add_to_pollset_set(exec_ctx, pollent,
+ grpc_polling_entity_add_to_pollset_set(exec_ctx, pick_args->pollent,
p->base.interested_parties);
pp = gpr_malloc(sizeof(*pp));
pp->next = p->pending_picks;
- pp->pollent = pollent;
+ pp->pollent = pick_args->pollent;
pp->target = target;
- pp->initial_metadata_flags = initial_metadata_flags;
+ pp->initial_metadata_flags = pick_args->initial_metadata_flags;
pp->on_complete = on_complete;
p->pending_picks = pp;
gpr_mu_unlock(&p->mu);
@@ -443,20 +441,25 @@ static grpc_lb_policy *create_pick_first(grpc_exec_ctx *exec_ctx,
GPR_ASSERT(args->addresses != NULL);
GPR_ASSERT(args->client_channel_factory != NULL);
- if (args->addresses->naddrs == 0) return NULL;
+ if (args->num_addresses == 0) return NULL;
pick_first_lb_policy *p = gpr_malloc(sizeof(*p));
memset(p, 0, sizeof(*p));
- p->subchannels =
- gpr_malloc(sizeof(grpc_subchannel *) * args->addresses->naddrs);
- memset(p->subchannels, 0, sizeof(*p->subchannels) * args->addresses->naddrs);
+ p->subchannels = gpr_malloc(sizeof(grpc_subchannel *) * args->num_addresses);
+ memset(p->subchannels, 0, sizeof(*p->subchannels) * args->num_addresses);
grpc_subchannel_args sc_args;
size_t subchannel_idx = 0;
- for (size_t i = 0; i < args->addresses->naddrs; i++) {
+ for (size_t i = 0; i < args->num_addresses; i++) {
+ if (args->addresses[i].user_data != NULL) {
+ gpr_log(GPR_ERROR,
+ "This LB policy doesn't support user data. It will be ignored");
+ }
+
memset(&sc_args, 0, sizeof(grpc_subchannel_args));
- sc_args.addr = (struct sockaddr *)(args->addresses->addrs[i].addr);
- sc_args.addr_len = (size_t)args->addresses->addrs[i].len;
+ sc_args.addr =
+ (struct sockaddr *)(args->addresses[i].resolved_address->addr);
+ sc_args.addr_len = (size_t)args->addresses[i].resolved_address->len;
grpc_subchannel *subchannel = grpc_client_channel_factory_create_subchannel(
exec_ctx, args->client_channel_factory, &sc_args);
diff --git a/src/core/ext/lb_policy/round_robin/round_robin.c b/src/core/ext/lb_policy/round_robin/round_robin.c
index 7bcf608ab9..4434165ff9 100644
--- a/src/core/ext/lb_policy/round_robin/round_robin.c
+++ b/src/core/ext/lb_policy/round_robin/round_robin.c
@@ -66,6 +66,7 @@
#include "src/core/ext/client_config/lb_policy_registry.h"
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/transport/connectivity_state.h"
+#include "src/core/lib/transport/static_metadata.h"
typedef struct round_robin_lb_policy round_robin_lb_policy;
@@ -76,15 +77,32 @@ int grpc_lb_round_robin_trace = 0;
* Once a pick is available, \a target is updated and \a on_complete called. */
typedef struct pending_pick {
struct pending_pick *next;
+
+ /* polling entity for the pick()'s async notification */
grpc_polling_entity *pollent;
+
+ /* output argument where to store the pick()ed user_data. It'll be NULL if no
+ * such data is present or there's an error (the definite test for errors is
+ * \a target being NULL). */
+ void **user_data;
+
+ /* bitmask passed to pick() and used for selective cancelling. See
+ * grpc_lb_policy_cancel_picks() */
uint32_t initial_metadata_flags;
+
+ /* output argument where to store the pick()ed connected subchannel, or NULL
+ * upon error. */
grpc_connected_subchannel **target;
+
+ /* to be invoked once the pick() has completed (regardless of success) */
grpc_closure *on_complete;
} pending_pick;
/** List of subchannels in a connectivity READY state */
typedef struct ready_list {
grpc_subchannel *subchannel;
+ /* references namesake entry in subchannel_data */
+ void *user_data;
struct ready_list *next;
struct ready_list *prev;
} ready_list;
@@ -102,12 +120,21 @@ typedef struct {
ready_list *ready_list_node;
/** last observed connectivity */
grpc_connectivity_state connectivity_state;
+ /** the subchannel's target user data */
+ void *user_data;
} subchannel_data;
struct round_robin_lb_policy {
/** base policy: must be first */
grpc_lb_policy base;
+ /** total number of addresses received at creation time */
+ size_t num_addresses;
+ /** array holding the borrowed and opaque pointers to incoming user data, one
+ * per incoming address. These individual pointers will be returned as-is in
+ * successful picks. */
+ void **user_data_pointers;
+
/** all our subchannels */
size_t num_subchannels;
subchannel_data **subchannels;
@@ -166,16 +193,19 @@ static void advance_last_picked_locked(round_robin_lb_policy *p) {
if (grpc_lb_round_robin_trace) {
gpr_log(GPR_DEBUG, "[READYLIST] ADVANCED LAST PICK. NOW AT NODE %p (SC %p)",
- p->ready_list_last_pick, p->ready_list_last_pick->subchannel);
+ (void *)p->ready_list_last_pick,
+ (void *)p->ready_list_last_pick->subchannel);
}
}
/** Prepends (relative to the root at p->ready_list) the connected subchannel \a
* csc to the list of ready subchannels. */
static ready_list *add_connected_sc_locked(round_robin_lb_policy *p,
- grpc_subchannel *sc) {
+ subchannel_data *sd) {
ready_list *new_elem = gpr_malloc(sizeof(ready_list));
- new_elem->subchannel = sc;
+ memset(new_elem, 0, sizeof(ready_list));
+ new_elem->subchannel = sd->subchannel;
+ new_elem->user_data = sd->user_data;
if (p->ready_list.prev == NULL) {
/* first element */
new_elem->next = &p->ready_list;
@@ -189,7 +219,8 @@ static ready_list *add_connected_sc_locked(round_robin_lb_policy *p,
p->ready_list.prev = new_elem;
}
if (grpc_lb_round_robin_trace) {
- gpr_log(GPR_DEBUG, "[READYLIST] ADDING NODE %p (SC %p)", new_elem, sc);
+ gpr_log(GPR_DEBUG, "[READYLIST] ADDING NODE %p (Conn. SC %p)",
+ (void *)new_elem, (void *)sd->subchannel);
}
return new_elem;
}
@@ -216,8 +247,8 @@ static void remove_disconnected_sc_locked(round_robin_lb_policy *p,
}
if (grpc_lb_round_robin_trace) {
- gpr_log(GPR_DEBUG, "[READYLIST] REMOVED NODE %p (SC %p)", node,
- node->subchannel);
+ gpr_log(GPR_DEBUG, "[READYLIST] REMOVED NODE %p (SC %p)", (void *)node,
+ (void *)node->subchannel);
}
node->next = NULL;
@@ -229,9 +260,8 @@ static void remove_disconnected_sc_locked(round_robin_lb_policy *p,
static void rr_destroy(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) {
round_robin_lb_policy *p = (round_robin_lb_policy *)pol;
- size_t i;
ready_list *elem;
- for (i = 0; i < p->num_subchannels; i++) {
+ for (size_t i = 0; i < p->num_subchannels; i++) {
subchannel_data *sd = p->subchannels[i];
GRPC_SUBCHANNEL_UNREF(exec_ctx, sd->subchannel, "round_robin");
gpr_free(sd);
@@ -251,6 +281,8 @@ static void rr_destroy(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) {
gpr_free(elem);
elem = tmp;
}
+
+ gpr_free(p->user_data_pointers);
gpr_free(p);
}
@@ -337,7 +369,7 @@ static void start_picking(grpc_exec_ctx *exec_ctx, round_robin_lb_policy *p) {
p->started_picking = 1;
if (grpc_lb_round_robin_trace) {
- gpr_log(GPR_DEBUG, "LB_POLICY: p=%p num_subchannels=%" PRIuPTR, p,
+ gpr_log(GPR_DEBUG, "LB_POLICY: p=%p num_subchannels=%" PRIuPTR, (void *)p,
p->num_subchannels);
}
@@ -361,38 +393,40 @@ static void rr_exit_idle(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) {
}
static int rr_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
- grpc_polling_entity *pollent,
- grpc_metadata_batch *initial_metadata,
- uint32_t initial_metadata_flags,
- grpc_connected_subchannel **target,
+ const grpc_lb_policy_pick_args *pick_args,
+ grpc_connected_subchannel **target, void **user_data,
grpc_closure *on_complete) {
round_robin_lb_policy *p = (round_robin_lb_policy *)pol;
pending_pick *pp;
ready_list *selected;
gpr_mu_lock(&p->mu);
if ((selected = peek_next_connected_locked(p))) {
+ /* readily available, report right away */
gpr_mu_unlock(&p->mu);
*target = grpc_subchannel_get_connected_subchannel(selected->subchannel);
+ *user_data = selected->user_data;
if (grpc_lb_round_robin_trace) {
gpr_log(GPR_DEBUG,
- "[RR PICK] TARGET <-- CONNECTED SUBCHANNEL %p (NODE %p)", *target,
- selected);
+ "[RR PICK] TARGET <-- CONNECTED SUBCHANNEL %p (NODE %p)",
+ (void *)*target, (void *)selected);
}
/* only advance the last picked pointer if the selection was used */
advance_last_picked_locked(p);
return 1;
} else {
+ /* no pick currently available. Save for later in list of pending picks */
if (!p->started_picking) {
start_picking(exec_ctx, p);
}
- grpc_polling_entity_add_to_pollset_set(exec_ctx, pollent,
+ grpc_polling_entity_add_to_pollset_set(exec_ctx, pick_args->pollent,
p->base.interested_parties);
pp = gpr_malloc(sizeof(*pp));
pp->next = p->pending_picks;
- pp->pollent = pollent;
+ pp->pollent = pick_args->pollent;
pp->target = target;
pp->on_complete = on_complete;
- pp->initial_metadata_flags = initial_metadata_flags;
+ pp->initial_metadata_flags = pick_args->initial_metadata_flags;
+ pp->user_data = user_data;
p->pending_picks = pp;
gpr_mu_unlock(&p->mu);
return 0;
@@ -421,7 +455,7 @@ static void rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg,
"connecting_ready");
/* add the newly connected subchannel to the list of connected ones.
* Note that it goes to the "end of the line". */
- sd->ready_list_node = add_connected_sc_locked(p, sd->subchannel);
+ sd->ready_list_node = add_connected_sc_locked(p, sd);
/* at this point we know there's at least one suitable subchannel. Go
* ahead and pick one and notify the pending suitors in
* p->pending_picks. This preemtively replicates rr_pick()'s actions. */
@@ -433,12 +467,14 @@ static void rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg,
}
while ((pp = p->pending_picks)) {
p->pending_picks = pp->next;
+
*pp->target =
grpc_subchannel_get_connected_subchannel(selected->subchannel);
+ *pp->user_data = selected->user_data;
if (grpc_lb_round_robin_trace) {
gpr_log(GPR_DEBUG,
"[RR CONN CHANGED] TARGET <-- SUBCHANNEL %p (NODE %p)",
- selected->subchannel, selected);
+ (void *)selected->subchannel, (void *)selected);
}
grpc_polling_entity_del_from_pollset_set(exec_ctx, pp->pollent,
p->base.interested_parties);
@@ -570,20 +606,25 @@ static grpc_lb_policy *round_robin_create(grpc_exec_ctx *exec_ctx,
grpc_lb_policy_args *args) {
GPR_ASSERT(args->addresses != NULL);
GPR_ASSERT(args->client_channel_factory != NULL);
+ if (args->num_addresses == 0) return NULL;
round_robin_lb_policy *p = gpr_malloc(sizeof(*p));
memset(p, 0, sizeof(*p));
- p->subchannels =
- gpr_malloc(sizeof(*p->subchannels) * args->addresses->naddrs);
- memset(p->subchannels, 0, sizeof(*p->subchannels) * args->addresses->naddrs);
+ p->num_addresses = args->num_addresses;
+ p->subchannels = gpr_malloc(sizeof(subchannel_data) * p->num_addresses);
+ memset(p->subchannels, 0, sizeof(*p->subchannels) * p->num_addresses);
+ p->user_data_pointers = gpr_malloc(sizeof(void *) * p->num_addresses);
+ memset(p->user_data_pointers, 0, sizeof(void *) * p->num_addresses);
grpc_subchannel_args sc_args;
size_t subchannel_idx = 0;
- for (size_t i = 0; i < args->addresses->naddrs; i++) {
+ for (size_t i = 0; i < p->num_addresses; i++) {
memset(&sc_args, 0, sizeof(grpc_subchannel_args));
- sc_args.addr = (struct sockaddr *)(args->addresses->addrs[i].addr);
- sc_args.addr_len = (size_t)args->addresses->addrs[i].len;
+ sc_args.addr = (struct sockaddr *)args->addresses[i].resolved_address->addr;
+ sc_args.addr_len = args->addresses[i].resolved_address->len;
+
+ p->user_data_pointers[i] = args->addresses[i].user_data;
grpc_subchannel *subchannel = grpc_client_channel_factory_create_subchannel(
exec_ctx, args->client_channel_factory, &sc_args);
@@ -595,12 +636,14 @@ static grpc_lb_policy *round_robin_create(grpc_exec_ctx *exec_ctx,
sd->policy = p;
sd->index = subchannel_idx;
sd->subchannel = subchannel;
+ sd->user_data = p->user_data_pointers[i];
++subchannel_idx;
grpc_closure_init(&sd->connectivity_changed_closure,
rr_connectivity_changed, sd);
}
}
if (subchannel_idx == 0) {
+ /* couldn't create any subchannel. Bail out */
gpr_free(p->subchannels);
gpr_free(p);
return NULL;
diff --git a/src/core/ext/resolver/dns/native/dns_resolver.c b/src/core/ext/resolver/dns/native/dns_resolver.c
index 31ac968670..32e9de69a6 100644
--- a/src/core/ext/resolver/dns/native/dns_resolver.c
+++ b/src/core/ext/resolver/dns/native/dns_resolver.c
@@ -67,16 +67,16 @@ typedef struct {
gpr_mu mu;
/** are we currently resolving? */
int resolving;
- /** which version of resolved_config have we published? */
+ /** which version of the result have we published? */
int published_version;
- /** which version of resolved_config is current? */
+ /** which version of the result is current? */
int resolved_version;
/** pending next completion, or NULL */
grpc_closure *next_completion;
- /** target config address for next completion */
- grpc_client_config **target_config;
- /** current (fully resolved) config */
- grpc_client_config *resolved_config;
+ /** target result address for next completion */
+ grpc_resolver_result **target_result;
+ /** current (fully resolved) result */
+ grpc_resolver_result *resolved_result;
/** retry timer */
bool have_retry_timer;
grpc_timer retry_timer;
@@ -97,7 +97,7 @@ static void dns_maybe_finish_next_locked(grpc_exec_ctx *exec_ctx,
static void dns_shutdown(grpc_exec_ctx *exec_ctx, grpc_resolver *r);
static void dns_channel_saw_error(grpc_exec_ctx *exec_ctx, grpc_resolver *r);
static void dns_next(grpc_exec_ctx *exec_ctx, grpc_resolver *r,
- grpc_client_config **target_config,
+ grpc_resolver_result **target_result,
grpc_closure *on_complete);
static const grpc_resolver_vtable dns_resolver_vtable = {
@@ -110,7 +110,7 @@ static void dns_shutdown(grpc_exec_ctx *exec_ctx, grpc_resolver *resolver) {
grpc_timer_cancel(exec_ctx, &r->retry_timer);
}
if (r->next_completion != NULL) {
- *r->target_config = NULL;
+ *r->target_result = NULL;
grpc_exec_ctx_sched(exec_ctx, r->next_completion,
GRPC_ERROR_CREATE("Resolver Shutdown"), NULL);
r->next_completion = NULL;
@@ -130,13 +130,13 @@ static void dns_channel_saw_error(grpc_exec_ctx *exec_ctx,
}
static void dns_next(grpc_exec_ctx *exec_ctx, grpc_resolver *resolver,
- grpc_client_config **target_config,
+ grpc_resolver_result **target_result,
grpc_closure *on_complete) {
dns_resolver *r = (dns_resolver *)resolver;
gpr_mu_lock(&r->mu);
GPR_ASSERT(!r->next_completion);
r->next_completion = on_complete;
- r->target_config = target_config;
+ r->target_result = target_result;
if (r->resolved_version == 0 && !r->resolving) {
gpr_backoff_reset(&r->backoff_state);
dns_start_resolving_locked(exec_ctx, r);
@@ -165,7 +165,7 @@ static void dns_on_retry_timer(grpc_exec_ctx *exec_ctx, void *arg,
static void dns_on_resolved(grpc_exec_ctx *exec_ctx, void *arg,
grpc_error *error) {
dns_resolver *r = arg;
- grpc_client_config *config = NULL;
+ grpc_resolver_result *result = NULL;
grpc_lb_policy *lb_policy;
gpr_mu_lock(&r->mu);
GPR_ASSERT(r->resolving);
@@ -173,14 +173,22 @@ static void dns_on_resolved(grpc_exec_ctx *exec_ctx, void *arg,
grpc_resolved_addresses *addresses = r->addresses;
if (addresses != NULL) {
grpc_lb_policy_args lb_policy_args;
- config = grpc_client_config_create();
+ result = grpc_resolver_result_create();
memset(&lb_policy_args, 0, sizeof(lb_policy_args));
- lb_policy_args.addresses = addresses;
+ lb_policy_args.num_addresses = addresses->naddrs;
+ lb_policy_args.addresses =
+ gpr_malloc(sizeof(grpc_lb_address) * lb_policy_args.num_addresses);
+ memset(lb_policy_args.addresses, 0,
+ sizeof(grpc_lb_address) * lb_policy_args.num_addresses);
+ for (size_t i = 0; i < addresses->naddrs; ++i) {
+ lb_policy_args.addresses[i].resolved_address = &r->addresses->addrs[i];
+ }
lb_policy_args.client_channel_factory = r->client_channel_factory;
lb_policy =
grpc_lb_policy_create(exec_ctx, r->lb_policy_name, &lb_policy_args);
+ gpr_free(lb_policy_args.addresses);
if (lb_policy != NULL) {
- grpc_client_config_set_lb_policy(config, lb_policy);
+ grpc_resolver_result_set_lb_policy(result, lb_policy);
GRPC_LB_POLICY_UNREF(exec_ctx, lb_policy, "construction");
}
grpc_resolved_addresses_destroy(addresses);
@@ -203,10 +211,10 @@ static void dns_on_resolved(grpc_exec_ctx *exec_ctx, void *arg,
grpc_timer_init(exec_ctx, &r->retry_timer, next_try, dns_on_retry_timer, r,
now);
}
- if (r->resolved_config) {
- grpc_client_config_unref(exec_ctx, r->resolved_config);
+ if (r->resolved_result) {
+ grpc_resolver_result_unref(exec_ctx, r->resolved_result);
}
- r->resolved_config = config;
+ r->resolved_result = result;
r->resolved_version++;
dns_maybe_finish_next_locked(exec_ctx, r);
gpr_mu_unlock(&r->mu);
@@ -228,9 +236,9 @@ static void dns_maybe_finish_next_locked(grpc_exec_ctx *exec_ctx,
dns_resolver *r) {
if (r->next_completion != NULL &&
r->resolved_version != r->published_version) {
- *r->target_config = r->resolved_config;
- if (r->resolved_config) {
- grpc_client_config_ref(r->resolved_config);
+ *r->target_result = r->resolved_result;
+ if (r->resolved_result) {
+ grpc_resolver_result_ref(r->resolved_result);
}
grpc_exec_ctx_sched(exec_ctx, r->next_completion, GRPC_ERROR_NONE, NULL);
r->next_completion = NULL;
@@ -241,8 +249,8 @@ static void dns_maybe_finish_next_locked(grpc_exec_ctx *exec_ctx,
static void dns_destroy(grpc_exec_ctx *exec_ctx, grpc_resolver *gr) {
dns_resolver *r = (dns_resolver *)gr;
gpr_mu_destroy(&r->mu);
- if (r->resolved_config) {
- grpc_client_config_unref(exec_ctx, r->resolved_config);
+ if (r->resolved_result) {
+ grpc_resolver_result_unref(exec_ctx, r->resolved_result);
}
grpc_client_channel_factory_unref(exec_ctx, r->client_channel_factory);
gpr_free(r->name);
diff --git a/src/core/ext/resolver/sockaddr/sockaddr_resolver.c b/src/core/ext/resolver/sockaddr/sockaddr_resolver.c
index 1f7cce2f43..425285287c 100644
--- a/src/core/ext/resolver/sockaddr/sockaddr_resolver.c
+++ b/src/core/ext/resolver/sockaddr/sockaddr_resolver.c
@@ -66,8 +66,8 @@ typedef struct {
int published;
/** pending next completion, or NULL */
grpc_closure *next_completion;
- /** target config address for next completion */
- grpc_client_config **target_config;
+ /** target result address for next completion */
+ grpc_resolver_result **target_result;
} sockaddr_resolver;
static void sockaddr_destroy(grpc_exec_ctx *exec_ctx, grpc_resolver *r);
@@ -79,7 +79,7 @@ static void sockaddr_shutdown(grpc_exec_ctx *exec_ctx, grpc_resolver *r);
static void sockaddr_channel_saw_error(grpc_exec_ctx *exec_ctx,
grpc_resolver *r);
static void sockaddr_next(grpc_exec_ctx *exec_ctx, grpc_resolver *r,
- grpc_client_config **target_config,
+ grpc_resolver_result **target_result,
grpc_closure *on_complete);
static const grpc_resolver_vtable sockaddr_resolver_vtable = {
@@ -91,7 +91,7 @@ static void sockaddr_shutdown(grpc_exec_ctx *exec_ctx,
sockaddr_resolver *r = (sockaddr_resolver *)resolver;
gpr_mu_lock(&r->mu);
if (r->next_completion != NULL) {
- *r->target_config = NULL;
+ *r->target_result = NULL;
grpc_exec_ctx_sched(exec_ctx, r->next_completion, GRPC_ERROR_NONE, NULL);
r->next_completion = NULL;
}
@@ -108,13 +108,13 @@ static void sockaddr_channel_saw_error(grpc_exec_ctx *exec_ctx,
}
static void sockaddr_next(grpc_exec_ctx *exec_ctx, grpc_resolver *resolver,
- grpc_client_config **target_config,
+ grpc_resolver_result **target_result,
grpc_closure *on_complete) {
sockaddr_resolver *r = (sockaddr_resolver *)resolver;
gpr_mu_lock(&r->mu);
GPR_ASSERT(!r->next_completion);
r->next_completion = on_complete;
- r->target_config = target_config;
+ r->target_result = target_result;
sockaddr_maybe_finish_next_locked(exec_ctx, r);
gpr_mu_unlock(&r->mu);
}
@@ -122,17 +122,25 @@ static void sockaddr_next(grpc_exec_ctx *exec_ctx, grpc_resolver *resolver,
static void sockaddr_maybe_finish_next_locked(grpc_exec_ctx *exec_ctx,
sockaddr_resolver *r) {
if (r->next_completion != NULL && !r->published) {
- grpc_client_config *cfg = grpc_client_config_create();
+ grpc_resolver_result *result = grpc_resolver_result_create();
grpc_lb_policy_args lb_policy_args;
memset(&lb_policy_args, 0, sizeof(lb_policy_args));
- lb_policy_args.addresses = r->addresses;
+ lb_policy_args.num_addresses = r->addresses->naddrs;
+ lb_policy_args.addresses =
+ gpr_malloc(sizeof(grpc_lb_address) * lb_policy_args.num_addresses);
+ memset(lb_policy_args.addresses, 0,
+ sizeof(grpc_lb_address) * lb_policy_args.num_addresses);
+ for (size_t i = 0; i < lb_policy_args.num_addresses; ++i) {
+ lb_policy_args.addresses[i].resolved_address = &r->addresses->addrs[i];
+ }
lb_policy_args.client_channel_factory = r->client_channel_factory;
grpc_lb_policy *lb_policy =
grpc_lb_policy_create(exec_ctx, r->lb_policy_name, &lb_policy_args);
- grpc_client_config_set_lb_policy(cfg, lb_policy);
+ gpr_free(lb_policy_args.addresses);
+ grpc_resolver_result_set_lb_policy(result, lb_policy);
GRPC_LB_POLICY_UNREF(exec_ctx, lb_policy, "sockaddr");
r->published = 1;
- *r->target_config = cfg;
+ *r->target_result = result;
grpc_exec_ctx_sched(exec_ctx, r->next_completion, GRPC_ERROR_NONE, NULL);
r->next_completion = NULL;
}
diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c
index 0e8dfb7d96..00999e3b94 100644
--- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c
+++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c
@@ -408,6 +408,19 @@ static void init_transport(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t,
push_setting(exec_ctx, t, GRPC_CHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE,
(uint32_t)channel_args->args[i].value.integer);
}
+ } else if (0 == strcmp(channel_args->args[i].key,
+ GRPC_ARG_HTTP2_MAX_FRAME_SIZE)) {
+ if (channel_args->args[i].type != GRPC_ARG_INTEGER) {
+ gpr_log(GPR_ERROR, "%s: must be an integer",
+ GRPC_ARG_HTTP2_MAX_FRAME_SIZE);
+ } else if (channel_args->args[i].value.integer < 16384 ||
+ channel_args->args[i].value.integer > 16777215) {
+ gpr_log(GPR_ERROR, "%s: must be between 16384 and 16777215",
+ GRPC_ARG_HTTP2_MAX_FRAME_SIZE);
+ } else {
+ push_setting(exec_ctx, t, GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE,
+ (uint32_t)channel_args->args[i].value.integer);
+ }
}
}
}
diff --git a/src/core/ext/transport/chttp2/transport/frame.h b/src/core/ext/transport/chttp2/transport/frame.h
index 7776609367..507aae4100 100644
--- a/src/core/ext/transport/chttp2/transport/frame.h
+++ b/src/core/ext/transport/chttp2/transport/frame.h
@@ -52,8 +52,6 @@ typedef struct grpc_chttp2_transport_parsing grpc_chttp2_transport_parsing;
#define GRPC_CHTTP2_FRAME_GOAWAY 7
#define GRPC_CHTTP2_FRAME_WINDOW_UPDATE 8
-#define GRPC_CHTTP2_MAX_PAYLOAD_LENGTH ((1 << 14) - 1)
-
#define GRPC_CHTTP2_DATA_FLAG_END_STREAM 1
#define GRPC_CHTTP2_FLAG_ACK 1
#define GRPC_CHTTP2_DATA_FLAG_END_HEADERS 4
diff --git a/src/core/ext/transport/chttp2/transport/hpack_encoder.c b/src/core/ext/transport/chttp2/transport/hpack_encoder.c
index 2cb8205d94..581471ba02 100644
--- a/src/core/ext/transport/chttp2/transport/hpack_encoder.c
+++ b/src/core/ext/transport/chttp2/transport/hpack_encoder.c
@@ -78,6 +78,8 @@ typedef struct {
uint32_t stream_id;
gpr_slice_buffer *output;
grpc_transport_one_way_stats *stats;
+ /* maximum size of a frame */
+ size_t max_frame_size;
} framer_state;
/* fills p (which is expected to be 9 bytes long) with a data frame header */
@@ -123,7 +125,7 @@ static void begin_frame(framer_state *st) {
needed */
static void ensure_space(framer_state *st, size_t need_bytes) {
if (st->output->length - st->output_length_at_start_of_frame + need_bytes <=
- GRPC_CHTTP2_MAX_PAYLOAD_LENGTH) {
+ st->max_frame_size) {
return;
}
finish_frame(st, 0, 0);
@@ -149,8 +151,8 @@ static void add_header_data(framer_state *st, gpr_slice slice) {
size_t len = GPR_SLICE_LENGTH(slice);
size_t remaining;
if (len == 0) return;
- remaining = GRPC_CHTTP2_MAX_PAYLOAD_LENGTH +
- st->output_length_at_start_of_frame - st->output->length;
+ remaining = st->max_frame_size + st->output_length_at_start_of_frame -
+ st->output->length;
if (len <= remaining) {
st->stats->header_bytes += len;
gpr_slice_buffer_add(st->output, slice);
@@ -542,6 +544,7 @@ void grpc_chttp2_hpack_compressor_set_max_table_size(
void grpc_chttp2_encode_header(grpc_chttp2_hpack_compressor *c,
uint32_t stream_id,
grpc_metadata_batch *metadata, int is_eof,
+ size_t max_frame_size,
grpc_transport_one_way_stats *stats,
gpr_slice_buffer *outbuf) {
framer_state st;
@@ -555,6 +558,7 @@ void grpc_chttp2_encode_header(grpc_chttp2_hpack_compressor *c,
st.output = outbuf;
st.is_first_frame = 1;
st.stats = stats;
+ st.max_frame_size = max_frame_size;
/* Encode a metadata batch; store the returned values, representing
a metadata element that needs to be unreffed back into the metadata
diff --git a/src/core/ext/transport/chttp2/transport/hpack_encoder.h b/src/core/ext/transport/chttp2/transport/hpack_encoder.h
index 0f7b0b063a..4c3a931549 100644
--- a/src/core/ext/transport/chttp2/transport/hpack_encoder.h
+++ b/src/core/ext/transport/chttp2/transport/hpack_encoder.h
@@ -91,6 +91,7 @@ void grpc_chttp2_hpack_compressor_set_max_usable_size(
void grpc_chttp2_encode_header(grpc_chttp2_hpack_compressor *c, uint32_t id,
grpc_metadata_batch *metadata, int is_eof,
+ size_t max_frame_size,
grpc_transport_one_way_stats *stats,
gpr_slice_buffer *outbuf);
diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h
index e1dcf5262a..d67c014e54 100644
--- a/src/core/ext/transport/chttp2/transport/internal.h
+++ b/src/core/ext/transport/chttp2/transport/internal.h
@@ -223,6 +223,8 @@ typedef struct {
uint8_t is_client;
/** callback for when writing is done */
grpc_closure done_cb;
+ /** maximum frame size */
+ uint32_t max_frame_size;
} grpc_chttp2_transport_writing;
struct grpc_chttp2_transport_parsing {
diff --git a/src/core/ext/transport/chttp2/transport/writing.c b/src/core/ext/transport/chttp2/transport/writing.c
index 8f7a1f55c6..311b26e354 100644
--- a/src/core/ext/transport/chttp2/transport/writing.c
+++ b/src/core/ext/transport/chttp2/transport/writing.c
@@ -51,6 +51,10 @@ int grpc_chttp2_unlocking_check_writes(
GPR_TIMER_BEGIN("grpc_chttp2_unlocking_check_writes", 0);
+ transport_writing->max_frame_size =
+ transport_global->settings[GRPC_ACKED_SETTINGS]
+ [GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE];
+
/* simple writes are queued to qbuf, and flushed here */
gpr_slice_buffer_swap(&transport_global->qbuf, &transport_writing->outbuf);
GPR_ASSERT(transport_global->qbuf.count == 0);
@@ -206,14 +210,15 @@ static void finalize_outbuf(grpc_exec_ctx *exec_ctx,
while (
grpc_chttp2_list_pop_writing_stream(transport_writing, &stream_writing)) {
uint32_t max_outgoing =
- (uint32_t)GPR_MIN(GRPC_CHTTP2_MAX_PAYLOAD_LENGTH,
+ (uint32_t)GPR_MIN(transport_writing->max_frame_size,
GPR_MIN(stream_writing->outgoing_window,
transport_writing->outgoing_window));
/* send initial metadata if it's available */
if (stream_writing->send_initial_metadata != NULL) {
grpc_chttp2_encode_header(
&transport_writing->hpack_compressor, stream_writing->id,
- stream_writing->send_initial_metadata, 0, &stream_writing->stats,
+ stream_writing->send_initial_metadata, 0,
+ transport_writing->max_frame_size, &stream_writing->stats,
&transport_writing->outbuf);
stream_writing->send_initial_metadata = NULL;
stream_writing->sent_initial_metadata = 1;
@@ -303,7 +308,8 @@ static void finalize_outbuf(grpc_exec_ctx *exec_ctx,
} else {
grpc_chttp2_encode_header(
&transport_writing->hpack_compressor, stream_writing->id,
- stream_writing->send_trailing_metadata, 1, &stream_writing->stats,
+ stream_writing->send_trailing_metadata, 1,
+ transport_writing->max_frame_size, &stream_writing->stats,
&transport_writing->outbuf);
}
if (!transport_writing->is_client && !stream_writing->read_closed) {
diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.c b/src/core/ext/transport/cronet/transport/cronet_transport.c
index 029c15014e..366690acf2 100644
--- a/src/core/ext/transport/cronet/transport/cronet_transport.c
+++ b/src/core/ext/transport/cronet/transport/cronet_transport.c
@@ -294,7 +294,7 @@ static void remove_from_storage(struct stream_obj *s,
/*
Cycle through ops and try to take next action. Break when either
an action with callback is taken, or no action is possible.
- This can be executed from the Cronet network thread via cronet callback
+ This can get executed from the Cronet network thread via cronet callback
or on the application supplied thread via the perform_stream_op function.
*/
static void execute_from_storage(stream_obj *s) {
@@ -329,6 +329,7 @@ static void execute_from_storage(stream_obj *s) {
static void on_failed(cronet_bidirectional_stream *stream, int net_error) {
CRONET_LOG(GPR_DEBUG, "on_failed(%p, %d)", stream, net_error);
stream_obj *s = (stream_obj *)stream->annotation;
+ gpr_mu_lock(&s->mu);
cronet_bidirectional_stream_destroy(s->cbs);
s->state.state_callback_received[OP_FAILED] = true;
s->cbs = NULL;
@@ -340,6 +341,7 @@ static void on_failed(cronet_bidirectional_stream *stream, int net_error) {
gpr_free(s->state.ws.write_buffer);
s->state.ws.write_buffer = NULL;
}
+ gpr_mu_unlock(&s->mu);
execute_from_storage(s);
}
@@ -349,6 +351,7 @@ static void on_failed(cronet_bidirectional_stream *stream, int net_error) {
static void on_canceled(cronet_bidirectional_stream *stream) {
CRONET_LOG(GPR_DEBUG, "on_canceled(%p)", stream);
stream_obj *s = (stream_obj *)stream->annotation;
+ gpr_mu_lock(&s->mu);
cronet_bidirectional_stream_destroy(s->cbs);
s->state.state_callback_received[OP_CANCELED] = true;
s->cbs = NULL;
@@ -360,6 +363,7 @@ static void on_canceled(cronet_bidirectional_stream *stream) {
gpr_free(s->state.ws.write_buffer);
s->state.ws.write_buffer = NULL;
}
+ gpr_mu_unlock(&s->mu);
execute_from_storage(s);
}
@@ -369,9 +373,11 @@ static void on_canceled(cronet_bidirectional_stream *stream) {
static void on_succeeded(cronet_bidirectional_stream *stream) {
CRONET_LOG(GPR_DEBUG, "on_succeeded(%p)", stream);
stream_obj *s = (stream_obj *)stream->annotation;
+ gpr_mu_lock(&s->mu);
cronet_bidirectional_stream_destroy(s->cbs);
s->state.state_callback_received[OP_SUCCEEDED] = true;
s->cbs = NULL;
+ gpr_mu_unlock(&s->mu);
execute_from_storage(s);
}
@@ -381,6 +387,7 @@ static void on_succeeded(cronet_bidirectional_stream *stream) {
static void on_request_headers_sent(cronet_bidirectional_stream *stream) {
CRONET_LOG(GPR_DEBUG, "W: on_request_headers_sent(%p)", stream);
stream_obj *s = (stream_obj *)stream->annotation;
+ gpr_mu_lock(&s->mu);
s->state.state_op_done[OP_SEND_INITIAL_METADATA] = true;
s->state.state_callback_received[OP_SEND_INITIAL_METADATA] = true;
/* Free the memory allocated for headers */
@@ -388,6 +395,7 @@ static void on_request_headers_sent(cronet_bidirectional_stream *stream) {
gpr_free(s->header_array.headers);
s->header_array.headers = NULL;
}
+ gpr_mu_unlock(&s->mu);
execute_from_storage(s);
}
@@ -401,6 +409,7 @@ static void on_response_headers_received(
CRONET_LOG(GPR_DEBUG, "R: on_response_headers_received(%p, %p, %s)", stream,
headers, negotiated_protocol);
stream_obj *s = (stream_obj *)stream->annotation;
+ gpr_mu_lock(&s->mu);
memset(&s->state.rs.initial_metadata, 0,
sizeof(s->state.rs.initial_metadata));
grpc_chttp2_incoming_metadata_buffer_init(&s->state.rs.initial_metadata);
@@ -412,6 +421,7 @@ static void on_response_headers_received(
grpc_mdstr_from_string(headers->headers[i].value)));
}
s->state.state_callback_received[OP_RECV_INITIAL_METADATA] = true;
+ gpr_mu_unlock(&s->mu);
execute_from_storage(s);
}
@@ -422,11 +432,13 @@ static void on_write_completed(cronet_bidirectional_stream *stream,
const char *data) {
stream_obj *s = (stream_obj *)stream->annotation;
CRONET_LOG(GPR_DEBUG, "W: on_write_completed(%p, %s)", stream, data);
+ gpr_mu_lock(&s->mu);
if (s->state.ws.write_buffer) {
gpr_free(s->state.ws.write_buffer);
s->state.ws.write_buffer = NULL;
}
s->state.state_callback_received[OP_SEND_MESSAGE] = true;
+ gpr_mu_unlock(&s->mu);
execute_from_storage(s);
}
@@ -438,6 +450,7 @@ static void on_read_completed(cronet_bidirectional_stream *stream, char *data,
stream_obj *s = (stream_obj *)stream->annotation;
CRONET_LOG(GPR_DEBUG, "R: on_read_completed(%p, %p, %d)", stream, data,
count);
+ gpr_mu_lock(&s->mu);
s->state.state_callback_received[OP_RECV_MESSAGE] = true;
if (count > 0) {
s->state.rs.received_bytes += count;
@@ -448,11 +461,14 @@ static void on_read_completed(cronet_bidirectional_stream *stream, char *data,
cronet_bidirectional_stream_read(
s->cbs, s->state.rs.read_buffer + s->state.rs.received_bytes,
s->state.rs.remaining_bytes);
+ gpr_mu_unlock(&s->mu);
} else {
+ gpr_mu_unlock(&s->mu);
execute_from_storage(s);
}
} else {
s->state.rs.read_stream_closed = true;
+ gpr_mu_unlock(&s->mu);
execute_from_storage(s);
}
}
@@ -466,6 +482,7 @@ static void on_response_trailers_received(
CRONET_LOG(GPR_DEBUG, "R: on_response_trailers_received(%p,%p)", stream,
trailers);
stream_obj *s = (stream_obj *)stream->annotation;
+ gpr_mu_lock(&s->mu);
memset(&s->state.rs.trailing_metadata, 0,
sizeof(s->state.rs.trailing_metadata));
s->state.rs.trailing_metadata_valid = false;
@@ -481,6 +498,7 @@ static void on_response_trailers_received(
s->state.rs.trailing_metadata_valid = true;
}
s->state.state_callback_received[OP_RECV_TRAILING_METADATA] = true;
+ gpr_mu_unlock(&s->mu);
execute_from_storage(s);
}
@@ -757,14 +775,15 @@ static enum e_op_result execute_stream_op(grpc_exec_ctx *exec_ctx,
op_can_be_run(stream_op, stream_state, &oas->state,
OP_RECV_INITIAL_METADATA)) {
CRONET_LOG(GPR_DEBUG, "running: %p OP_RECV_INITIAL_METADATA", oas);
- if (!stream_state->state_op_done[OP_CANCEL_ERROR]) {
+ if (stream_state->state_op_done[OP_CANCEL_ERROR] ||
+ stream_state->state_callback_received[OP_FAILED]) {
+ grpc_exec_ctx_sched(exec_ctx, stream_op->recv_initial_metadata_ready,
+ GRPC_ERROR_CANCELLED, NULL);
+ } else {
grpc_chttp2_incoming_metadata_buffer_publish(
&oas->s->state.rs.initial_metadata, stream_op->recv_initial_metadata);
grpc_exec_ctx_sched(exec_ctx, stream_op->recv_initial_metadata_ready,
GRPC_ERROR_NONE, NULL);
- } else {
- grpc_exec_ctx_sched(exec_ctx, stream_op->recv_initial_metadata_ready,
- GRPC_ERROR_CANCELLED, NULL);
}
stream_state->state_op_done[OP_RECV_INITIAL_METADATA] = true;
result = ACTION_TAKEN_NO_CALLBACK;
@@ -772,32 +791,40 @@ static enum e_op_result execute_stream_op(grpc_exec_ctx *exec_ctx,
op_can_be_run(stream_op, stream_state, &oas->state,
OP_SEND_MESSAGE)) {
CRONET_LOG(GPR_DEBUG, "running: %p OP_SEND_MESSAGE", oas);
- gpr_slice_buffer write_slice_buffer;
- gpr_slice slice;
- gpr_slice_buffer_init(&write_slice_buffer);
- grpc_byte_stream_next(NULL, stream_op->send_message, &slice,
- stream_op->send_message->length, NULL);
- /* Check that compression flag is OFF. We don't support compression yet. */
- if (stream_op->send_message->flags != 0) {
- gpr_log(GPR_ERROR, "Compression is not supported");
- GPR_ASSERT(stream_op->send_message->flags == 0);
- }
- gpr_slice_buffer_add(&write_slice_buffer, slice);
- if (write_slice_buffer.count != 1) {
- /* Empty request not handled yet */
- gpr_log(GPR_ERROR, "Empty request is not supported");
- GPR_ASSERT(write_slice_buffer.count == 1);
- }
- if (write_slice_buffer.count > 0) {
- size_t write_buffer_size;
- create_grpc_frame(&write_slice_buffer, &stream_state->ws.write_buffer,
- &write_buffer_size);
- CRONET_LOG(GPR_DEBUG, "cronet_bidirectional_stream_write (%p, %p)",
- s->cbs, stream_state->ws.write_buffer);
- stream_state->state_callback_received[OP_SEND_MESSAGE] = false;
- cronet_bidirectional_stream_write(s->cbs, stream_state->ws.write_buffer,
- (int)write_buffer_size, false);
- result = ACTION_TAKEN_WITH_CALLBACK;
+ if (stream_state->state_callback_received[OP_FAILED]) {
+ result = NO_ACTION_POSSIBLE;
+ CRONET_LOG(GPR_DEBUG, "Stream is either cancelled or failed.");
+ } else {
+ gpr_slice_buffer write_slice_buffer;
+ gpr_slice slice;
+ gpr_slice_buffer_init(&write_slice_buffer);
+ grpc_byte_stream_next(NULL, stream_op->send_message, &slice,
+ stream_op->send_message->length, NULL);
+ /* Check that compression flag is OFF. We don't support compression yet.
+ */
+ if (stream_op->send_message->flags != 0) {
+ gpr_log(GPR_ERROR, "Compression is not supported");
+ GPR_ASSERT(stream_op->send_message->flags == 0);
+ }
+ gpr_slice_buffer_add(&write_slice_buffer, slice);
+ if (write_slice_buffer.count != 1) {
+ /* Empty request not handled yet */
+ gpr_log(GPR_ERROR, "Empty request is not supported");
+ GPR_ASSERT(write_slice_buffer.count == 1);
+ }
+ if (write_slice_buffer.count > 0) {
+ size_t write_buffer_size;
+ create_grpc_frame(&write_slice_buffer, &stream_state->ws.write_buffer,
+ &write_buffer_size);
+ CRONET_LOG(GPR_DEBUG, "cronet_bidirectional_stream_write (%p, %p)",
+ s->cbs, stream_state->ws.write_buffer);
+ stream_state->state_callback_received[OP_SEND_MESSAGE] = false;
+ cronet_bidirectional_stream_write(s->cbs, stream_state->ws.write_buffer,
+ (int)write_buffer_size, false);
+ result = ACTION_TAKEN_WITH_CALLBACK;
+ } else {
+ result = NO_ACTION_POSSIBLE;
+ }
}
stream_state->state_op_done[OP_SEND_MESSAGE] = true;
oas->state.state_op_done[OP_SEND_MESSAGE] = true;
@@ -805,7 +832,9 @@ static enum e_op_result execute_stream_op(grpc_exec_ctx *exec_ctx,
op_can_be_run(stream_op, stream_state, &oas->state,
OP_RECV_MESSAGE)) {
CRONET_LOG(GPR_DEBUG, "running: %p OP_RECV_MESSAGE", oas);
- if (stream_state->state_op_done[OP_CANCEL_ERROR]) {
+ if (stream_state->state_op_done[OP_CANCEL_ERROR] ||
+ stream_state->state_callback_received[OP_FAILED]) {
+ CRONET_LOG(GPR_DEBUG, "Stream is either cancelled or failed.");
grpc_exec_ctx_sched(exec_ctx, stream_op->recv_message_ready,
GRPC_ERROR_CANCELLED, NULL);
stream_state->state_op_done[OP_RECV_MESSAGE] = true;
@@ -861,8 +890,10 @@ static enum e_op_result execute_stream_op(grpc_exec_ctx *exec_ctx,
true; /* Indicates that at least one read request has been made */
cronet_bidirectional_stream_read(s->cbs, stream_state->rs.read_buffer,
stream_state->rs.remaining_bytes);
+ result = ACTION_TAKEN_WITH_CALLBACK;
+ } else {
+ result = NO_ACTION_POSSIBLE;
}
- result = ACTION_TAKEN_WITH_CALLBACK;
} else if (stream_state->rs.remaining_bytes == 0) {
CRONET_LOG(GPR_DEBUG, "read operation complete");
gpr_slice read_data_slice =
@@ -903,11 +934,17 @@ static enum e_op_result execute_stream_op(grpc_exec_ctx *exec_ctx,
op_can_be_run(stream_op, stream_state, &oas->state,
OP_SEND_TRAILING_METADATA)) {
CRONET_LOG(GPR_DEBUG, "running: %p OP_SEND_TRAILING_METADATA", oas);
- CRONET_LOG(GPR_DEBUG, "cronet_bidirectional_stream_write (%p, 0)", s->cbs);
- stream_state->state_callback_received[OP_SEND_MESSAGE] = false;
- cronet_bidirectional_stream_write(s->cbs, "", 0, true);
+ if (stream_state->state_callback_received[OP_FAILED]) {
+ result = NO_ACTION_POSSIBLE;
+ CRONET_LOG(GPR_DEBUG, "Stream is either cancelled or failed.");
+ } else {
+ CRONET_LOG(GPR_DEBUG, "cronet_bidirectional_stream_write (%p, 0)",
+ s->cbs);
+ stream_state->state_callback_received[OP_SEND_MESSAGE] = false;
+ cronet_bidirectional_stream_write(s->cbs, "", 0, true);
+ result = ACTION_TAKEN_WITH_CALLBACK;
+ }
stream_state->state_op_done[OP_SEND_TRAILING_METADATA] = true;
- result = ACTION_TAKEN_WITH_CALLBACK;
} else if (stream_op->cancel_error &&
op_can_be_run(stream_op, stream_state, &oas->state,
OP_CANCEL_ERROR)) {
diff --git a/src/core/lib/channel/handshaker.c b/src/core/lib/channel/handshaker.c
index c0979f5e80..8f9fb17a31 100644
--- a/src/core/lib/channel/handshaker.c
+++ b/src/core/lib/channel/handshaker.c
@@ -33,8 +33,8 @@
#include <string.h>
-#include <grpc/impl/codegen/alloc.h>
-#include <grpc/impl/codegen/log.h>
+#include <grpc/support/alloc.h>
+#include <grpc/support/log.h>
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/handshaker.h"
diff --git a/src/core/lib/channel/handshaker.h b/src/core/lib/channel/handshaker.h
index b276f6028c..d574b46242 100644
--- a/src/core/lib/channel/handshaker.h
+++ b/src/core/lib/channel/handshaker.h
@@ -35,8 +35,6 @@
#define GRPC_CORE_LIB_CHANNEL_HANDSHAKER_H
#include <grpc/impl/codegen/grpc_types.h>
-#include <grpc/impl/codegen/time.h>
-#include <grpc/support/slice_buffer.h>
#include "src/core/lib/iomgr/closure.h"
#include "src/core/lib/iomgr/endpoint.h"
diff --git a/src/core/lib/channel/http_client_filter.c b/src/core/lib/channel/http_client_filter.c
index a7a775cc53..edcc741ff6 100644
--- a/src/core/lib/channel/http_client_filter.c
+++ b/src/core/lib/channel/http_client_filter.c
@@ -43,6 +43,9 @@
#define EXPECTED_CONTENT_TYPE "application/grpc"
#define EXPECTED_CONTENT_TYPE_LENGTH sizeof(EXPECTED_CONTENT_TYPE) - 1
+/* default maximum size of payload eligable for GET request */
+static const size_t kMaxPayloadSizeForGet = 2048;
+
typedef struct call_data {
grpc_linked_mdelem method;
grpc_linked_mdelem scheme;
@@ -50,20 +53,39 @@ typedef struct call_data {
grpc_linked_mdelem te_trailers;
grpc_linked_mdelem content_type;
grpc_linked_mdelem user_agent;
+ grpc_linked_mdelem payload_bin;
grpc_metadata_batch *recv_initial_metadata;
+ uint8_t *payload_bytes;
+
+ /* Vars to read data off of send_message */
+ grpc_transport_stream_op send_op;
+ uint32_t send_length;
+ uint32_t send_flags;
+ gpr_slice incoming_slice;
+ grpc_slice_buffer_stream replacement_stream;
+ gpr_slice_buffer slices;
+ /* flag that indicates that all slices of send_messages aren't availble */
+ bool send_message_blocked;
/** Closure to call when finished with the hc_on_recv hook */
grpc_closure *on_done_recv;
+ grpc_closure *on_complete;
+ grpc_closure *post_send;
+
/** Receive closures are chained: we inject this closure as the on_done_recv
up-call on transport_op, and remember to call our on_done_recv member
after handling it. */
grpc_closure hc_on_recv;
+ grpc_closure hc_on_complete;
+ grpc_closure got_slice;
+ grpc_closure send_done;
} call_data;
typedef struct channel_data {
grpc_mdelem *static_scheme;
grpc_mdelem *user_agent;
+ size_t max_payload_size_for_get;
} channel_data;
typedef struct {
@@ -119,6 +141,24 @@ static void hc_on_recv(grpc_exec_ctx *exec_ctx, void *user_data,
calld->on_done_recv->cb(exec_ctx, calld->on_done_recv->cb_arg, error);
}
+static void hc_on_complete(grpc_exec_ctx *exec_ctx, void *user_data,
+ grpc_error *error) {
+ grpc_call_element *elem = user_data;
+ call_data *calld = elem->call_data;
+ if (calld->payload_bytes) {
+ gpr_free(calld->payload_bytes);
+ calld->payload_bytes = NULL;
+ }
+ calld->on_complete->cb(exec_ctx, calld->on_complete->cb_arg, error);
+}
+
+static void send_done(grpc_exec_ctx *exec_ctx, void *elemp, grpc_error *error) {
+ grpc_call_element *elem = elemp;
+ call_data *calld = elem->call_data;
+ gpr_slice_buffer_reset_and_unref(&calld->slices);
+ calld->post_send->cb(exec_ctx, calld->post_send->cb_arg, error);
+}
+
static grpc_mdelem *client_strip_filter(void *user_data, grpc_mdelem *md) {
/* eat the things we'd like to set ourselves */
if (md->key == GRPC_MDSTR_METHOD) return NULL;
@@ -129,22 +169,104 @@ static grpc_mdelem *client_strip_filter(void *user_data, grpc_mdelem *md) {
return md;
}
-static void hc_mutate_op(grpc_call_element *elem,
+static void continue_send_message(grpc_exec_ctx *exec_ctx,
+ grpc_call_element *elem) {
+ call_data *calld = elem->call_data;
+ uint8_t *wrptr = calld->payload_bytes;
+ while (grpc_byte_stream_next(exec_ctx, calld->send_op.send_message,
+ &calld->incoming_slice, ~(size_t)0,
+ &calld->got_slice)) {
+ memcpy(wrptr, GPR_SLICE_START_PTR(calld->incoming_slice),
+ GPR_SLICE_LENGTH(calld->incoming_slice));
+ wrptr += GPR_SLICE_LENGTH(calld->incoming_slice);
+ gpr_slice_buffer_add(&calld->slices, calld->incoming_slice);
+ if (calld->send_length == calld->slices.length) {
+ calld->send_message_blocked = false;
+ break;
+ }
+ }
+}
+
+static void got_slice(grpc_exec_ctx *exec_ctx, void *elemp, grpc_error *error) {
+ grpc_call_element *elem = elemp;
+ call_data *calld = elem->call_data;
+ calld->send_message_blocked = false;
+ gpr_slice_buffer_add(&calld->slices, calld->incoming_slice);
+ if (calld->send_length == calld->slices.length) {
+ /* Pass down the original send_message op that was blocked.*/
+ grpc_slice_buffer_stream_init(&calld->replacement_stream, &calld->slices,
+ calld->send_flags);
+ calld->send_op.send_message = &calld->replacement_stream.base;
+ calld->post_send = calld->send_op.on_complete;
+ calld->send_op.on_complete = &calld->send_done;
+ grpc_call_next_op(exec_ctx, elem, &calld->send_op);
+ } else {
+ continue_send_message(exec_ctx, elem);
+ }
+}
+
+static void hc_mutate_op(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
grpc_transport_stream_op *op) {
/* grab pointers to our data from the call element */
call_data *calld = elem->call_data;
channel_data *channeld = elem->channel_data;
+
if (op->send_initial_metadata != NULL) {
+ /* Decide which HTTP VERB to use. We use GET if the request is marked
+ cacheable, and the operation contains both initial metadata and send
+ message, and the payload is below the size threshold, and all the data
+ for this request is immediately available. */
+ grpc_mdelem *method = GRPC_MDELEM_METHOD_POST;
+ calld->send_message_blocked = false;
+ if ((op->send_initial_metadata_flags &
+ GRPC_INITIAL_METADATA_CACHEABLE_REQUEST) &&
+ op->send_message != NULL &&
+ op->send_message->length < channeld->max_payload_size_for_get) {
+ method = GRPC_MDELEM_METHOD_GET;
+ calld->send_message_blocked = true;
+ } else if (op->send_initial_metadata_flags &
+ GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST) {
+ method = GRPC_MDELEM_METHOD_PUT;
+ }
+
+ /* Attempt to read the data from send_message and create a header field. */
+ if (method == GRPC_MDELEM_METHOD_GET) {
+ /* allocate memory to hold the entire payload */
+ calld->payload_bytes = gpr_malloc(op->send_message->length);
+
+ /* read slices of send_message and copy into payload_bytes */
+ calld->send_op = *op;
+ calld->send_length = op->send_message->length;
+ calld->send_flags = op->send_message->flags;
+ continue_send_message(exec_ctx, elem);
+
+ if (calld->send_message_blocked == false) {
+ /* when all the send_message data is available, then create a MDELEM and
+ append to headers */
+ grpc_mdelem *payload_bin = grpc_mdelem_from_metadata_strings(
+ GRPC_MDSTR_GRPC_PAYLOAD_BIN,
+ grpc_mdstr_from_buffer(calld->payload_bytes,
+ op->send_message->length));
+ grpc_metadata_batch_add_tail(op->send_initial_metadata,
+ &calld->payload_bin, payload_bin);
+ calld->on_complete = op->on_complete;
+ op->on_complete = &calld->hc_on_complete;
+ op->send_message = NULL;
+ } else {
+ /* Not all data is available. Fall back to POST. */
+ gpr_log(GPR_DEBUG,
+ "Request is marked Cacheable but not all data is available.\
+ Falling back to POST");
+ method = GRPC_MDELEM_METHOD_POST;
+ }
+ }
+
grpc_metadata_batch_filter(op->send_initial_metadata, client_strip_filter,
elem);
/* Send : prefixed headers, which have to be before any application
layer headers. */
- grpc_metadata_batch_add_head(
- op->send_initial_metadata, &calld->method,
- op->send_initial_metadata_flags &
- GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST
- ? GRPC_MDELEM_METHOD_PUT
- : GRPC_MDELEM_METHOD_POST);
+ grpc_metadata_batch_add_head(op->send_initial_metadata, &calld->method,
+ method);
grpc_metadata_batch_add_head(op->send_initial_metadata, &calld->scheme,
channeld->static_scheme);
grpc_metadata_batch_add_tail(op->send_initial_metadata, &calld->te_trailers,
@@ -169,9 +291,16 @@ static void hc_start_transport_op(grpc_exec_ctx *exec_ctx,
grpc_transport_stream_op *op) {
GPR_TIMER_BEGIN("hc_start_transport_op", 0);
GRPC_CALL_LOG_OP(GPR_INFO, elem, op);
- hc_mutate_op(elem, op);
+ hc_mutate_op(exec_ctx, elem, op);
GPR_TIMER_END("hc_start_transport_op", 0);
- grpc_call_next_op(exec_ctx, elem, op);
+ call_data *calld = elem->call_data;
+ if (op->send_message != NULL && calld->send_message_blocked) {
+ /* Don't forward the op. send_message contains slices that aren't ready
+ yet. The call will be forwarded by the op_complete of slice read call.
+ */
+ } else {
+ grpc_call_next_op(exec_ctx, elem, op);
+ }
}
/* Constructor for call_data */
@@ -180,14 +309,23 @@ static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx,
grpc_call_element_args *args) {
call_data *calld = elem->call_data;
calld->on_done_recv = NULL;
+ calld->on_complete = NULL;
+ calld->payload_bytes = NULL;
+ gpr_slice_buffer_init(&calld->slices);
grpc_closure_init(&calld->hc_on_recv, hc_on_recv, elem);
+ grpc_closure_init(&calld->hc_on_complete, hc_on_complete, elem);
+ grpc_closure_init(&calld->got_slice, got_slice, elem);
+ grpc_closure_init(&calld->send_done, send_done, elem);
return GRPC_ERROR_NONE;
}
/* Destructor for call_data */
static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
const grpc_call_final_info *final_info,
- void *ignored) {}
+ void *ignored) {
+ call_data *calld = elem->call_data;
+ gpr_slice_buffer_destroy(&calld->slices);
+}
static grpc_mdelem *scheme_from_args(const grpc_channel_args *args) {
unsigned i;
@@ -210,6 +348,22 @@ static grpc_mdelem *scheme_from_args(const grpc_channel_args *args) {
return GRPC_MDELEM_SCHEME_HTTP;
}
+static size_t max_payload_size_from_args(const grpc_channel_args *args) {
+ if (args != NULL) {
+ for (size_t i = 0; i < args->num_args; ++i) {
+ if (0 == strcmp(args->args[i].key, GRPC_ARG_MAX_PAYLOAD_SIZE_FOR_GET)) {
+ if (args->args[i].type != GRPC_ARG_INTEGER) {
+ gpr_log(GPR_ERROR, "%s: must be an integer",
+ GRPC_ARG_MAX_PAYLOAD_SIZE_FOR_GET);
+ } else {
+ return (size_t)args->args[i].value.integer;
+ }
+ }
+ }
+ }
+ return kMaxPayloadSizeForGet;
+}
+
static grpc_mdstr *user_agent_from_args(const grpc_channel_args *args,
const char *transport_name) {
gpr_strvec v;
@@ -233,8 +387,9 @@ static grpc_mdstr *user_agent_from_args(const grpc_channel_args *args,
}
}
- gpr_asprintf(&tmp, "%sgrpc-c/%s (%s; %s)", is_first ? "" : " ",
- grpc_version_string(), GPR_PLATFORM_STRING, transport_name);
+ gpr_asprintf(&tmp, "%sgrpc-c/%s (%s; %s; %s)", is_first ? "" : " ",
+ grpc_version_string(), GPR_PLATFORM_STRING, transport_name,
+ grpc_g_stands_for());
is_first = 0;
gpr_strvec_add(&v, tmp);
@@ -267,6 +422,8 @@ static void init_channel_elem(grpc_exec_ctx *exec_ctx,
GPR_ASSERT(!args->is_last);
GPR_ASSERT(args->optional_transport != NULL);
chand->static_scheme = scheme_from_args(args->channel_args);
+ chand->max_payload_size_for_get =
+ max_payload_size_from_args(args->channel_args);
chand->user_agent = grpc_mdelem_from_metadata_strings(
GRPC_MDSTR_USER_AGENT,
user_agent_from_args(args->channel_args,
diff --git a/src/core/lib/channel/http_client_filter.h b/src/core/lib/channel/http_client_filter.h
index 47081175ea..9e6e106e9c 100644
--- a/src/core/lib/channel/http_client_filter.h
+++ b/src/core/lib/channel/http_client_filter.h
@@ -41,4 +41,7 @@ extern const grpc_channel_filter grpc_http_client_filter;
/* Channel arg to override the http2 :scheme header */
#define GRPC_ARG_HTTP2_SCHEME "grpc.http2_scheme"
+/* Channel arg to determine maximum size of payload eligable for GET request */
+#define GRPC_ARG_MAX_PAYLOAD_SIZE_FOR_GET "grpc.max_payload_size_for_get"
+
#endif /* GRPC_CORE_LIB_CHANNEL_HTTP_CLIENT_FILTER_H */
diff --git a/src/core/lib/channel/http_server_filter.c b/src/core/lib/channel/http_server_filter.c
index 5ce51f9016..0f2bf97824 100644
--- a/src/core/lib/channel/http_server_filter.c
+++ b/src/core/lib/channel/http_server_filter.c
@@ -49,17 +49,32 @@ typedef struct call_data {
uint8_t seen_scheme;
uint8_t seen_te_trailers;
uint8_t seen_authority;
+ uint8_t seen_payload_bin;
grpc_linked_mdelem status;
grpc_linked_mdelem content_type;
+ /* flag to ensure payload_bin is delivered only once */
+ uint8_t payload_bin_delivered;
+
grpc_metadata_batch *recv_initial_metadata;
bool *recv_idempotent_request;
+ bool *recv_cacheable_request;
/** Closure to call when finished with the hs_on_recv hook */
grpc_closure *on_done_recv;
+ /** Closure to call when we retrieve read message from the payload-bin header
+ */
+ grpc_closure *recv_message_ready;
+ grpc_closure *on_complete;
+ grpc_byte_stream **pp_recv_message;
+ gpr_slice_buffer read_slice_buffer;
+ grpc_slice_buffer_stream read_stream;
+
/** Receive closures are chained: we inject this closure as the on_done_recv
up-call on transport_op, and remember to call our on_done_recv member
after handling it. */
grpc_closure hs_on_recv;
+ grpc_closure hs_on_complete;
+ grpc_closure hs_recv_message_ready;
} call_data;
typedef struct channel_data { uint8_t unused; } channel_data;
@@ -76,16 +91,20 @@ static grpc_mdelem *server_filter(void *user_data, grpc_mdelem *md) {
/* Check if it is one of the headers we care about. */
if (md == GRPC_MDELEM_TE_TRAILERS || md == GRPC_MDELEM_METHOD_POST ||
- md == GRPC_MDELEM_METHOD_PUT || md == GRPC_MDELEM_SCHEME_HTTP ||
- md == GRPC_MDELEM_SCHEME_HTTPS ||
+ md == GRPC_MDELEM_METHOD_PUT || md == GRPC_MDELEM_METHOD_GET ||
+ md == GRPC_MDELEM_SCHEME_HTTP || md == GRPC_MDELEM_SCHEME_HTTPS ||
md == GRPC_MDELEM_CONTENT_TYPE_APPLICATION_SLASH_GRPC) {
/* swallow it */
if (md == GRPC_MDELEM_METHOD_POST) {
calld->seen_method = 1;
*calld->recv_idempotent_request = false;
+ *calld->recv_cacheable_request = false;
} else if (md == GRPC_MDELEM_METHOD_PUT) {
calld->seen_method = 1;
*calld->recv_idempotent_request = true;
+ } else if (md == GRPC_MDELEM_METHOD_GET) {
+ calld->seen_method = 1;
+ *calld->recv_cacheable_request = true;
} else if (md->key == GRPC_MDSTR_SCHEME) {
calld->seen_scheme = 1;
} else if (md == GRPC_MDELEM_TE_TRAILERS) {
@@ -137,6 +156,16 @@ static grpc_mdelem *server_filter(void *user_data, grpc_mdelem *md) {
GRPC_MDSTR_AUTHORITY, GRPC_MDSTR_REF(md->value));
calld->seen_authority = 1;
return authority;
+ } else if (md->key == GRPC_MDSTR_GRPC_PAYLOAD_BIN) {
+ /* Retrieve the payload from the value of the 'grpc-internal-payload-bin'
+ header field */
+ calld->seen_payload_bin = 1;
+ gpr_slice_buffer_init(&calld->read_slice_buffer);
+ gpr_slice_buffer_add(&calld->read_slice_buffer,
+ gpr_slice_ref(md->value->slice));
+ grpc_slice_buffer_stream_init(&calld->read_stream,
+ &calld->read_slice_buffer, 0);
+ return NULL;
} else {
return md;
}
@@ -189,6 +218,36 @@ static void hs_on_recv(grpc_exec_ctx *exec_ctx, void *user_data,
GRPC_ERROR_UNREF(err);
}
+static void hs_on_complete(grpc_exec_ctx *exec_ctx, void *user_data,
+ grpc_error *err) {
+ grpc_call_element *elem = user_data;
+ call_data *calld = elem->call_data;
+ /* Call recv_message_ready if we got the payload via the header field */
+ if (calld->seen_payload_bin && calld->recv_message_ready != NULL) {
+ *calld->pp_recv_message = calld->payload_bin_delivered
+ ? NULL
+ : (grpc_byte_stream *)&calld->read_stream;
+ calld->recv_message_ready->cb(exec_ctx, calld->recv_message_ready->cb_arg,
+ err);
+ calld->recv_message_ready = NULL;
+ calld->payload_bin_delivered = true;
+ }
+ calld->on_complete->cb(exec_ctx, calld->on_complete->cb_arg, err);
+}
+
+static void hs_recv_message_ready(grpc_exec_ctx *exec_ctx, void *user_data,
+ grpc_error *err) {
+ grpc_call_element *elem = user_data;
+ call_data *calld = elem->call_data;
+ if (calld->seen_payload_bin) {
+ /* do nothing. This is probably a GET request, and payload will be returned
+ in hs_on_complete callback. */
+ } else {
+ calld->recv_message_ready->cb(exec_ctx, calld->recv_message_ready->cb_arg,
+ err);
+ }
+}
+
static void hs_mutate_op(grpc_call_element *elem,
grpc_transport_stream_op *op) {
/* grab pointers to our data from the call element */
@@ -206,11 +265,25 @@ static void hs_mutate_op(grpc_call_element *elem,
if (op->recv_initial_metadata) {
/* substitute our callback for the higher callback */
GPR_ASSERT(op->recv_idempotent_request != NULL);
+ GPR_ASSERT(op->recv_cacheable_request != NULL);
calld->recv_initial_metadata = op->recv_initial_metadata;
calld->recv_idempotent_request = op->recv_idempotent_request;
+ calld->recv_cacheable_request = op->recv_cacheable_request;
calld->on_done_recv = op->recv_initial_metadata_ready;
op->recv_initial_metadata_ready = &calld->hs_on_recv;
}
+
+ if (op->recv_message) {
+ calld->recv_message_ready = op->recv_message_ready;
+ calld->pp_recv_message = op->recv_message;
+ if (op->recv_message_ready) {
+ op->recv_message_ready = &calld->hs_recv_message_ready;
+ }
+ if (op->on_complete) {
+ calld->on_complete = op->on_complete;
+ op->on_complete = &calld->hs_on_complete;
+ }
+ }
}
static void hs_start_transport_op(grpc_exec_ctx *exec_ctx,
@@ -232,6 +305,8 @@ static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx,
/* initialize members */
memset(calld, 0, sizeof(*calld));
grpc_closure_init(&calld->hs_on_recv, hs_on_recv, elem);
+ grpc_closure_init(&calld->hs_on_complete, hs_on_complete, elem);
+ grpc_closure_init(&calld->hs_recv_message_ready, hs_recv_message_ready, elem);
return GRPC_ERROR_NONE;
}
diff --git a/src/core/lib/iomgr/error.h b/src/core/lib/iomgr/error.h
index bc7781250e..6c769accdb 100644
--- a/src/core/lib/iomgr/error.h
+++ b/src/core/lib/iomgr/error.h
@@ -47,7 +47,8 @@
/// if a grpc_error is passed to a grpc_closure callback function (functions
/// with the signature:
/// void (*f)(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error))
-/// then those functions do not automatically own a ref to error
+/// then those functions do not own a ref to error (but are free to manually
+/// take a reference).
/// if a grpc_error is passed to *ANY OTHER FUNCTION* then that function takes
/// ownership of the error
/// Errors have:
diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c
index 02bcbaa10f..eba347125e 100644
--- a/src/core/lib/iomgr/ev_epoll_linux.c
+++ b/src/core/lib/iomgr/ev_epoll_linux.c
@@ -928,7 +928,8 @@ static void fd_orphan(grpc_exec_ctx *exec_ctx, grpc_fd *fd,
fd->polling_island = NULL;
}
- grpc_exec_ctx_sched(exec_ctx, fd->on_done_closure, error, NULL);
+ grpc_exec_ctx_sched(exec_ctx, fd->on_done_closure, GRPC_ERROR_REF(error),
+ NULL);
gpr_mu_unlock(&fd->mu);
UNREF_BY(fd, 2, reason); /* Drop the reference */
@@ -940,6 +941,7 @@ static void fd_orphan(grpc_exec_ctx *exec_ctx, grpc_fd *fd,
PI_UNREF(exec_ctx, unref_pi, "fd_orphan");
}
GRPC_LOG_IF_ERROR("fd_orphan", GRPC_ERROR_REF(error));
+ GRPC_ERROR_UNREF(error);
}
static grpc_error *fd_shutdown_error(bool shutdown) {
@@ -1353,8 +1355,10 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx,
gpr_mu_unlock(&pollset->mu);
do {
+ GRPC_SCHEDULING_START_BLOCKING_REGION;
ep_rv = epoll_pwait(epoll_fd, ep_ev, GRPC_EPOLL_MAX_EVENTS, timeout_ms,
sig_mask);
+ GRPC_SCHEDULING_END_BLOCKING_REGION;
if (ep_rv < 0) {
if (errno != EINTR) {
gpr_asprintf(&err_msg,
diff --git a/src/core/lib/security/context/security_context.c b/src/core/lib/security/context/security_context.c
index 127b13ee50..2204fadf54 100644
--- a/src/core/lib/security/context/security_context.c
+++ b/src/core/lib/security/context/security_context.c
@@ -99,6 +99,9 @@ void grpc_client_security_context_destroy(void *ctx) {
grpc_client_security_context *c = (grpc_client_security_context *)ctx;
grpc_call_credentials_unref(c->creds);
GRPC_AUTH_CONTEXT_UNREF(c->auth_context, "client_security_context");
+ if (c->extension.instance != NULL && c->extension.destroy != NULL) {
+ c->extension.destroy(c->extension.instance);
+ }
gpr_free(ctx);
}
@@ -114,6 +117,9 @@ grpc_server_security_context *grpc_server_security_context_create(void) {
void grpc_server_security_context_destroy(void *ctx) {
grpc_server_security_context *c = (grpc_server_security_context *)ctx;
GRPC_AUTH_CONTEXT_UNREF(c->auth_context, "server_security_context");
+ if (c->extension.instance != NULL && c->extension.destroy != NULL) {
+ c->extension.destroy(c->extension.instance);
+ }
gpr_free(ctx);
}
diff --git a/src/core/lib/security/context/security_context.h b/src/core/lib/security/context/security_context.h
index 4e7666dfe3..1e131a0c23 100644
--- a/src/core/lib/security/context/security_context.h
+++ b/src/core/lib/security/context/security_context.h
@@ -84,6 +84,16 @@ void grpc_auth_context_unref(grpc_auth_context *policy);
void grpc_auth_property_reset(grpc_auth_property *property);
+/* --- grpc_security_context_extension ---
+
+ Extension to the security context that may be set in a filter and accessed
+ later by a higher level method on a grpc_call object. */
+
+typedef struct {
+ void *instance;
+ void (*destroy)(void *);
+} grpc_security_context_extension;
+
/* --- grpc_client_security_context ---
Internal client-side security context. */
@@ -91,6 +101,7 @@ void grpc_auth_property_reset(grpc_auth_property *property);
typedef struct {
grpc_call_credentials *creds;
grpc_auth_context *auth_context;
+ grpc_security_context_extension extension;
} grpc_client_security_context;
grpc_client_security_context *grpc_client_security_context_create(void);
@@ -102,6 +113,7 @@ void grpc_client_security_context_destroy(void *ctx);
typedef struct {
grpc_auth_context *auth_context;
+ grpc_security_context_extension extension;
} grpc_server_security_context;
grpc_server_security_context *grpc_server_security_context_create(void);
diff --git a/src/core/lib/security/credentials/jwt/json_token.c b/src/core/lib/security/credentials/jwt/json_token.c
index 354c13133e..192a5f47ed 100644
--- a/src/core/lib/security/credentials/jwt/json_token.c
+++ b/src/core/lib/security/credentials/jwt/json_token.c
@@ -38,6 +38,7 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
+#include <grpc/support/time.h>
#include "src/core/lib/security/util/b64.h"
#include "src/core/lib/security/util/json_util.h"
diff --git a/src/core/lib/support/percent_encoding.c b/src/core/lib/support/percent_encoding.c
new file mode 100644
index 0000000000..3c19f264f9
--- /dev/null
+++ b/src/core/lib/support/percent_encoding.c
@@ -0,0 +1,180 @@
+/*
+ *
+ * Copyright 2016, Google Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#include "src/core/lib/support/percent_encoding.h"
+
+#include <grpc/support/log.h>
+
+const uint8_t gpr_url_percent_encoding_unreserved_bytes[256 / 8] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xff, 0x03, 0xfe, 0xff, 0xff,
+ 0x87, 0xfe, 0xff, 0xff, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+const uint8_t gpr_compatible_percent_encoding_unreserved_bytes[256 / 8] = {
+ 0x00, 0x00, 0x00, 0x00, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+
+static bool is_unreserved_character(uint8_t c,
+ const uint8_t *unreserved_bytes) {
+ return ((unreserved_bytes[c / 8] >> (c % 8)) & 1) != 0;
+}
+
+gpr_slice gpr_percent_encode_slice(gpr_slice slice,
+ const uint8_t *unreserved_bytes) {
+ static const uint8_t hex[] = "0123456789ABCDEF";
+
+ // first pass: count the number of bytes needed to output this string
+ size_t output_length = 0;
+ const uint8_t *slice_start = GPR_SLICE_START_PTR(slice);
+ const uint8_t *slice_end = GPR_SLICE_END_PTR(slice);
+ const uint8_t *p;
+ bool any_reserved_bytes = false;
+ for (p = slice_start; p < slice_end; p++) {
+ bool unres = is_unreserved_character(*p, unreserved_bytes);
+ output_length += unres ? 1 : 3;
+ any_reserved_bytes |= !unres;
+ }
+ // no unreserved bytes: return the string unmodified
+ if (!any_reserved_bytes) {
+ return gpr_slice_ref(slice);
+ }
+ // second pass: actually encode
+ gpr_slice out = gpr_slice_malloc(output_length);
+ uint8_t *q = GPR_SLICE_START_PTR(out);
+ for (p = slice_start; p < slice_end; p++) {
+ if (is_unreserved_character(*p, unreserved_bytes)) {
+ *q++ = *p;
+ } else {
+ *q++ = '%';
+ *q++ = hex[*p >> 4];
+ *q++ = hex[*p & 15];
+ }
+ }
+ GPR_ASSERT(q == GPR_SLICE_END_PTR(out));
+ return out;
+}
+
+static bool valid_hex(const uint8_t *p, const uint8_t *end) {
+ if (p >= end) return false;
+ return (*p >= '0' && *p <= '9') || (*p >= 'a' && *p <= 'f') ||
+ (*p >= 'A' && *p <= 'F');
+}
+
+static uint8_t dehex(uint8_t c) {
+ if (c >= '0' && c <= '9') return (uint8_t)(c - '0');
+ if (c >= 'A' && c <= 'F') return (uint8_t)(c - 'A' + 10);
+ if (c >= 'a' && c <= 'f') return (uint8_t)(c - 'a' + 10);
+ GPR_UNREACHABLE_CODE(return 255);
+}
+
+bool gpr_strict_percent_decode_slice(gpr_slice slice_in,
+ const uint8_t *unreserved_bytes,
+ gpr_slice *slice_out) {
+ const uint8_t *p = GPR_SLICE_START_PTR(slice_in);
+ const uint8_t *in_end = GPR_SLICE_END_PTR(slice_in);
+ size_t out_length = 0;
+ bool any_percent_encoded_stuff = false;
+ while (p != in_end) {
+ if (*p == '%') {
+ if (!valid_hex(++p, in_end)) return false;
+ if (!valid_hex(++p, in_end)) return false;
+ p++;
+ out_length++;
+ any_percent_encoded_stuff = true;
+ } else if (is_unreserved_character(*p, unreserved_bytes)) {
+ p++;
+ out_length++;
+ } else {
+ return false;
+ }
+ }
+ if (!any_percent_encoded_stuff) {
+ *slice_out = gpr_slice_ref(slice_in);
+ return true;
+ }
+ p = GPR_SLICE_START_PTR(slice_in);
+ *slice_out = gpr_slice_malloc(out_length);
+ uint8_t *q = GPR_SLICE_START_PTR(*slice_out);
+ while (p != in_end) {
+ if (*p == '%') {
+ *q++ = (uint8_t)(dehex(p[1]) << 4) | (dehex(p[2]));
+ p += 3;
+ } else {
+ *q++ = *p++;
+ }
+ }
+ GPR_ASSERT(q == GPR_SLICE_END_PTR(*slice_out));
+ return true;
+}
+
+gpr_slice gpr_permissive_percent_decode_slice(gpr_slice slice_in) {
+ const uint8_t *p = GPR_SLICE_START_PTR(slice_in);
+ const uint8_t *in_end = GPR_SLICE_END_PTR(slice_in);
+ size_t out_length = 0;
+ bool any_percent_encoded_stuff = false;
+ while (p != in_end) {
+ if (*p == '%') {
+ if (!valid_hex(p + 1, in_end) || !valid_hex(p + 2, in_end)) {
+ p++;
+ out_length++;
+ } else {
+ p += 3;
+ out_length++;
+ any_percent_encoded_stuff = true;
+ }
+ } else {
+ p++;
+ out_length++;
+ }
+ }
+ if (!any_percent_encoded_stuff) {
+ return gpr_slice_ref(slice_in);
+ }
+ p = GPR_SLICE_START_PTR(slice_in);
+ gpr_slice out = gpr_slice_malloc(out_length);
+ uint8_t *q = GPR_SLICE_START_PTR(out);
+ while (p != in_end) {
+ if (*p == '%') {
+ if (!valid_hex(p + 1, in_end) || !valid_hex(p + 2, in_end)) {
+ *q++ = *p++;
+ } else {
+ *q++ = (uint8_t)(dehex(p[1]) << 4) | (dehex(p[2]));
+ p += 3;
+ }
+ } else {
+ *q++ = *p++;
+ }
+ }
+ GPR_ASSERT(q == GPR_SLICE_END_PTR(out));
+ return out;
+}
diff --git a/src/core/lib/support/percent_encoding.h b/src/core/lib/support/percent_encoding.h
new file mode 100644
index 0000000000..000bf14ede
--- /dev/null
+++ b/src/core/lib/support/percent_encoding.h
@@ -0,0 +1,78 @@
+/*
+ *
+ * Copyright 2016, Google Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#ifndef GRPC_CORE_LIB_SUPPORT_PERCENT_ENCODING_H
+#define GRPC_CORE_LIB_SUPPORT_PERCENT_ENCODING_H
+
+/* Percent encoding and decoding of slices.
+ Transforms arbitrary strings into safe-for-transmission strings by using
+ variants of percent encoding (RFC 3986).
+ Two major variants are supplied: one that strictly matches URL encoding,
+ and another which applies percent encoding only to non-http2 header
+ bytes (the 'compatible' variant) */
+
+#include <stdbool.h>
+
+#include <grpc/support/slice.h>
+
+/* URL percent encoding spec bitfield (usabel as 'unreserved_bytes' in
+ gpr_percent_encode_slice, gpr_strict_percent_decode_slice).
+ Flags [A-Za-z0-9-_.~] as unreserved bytes for the percent encoding routines
+ */
+extern const uint8_t gpr_url_percent_encoding_unreserved_bytes[256 / 8];
+/* URL percent encoding spec bitfield (usabel as 'unreserved_bytes' in
+ gpr_percent_encode_slice, gpr_strict_percent_decode_slice).
+ Flags ascii7 non-control characters excluding '%' as unreserved bytes for the
+ percent encoding routines */
+extern const uint8_t gpr_compatible_percent_encoding_unreserved_bytes[256 / 8];
+
+/* Percent-encode a slice, returning the new slice (this cannot fail):
+ unreserved_bytes is a bitfield indicating which bytes are considered
+ unreserved and thus do not need percent encoding */
+gpr_slice gpr_percent_encode_slice(gpr_slice slice,
+ const uint8_t *unreserved_bytes);
+/* Percent-decode a slice, strictly.
+ If the input is legal (contains no unreserved bytes, and legal % encodings),
+ returns true and sets *slice_out to the decoded slice.
+ If the input is not legal, returns false and leaves *slice_out untouched.
+ unreserved_bytes is a bitfield indicating which bytes are considered
+ unreserved and thus do not need percent encoding */
+bool gpr_strict_percent_decode_slice(gpr_slice slice_in,
+ const uint8_t *unreserved_bytes,
+ gpr_slice *slice_out);
+/* Percent-decode a slice, permissively.
+ If a % triplet can not be decoded, pass it through verbatim.
+ This cannot fail. */
+gpr_slice gpr_permissive_percent_decode_slice(gpr_slice slice_in);
+
+#endif /* GRPC_CORE_LIB_SUPPORT_PERCENT_ENCODING_H */
diff --git a/src/core/lib/support/time_posix.c b/src/core/lib/support/time_posix.c
index 11542072fe..a69c501e9f 100644
--- a/src/core/lib/support/time_posix.c
+++ b/src/core/lib/support/time_posix.c
@@ -127,7 +127,7 @@ static gpr_timespec now_impl(gpr_clock_type clock) {
now.tv_nsec = now_tv.tv_usec * 1000;
break;
case GPR_CLOCK_MONOTONIC:
- now_dbl = (mach_absolute_time() - g_time_start) * g_time_scale;
+ now_dbl = ((double)(mach_absolute_time() - g_time_start)) * g_time_scale;
now.tv_sec = (int64_t)(now_dbl * 1e-9);
now.tv_nsec = (int32_t)(now_dbl - ((double)now.tv_sec) * 1e9);
break;
diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c
index 64afcecc07..55e6d99057 100644
--- a/src/core/lib/surface/server.c
+++ b/src/core/lib/surface/server.c
@@ -149,6 +149,7 @@ struct call_data {
grpc_metadata_batch *recv_initial_metadata;
bool recv_idempotent_request;
+ bool recv_cacheable_request;
grpc_metadata_array initial_metadata;
request_matcher *request_matcher;
@@ -497,9 +498,12 @@ static void publish_call(grpc_exec_ctx *exec_ctx, grpc_server *server,
&rc->data.batch.details->method_capacity, calld->path);
rc->data.batch.details->deadline = calld->deadline;
rc->data.batch.details->flags =
- 0 | (calld->recv_idempotent_request
- ? GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST
- : 0);
+ (calld->recv_idempotent_request
+ ? GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST
+ : 0) |
+ (calld->recv_cacheable_request
+ ? GRPC_INITIAL_METADATA_CACHEABLE_REQUEST
+ : 0);
break;
case REGISTERED_CALL:
*rc->data.registered.deadline = calld->deadline;
@@ -779,6 +783,7 @@ static void server_mutate_op(grpc_call_element *elem,
calld->on_done_recv_initial_metadata = op->recv_initial_metadata_ready;
op->recv_initial_metadata_ready = &calld->server_on_recv_initial_metadata;
op->recv_idempotent_request = &calld->recv_idempotent_request;
+ op->recv_cacheable_request = &calld->recv_cacheable_request;
}
}
diff --git a/src/core/lib/surface/version.c b/src/core/lib/surface/version.c
index 1942075054..41242684da 100644
--- a/src/core/lib/surface/version.c
+++ b/src/core/lib/surface/version.c
@@ -37,3 +37,5 @@
#include <grpc/grpc.h>
const char *grpc_version_string(void) { return "1.1.0-dev"; }
+
+const char *grpc_g_stands_for(void) { return "good"; }
diff --git a/src/core/lib/transport/metadata.c b/src/core/lib/transport/metadata.c
index 0677f29766..4b40c275ad 100644
--- a/src/core/lib/transport/metadata.c
+++ b/src/core/lib/transport/metadata.c
@@ -278,7 +278,7 @@ static void ref_md_locked(mdtab_shard *shard,
internal_metadata *md DEBUG_ARGS) {
#ifdef GRPC_METADATA_REFCOUNT_DEBUG
gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG,
- "ELM REF:%p:%d->%d: '%s' = '%s'", md,
+ "ELM REF:%p:%zu->%zu: '%s' = '%s'", (void *)md,
gpr_atm_no_barrier_load(&md->refcnt),
gpr_atm_no_barrier_load(&md->refcnt) + 1,
grpc_mdstr_as_c_string((grpc_mdstr *)md->key),
@@ -566,7 +566,7 @@ grpc_mdelem *grpc_mdelem_from_metadata_strings(grpc_mdstr *mkey,
shard->elems[idx] = md;
gpr_mu_init(&md->mu_user_data);
#ifdef GRPC_METADATA_REFCOUNT_DEBUG
- gpr_log(GPR_DEBUG, "ELM NEW:%p:%d: '%s' = '%s'", md,
+ gpr_log(GPR_DEBUG, "ELM NEW:%p:%zu: '%s' = '%s'", (void *)md,
gpr_atm_no_barrier_load(&md->refcnt),
grpc_mdstr_as_c_string((grpc_mdstr *)md->key),
grpc_mdstr_as_c_string((grpc_mdstr *)md->value));
@@ -639,7 +639,7 @@ grpc_mdelem *grpc_mdelem_ref(grpc_mdelem *gmd DEBUG_ARGS) {
if (is_mdelem_static(gmd)) return gmd;
#ifdef GRPC_METADATA_REFCOUNT_DEBUG
gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG,
- "ELM REF:%p:%d->%d: '%s' = '%s'", md,
+ "ELM REF:%p:%zu->%zu: '%s' = '%s'", (void *)md,
gpr_atm_no_barrier_load(&md->refcnt),
gpr_atm_no_barrier_load(&md->refcnt) + 1,
grpc_mdstr_as_c_string((grpc_mdstr *)md->key),
@@ -649,7 +649,7 @@ grpc_mdelem *grpc_mdelem_ref(grpc_mdelem *gmd DEBUG_ARGS) {
this function - meaning that no adjustment to mdtab_free is necessary,
simplifying the logic here to be just an atomic increment */
/* use C assert to have this removed in opt builds */
- assert(gpr_atm_no_barrier_load(&md->refcnt) >= 1);
+ GPR_ASSERT(gpr_atm_no_barrier_load(&md->refcnt) >= 1);
gpr_atm_no_barrier_fetch_add(&md->refcnt, 1);
return gmd;
}
@@ -660,14 +660,16 @@ void grpc_mdelem_unref(grpc_mdelem *gmd DEBUG_ARGS) {
if (is_mdelem_static(gmd)) return;
#ifdef GRPC_METADATA_REFCOUNT_DEBUG
gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG,
- "ELM UNREF:%p:%d->%d: '%s' = '%s'", md,
+ "ELM UNREF:%p:%zu->%zu: '%s' = '%s'", (void *)md,
gpr_atm_no_barrier_load(&md->refcnt),
gpr_atm_no_barrier_load(&md->refcnt) - 1,
grpc_mdstr_as_c_string((grpc_mdstr *)md->key),
grpc_mdstr_as_c_string((grpc_mdstr *)md->value));
#endif
uint32_t hash = GRPC_MDSTR_KV_HASH(md->key->hash, md->value->hash);
- if (1 == gpr_atm_full_fetch_add(&md->refcnt, -1)) {
+ const gpr_atm prev_refcount = gpr_atm_full_fetch_add(&md->refcnt, -1);
+ GPR_ASSERT(prev_refcount >= 1);
+ if (1 == prev_refcount) {
/* once the refcount hits zero, some other thread can come along and
free md at any time: it's unsafe from this point on to access it */
mdtab_shard *shard =
@@ -676,10 +678,12 @@ void grpc_mdelem_unref(grpc_mdelem *gmd DEBUG_ARGS) {
}
}
-const char *grpc_mdstr_as_c_string(grpc_mdstr *s) {
+const char *grpc_mdstr_as_c_string(const grpc_mdstr *s) {
return (const char *)GPR_SLICE_START_PTR(s->slice);
}
+size_t grpc_mdstr_length(const grpc_mdstr *s) { return GRPC_MDSTR_LENGTH(s); }
+
grpc_mdstr *grpc_mdstr_ref(grpc_mdstr *gs DEBUG_ARGS) {
internal_string *s = (internal_string *)gs;
if (is_mdstr_static(gs)) return gs;
diff --git a/src/core/lib/transport/metadata.h b/src/core/lib/transport/metadata.h
index 2b0921c8d7..71eff0acf2 100644
--- a/src/core/lib/transport/metadata.h
+++ b/src/core/lib/transport/metadata.h
@@ -147,7 +147,7 @@ void grpc_mdelem_unref(grpc_mdelem *md);
/* Recover a char* from a grpc_mdstr. The returned string is null terminated.
Does not promise that the returned string has no embedded nulls however. */
-const char *grpc_mdstr_as_c_string(grpc_mdstr *s);
+const char *grpc_mdstr_as_c_string(const grpc_mdstr *s);
#define GRPC_MDSTR_LENGTH(s) (GPR_SLICE_LENGTH(s->slice))
diff --git a/src/core/lib/transport/static_metadata.c b/src/core/lib/transport/static_metadata.c
index 8f3e5b5b40..fce591f346 100644
--- a/src/core/lib/transport/static_metadata.c
+++ b/src/core/lib/transport/static_metadata.c
@@ -51,15 +51,15 @@ uintptr_t grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
const uint8_t grpc_static_metadata_elem_indices[GRPC_STATIC_MDELEM_COUNT * 2] =
- {11, 33, 10, 33, 12, 33, 12, 49, 13, 33, 14, 33, 15, 33, 16, 33, 17, 33,
+ {11, 33, 10, 33, 12, 33, 12, 50, 13, 33, 14, 33, 15, 33, 16, 33, 17, 33,
19, 33, 20, 33, 21, 33, 22, 33, 23, 33, 24, 33, 25, 33, 26, 33, 27, 33,
28, 18, 28, 33, 29, 33, 30, 33, 34, 33, 35, 33, 36, 33, 37, 33, 40, 31,
- 40, 32, 40, 48, 40, 53, 40, 54, 40, 55, 40, 56, 42, 31, 42, 48, 42, 53,
- 45, 0, 45, 1, 45, 2, 50, 33, 57, 33, 58, 33, 59, 33, 60, 33, 61, 33,
- 62, 33, 63, 33, 64, 33, 65, 33, 66, 33, 67, 33, 68, 38, 68, 70, 68, 73,
- 69, 81, 69, 82, 71, 33, 72, 33, 74, 33, 75, 33, 76, 33, 77, 33, 78, 39,
- 78, 51, 78, 52, 79, 33, 80, 33, 83, 3, 83, 4, 83, 5, 83, 6, 83, 7,
- 83, 8, 83, 9, 84, 33, 85, 86, 87, 33, 88, 33, 89, 33, 90, 33, 91, 33};
+ 40, 32, 40, 49, 40, 54, 40, 55, 40, 56, 40, 57, 42, 31, 42, 49, 42, 54,
+ 46, 0, 46, 1, 46, 2, 51, 33, 58, 33, 59, 33, 60, 33, 61, 33, 62, 33,
+ 63, 33, 64, 33, 65, 33, 66, 33, 67, 33, 68, 33, 69, 38, 69, 71, 69, 74,
+ 70, 82, 70, 83, 72, 33, 73, 33, 75, 33, 76, 33, 77, 33, 78, 33, 79, 39,
+ 79, 52, 79, 53, 80, 33, 81, 33, 84, 3, 84, 4, 84, 5, 84, 6, 84, 7,
+ 84, 8, 84, 9, 85, 33, 86, 87, 88, 33, 89, 33, 90, 33, 91, 33, 92, 33};
const char *const grpc_static_metadata_strings[GRPC_STATIC_MDSTR_COUNT] = {
"0",
@@ -107,6 +107,7 @@ const char *const grpc_static_metadata_strings[GRPC_STATIC_MDSTR_COUNT] = {
"grpc-encoding",
"grpc-internal-encoding-request",
"grpc-message",
+ "grpc-payload-bin",
"grpc-status",
"grpc-timeout",
"grpc-tracing-bin",
diff --git a/src/core/lib/transport/static_metadata.h b/src/core/lib/transport/static_metadata.h
index b51bacac50..54b6f38be1 100644
--- a/src/core/lib/transport/static_metadata.h
+++ b/src/core/lib/transport/static_metadata.h
@@ -44,7 +44,7 @@
#include "src/core/lib/transport/metadata.h"
-#define GRPC_STATIC_MDSTR_COUNT 92
+#define GRPC_STATIC_MDSTR_COUNT 93
extern grpc_mdstr grpc_static_mdstr_table[GRPC_STATIC_MDSTR_COUNT];
/* "0" */
#define GRPC_MDSTR_0 (&grpc_static_mdstr_table[0])
@@ -136,101 +136,103 @@ extern grpc_mdstr grpc_static_mdstr_table[GRPC_STATIC_MDSTR_COUNT];
#define GRPC_MDSTR_GRPC_INTERNAL_ENCODING_REQUEST (&grpc_static_mdstr_table[43])
/* "grpc-message" */
#define GRPC_MDSTR_GRPC_MESSAGE (&grpc_static_mdstr_table[44])
+/* "grpc-payload-bin" */
+#define GRPC_MDSTR_GRPC_PAYLOAD_BIN (&grpc_static_mdstr_table[45])
/* "grpc-status" */
-#define GRPC_MDSTR_GRPC_STATUS (&grpc_static_mdstr_table[45])
+#define GRPC_MDSTR_GRPC_STATUS (&grpc_static_mdstr_table[46])
/* "grpc-timeout" */
-#define GRPC_MDSTR_GRPC_TIMEOUT (&grpc_static_mdstr_table[46])
+#define GRPC_MDSTR_GRPC_TIMEOUT (&grpc_static_mdstr_table[47])
/* "grpc-tracing-bin" */
-#define GRPC_MDSTR_GRPC_TRACING_BIN (&grpc_static_mdstr_table[47])
+#define GRPC_MDSTR_GRPC_TRACING_BIN (&grpc_static_mdstr_table[48])
/* "gzip" */
-#define GRPC_MDSTR_GZIP (&grpc_static_mdstr_table[48])
+#define GRPC_MDSTR_GZIP (&grpc_static_mdstr_table[49])
/* "gzip, deflate" */
-#define GRPC_MDSTR_GZIP_COMMA_DEFLATE (&grpc_static_mdstr_table[49])
+#define GRPC_MDSTR_GZIP_COMMA_DEFLATE (&grpc_static_mdstr_table[50])
/* "host" */
-#define GRPC_MDSTR_HOST (&grpc_static_mdstr_table[50])
+#define GRPC_MDSTR_HOST (&grpc_static_mdstr_table[51])
/* "http" */
-#define GRPC_MDSTR_HTTP (&grpc_static_mdstr_table[51])
+#define GRPC_MDSTR_HTTP (&grpc_static_mdstr_table[52])
/* "https" */
-#define GRPC_MDSTR_HTTPS (&grpc_static_mdstr_table[52])
+#define GRPC_MDSTR_HTTPS (&grpc_static_mdstr_table[53])
/* "identity" */
-#define GRPC_MDSTR_IDENTITY (&grpc_static_mdstr_table[53])
+#define GRPC_MDSTR_IDENTITY (&grpc_static_mdstr_table[54])
/* "identity,deflate" */
-#define GRPC_MDSTR_IDENTITY_COMMA_DEFLATE (&grpc_static_mdstr_table[54])
+#define GRPC_MDSTR_IDENTITY_COMMA_DEFLATE (&grpc_static_mdstr_table[55])
/* "identity,deflate,gzip" */
#define GRPC_MDSTR_IDENTITY_COMMA_DEFLATE_COMMA_GZIP \
- (&grpc_static_mdstr_table[55])
+ (&grpc_static_mdstr_table[56])
/* "identity,gzip" */
-#define GRPC_MDSTR_IDENTITY_COMMA_GZIP (&grpc_static_mdstr_table[56])
+#define GRPC_MDSTR_IDENTITY_COMMA_GZIP (&grpc_static_mdstr_table[57])
/* "if-match" */
-#define GRPC_MDSTR_IF_MATCH (&grpc_static_mdstr_table[57])
+#define GRPC_MDSTR_IF_MATCH (&grpc_static_mdstr_table[58])
/* "if-modified-since" */
-#define GRPC_MDSTR_IF_MODIFIED_SINCE (&grpc_static_mdstr_table[58])
+#define GRPC_MDSTR_IF_MODIFIED_SINCE (&grpc_static_mdstr_table[59])
/* "if-none-match" */
-#define GRPC_MDSTR_IF_NONE_MATCH (&grpc_static_mdstr_table[59])
+#define GRPC_MDSTR_IF_NONE_MATCH (&grpc_static_mdstr_table[60])
/* "if-range" */
-#define GRPC_MDSTR_IF_RANGE (&grpc_static_mdstr_table[60])
+#define GRPC_MDSTR_IF_RANGE (&grpc_static_mdstr_table[61])
/* "if-unmodified-since" */
-#define GRPC_MDSTR_IF_UNMODIFIED_SINCE (&grpc_static_mdstr_table[61])
+#define GRPC_MDSTR_IF_UNMODIFIED_SINCE (&grpc_static_mdstr_table[62])
/* "last-modified" */
-#define GRPC_MDSTR_LAST_MODIFIED (&grpc_static_mdstr_table[62])
+#define GRPC_MDSTR_LAST_MODIFIED (&grpc_static_mdstr_table[63])
/* "link" */
-#define GRPC_MDSTR_LINK (&grpc_static_mdstr_table[63])
+#define GRPC_MDSTR_LINK (&grpc_static_mdstr_table[64])
/* "load-reporting-initial" */
-#define GRPC_MDSTR_LOAD_REPORTING_INITIAL (&grpc_static_mdstr_table[64])
+#define GRPC_MDSTR_LOAD_REPORTING_INITIAL (&grpc_static_mdstr_table[65])
/* "load-reporting-trailing" */
-#define GRPC_MDSTR_LOAD_REPORTING_TRAILING (&grpc_static_mdstr_table[65])
+#define GRPC_MDSTR_LOAD_REPORTING_TRAILING (&grpc_static_mdstr_table[66])
/* "location" */
-#define GRPC_MDSTR_LOCATION (&grpc_static_mdstr_table[66])
+#define GRPC_MDSTR_LOCATION (&grpc_static_mdstr_table[67])
/* "max-forwards" */
-#define GRPC_MDSTR_MAX_FORWARDS (&grpc_static_mdstr_table[67])
+#define GRPC_MDSTR_MAX_FORWARDS (&grpc_static_mdstr_table[68])
/* ":method" */
-#define GRPC_MDSTR_METHOD (&grpc_static_mdstr_table[68])
+#define GRPC_MDSTR_METHOD (&grpc_static_mdstr_table[69])
/* ":path" */
-#define GRPC_MDSTR_PATH (&grpc_static_mdstr_table[69])
+#define GRPC_MDSTR_PATH (&grpc_static_mdstr_table[70])
/* "POST" */
-#define GRPC_MDSTR_POST (&grpc_static_mdstr_table[70])
+#define GRPC_MDSTR_POST (&grpc_static_mdstr_table[71])
/* "proxy-authenticate" */
-#define GRPC_MDSTR_PROXY_AUTHENTICATE (&grpc_static_mdstr_table[71])
+#define GRPC_MDSTR_PROXY_AUTHENTICATE (&grpc_static_mdstr_table[72])
/* "proxy-authorization" */
-#define GRPC_MDSTR_PROXY_AUTHORIZATION (&grpc_static_mdstr_table[72])
+#define GRPC_MDSTR_PROXY_AUTHORIZATION (&grpc_static_mdstr_table[73])
/* "PUT" */
-#define GRPC_MDSTR_PUT (&grpc_static_mdstr_table[73])
+#define GRPC_MDSTR_PUT (&grpc_static_mdstr_table[74])
/* "range" */
-#define GRPC_MDSTR_RANGE (&grpc_static_mdstr_table[74])
+#define GRPC_MDSTR_RANGE (&grpc_static_mdstr_table[75])
/* "referer" */
-#define GRPC_MDSTR_REFERER (&grpc_static_mdstr_table[75])
+#define GRPC_MDSTR_REFERER (&grpc_static_mdstr_table[76])
/* "refresh" */
-#define GRPC_MDSTR_REFRESH (&grpc_static_mdstr_table[76])
+#define GRPC_MDSTR_REFRESH (&grpc_static_mdstr_table[77])
/* "retry-after" */
-#define GRPC_MDSTR_RETRY_AFTER (&grpc_static_mdstr_table[77])
+#define GRPC_MDSTR_RETRY_AFTER (&grpc_static_mdstr_table[78])
/* ":scheme" */
-#define GRPC_MDSTR_SCHEME (&grpc_static_mdstr_table[78])
+#define GRPC_MDSTR_SCHEME (&grpc_static_mdstr_table[79])
/* "server" */
-#define GRPC_MDSTR_SERVER (&grpc_static_mdstr_table[79])
+#define GRPC_MDSTR_SERVER (&grpc_static_mdstr_table[80])
/* "set-cookie" */
-#define GRPC_MDSTR_SET_COOKIE (&grpc_static_mdstr_table[80])
+#define GRPC_MDSTR_SET_COOKIE (&grpc_static_mdstr_table[81])
/* "/" */
-#define GRPC_MDSTR_SLASH (&grpc_static_mdstr_table[81])
+#define GRPC_MDSTR_SLASH (&grpc_static_mdstr_table[82])
/* "/index.html" */
-#define GRPC_MDSTR_SLASH_INDEX_DOT_HTML (&grpc_static_mdstr_table[82])
+#define GRPC_MDSTR_SLASH_INDEX_DOT_HTML (&grpc_static_mdstr_table[83])
/* ":status" */
-#define GRPC_MDSTR_STATUS (&grpc_static_mdstr_table[83])
+#define GRPC_MDSTR_STATUS (&grpc_static_mdstr_table[84])
/* "strict-transport-security" */
-#define GRPC_MDSTR_STRICT_TRANSPORT_SECURITY (&grpc_static_mdstr_table[84])
+#define GRPC_MDSTR_STRICT_TRANSPORT_SECURITY (&grpc_static_mdstr_table[85])
/* "te" */
-#define GRPC_MDSTR_TE (&grpc_static_mdstr_table[85])
+#define GRPC_MDSTR_TE (&grpc_static_mdstr_table[86])
/* "trailers" */
-#define GRPC_MDSTR_TRAILERS (&grpc_static_mdstr_table[86])
+#define GRPC_MDSTR_TRAILERS (&grpc_static_mdstr_table[87])
/* "transfer-encoding" */
-#define GRPC_MDSTR_TRANSFER_ENCODING (&grpc_static_mdstr_table[87])
+#define GRPC_MDSTR_TRANSFER_ENCODING (&grpc_static_mdstr_table[88])
/* "user-agent" */
-#define GRPC_MDSTR_USER_AGENT (&grpc_static_mdstr_table[88])
+#define GRPC_MDSTR_USER_AGENT (&grpc_static_mdstr_table[89])
/* "vary" */
-#define GRPC_MDSTR_VARY (&grpc_static_mdstr_table[89])
+#define GRPC_MDSTR_VARY (&grpc_static_mdstr_table[90])
/* "via" */
-#define GRPC_MDSTR_VIA (&grpc_static_mdstr_table[90])
+#define GRPC_MDSTR_VIA (&grpc_static_mdstr_table[91])
/* "www-authenticate" */
-#define GRPC_MDSTR_WWW_AUTHENTICATE (&grpc_static_mdstr_table[91])
+#define GRPC_MDSTR_WWW_AUTHENTICATE (&grpc_static_mdstr_table[92])
#define GRPC_STATIC_MDELEM_COUNT 81
extern grpc_mdelem grpc_static_mdelem_table[GRPC_STATIC_MDELEM_COUNT];
diff --git a/src/core/lib/transport/transport.h b/src/core/lib/transport/transport.h
index 1705e6e582..26ed6cb839 100644
--- a/src/core/lib/transport/transport.h
+++ b/src/core/lib/transport/transport.h
@@ -124,6 +124,7 @@ typedef struct grpc_transport_stream_op {
/** Receive initial metadata from the stream, into provided metadata batch. */
grpc_metadata_batch *recv_initial_metadata;
bool *recv_idempotent_request;
+ bool *recv_cacheable_request;
/** Should be enqueued when initial metadata is ready to be processed. */
grpc_closure *recv_initial_metadata_ready;
diff --git a/src/cpp/client/channel.cc b/src/cpp/client/channel_cc.cc
index 43b3875cb3..43b3875cb3 100644
--- a/src/cpp/client/channel.cc
+++ b/src/cpp/client/channel_cc.cc
diff --git a/src/cpp/client/client_context.cc b/src/cpp/client/client_context.cc
index 0ba77a5057..5b6aaa777b 100644
--- a/src/cpp/client/client_context.cc
+++ b/src/cpp/client/client_context.cc
@@ -36,6 +36,7 @@
#include <grpc/compression.h>
#include <grpc/grpc.h>
#include <grpc/support/alloc.h>
+#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
#include <grpc++/security/credentials.h>
@@ -60,6 +61,7 @@ ClientContext::ClientContext()
: initial_metadata_received_(false),
fail_fast_(true),
idempotent_(false),
+ cacheable_(false),
call_(nullptr),
call_canceled_(false),
deadline_(gpr_inf_future(GPR_CLOCK_REALTIME)),
diff --git a/src/cpp/client/credentials.cc b/src/cpp/client/credentials_cc.cc
index e6a4f81b0d..e6a4f81b0d 100644
--- a/src/cpp/client/credentials.cc
+++ b/src/cpp/client/credentials_cc.cc
diff --git a/src/cpp/common/channel_filter.h b/src/cpp/common/channel_filter.h
index ec2af63afd..6f5af3dec3 100644
--- a/src/cpp/common/channel_filter.h
+++ b/src/cpp/common/channel_filter.h
@@ -36,7 +36,7 @@
#include <grpc++/impl/codegen/config.h>
#include <grpc/grpc.h>
-#include <grpc/impl/codegen/alloc.h>
+#include <grpc/support/alloc.h>
#include <functional>
#include <vector>
diff --git a/src/cpp/common/completion_queue.cc b/src/cpp/common/completion_queue_cc.cc
index 00cc102f92..00cc102f92 100644
--- a/src/cpp/common/completion_queue.cc
+++ b/src/cpp/common/completion_queue_cc.cc
diff --git a/src/cpp/common/core_codegen.cc b/src/cpp/common/core_codegen.cc
index 3d6780bcb8..ce02202976 100644
--- a/src/cpp/common/core_codegen.cc
+++ b/src/cpp/common/core_codegen.cc
@@ -39,15 +39,19 @@
#include <grpc/byte_buffer.h>
#include <grpc/byte_buffer_reader.h>
#include <grpc/grpc.h>
-#include <grpc/impl/codegen/alloc.h>
-#include <grpc/impl/codegen/byte_buffer.h>
-#include <grpc/impl/codegen/log.h>
+#include <grpc/support/alloc.h>
+#include <grpc/support/log.h>
#include <grpc/support/port_platform.h>
#include <grpc/support/slice.h>
#include <grpc/support/slice_buffer.h>
+#include <grpc/support/sync.h>
#include "src/core/lib/profiling/timers.h"
+extern "C" {
+struct grpc_byte_buffer;
+}
+
namespace grpc {
grpc_completion_queue* CoreCodegen::grpc_completion_queue_create(
@@ -70,6 +74,19 @@ void* CoreCodegen::gpr_malloc(size_t size) { return ::gpr_malloc(size); }
void CoreCodegen::gpr_free(void* p) { return ::gpr_free(p); }
+void CoreCodegen::gpr_mu_init(gpr_mu* mu) { ::gpr_mu_init(mu); };
+void CoreCodegen::gpr_mu_destroy(gpr_mu* mu) { ::gpr_mu_destroy(mu); }
+void CoreCodegen::gpr_mu_lock(gpr_mu* mu) { ::gpr_mu_lock(mu); }
+void CoreCodegen::gpr_mu_unlock(gpr_mu* mu) { ::gpr_mu_unlock(mu); }
+void CoreCodegen::gpr_cv_init(gpr_cv* cv) { ::gpr_cv_init(cv); }
+void CoreCodegen::gpr_cv_destroy(gpr_cv* cv) { ::gpr_cv_destroy(cv); }
+int CoreCodegen::gpr_cv_wait(gpr_cv* cv, gpr_mu* mu,
+ gpr_timespec abs_deadline) {
+ return ::gpr_cv_wait(cv, mu, abs_deadline);
+}
+void CoreCodegen::gpr_cv_signal(gpr_cv* cv) { ::gpr_cv_signal(cv); }
+void CoreCodegen::gpr_cv_broadcast(gpr_cv* cv) { ::gpr_cv_broadcast(cv); }
+
void CoreCodegen::grpc_byte_buffer_destroy(grpc_byte_buffer* bb) {
::grpc_byte_buffer_destroy(bb);
}
@@ -128,6 +145,10 @@ gpr_timespec CoreCodegen::gpr_inf_future(gpr_clock_type type) {
return ::gpr_inf_future(type);
}
+gpr_timespec CoreCodegen::gpr_time_0(gpr_clock_type type) {
+ return ::gpr_time_0(type);
+}
+
void CoreCodegen::assert_fail(const char* failed_assertion) {
gpr_log(GPR_ERROR, "assertion failed: %s", failed_assertion);
abort();
diff --git a/src/cpp/server/server_builder.cc b/src/cpp/server/server_builder.cc
index 45bb858e2e..1a014da3b8 100644
--- a/src/cpp/server/server_builder.cc
+++ b/src/cpp/server/server_builder.cc
@@ -35,10 +35,9 @@
#include <grpc++/impl/service_type.h>
#include <grpc++/server.h>
-#include <grpc/support/cpu.h>
#include <grpc/support/log.h>
+#include <grpc/support/useful.h>
-#include "include/grpc/support/useful.h"
#include "src/cpp/server/thread_pool_interface.h"
namespace grpc {
@@ -154,14 +153,12 @@ std::unique_ptr<Server> ServerBuilder::BuildAndStart() {
(*option)->UpdateArguments(&args);
(*option)->UpdatePlugins(&plugins_);
}
- if (!thread_pool) {
- for (auto plugin = plugins_.begin(); plugin != plugins_.end(); plugin++) {
- if ((*plugin)->has_sync_methods()) {
- thread_pool.reset(CreateDefaultThreadPool());
- has_sync_methods = true;
- break;
- }
+ for (auto plugin = plugins_.begin(); plugin != plugins_.end(); plugin++) {
+ if (!thread_pool && (*plugin)->has_sync_methods()) {
+ thread_pool.reset(CreateDefaultThreadPool());
+ has_sync_methods = true;
}
+ (*plugin)->UpdateChannelArguments(&args);
}
if (max_message_size_ > 0) {
args.SetInt(GRPC_ARG_MAX_MESSAGE_LENGTH, max_message_size_);
diff --git a/src/cpp/server/server.cc b/src/cpp/server/server_cc.cc
index af04fd4ca6..af04fd4ca6 100644
--- a/src/cpp/server/server.cc
+++ b/src/cpp/server/server_cc.cc
diff --git a/src/cpp/util/byte_buffer.cc b/src/cpp/util/byte_buffer_cc.cc
index 91ed66b766..91ed66b766 100644
--- a/src/cpp/util/byte_buffer.cc
+++ b/src/cpp/util/byte_buffer_cc.cc
diff --git a/src/cpp/util/slice.cc b/src/cpp/util/slice_cc.cc
index 7e88423b6c..7e88423b6c 100644
--- a/src/cpp/util/slice.cc
+++ b/src/cpp/util/slice_cc.cc
diff --git a/src/cpp/util/time.cc b/src/cpp/util/time_cc.cc
index c43d848cc6..c43d848cc6 100644
--- a/src/cpp/util/time.cc
+++ b/src/cpp/util/time_cc.cc
diff --git a/src/csharp/Grpc.Auth/Grpc.Auth.csproj b/src/csharp/Grpc.Auth/Grpc.Auth.csproj
index 7a6955311a..a44aaf1fdd 100644
--- a/src/csharp/Grpc.Auth/Grpc.Auth.csproj
+++ b/src/csharp/Grpc.Auth/Grpc.Auth.csproj
@@ -49,14 +49,26 @@
<Reference Include="Newtonsoft.Json">
<HintPath>..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
+ <Reference Include="log4net">
+ <HintPath>..\packages\log4net.2.0.3\lib\net40-full\log4net.dll</HintPath>
+ </Reference>
<Reference Include="Google.Apis.Core">
- <HintPath>..\packages\Google.Apis.Core.1.15.0\lib\net45\Google.Apis.Core.dll</HintPath>
+ <HintPath>..\packages\Google.Apis.Core.1.16.0\lib\net45\Google.Apis.Core.dll</HintPath>
+ </Reference>
+ <Reference Include="Zlib.Portable">
+ <HintPath>..\packages\Zlib.Portable.Signed.1.11.0\lib\portable-net4+sl5+wp8+win8+wpa81+MonoTouch+MonoAndroid\Zlib.Portable.dll</HintPath>
+ </Reference>
+ <Reference Include="Google.Apis">
+ <HintPath>..\packages\Google.Apis.1.16.0\lib\net45\Google.Apis.dll</HintPath>
+ </Reference>
+ <Reference Include="Google.Apis.PlatformServices">
+ <HintPath>..\packages\Google.Apis.1.16.0\lib\net45\Google.Apis.PlatformServices.dll</HintPath>
</Reference>
<Reference Include="Google.Apis.Auth">
- <HintPath>..\packages\Google.Apis.Auth.1.15.0\lib\net45\Google.Apis.Auth.dll</HintPath>
+ <HintPath>..\packages\Google.Apis.Auth.1.16.0\lib\net45\Google.Apis.Auth.dll</HintPath>
</Reference>
<Reference Include="Google.Apis.Auth.PlatformServices">
- <HintPath>..\packages\Google.Apis.Auth.1.15.0\lib\net45\Google.Apis.Auth.PlatformServices.dll</HintPath>
+ <HintPath>..\packages\Google.Apis.Auth.1.16.0\lib\net45\Google.Apis.Auth.PlatformServices.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
diff --git a/src/csharp/Grpc.Auth/packages.config b/src/csharp/Grpc.Auth/packages.config
index 738d3e6f3b..11c6375c63 100644
--- a/src/csharp/Grpc.Auth/packages.config
+++ b/src/csharp/Grpc.Auth/packages.config
@@ -1,7 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="BouncyCastle" version="1.7.0" targetFramework="net45" />
- <package id="Google.Apis.Auth" version="1.15.0" targetFramework="net45" />
- <package id="Google.Apis.Core" version="1.15.0" targetFramework="net45" />
+ <package id="Google.Apis" version="1.16.0" targetFramework="net45" />
+ <package id="Google.Apis.Auth" version="1.16.0" targetFramework="net45" />
+ <package id="Google.Apis.Core" version="1.16.0" targetFramework="net45" />
+ <package id="log4net" version="2.0.3" targetFramework="net45" />
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
+ <package id="Zlib.Portable.Signed" version="1.11.0" targetFramework="net45" />
</packages> \ No newline at end of file
diff --git a/src/csharp/Grpc.Auth/project.json b/src/csharp/Grpc.Auth/project.json
index 30f0944693..595e29f50a 100644
--- a/src/csharp/Grpc.Auth/project.json
+++ b/src/csharp/Grpc.Auth/project.json
@@ -23,18 +23,13 @@
},
"dependencies": {
"Grpc.Core": "1.1.0-dev",
- "Google.Apis.Auth": "1.15.0"
+ "Google.Apis.Auth": "1.16.0"
},
"frameworks": {
"net45": { },
"netstandard1.5": {
- "imports": [
- "portable-net45"
- ],
"dependencies": {
- "Microsoft.NETCore.Portable.Compatibility": "1.0.1",
- "NETStandard.Library": "1.6.0",
- "System.Threading.Tasks": "4.0.11"
+ "NETStandard.Library": "1.6.0"
}
}
}
diff --git a/src/csharp/Grpc.Core.Tests/project.json b/src/csharp/Grpc.Core.Tests/project.json
index 014e2262e9..faf28dcee8 100644
--- a/src/csharp/Grpc.Core.Tests/project.json
+++ b/src/csharp/Grpc.Core.Tests/project.json
@@ -42,11 +42,6 @@
}
}
},
- "runtimes": {
- "win7-x64": { },
- "debian.8-x64": { },
- "osx.10.11-x64": { }
- },
"dependencies": {
"Grpc.Core": {
@@ -66,8 +61,10 @@
"portable-net45"
],
"dependencies": {
- "Microsoft.NETCore.App": "1.0.0",
- "NETStandard.Library": "1.6.0"
+ "Microsoft.NETCore.App": {
+ "type": "platform",
+ "version": "1.0.0"
+ }
}
}
},
diff --git a/src/csharp/Grpc.Core/GrpcEnvironment.cs b/src/csharp/Grpc.Core/GrpcEnvironment.cs
index 574e900a0e..3ed2df203d 100644
--- a/src/csharp/Grpc.Core/GrpcEnvironment.cs
+++ b/src/csharp/Grpc.Core/GrpcEnvironment.cs
@@ -351,11 +351,11 @@ namespace Grpc.Core
{
if (!hooksRegistered)
{
- // TODO(jtattermusch): register shutdownhooks for CoreCLR as well
-#if !NETSTANDARD1_5
-
- AppDomain.CurrentDomain.ProcessExit += ShutdownHookHandler;
- AppDomain.CurrentDomain.DomainUnload += ShutdownHookHandler;
+#if NETSTANDARD1_5
+ System.Runtime.Loader.AssemblyLoadContext.Default.Unloading += (assemblyLoadContext) => { HandleShutdown(); };
+#else
+ AppDomain.CurrentDomain.ProcessExit += (sender, eventArgs) => { HandleShutdown(); };
+ AppDomain.CurrentDomain.DomainUnload += (sender, eventArgs) => { HandleShutdown(); };
#endif
}
hooksRegistered = true;
@@ -363,9 +363,9 @@ namespace Grpc.Core
}
/// <summary>
- /// Handler for AppDomain.DomainUnload and AppDomain.ProcessExit hooks.
+ /// Handler for AppDomain.DomainUnload, AppDomain.ProcessExit and AssemblyLoadContext.Unloading hooks.
/// </summary>
- private static void ShutdownHookHandler(object sender, EventArgs e)
+ private static void HandleShutdown()
{
Task.WaitAll(GrpcEnvironment.ShutdownChannelsAsync(), GrpcEnvironment.KillServersAsync());
}
diff --git a/src/csharp/Grpc.Core/Internal/NativeExtension.cs b/src/csharp/Grpc.Core/Internal/NativeExtension.cs
index 509baf7cb1..61d8b57c76 100644
--- a/src/csharp/Grpc.Core/Internal/NativeExtension.cs
+++ b/src/csharp/Grpc.Core/Internal/NativeExtension.cs
@@ -100,19 +100,19 @@ namespace Grpc.Core.Internal
// With old-style VS projects, the native libraries get copied using a .targets rule to the build output folder
// alongside the compiled assembly.
- // With dotnet cli projects, the native libraries (just the required ones) are similarly copied to the built output folder,
- // through the magic of Microsoft.NETCore.Platforms.
+ // With dotnet cli projects targeting net45 framework, the native libraries (just the required ones)
+ // are similarly copied to the built output folder, through the magic of Microsoft.NETCore.Platforms.
var classicPath = Path.Combine(assemblyDirectory, GetNativeLibraryFilename());
- // DNX-style project.json projects will use Grpc.Core assembly directly in the location where it got restored
+ // With dotnet cli project targeting netcoreapp1.0, projects will use Grpc.Core assembly directly in the location where it got restored
// by nuget. We locate the native libraries based on known structure of Grpc.Core nuget package.
+ // When "dotnet publish" is used, the runtimes directory is copied next to the published assemblies.
+ string runtimesDirectory = string.Format("runtimes/{0}/native", GetPlatformString());
+ var netCorePublishedAppStylePath = Path.Combine(assemblyDirectory, runtimesDirectory, GetNativeLibraryFilename());
+ var netCoreAppStylePath = Path.Combine(assemblyDirectory, "../..", runtimesDirectory, GetNativeLibraryFilename());
- // TODO: Support .NET Core applications, which act slightly differently. We may be okay if "dotnet publish"
- // is used, but "dotnet run" leaves the native libraries in-package, while copying assemblies.
- string platform = GetPlatformString();
- string relativeDirectory = string.Format("../../runtimes/{0}/native", platform);
- var dnxStylePath = Path.Combine(assemblyDirectory, relativeDirectory, GetNativeLibraryFilename());
- string[] paths = new[] { classicPath, dnxStylePath };
+ // Look for all native library in all possible locations in given order.
+ string[] paths = new[] { classicPath, netCorePublishedAppStylePath, netCoreAppStylePath};
return new UnmanagedLibrary(paths);
}
diff --git a/src/csharp/Grpc.Core/project.json b/src/csharp/Grpc.Core/project.json
index f7e21a25dd..aa1e4cc7fb 100644
--- a/src/csharp/Grpc.Core/project.json
+++ b/src/csharp/Grpc.Core/project.json
@@ -36,11 +36,9 @@
"frameworks": {
"net45": { },
"netstandard1.5": {
- "imports": [
- "portable-net45"
- ],
"dependencies": {
"NETStandard.Library": "1.6.0",
+ "System.Runtime.Loader": "4.0.0",
"System.Threading.Thread": "4.0.0"
}
}
diff --git a/src/csharp/Grpc.Examples.MathClient/project.json b/src/csharp/Grpc.Examples.MathClient/project.json
index ad319478ab..628f532966 100644
--- a/src/csharp/Grpc.Examples.MathClient/project.json
+++ b/src/csharp/Grpc.Examples.MathClient/project.json
@@ -42,11 +42,6 @@
}
}
},
- "runtimes": {
- "win7-x64": { },
- "debian.8-x64": { },
- "osx.10.11-x64": { }
- },
"dependencies": {
"Grpc.Examples": {
@@ -56,12 +51,11 @@
"frameworks": {
"net45": { },
"netcoreapp1.0": {
- "imports": [
- "portable-net45"
- ],
"dependencies": {
- "Microsoft.NETCore.App": "1.0.0",
- "NETStandard.Library": "1.6.0"
+ "Microsoft.NETCore.App": {
+ "type": "platform",
+ "version": "1.0.0"
+ }
}
}
}
diff --git a/src/csharp/Grpc.Examples.MathServer/project.json b/src/csharp/Grpc.Examples.MathServer/project.json
index ad319478ab..628f532966 100644
--- a/src/csharp/Grpc.Examples.MathServer/project.json
+++ b/src/csharp/Grpc.Examples.MathServer/project.json
@@ -42,11 +42,6 @@
}
}
},
- "runtimes": {
- "win7-x64": { },
- "debian.8-x64": { },
- "osx.10.11-x64": { }
- },
"dependencies": {
"Grpc.Examples": {
@@ -56,12 +51,11 @@
"frameworks": {
"net45": { },
"netcoreapp1.0": {
- "imports": [
- "portable-net45"
- ],
"dependencies": {
- "Microsoft.NETCore.App": "1.0.0",
- "NETStandard.Library": "1.6.0"
+ "Microsoft.NETCore.App": {
+ "type": "platform",
+ "version": "1.0.0"
+ }
}
}
}
diff --git a/src/csharp/Grpc.Examples.Tests/Grpc.Examples.Tests.csproj b/src/csharp/Grpc.Examples.Tests/Grpc.Examples.Tests.csproj
index c8801a9413..a114d96127 100644
--- a/src/csharp/Grpc.Examples.Tests/Grpc.Examples.Tests.csproj
+++ b/src/csharp/Grpc.Examples.Tests/Grpc.Examples.Tests.csproj
@@ -36,9 +36,6 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
- <Reference Include="Google.Protobuf">
- <HintPath>..\packages\Google.Protobuf.3.0.0-beta3\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
- </Reference>
<Reference Include="nunit.framework">
<HintPath>..\packages\NUnit.3.2.0\lib\net45\nunit.framework.dll</HintPath>
</Reference>
@@ -48,6 +45,9 @@
<Reference Include="nunitlite">
<HintPath>..\packages\NUnitLite.3.2.0\lib\net45\nunitlite.dll</HintPath>
</Reference>
+ <Reference Include="Google.Protobuf">
+ <HintPath>..\packages\Google.Protobuf.3.0.0\lib\net45\Google.Protobuf.dll</HintPath>
+ </Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="..\Grpc.Core\Version.cs">
diff --git a/src/csharp/Grpc.Examples.Tests/packages.config b/src/csharp/Grpc.Examples.Tests/packages.config
index cc473eb34c..f14517d2e2 100644
--- a/src/csharp/Grpc.Examples.Tests/packages.config
+++ b/src/csharp/Grpc.Examples.Tests/packages.config
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
- <package id="Google.Protobuf" version="3.0.0-beta3" targetFramework="net45" />
- <package id="System.Interactive.Async" version="3.0.0" targetFramework="net45" />
+ <package id="Google.Protobuf" version="3.0.0" targetFramework="net45" />
<package id="NUnit" version="3.2.0" targetFramework="net45" />
<package id="NUnitLite" version="3.2.0" targetFramework="net45" />
+ <package id="System.Interactive.Async" version="3.0.0" targetFramework="net45" />
</packages> \ No newline at end of file
diff --git a/src/csharp/Grpc.Examples.Tests/project.json b/src/csharp/Grpc.Examples.Tests/project.json
index 1cd1848e99..0109617e6b 100644
--- a/src/csharp/Grpc.Examples.Tests/project.json
+++ b/src/csharp/Grpc.Examples.Tests/project.json
@@ -42,11 +42,6 @@
}
}
},
- "runtimes": {
- "win7-x64": { },
- "debian.8-x64": { },
- "osx.10.11-x64": { }
- },
"dependencies": {
"Grpc.Examples": {
@@ -62,8 +57,10 @@
"portable-net45"
],
"dependencies": {
- "Microsoft.NETCore.App": "1.0.0",
- "NETStandard.Library": "1.6.0"
+ "Microsoft.NETCore.App": {
+ "type": "platform",
+ "version": "1.0.0"
+ }
}
}
}
diff --git a/src/csharp/Grpc.Examples/Grpc.Examples.csproj b/src/csharp/Grpc.Examples/Grpc.Examples.csproj
index 4521649b6f..dcbef5fc0b 100644
--- a/src/csharp/Grpc.Examples/Grpc.Examples.csproj
+++ b/src/csharp/Grpc.Examples/Grpc.Examples.csproj
@@ -37,10 +37,6 @@
<AssemblyOriginatorKeyFile>..\keys\Grpc.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
- <Reference Include="Google.Protobuf, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\Google.Protobuf.3.0.0-beta3\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
- </Reference>
<Reference Include="nunit.framework">
<HintPath>..\packages\NUnit.3.2.0\lib\net45\nunit.framework.dll</HintPath>
</Reference>
@@ -50,6 +46,9 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\System.Interactive.Async.3.0.0\lib\net45\System.Interactive.Async.dll</HintPath>
</Reference>
+ <Reference Include="Google.Protobuf">
+ <HintPath>..\packages\Google.Protobuf.3.0.0\lib\net45\Google.Protobuf.dll</HintPath>
+ </Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="..\Grpc.Core\Version.cs">
diff --git a/src/csharp/Grpc.Examples/packages.config b/src/csharp/Grpc.Examples/packages.config
index 8985ae4c77..d17347f08f 100644
--- a/src/csharp/Grpc.Examples/packages.config
+++ b/src/csharp/Grpc.Examples/packages.config
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
- <package id="Google.Protobuf" version="3.0.0-beta3" targetFramework="net45" />
- <package id="System.Interactive.Async" version="3.0.0" targetFramework="net45" />
+ <package id="Google.Protobuf" version="3.0.0" targetFramework="net45" />
<package id="NUnit" version="3.2.0" targetFramework="net45" />
+ <package id="System.Interactive.Async" version="3.0.0" targetFramework="net45" />
</packages> \ No newline at end of file
diff --git a/src/csharp/Grpc.Examples/project.json b/src/csharp/Grpc.Examples/project.json
index 98bd5d852c..21a730cb22 100644
--- a/src/csharp/Grpc.Examples/project.json
+++ b/src/csharp/Grpc.Examples/project.json
@@ -1,17 +1,12 @@
{
"buildOptions": {
},
- "runtimes": {
- "win7-x64": { },
- "debian.8-x64": { },
- "osx.10.11-x64": { }
- },
"dependencies": {
"Grpc.Core": {
"target": "project"
},
- "Google.Protobuf": "3.0.0-beta3"
+ "Google.Protobuf": "3.0.0"
},
"frameworks": {
"net45": {
@@ -21,12 +16,11 @@
}
},
"netcoreapp1.0": {
- "imports": [
- "portable-net45"
- ],
"dependencies": {
- "Microsoft.NETCore.App": "1.0.0",
- "NETStandard.Library": "1.6.0"
+ "Microsoft.NETCore.App": {
+ "type": "platform",
+ "version": "1.0.0"
+ }
}
}
}
diff --git a/src/csharp/Grpc.HealthCheck.Tests/Grpc.HealthCheck.Tests.csproj b/src/csharp/Grpc.HealthCheck.Tests/Grpc.HealthCheck.Tests.csproj
index aefacfbcc0..93c3b3a55f 100644
--- a/src/csharp/Grpc.HealthCheck.Tests/Grpc.HealthCheck.Tests.csproj
+++ b/src/csharp/Grpc.HealthCheck.Tests/Grpc.HealthCheck.Tests.csproj
@@ -44,15 +44,15 @@
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
- <Reference Include="Google.Protobuf">
- <HintPath>..\packages\Google.Protobuf.3.0.0-beta3\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
- </Reference>
<Reference Include="nunit.framework">
<HintPath>..\packages\NUnit.3.2.0\lib\net45\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="nunitlite">
<HintPath>..\packages\NUnitLite.3.2.0\lib\net45\nunitlite.dll</HintPath>
</Reference>
+ <Reference Include="Google.Protobuf">
+ <HintPath>..\packages\Google.Protobuf.3.0.0\lib\net45\Google.Protobuf.dll</HintPath>
+ </Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="..\Grpc.Core\Version.cs">
diff --git a/src/csharp/Grpc.HealthCheck.Tests/packages.config b/src/csharp/Grpc.HealthCheck.Tests/packages.config
index 2bcfec8829..e796d6b135 100644
--- a/src/csharp/Grpc.HealthCheck.Tests/packages.config
+++ b/src/csharp/Grpc.HealthCheck.Tests/packages.config
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
- <package id="Google.Protobuf" version="3.0.0-beta3" targetFramework="net45" />
+ <package id="Google.Protobuf" version="3.0.0" targetFramework="net45" />
<package id="NUnit" version="3.2.0" targetFramework="net45" />
<package id="NUnitLite" version="3.2.0" targetFramework="net45" />
</packages> \ No newline at end of file
diff --git a/src/csharp/Grpc.HealthCheck.Tests/project.json b/src/csharp/Grpc.HealthCheck.Tests/project.json
index faa4400304..66dcd79a39 100644
--- a/src/csharp/Grpc.HealthCheck.Tests/project.json
+++ b/src/csharp/Grpc.HealthCheck.Tests/project.json
@@ -42,11 +42,6 @@
}
}
},
- "runtimes": {
- "win7-x64": { },
- "debian.8-x64": { },
- "osx.10.11-x64": { }
- },
"dependencies": {
"Grpc.HealthCheck": {
@@ -62,8 +57,10 @@
"portable-net45"
],
"dependencies": {
- "Microsoft.NETCore.App": "1.0.0",
- "NETStandard.Library": "1.6.0"
+ "Microsoft.NETCore.App": {
+ "type": "platform",
+ "version": "1.0.0"
+ }
}
}
}
diff --git a/src/csharp/Grpc.HealthCheck/Grpc.HealthCheck.csproj b/src/csharp/Grpc.HealthCheck/Grpc.HealthCheck.csproj
index e13416cc1a..54a2984964 100644
--- a/src/csharp/Grpc.HealthCheck/Grpc.HealthCheck.csproj
+++ b/src/csharp/Grpc.HealthCheck/Grpc.HealthCheck.csproj
@@ -38,10 +38,6 @@
<AssemblyOriginatorKeyFile>..\keys\Grpc.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
- <Reference Include="Google.Protobuf, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\Google.Protobuf.3.0.0-beta3\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
- </Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Interactive.Async, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
@@ -53,6 +49,9 @@
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
+ <Reference Include="Google.Protobuf">
+ <HintPath>..\packages\Google.Protobuf.3.0.0\lib\net45\Google.Protobuf.dll</HintPath>
+ </Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="..\Grpc.Core\Version.cs">
diff --git a/src/csharp/Grpc.HealthCheck/packages.config b/src/csharp/Grpc.HealthCheck/packages.config
index 063094f775..f8e353bf26 100644
--- a/src/csharp/Grpc.HealthCheck/packages.config
+++ b/src/csharp/Grpc.HealthCheck/packages.config
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
- <package id="Google.Protobuf" version="3.0.0-beta3" targetFramework="net45" />
+ <package id="Google.Protobuf" version="3.0.0" targetFramework="net45" />
<package id="System.Interactive.Async" version="3.0.0" targetFramework="net45" />
</packages> \ No newline at end of file
diff --git a/src/csharp/Grpc.HealthCheck/project.json b/src/csharp/Grpc.HealthCheck/project.json
index 7c062a7e40..9d631229d8 100644
--- a/src/csharp/Grpc.HealthCheck/project.json
+++ b/src/csharp/Grpc.HealthCheck/project.json
@@ -23,7 +23,7 @@
},
"dependencies": {
"Grpc.Core": "1.1.0-dev",
- "Google.Protobuf": "3.0.0-beta3"
+ "Google.Protobuf": "3.0.0"
},
"frameworks": {
"net45": {
@@ -33,9 +33,6 @@
}
},
"netstandard1.5": {
- "imports": [
- "portable-net45"
- ],
"dependencies": {
"NETStandard.Library": "1.6.0"
}
diff --git a/src/csharp/Grpc.IntegrationTesting.Client/Grpc.IntegrationTesting.Client.csproj b/src/csharp/Grpc.IntegrationTesting.Client/Grpc.IntegrationTesting.Client.csproj
index 6816b5c5a2..ae58073b52 100644
--- a/src/csharp/Grpc.IntegrationTesting.Client/Grpc.IntegrationTesting.Client.csproj
+++ b/src/csharp/Grpc.IntegrationTesting.Client/Grpc.IntegrationTesting.Client.csproj
@@ -49,14 +49,26 @@
<Reference Include="Newtonsoft.Json">
<HintPath>..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
+ <Reference Include="log4net">
+ <HintPath>..\packages\log4net.2.0.3\lib\net40-full\log4net.dll</HintPath>
+ </Reference>
<Reference Include="Google.Apis.Core">
- <HintPath>..\packages\Google.Apis.Core.1.15.0\lib\net45\Google.Apis.Core.dll</HintPath>
+ <HintPath>..\packages\Google.Apis.Core.1.16.0\lib\net45\Google.Apis.Core.dll</HintPath>
+ </Reference>
+ <Reference Include="Zlib.Portable">
+ <HintPath>..\packages\Zlib.Portable.Signed.1.11.0\lib\portable-net4+sl5+wp8+win8+wpa81+MonoTouch+MonoAndroid\Zlib.Portable.dll</HintPath>
+ </Reference>
+ <Reference Include="Google.Apis">
+ <HintPath>..\packages\Google.Apis.1.16.0\lib\net45\Google.Apis.dll</HintPath>
+ </Reference>
+ <Reference Include="Google.Apis.PlatformServices">
+ <HintPath>..\packages\Google.Apis.1.16.0\lib\net45\Google.Apis.PlatformServices.dll</HintPath>
</Reference>
<Reference Include="Google.Apis.Auth">
- <HintPath>..\packages\Google.Apis.Auth.1.15.0\lib\net45\Google.Apis.Auth.dll</HintPath>
+ <HintPath>..\packages\Google.Apis.Auth.1.16.0\lib\net45\Google.Apis.Auth.dll</HintPath>
</Reference>
<Reference Include="Google.Apis.Auth.PlatformServices">
- <HintPath>..\packages\Google.Apis.Auth.1.15.0\lib\net45\Google.Apis.Auth.PlatformServices.dll</HintPath>
+ <HintPath>..\packages\Google.Apis.Auth.1.16.0\lib\net45\Google.Apis.Auth.PlatformServices.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
diff --git a/src/csharp/Grpc.IntegrationTesting.Client/packages.config b/src/csharp/Grpc.IntegrationTesting.Client/packages.config
index 738d3e6f3b..11c6375c63 100644
--- a/src/csharp/Grpc.IntegrationTesting.Client/packages.config
+++ b/src/csharp/Grpc.IntegrationTesting.Client/packages.config
@@ -1,7 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="BouncyCastle" version="1.7.0" targetFramework="net45" />
- <package id="Google.Apis.Auth" version="1.15.0" targetFramework="net45" />
- <package id="Google.Apis.Core" version="1.15.0" targetFramework="net45" />
+ <package id="Google.Apis" version="1.16.0" targetFramework="net45" />
+ <package id="Google.Apis.Auth" version="1.16.0" targetFramework="net45" />
+ <package id="Google.Apis.Core" version="1.16.0" targetFramework="net45" />
+ <package id="log4net" version="2.0.3" targetFramework="net45" />
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
+ <package id="Zlib.Portable.Signed" version="1.11.0" targetFramework="net45" />
</packages> \ No newline at end of file
diff --git a/src/csharp/Grpc.IntegrationTesting.Client/project.json b/src/csharp/Grpc.IntegrationTesting.Client/project.json
index 287950720f..1b900c8af3 100644
--- a/src/csharp/Grpc.IntegrationTesting.Client/project.json
+++ b/src/csharp/Grpc.IntegrationTesting.Client/project.json
@@ -13,8 +13,10 @@
"includeFiles": [ "../Grpc.Core/Version.cs" ]
},
"copyToOutput": {
- "include": "data/*",
"mappings": {
+ "data/ca.pem": "../Grpc.IntegrationTesting/data/ca.pem",
+ "data/server1.key": "../Grpc.IntegrationTesting/data/server1.key",
+ "data/server1.pem": "../Grpc.IntegrationTesting/data/server1.pem",
"grpc_csharp_ext.x64.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll",
"grpc_csharp_ext.x86.dll": "../../../vsprojects/Debug/grpc_csharp_ext.dll",
"libgrpc_csharp_ext.x64.so": "../../../libs/dbg/libgrpc_csharp_ext.so",
@@ -33,8 +35,10 @@
"includeFiles": [ "../Grpc.Core/Version.cs" ]
},
"copyToOutput": {
- "include": "data/*",
"mappings": {
+ "data/ca.pem": "../Grpc.IntegrationTesting/data/ca.pem",
+ "data/server1.key": "../Grpc.IntegrationTesting/data/server1.key",
+ "data/server1.pem": "../Grpc.IntegrationTesting/data/server1.pem",
"grpc_csharp_ext.x64.dll": "../../../vsprojects/x64/Release/grpc_csharp_ext.dll",
"grpc_csharp_ext.x86.dll": "../../../vsprojects/Release/grpc_csharp_ext.dll",
"libgrpc_csharp_ext.x64.so": "../../../libs/opt/libgrpc_csharp_ext.so",
@@ -44,11 +48,6 @@
}
}
},
- "runtimes": {
- "win7-x64": { },
- "debian.8-x64": { },
- "osx.10.11-x64": { }
- },
"dependencies": {
"Grpc.IntegrationTesting": {
@@ -59,12 +58,13 @@
"net45": { },
"netcoreapp1.0": {
"imports": [
- "portable-net45",
- "net45"
+ "portable-net45"
],
"dependencies": {
- "Microsoft.NETCore.App": "1.0.0",
- "NETStandard.Library": "1.6.0"
+ "Microsoft.NETCore.App": {
+ "type": "platform",
+ "version": "1.0.0"
+ }
}
}
}
diff --git a/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json b/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json
index 287950720f..1b900c8af3 100644
--- a/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json
+++ b/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json
@@ -13,8 +13,10 @@
"includeFiles": [ "../Grpc.Core/Version.cs" ]
},
"copyToOutput": {
- "include": "data/*",
"mappings": {
+ "data/ca.pem": "../Grpc.IntegrationTesting/data/ca.pem",
+ "data/server1.key": "../Grpc.IntegrationTesting/data/server1.key",
+ "data/server1.pem": "../Grpc.IntegrationTesting/data/server1.pem",
"grpc_csharp_ext.x64.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll",
"grpc_csharp_ext.x86.dll": "../../../vsprojects/Debug/grpc_csharp_ext.dll",
"libgrpc_csharp_ext.x64.so": "../../../libs/dbg/libgrpc_csharp_ext.so",
@@ -33,8 +35,10 @@
"includeFiles": [ "../Grpc.Core/Version.cs" ]
},
"copyToOutput": {
- "include": "data/*",
"mappings": {
+ "data/ca.pem": "../Grpc.IntegrationTesting/data/ca.pem",
+ "data/server1.key": "../Grpc.IntegrationTesting/data/server1.key",
+ "data/server1.pem": "../Grpc.IntegrationTesting/data/server1.pem",
"grpc_csharp_ext.x64.dll": "../../../vsprojects/x64/Release/grpc_csharp_ext.dll",
"grpc_csharp_ext.x86.dll": "../../../vsprojects/Release/grpc_csharp_ext.dll",
"libgrpc_csharp_ext.x64.so": "../../../libs/opt/libgrpc_csharp_ext.so",
@@ -44,11 +48,6 @@
}
}
},
- "runtimes": {
- "win7-x64": { },
- "debian.8-x64": { },
- "osx.10.11-x64": { }
- },
"dependencies": {
"Grpc.IntegrationTesting": {
@@ -59,12 +58,13 @@
"net45": { },
"netcoreapp1.0": {
"imports": [
- "portable-net45",
- "net45"
+ "portable-net45"
],
"dependencies": {
- "Microsoft.NETCore.App": "1.0.0",
- "NETStandard.Library": "1.6.0"
+ "Microsoft.NETCore.App": {
+ "type": "platform",
+ "version": "1.0.0"
+ }
}
}
}
diff --git a/src/csharp/Grpc.IntegrationTesting.Server/Grpc.IntegrationTesting.Server.csproj b/src/csharp/Grpc.IntegrationTesting.Server/Grpc.IntegrationTesting.Server.csproj
index 987387ca25..d5c40ba948 100644
--- a/src/csharp/Grpc.IntegrationTesting.Server/Grpc.IntegrationTesting.Server.csproj
+++ b/src/csharp/Grpc.IntegrationTesting.Server/Grpc.IntegrationTesting.Server.csproj
@@ -49,14 +49,26 @@
<Reference Include="Newtonsoft.Json">
<HintPath>..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
+ <Reference Include="log4net">
+ <HintPath>..\packages\log4net.2.0.3\lib\net40-full\log4net.dll</HintPath>
+ </Reference>
<Reference Include="Google.Apis.Core">
- <HintPath>..\packages\Google.Apis.Core.1.15.0\lib\net45\Google.Apis.Core.dll</HintPath>
+ <HintPath>..\packages\Google.Apis.Core.1.16.0\lib\net45\Google.Apis.Core.dll</HintPath>
+ </Reference>
+ <Reference Include="Zlib.Portable">
+ <HintPath>..\packages\Zlib.Portable.Signed.1.11.0\lib\portable-net4+sl5+wp8+win8+wpa81+MonoTouch+MonoAndroid\Zlib.Portable.dll</HintPath>
+ </Reference>
+ <Reference Include="Google.Apis">
+ <HintPath>..\packages\Google.Apis.1.16.0\lib\net45\Google.Apis.dll</HintPath>
+ </Reference>
+ <Reference Include="Google.Apis.PlatformServices">
+ <HintPath>..\packages\Google.Apis.1.16.0\lib\net45\Google.Apis.PlatformServices.dll</HintPath>
</Reference>
<Reference Include="Google.Apis.Auth">
- <HintPath>..\packages\Google.Apis.Auth.1.15.0\lib\net45\Google.Apis.Auth.dll</HintPath>
+ <HintPath>..\packages\Google.Apis.Auth.1.16.0\lib\net45\Google.Apis.Auth.dll</HintPath>
</Reference>
<Reference Include="Google.Apis.Auth.PlatformServices">
- <HintPath>..\packages\Google.Apis.Auth.1.15.0\lib\net45\Google.Apis.Auth.PlatformServices.dll</HintPath>
+ <HintPath>..\packages\Google.Apis.Auth.1.16.0\lib\net45\Google.Apis.Auth.PlatformServices.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
diff --git a/src/csharp/Grpc.IntegrationTesting.Server/packages.config b/src/csharp/Grpc.IntegrationTesting.Server/packages.config
index 738d3e6f3b..11c6375c63 100644
--- a/src/csharp/Grpc.IntegrationTesting.Server/packages.config
+++ b/src/csharp/Grpc.IntegrationTesting.Server/packages.config
@@ -1,7 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="BouncyCastle" version="1.7.0" targetFramework="net45" />
- <package id="Google.Apis.Auth" version="1.15.0" targetFramework="net45" />
- <package id="Google.Apis.Core" version="1.15.0" targetFramework="net45" />
+ <package id="Google.Apis" version="1.16.0" targetFramework="net45" />
+ <package id="Google.Apis.Auth" version="1.16.0" targetFramework="net45" />
+ <package id="Google.Apis.Core" version="1.16.0" targetFramework="net45" />
+ <package id="log4net" version="2.0.3" targetFramework="net45" />
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
+ <package id="Zlib.Portable.Signed" version="1.11.0" targetFramework="net45" />
</packages> \ No newline at end of file
diff --git a/src/csharp/Grpc.IntegrationTesting.Server/project.json b/src/csharp/Grpc.IntegrationTesting.Server/project.json
index 287950720f..1b900c8af3 100644
--- a/src/csharp/Grpc.IntegrationTesting.Server/project.json
+++ b/src/csharp/Grpc.IntegrationTesting.Server/project.json
@@ -13,8 +13,10 @@
"includeFiles": [ "../Grpc.Core/Version.cs" ]
},
"copyToOutput": {
- "include": "data/*",
"mappings": {
+ "data/ca.pem": "../Grpc.IntegrationTesting/data/ca.pem",
+ "data/server1.key": "../Grpc.IntegrationTesting/data/server1.key",
+ "data/server1.pem": "../Grpc.IntegrationTesting/data/server1.pem",
"grpc_csharp_ext.x64.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll",
"grpc_csharp_ext.x86.dll": "../../../vsprojects/Debug/grpc_csharp_ext.dll",
"libgrpc_csharp_ext.x64.so": "../../../libs/dbg/libgrpc_csharp_ext.so",
@@ -33,8 +35,10 @@
"includeFiles": [ "../Grpc.Core/Version.cs" ]
},
"copyToOutput": {
- "include": "data/*",
"mappings": {
+ "data/ca.pem": "../Grpc.IntegrationTesting/data/ca.pem",
+ "data/server1.key": "../Grpc.IntegrationTesting/data/server1.key",
+ "data/server1.pem": "../Grpc.IntegrationTesting/data/server1.pem",
"grpc_csharp_ext.x64.dll": "../../../vsprojects/x64/Release/grpc_csharp_ext.dll",
"grpc_csharp_ext.x86.dll": "../../../vsprojects/Release/grpc_csharp_ext.dll",
"libgrpc_csharp_ext.x64.so": "../../../libs/opt/libgrpc_csharp_ext.so",
@@ -44,11 +48,6 @@
}
}
},
- "runtimes": {
- "win7-x64": { },
- "debian.8-x64": { },
- "osx.10.11-x64": { }
- },
"dependencies": {
"Grpc.IntegrationTesting": {
@@ -59,12 +58,13 @@
"net45": { },
"netcoreapp1.0": {
"imports": [
- "portable-net45",
- "net45"
+ "portable-net45"
],
"dependencies": {
- "Microsoft.NETCore.App": "1.0.0",
- "NETStandard.Library": "1.6.0"
+ "Microsoft.NETCore.App": {
+ "type": "platform",
+ "version": "1.0.0"
+ }
}
}
}
diff --git a/src/csharp/Grpc.IntegrationTesting.StressClient/project.json b/src/csharp/Grpc.IntegrationTesting.StressClient/project.json
index 287950720f..1b900c8af3 100644
--- a/src/csharp/Grpc.IntegrationTesting.StressClient/project.json
+++ b/src/csharp/Grpc.IntegrationTesting.StressClient/project.json
@@ -13,8 +13,10 @@
"includeFiles": [ "../Grpc.Core/Version.cs" ]
},
"copyToOutput": {
- "include": "data/*",
"mappings": {
+ "data/ca.pem": "../Grpc.IntegrationTesting/data/ca.pem",
+ "data/server1.key": "../Grpc.IntegrationTesting/data/server1.key",
+ "data/server1.pem": "../Grpc.IntegrationTesting/data/server1.pem",
"grpc_csharp_ext.x64.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll",
"grpc_csharp_ext.x86.dll": "../../../vsprojects/Debug/grpc_csharp_ext.dll",
"libgrpc_csharp_ext.x64.so": "../../../libs/dbg/libgrpc_csharp_ext.so",
@@ -33,8 +35,10 @@
"includeFiles": [ "../Grpc.Core/Version.cs" ]
},
"copyToOutput": {
- "include": "data/*",
"mappings": {
+ "data/ca.pem": "../Grpc.IntegrationTesting/data/ca.pem",
+ "data/server1.key": "../Grpc.IntegrationTesting/data/server1.key",
+ "data/server1.pem": "../Grpc.IntegrationTesting/data/server1.pem",
"grpc_csharp_ext.x64.dll": "../../../vsprojects/x64/Release/grpc_csharp_ext.dll",
"grpc_csharp_ext.x86.dll": "../../../vsprojects/Release/grpc_csharp_ext.dll",
"libgrpc_csharp_ext.x64.so": "../../../libs/opt/libgrpc_csharp_ext.so",
@@ -44,11 +48,6 @@
}
}
},
- "runtimes": {
- "win7-x64": { },
- "debian.8-x64": { },
- "osx.10.11-x64": { }
- },
"dependencies": {
"Grpc.IntegrationTesting": {
@@ -59,12 +58,13 @@
"net45": { },
"netcoreapp1.0": {
"imports": [
- "portable-net45",
- "net45"
+ "portable-net45"
],
"dependencies": {
- "Microsoft.NETCore.App": "1.0.0",
- "NETStandard.Library": "1.6.0"
+ "Microsoft.NETCore.App": {
+ "type": "platform",
+ "version": "1.0.0"
+ }
}
}
}
diff --git a/src/csharp/Grpc.IntegrationTesting/GeneratedClientTest.cs b/src/csharp/Grpc.IntegrationTesting/GeneratedClientTest.cs
index c17ede7561..ac6c8d0740 100644
--- a/src/csharp/Grpc.IntegrationTesting/GeneratedClientTest.cs
+++ b/src/csharp/Grpc.IntegrationTesting/GeneratedClientTest.cs
@@ -48,8 +48,6 @@ namespace Grpc.IntegrationTesting
{
TestService.TestServiceClient unimplementedClient = new UnimplementedTestServiceClient();
- // TODO: replace Moq by some mocking library with CoreCLR support.
-#if !NETCOREAPP1_0
[Test]
public void ExpandedParamOverloadCanBeMocked()
{
@@ -72,7 +70,6 @@ namespace Grpc.IntegrationTesting
Assert.AreSame(expected, mockClient.Object.UnaryCall(new SimpleRequest(), new CallOptions()));
}
-#endif
[Test]
public void DefaultMethodStubThrows_UnaryCall()
diff --git a/src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.csproj b/src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.csproj
index e030b21eec..afd85fb484 100644
--- a/src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.csproj
+++ b/src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.csproj
@@ -38,9 +38,6 @@
<AssemblyOriginatorKeyFile>..\keys\Grpc.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
- <Reference Include="Moq">
- <HintPath>..\packages\Moq.4.2.1510.2205\lib\net40\Moq.dll</HintPath>
- </Reference>
<Reference Include="System" />
<Reference Include="System.Net" />
<Reference Include="System.Net.Http" />
@@ -48,9 +45,6 @@
<Reference Include="BouncyCastle.Crypto">
<HintPath>..\packages\BouncyCastle.1.7.0\lib\Net40-Client\BouncyCastle.Crypto.dll</HintPath>
</Reference>
- <Reference Include="Google.Protobuf">
- <HintPath>..\packages\Google.Protobuf.3.0.0-beta3\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
- </Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
@@ -63,17 +57,38 @@
<Reference Include="nunitlite">
<HintPath>..\packages\NUnitLite.3.2.0\lib\net45\nunitlite.dll</HintPath>
</Reference>
+ <Reference Include="CommandLineParser.Unofficial">
+ <HintPath>..\packages\CommandLineParser.Unofficial.2.0.275\lib\net45\CommandLineParser.Unofficial.dll</HintPath>
+ </Reference>
+ <Reference Include="log4net">
+ <HintPath>..\packages\log4net.2.0.3\lib\net40-full\log4net.dll</HintPath>
+ </Reference>
<Reference Include="Google.Apis.Core">
- <HintPath>..\packages\Google.Apis.Core.1.15.0\lib\net45\Google.Apis.Core.dll</HintPath>
+ <HintPath>..\packages\Google.Apis.Core.1.16.0\lib\net45\Google.Apis.Core.dll</HintPath>
+ </Reference>
+ <Reference Include="Zlib.Portable">
+ <HintPath>..\packages\Zlib.Portable.Signed.1.11.0\lib\portable-net4+sl5+wp8+win8+wpa81+MonoTouch+MonoAndroid\Zlib.Portable.dll</HintPath>
+ </Reference>
+ <Reference Include="Google.Apis">
+ <HintPath>..\packages\Google.Apis.1.16.0\lib\net45\Google.Apis.dll</HintPath>
+ </Reference>
+ <Reference Include="Google.Apis.PlatformServices">
+ <HintPath>..\packages\Google.Apis.1.16.0\lib\net45\Google.Apis.PlatformServices.dll</HintPath>
</Reference>
<Reference Include="Google.Apis.Auth">
- <HintPath>..\packages\Google.Apis.Auth.1.15.0\lib\net45\Google.Apis.Auth.dll</HintPath>
+ <HintPath>..\packages\Google.Apis.Auth.1.16.0\lib\net45\Google.Apis.Auth.dll</HintPath>
</Reference>
<Reference Include="Google.Apis.Auth.PlatformServices">
- <HintPath>..\packages\Google.Apis.Auth.1.15.0\lib\net45\Google.Apis.Auth.PlatformServices.dll</HintPath>
+ <HintPath>..\packages\Google.Apis.Auth.1.16.0\lib\net45\Google.Apis.Auth.PlatformServices.dll</HintPath>
</Reference>
- <Reference Include="CommandLineParser.Unofficial">
- <HintPath>..\packages\CommandLineParser.Unofficial.2.0.275\lib\net45\CommandLineParser.Unofficial.dll</HintPath>
+ <Reference Include="Google.Protobuf">
+ <HintPath>..\packages\Google.Protobuf.3.0.0\lib\net45\Google.Protobuf.dll</HintPath>
+ </Reference>
+ <Reference Include="Castle.Core">
+ <HintPath>..\packages\Castle.Core.3.3.3\lib\net45\Castle.Core.dll</HintPath>
+ </Reference>
+ <Reference Include="Moq">
+ <HintPath>..\packages\Moq.4.6.38-alpha\lib\net45\Moq.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
diff --git a/src/csharp/Grpc.IntegrationTesting/packages.config b/src/csharp/Grpc.IntegrationTesting/packages.config
index 8bf9dd4937..a39fb3a23e 100644
--- a/src/csharp/Grpc.IntegrationTesting/packages.config
+++ b/src/csharp/Grpc.IntegrationTesting/packages.config
@@ -1,13 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="BouncyCastle" version="1.7.0" targetFramework="net45" />
+ <package id="Castle.Core" version="3.3.3" targetFramework="net45" />
<package id="CommandLineParser.Unofficial" version="2.0.275" targetFramework="net45" />
- <package id="Google.Apis.Auth" version="1.15.0" targetFramework="net45" />
- <package id="Google.Apis.Core" version="1.15.0" targetFramework="net45" />
- <package id="Google.Protobuf" version="3.0.0-beta3" targetFramework="net45" />
- <package id="System.Interactive.Async" version="3.0.0" targetFramework="net45" />
- <package id="Moq" version="4.2.1510.2205" targetFramework="net45" />
+ <package id="Google.Apis" version="1.16.0" targetFramework="net45" />
+ <package id="Google.Apis.Auth" version="1.16.0" targetFramework="net45" />
+ <package id="Google.Apis.Core" version="1.16.0" targetFramework="net45" />
+ <package id="Google.Protobuf" version="3.0.0" targetFramework="net45" />
+ <package id="log4net" version="2.0.3" targetFramework="net45" />
+ <package id="Moq" version="4.6.38-alpha" targetFramework="net45" />
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
<package id="NUnit" version="3.2.0" targetFramework="net45" />
<package id="NUnitLite" version="3.2.0" targetFramework="net45" />
+ <package id="System.Interactive.Async" version="3.0.0" targetFramework="net45" />
+ <package id="Zlib.Portable.Signed" version="1.11.0" targetFramework="net45" />
</packages> \ No newline at end of file
diff --git a/src/csharp/Grpc.IntegrationTesting/project.json b/src/csharp/Grpc.IntegrationTesting/project.json
index 9d706510b2..0225abb414 100644
--- a/src/csharp/Grpc.IntegrationTesting/project.json
+++ b/src/csharp/Grpc.IntegrationTesting/project.json
@@ -13,8 +13,10 @@
"includeFiles": [ "../Grpc.Core/Version.cs" ]
},
"copyToOutput": {
- "include": "data/*",
"mappings": {
+ "data/ca.pem": "../Grpc.IntegrationTesting/data/ca.pem",
+ "data/server1.key": "../Grpc.IntegrationTesting/data/server1.key",
+ "data/server1.pem": "../Grpc.IntegrationTesting/data/server1.pem",
"grpc_csharp_ext.x64.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll",
"grpc_csharp_ext.x86.dll": "../../../vsprojects/Debug/grpc_csharp_ext.dll",
"libgrpc_csharp_ext.x64.so": "../../../libs/dbg/libgrpc_csharp_ext.so",
@@ -33,8 +35,10 @@
"includeFiles": [ "../Grpc.Core/Version.cs" ]
},
"copyToOutput": {
- "include": "data/*",
"mappings": {
+ "data/ca.pem": "../Grpc.IntegrationTesting/data/ca.pem",
+ "data/server1.key": "../Grpc.IntegrationTesting/data/server1.key",
+ "data/server1.pem": "../Grpc.IntegrationTesting/data/server1.pem",
"grpc_csharp_ext.x64.dll": "../../../vsprojects/x64/Release/grpc_csharp_ext.dll",
"grpc_csharp_ext.x86.dll": "../../../vsprojects/Release/grpc_csharp_ext.dll",
"libgrpc_csharp_ext.x64.so": "../../../libs/opt/libgrpc_csharp_ext.so",
@@ -44,11 +48,6 @@
}
}
},
- "runtimes": {
- "win7-x64": { },
- "debian.8-x64": { },
- "osx.10.11-x64": { }
- },
"dependencies": {
"Grpc.Auth": {
@@ -57,16 +56,14 @@
"Grpc.Core": {
"target": "project"
},
- "Google.Protobuf": "3.0.0-beta3",
+ "Google.Protobuf": "3.0.0",
"CommandLineParser.Unofficial": "2.0.275",
+ "Moq": "4.6.38-alpha",
"NUnit": "3.2.0",
"NUnitLite": "3.2.0-*"
},
"frameworks": {
"net45": {
- "dependencies": {
- "Moq": "4.2.1510.2205"
- },
"frameworkAssemblies": {
"System.Runtime": "",
"System.IO": ""
@@ -74,12 +71,13 @@
},
"netcoreapp1.0": {
"imports": [
- "portable-net45",
- "net45"
+ "portable-net45"
],
"dependencies": {
- "Microsoft.NETCore.App": "1.0.0",
- "NETStandard.Library": "1.6.0",
+ "Microsoft.NETCore.App": {
+ "type": "platform",
+ "version": "1.0.0"
+ },
"System.Linq.Expressions": "4.1.0"
}
}
diff --git a/src/csharp/Grpc.Tools.nuspec b/src/csharp/Grpc.Tools.nuspec
index 31d1bed647..0c937ab9cb 100644
--- a/src/csharp/Grpc.Tools.nuspec
+++ b/src/csharp/Grpc.Tools.nuspec
@@ -16,17 +16,18 @@
<tags>gRPC RPC Protocol HTTP/2</tags>
</metadata>
<files>
- <file src="protoc_plugins\windows_x86\protoc.exe" target="tools\windows_x86\protoc.exe" />
- <file src="protoc_plugins\windows_x86\grpc_csharp_plugin.exe" target="tools\windows_x86\grpc_csharp_plugin.exe" />
- <file src="protoc_plugins\windows_x64\protoc.exe" target="tools\windows_x64\protoc.exe" />
- <file src="protoc_plugins\windows_x64\grpc_csharp_plugin.exe" target="tools\windows_x64\grpc_csharp_plugin.exe" />
- <file src="protoc_plugins\linux_x86\protoc" target="tools\linux_x86\protoc" />
- <file src="protoc_plugins\linux_x86\grpc_csharp_plugin" target="tools\linux_x86\grpc_csharp_plugin" />
- <file src="protoc_plugins\linux_x64\protoc" target="tools\linux_x64\protoc" />
- <file src="protoc_plugins\linux_x64\grpc_csharp_plugin" target="tools\linux_x64\grpc_csharp_plugin" />
- <file src="protoc_plugins\macosx_x86\protoc" target="tools\macosx_x86\protoc" />
- <file src="protoc_plugins\macosx_x86\grpc_csharp_plugin" target="tools\macosx_x86\grpc_csharp_plugin" />
- <file src="protoc_plugins\macosx_x64\protoc" target="tools\macosx_x64\protoc" />
- <file src="protoc_plugins\macosx_x64\grpc_csharp_plugin" target="tools\macosx_x64\grpc_csharp_plugin" />
+ <!-- forward slashes in src path enable building on Linux -->
+ <file src="protoc_plugins/windows_x86/protoc.exe" target="tools\windows_x86\protoc.exe" />
+ <file src="protoc_plugins/windows_x86/grpc_csharp_plugin.exe" target="tools\windows_x86\grpc_csharp_plugin.exe" />
+ <file src="protoc_plugins/windows_x64/protoc.exe" target="tools\windows_x64\protoc.exe" />
+ <file src="protoc_plugins/windows_x64/grpc_csharp_plugin.exe" target="tools\windows_x64\grpc_csharp_plugin.exe" />
+ <file src="protoc_plugins/linux_x86/protoc" target="tools\linux_x86\protoc" />
+ <file src="protoc_plugins/linux_x86/grpc_csharp_plugin" target="tools\linux_x86\grpc_csharp_plugin" />
+ <file src="protoc_plugins/linux_x64/protoc" target="tools\linux_x64\protoc" />
+ <file src="protoc_plugins/linux_x64/grpc_csharp_plugin" target="tools\linux_x64\grpc_csharp_plugin" />
+ <file src="protoc_plugins/macosx_x86/protoc" target="tools\macosx_x86\protoc" />
+ <file src="protoc_plugins/macosx_x86/grpc_csharp_plugin" target="tools\macosx_x86\grpc_csharp_plugin" />
+ <file src="protoc_plugins/macosx_x64/protoc" target="tools\macosx_x64\protoc" />
+ <file src="protoc_plugins/macosx_x64/grpc_csharp_plugin" target="tools\macosx_x64\grpc_csharp_plugin" />
</files>
</package>
diff --git a/src/csharp/build_packages.bat b/src/csharp/build_packages.bat
index b92189c840..c0036df13f 100644
--- a/src/csharp/build_packages.bat
+++ b/src/csharp/build_packages.bat
@@ -29,6 +29,10 @@
@rem Builds gRPC NuGet packages
+@rem This way of building nuget packages is now obsolete. C# nuget packages
+@rem with CoreCLR support are now being built using the dotnet cli
+@rem in build_packages_dotnetcli.sh
+
@rem Current package versions
set VERSION=1.1.0-dev
set PROTOBUF_VERSION=3.0.0
@@ -77,8 +81,8 @@ endlocal
xcopy /Y /I *.nupkg ..\..\artifacts\
@rem create a zipfile with the artifacts as well
-powershell -Command "Add-Type -Assembly 'System.IO.Compression.FileSystem'; [System.IO.Compression.ZipFile]::CreateFromDirectory('..\..\artifacts', 'csharp_nugets.zip');"
-xcopy /Y /I csharp_nugets.zip ..\..\artifacts\
+powershell -Command "Add-Type -Assembly 'System.IO.Compression.FileSystem'; [System.IO.Compression.ZipFile]::CreateFromDirectory('..\..\artifacts', 'csharp_nugets_obsolete.zip');"
+xcopy /Y /I csharp_nugets_obsolete.zip ..\..\artifacts\
goto :EOF
diff --git a/tools/run_tests/build_package_csharp_coreclr.sh b/src/csharp/build_packages_dotnetcli.sh
index e1c363da50..3c127f320b 100755
--- a/tools/run_tests/build_package_csharp_coreclr.sh
+++ b/src/csharp/build_packages_dotnetcli.sh
@@ -30,19 +30,19 @@
set -ex
-cd $(dirname $0)/../..
+cd $(dirname $0)
-mkdir -p artifacts/
-
-cd src/csharp
-
-# IMPORTANT: NuGet packages generated by dotnet CLI are considered experimental.
-# The official nugets are generated by src/csharp/build_packages.bat
+mkdir -p ../../artifacts/
mkdir -p nativelibs/windows_x86 nativelibs/windows_x64 \
nativelibs/linux_x86 nativelibs/linux_x64 \
nativelibs/macosx_x86 nativelibs/macosx_x64
+mkdir -p protoc_plugins/windows_x86 protoc_plugins/windows_x64 \
+ protoc_plugins/linux_x86 protoc_plugins/linux_x64 \
+ protoc_plugins/macosx_x86 protoc_plugins/macosx_x64
+
+# Collect the artifacts built by the previous build step if running on Jenkins
cp $EXTERNAL_GIT_ROOT/architecture=x86,language=csharp,platform=windows/artifacts/* nativelibs/windows_x86 || true
cp $EXTERNAL_GIT_ROOT/architecture=x64,language=csharp,platform=windows/artifacts/* nativelibs/windows_x64 || true
cp $EXTERNAL_GIT_ROOT/architecture=x86,language=csharp,platform=linux/artifacts/* nativelibs/linux_x86 || true
@@ -50,10 +50,21 @@ cp $EXTERNAL_GIT_ROOT/architecture=x64,language=csharp,platform=linux/artifacts/
cp $EXTERNAL_GIT_ROOT/architecture=x86,language=csharp,platform=macos/artifacts/* nativelibs/macosx_x86 || true
cp $EXTERNAL_GIT_ROOT/architecture=x64,language=csharp,platform=macos/artifacts/* nativelibs/macosx_x64 || true
+# Collect protoc artifacts built by the previous build step
+cp $EXTERNAL_GIT_ROOT/architecture=x86,language=protoc,platform=windows/artifacts/* protoc_plugins/windows_x86 || true
+cp $EXTERNAL_GIT_ROOT/architecture=x64,language=protoc,platform=windows/artifacts/* protoc_plugins/windows_x64 || true
+cp $EXTERNAL_GIT_ROOT/architecture=x86,language=protoc,platform=linux/artifacts/* protoc_plugins/linux_x86 || true
+cp $EXTERNAL_GIT_ROOT/architecture=x64,language=protoc,platform=linux/artifacts/* protoc_plugins/linux_x64 || true
+cp $EXTERNAL_GIT_ROOT/architecture=x86,language=protoc,platform=macos/artifacts/* protoc_plugins/macosx_x86 || true
+cp $EXTERNAL_GIT_ROOT/architecture=x64,language=protoc,platform=macos/artifacts/* protoc_plugins/macosx_x64 || true
+
dotnet restore .
dotnet pack --configuration Release Grpc.Core/project.json --output ../../artifacts
dotnet pack --configuration Release Grpc.Auth/project.json --output ../../artifacts
dotnet pack --configuration Release Grpc.HealthCheck/project.json --output ../../artifacts
-tar -czf ../../artifacts/csharp_nugets_experimental.tar.gz ../../artifacts/*.nupkg
+nuget pack Grpc.nuspec -Version "1.1.0-dev" -OutputDirectory ../../artifacts
+nuget pack Grpc.Tools.nuspec -Version "1.1.0-dev" -OutputDirectory ../../artifacts
+
+(cd ../../artifacts && zip csharp_nugets_dotnetcli.zip *.nupkg)
diff --git a/src/csharp/ext/grpc_csharp_ext.c b/src/csharp/ext/grpc_csharp_ext.c
index 3d0947c03d..068bf709b8 100644
--- a/src/csharp/ext/grpc_csharp_ext.c
+++ b/src/csharp/ext/grpc_csharp_ext.c
@@ -255,8 +255,10 @@ GPR_EXPORT intptr_t GPR_CALLTYPE grpcsharp_batch_context_recv_message_length(
}
GPR_ASSERT(grpc_byte_buffer_reader_init(&reader, ctx->recv_message));
+ intptr_t result = (intptr_t)grpc_byte_buffer_length(reader.buffer_out);
+ grpc_byte_buffer_reader_destroy(&reader);
- return (intptr_t)grpc_byte_buffer_length(reader.buffer_out);
+ return result;
}
/*
@@ -279,6 +281,8 @@ GPR_EXPORT void GPR_CALLTYPE grpcsharp_batch_context_recv_message_to_buffer(
offset += len;
gpr_slice_unref(slice);
}
+
+ grpc_byte_buffer_reader_destroy(&reader);
}
GPR_EXPORT grpc_status_code GPR_CALLTYPE
diff --git a/src/node/README.md b/src/node/README.md
index 15d4c6d02f..9eafce9243 100644
--- a/src/node/README.md
+++ b/src/node/README.md
@@ -39,7 +39,7 @@ npm install grpc
To run the test suite, simply run `npm test` in the install location.
## API
-This library internally uses [ProtoBuf.js](https://github.com/dcodeIO/ProtoBuf.js), and some structures it exports match those exported by that library
+This library internally uses [ProtoBuf.js](https://github.com/dcodeIO/ProtoBuf.js), and some structures it exports match those exported by that library.
If you require this module, you will get an object with the following members
@@ -63,7 +63,7 @@ function loadObject(reflectionObject)
Returns the same structure that `load` returns, but takes a reflection object from `ProtoBuf.js` instead of a file name.
```javascript
-function Server([serverOpions])
+function Server([serverOptions])
```
Constructs a server to which service/implementation pairs can be added.
diff --git a/src/objective-c/GRPCClient/GRPCCall.m b/src/objective-c/GRPCClient/GRPCCall.m
index 05a1d10f6d..eecda4c03a 100644
--- a/src/objective-c/GRPCClient/GRPCCall.m
+++ b/src/objective-c/GRPCClient/GRPCCall.m
@@ -103,6 +103,11 @@ NSString * const kGRPCTrailersKey = @"io.grpc.TrailersKey";
@synthesize state = _state;
+// TODO(jcanizales): If grpc_init is idempotent, this should be changed from load to initialize.
++ (void)load {
+ grpc_init();
+}
+
- (instancetype)init {
return [self initWithHost:nil path:nil requestsWriter:nil];
}
diff --git a/src/objective-c/GRPCClient/private/GRPCWrappedCall.m b/src/objective-c/GRPCClient/private/GRPCWrappedCall.m
index 97f6b89340..1339429660 100644
--- a/src/objective-c/GRPCClient/private/GRPCWrappedCall.m
+++ b/src/objective-c/GRPCClient/private/GRPCWrappedCall.m
@@ -245,11 +245,6 @@
}
if (self = [super init]) {
- static dispatch_once_t initialization;
- dispatch_once(&initialization, ^{
- grpc_init();
- });
-
// Each completion queue consumes one thread. There's a trade to be made between creating and
// consuming too many threads and having contention of multiple calls in a single completion
// queue. Currently we use a singleton queue.
diff --git a/src/objective-c/RxLibrary/transformations/GRXMappingWriter.m b/src/objective-c/RxLibrary/transformations/GRXMappingWriter.m
index f3242e4fa9..6ee1545d25 100644
--- a/src/objective-c/RxLibrary/transformations/GRXMappingWriter.m
+++ b/src/objective-c/RxLibrary/transformations/GRXMappingWriter.m
@@ -33,10 +33,6 @@
#import "GRXMappingWriter.h"
-static id (^kIdentity)(id value) = ^id(id value) {
- return value;
-};
-
@interface GRXForwardingWriter () <GRXWriteable>
@end
@@ -51,7 +47,9 @@ static id (^kIdentity)(id value) = ^id(id value) {
// Designated initializer
- (instancetype)initWithWriter:(GRXWriter *)writer map:(id (^)(id value))map {
if ((self = [super initWithWriter:writer])) {
- _map = map ?: kIdentity;
+ _map = map ?: ^id(id value) {
+ return value;
+ };
}
return self;
}
diff --git a/src/php/ext/grpc/call.c b/src/php/ext/grpc/call.c
index 66ca1513ed..3a49ea8708 100644
--- a/src/php/ext/grpc/call.c
+++ b/src/php/ext/grpc/call.c
@@ -69,8 +69,8 @@ PHP_GRPC_FREE_WRAPPED_FUNC_START(wrapped_grpc_call)
}
PHP_GRPC_FREE_WRAPPED_FUNC_END()
-/* Initializes an instance of wrapped_grpc_call to be associated with an object
- * of a class specified by class_type */
+/* Initializes an instance of wrapped_grpc_call to be associated with an
+ * object of a class specified by class_type */
php_grpc_zend_object create_wrapped_grpc_call(zend_class_entry *class_type
TSRMLS_DC) {
PHP_GRPC_ALLOC_CLASS_OBJECT(wrapped_grpc_call);
@@ -164,6 +164,9 @@ bool create_metadata_array(zval *array, grpc_metadata_array *metadata) {
if (key_type1 != HASH_KEY_IS_STRING) {
return false;
}
+ if (!grpc_header_key_is_legal(key1, strlen(key1))) {
+ return false;
+ }
inner_array_hash = Z_ARRVAL_P(inner_array);
PHP_GRPC_HASH_FOREACH_VAL_START(inner_array_hash, value)
if (Z_TYPE_P(value) != IS_STRING) {
@@ -192,10 +195,11 @@ zval *grpc_php_wrap_call(grpc_call *wrapped, bool owned TSRMLS_DC) {
/**
* Constructs a new instance of the Call class.
- * @param Channel $channel The channel to associate the call with. Must not be
- * closed.
+ * @param Channel $channel_obj The channel to associate the call with.
+ * Must not be closed.
* @param string $method The method to call
- * @param Timeval $absolute_deadline The deadline for completing the call
+ * @param Timeval $deadline_obj The deadline for completing the call
+ * @param string $host_override The host is set by user (optional)
*/
PHP_METHOD(Call, __construct) {
zval *channel_obj;
@@ -234,7 +238,7 @@ PHP_METHOD(Call, __construct) {
/**
* Start a batch of RPC actions.
- * @param array batch Array of actions to take
+ * @param array $array Array of actions to take
* @return object Object with results of all actions
*/
PHP_METHOD(Call, startBatch) {
@@ -512,8 +516,9 @@ PHP_METHOD(Call, getPeer) {
}
/**
- * Cancel the call. This will cause the call to end with STATUS_CANCELLED if it
- * has not already ended with another status.
+ * Cancel the call. This will cause the call to end with STATUS_CANCELLED
+ * if it has not already ended with another status.
+ * @return void
*/
PHP_METHOD(Call, cancel) {
wrapped_grpc_call *call = Z_WRAPPED_GRPC_CALL_P(getThis());
@@ -522,8 +527,8 @@ PHP_METHOD(Call, cancel) {
/**
* Set the CallCredentials for this call.
- * @param CallCredentials creds_obj The CallCredentials object
- * @param int The error code
+ * @param CallCredentials $creds_obj The CallCredentials object
+ * @return int The error code
*/
PHP_METHOD(Call, setCredentials) {
zval *creds_obj;
diff --git a/src/php/ext/grpc/call_credentials.c b/src/php/ext/grpc/call_credentials.c
index 6921a5df17..3aafc3a19b 100644
--- a/src/php/ext/grpc/call_credentials.c
+++ b/src/php/ext/grpc/call_credentials.c
@@ -87,8 +87,8 @@ zval *grpc_php_wrap_call_credentials(grpc_call_credentials
/**
* Create composite credentials from two existing credentials.
- * @param CallCredentials cred1 The first credential
- * @param CallCredentials cred2 The second credential
+ * @param CallCredentials $cred1_obj The first credential
+ * @param CallCredentials $cred2_obj The second credential
* @return CallCredentials The new composite credentials object
*/
PHP_METHOD(CallCredentials, createComposite) {
@@ -119,7 +119,7 @@ PHP_METHOD(CallCredentials, createComposite) {
/**
* Create a call credentials object from the plugin API
- * @param function callback The callback function
+ * @param function $fci The callback function
* @return CallCredentials The new call credentials object
*/
PHP_METHOD(CallCredentials, createFromPlugin) {
@@ -192,24 +192,16 @@ void plugin_get_metadata(void *ptr, grpc_auth_metadata_context context,
/* call the user callback function */
zend_call_function(state->fci, state->fci_cache TSRMLS_CC);
- if (Z_TYPE_P(retval) != IS_ARRAY) {
- zend_throw_exception(spl_ce_InvalidArgumentException,
- "plugin callback must return metadata array",
- 1 TSRMLS_CC);
- return;
- }
-
+ grpc_status_code code = GRPC_STATUS_OK;
grpc_metadata_array metadata;
- if (!create_metadata_array(retval, &metadata)) {
- zend_throw_exception(spl_ce_InvalidArgumentException,
- "invalid metadata", 1 TSRMLS_CC);
+
+ if (Z_TYPE_P(retval) != IS_ARRAY) {
+ code = GRPC_STATUS_INVALID_ARGUMENT;
+ } else if (!create_metadata_array(retval, &metadata)) {
grpc_metadata_array_destroy(&metadata);
- return;
+ code = GRPC_STATUS_INVALID_ARGUMENT;
}
- /* TODO: handle error */
- grpc_status_code code = GRPC_STATUS_OK;
-
/* Pass control back to core */
cb(user_data, metadata.metadata, metadata.count, code, NULL);
}
diff --git a/src/php/ext/grpc/channel.c b/src/php/ext/grpc/channel.c
index b5a2c9f6ba..4ce4f307b0 100644
--- a/src/php/ext/grpc/channel.c
+++ b/src/php/ext/grpc/channel.c
@@ -125,7 +125,7 @@ void php_grpc_read_args_array(zval *args_array,
* "credentials" key mapping to a ChannelCredentials object, a secure channel
* will be created with those credentials.
* @param string $target The hostname to associate with this channel
- * @param array $args The arguments to pass to the Channel (optional)
+ * @param array $args_array The arguments to pass to the Channel
*/
PHP_METHOD(Channel, __construct) {
wrapped_grpc_channel *channel = Z_WRAPPED_GRPC_CHANNEL_P(getThis());
@@ -182,7 +182,7 @@ PHP_METHOD(Channel, getTarget) {
/**
* Get the connectivity state of the channel
- * @param bool (optional) try to connect on the channel
+ * @param bool $try_to_connect Try to connect on the channel (optional)
* @return long The grpc connectivity state
*/
PHP_METHOD(Channel, getConnectivityState) {
@@ -202,8 +202,8 @@ PHP_METHOD(Channel, getConnectivityState) {
/**
* Watch the connectivity state of the channel until it changed
- * @param long The previous connectivity state of the channel
- * @param Timeval The deadline this function should wait until
+ * @param long $last_state The previous connectivity state of the channel
+ * @param Timeval $deadline_obj The deadline this function should wait until
* @return bool If the connectivity state changes from last_state
* before deadline
*/
@@ -233,6 +233,7 @@ PHP_METHOD(Channel, watchConnectivityState) {
/**
* Close the channel
+ * @return void
*/
PHP_METHOD(Channel, close) {
wrapped_grpc_channel *channel = Z_WRAPPED_GRPC_CHANNEL_P(getThis());
diff --git a/src/php/ext/grpc/channel_credentials.c b/src/php/ext/grpc/channel_credentials.c
index 0b356aa25f..a32c4a4ea2 100644
--- a/src/php/ext/grpc/channel_credentials.c
+++ b/src/php/ext/grpc/channel_credentials.c
@@ -97,7 +97,7 @@ zval *grpc_php_wrap_channel_credentials(grpc_channel_credentials
/**
* Set default roots pem.
- * @param string pem_roots PEM encoding of the server root certificates
+ * @param string $pem_roots PEM encoding of the server root certificates
* @return void
*/
PHP_METHOD(ChannelCredentials, setDefaultRootsPem) {
@@ -129,11 +129,11 @@ PHP_METHOD(ChannelCredentials, createDefault) {
/**
* Create SSL credentials.
- * @param string pem_root_certs PEM encoding of the server root certificates
- * @param string pem_private_key PEM encoding of the client's private key
- * (optional)
- * @param string pem_cert_chain PEM encoding of the client's certificate chain
- * (optional)
+ * @param string $pem_root_certs PEM encoding of the server root certificates
+ * @param string $pem_key_cert_pair.private_key PEM encoding of the client's
+ * private key (optional)
+ * @param string $pem_key_cert_pair.cert_chain PEM encoding of the client's
+ * certificate chain (optional)
* @return ChannelCredentials The new SSL credentials object
*/
PHP_METHOD(ChannelCredentials, createSsl) {
@@ -168,8 +168,8 @@ PHP_METHOD(ChannelCredentials, createSsl) {
/**
* Create composite credentials from two existing credentials.
- * @param ChannelCredentials cred1 The first credential
- * @param CallCredentials cred2 The second credential
+ * @param ChannelCredentials $cred1_obj The first credential
+ * @param CallCredentials $cred2_obj The second credential
* @return ChannelCredentials The new composite credentials object
*/
PHP_METHOD(ChannelCredentials, createComposite) {
diff --git a/src/php/ext/grpc/server.c b/src/php/ext/grpc/server.c
index fc20c42b16..2217a4f9a8 100644
--- a/src/php/ext/grpc/server.c
+++ b/src/php/ext/grpc/server.c
@@ -72,8 +72,8 @@ PHP_GRPC_FREE_WRAPPED_FUNC_START(wrapped_grpc_server)
}
PHP_GRPC_FREE_WRAPPED_FUNC_END()
-/* Initializes an instance of wrapped_grpc_call to be associated with an object
- * of a class specified by class_type */
+/* Initializes an instance of wrapped_grpc_call to be associated with an
+ * object of a class specified by class_type */
php_grpc_zend_object create_wrapped_grpc_server(zend_class_entry *class_type
TSRMLS_DC) {
PHP_GRPC_ALLOC_CLASS_OBJECT(wrapped_grpc_server);
@@ -84,7 +84,7 @@ php_grpc_zend_object create_wrapped_grpc_server(zend_class_entry *class_type
/**
* Constructs a new instance of the Server class
- * @param array $args The arguments to pass to the server (optional)
+ * @param array $args_array The arguments to pass to the server (optional)
*/
PHP_METHOD(Server, __construct) {
wrapped_grpc_server *server = Z_WRAPPED_GRPC_SERVER_P(getThis());
@@ -116,7 +116,7 @@ PHP_METHOD(Server, __construct) {
* Request a call on a server. Creates a single GRPC_SERVER_RPC_NEW event.
* @param long $tag_new The tag to associate with the new request
* @param long $tag_cancel The tag to use if the call is cancelled
- * @return Void
+ * @return void
*/
PHP_METHOD(Server, requestCall) {
grpc_call_error error_code;
@@ -180,7 +180,7 @@ PHP_METHOD(Server, requestCall) {
/**
* Add a http2 over tcp listener.
* @param string $addr The address to add
- * @return true on success, false on failure
+ * @return bool True on success, false on failure
*/
PHP_METHOD(Server, addHttp2Port) {
const char *addr;
@@ -197,6 +197,12 @@ PHP_METHOD(Server, addHttp2Port) {
RETURN_LONG(grpc_server_add_insecure_http2_port(server->wrapped, addr));
}
+/**
+ * Add a secure http2 over tcp listener.
+ * @param string $addr The address to add
+ * @param ServerCredentials The ServerCredentials object
+ * @return bool True on success, false on failure
+ */
PHP_METHOD(Server, addSecureHttp2Port) {
const char *addr;
php_grpc_int addr_len;
@@ -220,7 +226,7 @@ PHP_METHOD(Server, addSecureHttp2Port) {
/**
* Start a server - tells all listeners to start listening
- * @return Void
+ * @return void
*/
PHP_METHOD(Server, start) {
wrapped_grpc_server *server = Z_WRAPPED_GRPC_SERVER_P(getThis());
diff --git a/src/php/ext/grpc/server_credentials.c b/src/php/ext/grpc/server_credentials.c
index b05896af4a..1610c8ebb0 100644
--- a/src/php/ext/grpc/server_credentials.c
+++ b/src/php/ext/grpc/server_credentials.c
@@ -61,8 +61,8 @@ PHP_GRPC_FREE_WRAPPED_FUNC_START(wrapped_grpc_server_credentials)
}
PHP_GRPC_FREE_WRAPPED_FUNC_END()
-/* Initializes an instace of wrapped_grpc_server_credentials to be associated
- * with an object of a class specified by class_type */
+/* Initializes an instace of wrapped_grpc_server_credentials to be
+ * associated with an object of a class specified by class_type */
php_grpc_zend_object create_wrapped_grpc_server_credentials(
zend_class_entry *class_type TSRMLS_DC) {
PHP_GRPC_ALLOC_CLASS_OBJECT(wrapped_grpc_server_credentials);
diff --git a/src/php/ext/grpc/timeval.c b/src/php/ext/grpc/timeval.c
index e145d96772..945231b47f 100644
--- a/src/php/ext/grpc/timeval.c
+++ b/src/php/ext/grpc/timeval.c
@@ -80,7 +80,7 @@ zval *grpc_php_wrap_timeval(gpr_timespec wrapped TSRMLS_DC) {
/**
* Constructs a new instance of the Timeval class
- * @param long $usec The number of microseconds in the interval
+ * @param long $microseconds The number of microseconds in the interval
*/
PHP_METHOD(Timeval, __construct) {
wrapped_grpc_timeval *timeval = Z_WRAPPED_GRPC_TIMEVAL_P(getThis());
@@ -100,7 +100,7 @@ PHP_METHOD(Timeval, __construct) {
/**
* Adds another Timeval to this one and returns the sum. Calculations saturate
* at infinities.
- * @param Timeval $other The other Timeval object to add
+ * @param Timeval $other_obj The other Timeval object to add
* @return Timeval A new Timeval object containing the sum
*/
PHP_METHOD(Timeval, add) {
@@ -126,8 +126,8 @@ PHP_METHOD(Timeval, add) {
/**
* Subtracts another Timeval from this one and returns the difference.
* Calculations saturate at infinities.
- * @param Timeval $other The other Timeval object to subtract
- * @param Timeval A new Timeval object containing the sum
+ * @param Timeval $other_obj The other Timeval object to subtract
+ * @return Timeval A new Timeval object containing the diff
*/
PHP_METHOD(Timeval, subtract) {
zval *other_obj;
@@ -150,10 +150,10 @@ PHP_METHOD(Timeval, subtract) {
}
/**
- * Return negative, 0, or positive according to whether a < b, a == b, or a > b
- * respectively.
- * @param Timeval $a The first time to compare
- * @param Timeval $b The second time to compare
+ * Return negative, 0, or positive according to whether a < b, a == b,
+ * or a > b respectively.
+ * @param Timeval $a_obj The first time to compare
+ * @param Timeval $b_obj The second time to compare
* @return long
*/
PHP_METHOD(Timeval, compare) {
@@ -176,9 +176,9 @@ PHP_METHOD(Timeval, compare) {
/**
* Checks whether the two times are within $threshold of each other
- * @param Timeval $a The first time to compare
- * @param Timeval $b The second time to compare
- * @param Timeval $threshold The threshold to check against
+ * @param Timeval $a_obj The first time to compare
+ * @param Timeval $b_obj The second time to compare
+ * @param Timeval $thresh_obj The threshold to check against
* @return bool True if $a and $b are within $threshold, False otherwise
*/
PHP_METHOD(Timeval, similar) {
diff --git a/src/php/lib/Grpc/AbstractCall.php b/src/php/lib/Grpc/AbstractCall.php
index c86d298805..c58ee56742 100644
--- a/src/php/lib/Grpc/AbstractCall.php
+++ b/src/php/lib/Grpc/AbstractCall.php
@@ -34,8 +34,15 @@
namespace Grpc;
+/**
+ * Class AbstractCall
+ * @package Grpc
+ */
abstract class AbstractCall
{
+ /**
+ * @var Call
+ */
protected $call;
protected $deserialize;
protected $metadata;
@@ -51,13 +58,15 @@ abstract class AbstractCall
* the response
* @param array $options Call options (optional)
*/
- public function __construct(Channel $channel,
- $method,
- $deserialize,
- $options = [])
- {
- if (isset($options['timeout']) &&
- is_numeric($timeout = $options['timeout'])) {
+ public function __construct(
+ Channel $channel,
+ $method,
+ $deserialize,
+ $options = []
+ ) {
+ if (array_key_exists('timeout', $options) &&
+ is_numeric($timeout = $options['timeout'])
+ ) {
$now = Timeval::now();
$delta = new Timeval($timeout);
$deadline = $now->add($delta);
@@ -68,17 +77,19 @@ abstract class AbstractCall
$this->deserialize = $deserialize;
$this->metadata = null;
$this->trailing_metadata = null;
- if (isset($options['call_credentials_callback']) &&
+ if (array_key_exists('call_credentials_callback', $options) &&
is_callable($call_credentials_callback =
- $options['call_credentials_callback'])) {
+ $options['call_credentials_callback'])
+ ) {
$call_credentials = CallCredentials::createFromPlugin(
- $call_credentials_callback);
+ $call_credentials_callback
+ );
$this->call->setCredentials($call_credentials);
}
}
/**
- * @return The metadata sent by the server.
+ * @return mixed The metadata sent by the server.
*/
public function getMetadata()
{
@@ -86,7 +97,7 @@ abstract class AbstractCall
}
/**
- * @return The trailing metadata sent by the server.
+ * @return mixed The trailing metadata sent by the server.
*/
public function getTrailingMetadata()
{
@@ -114,7 +125,7 @@ abstract class AbstractCall
*
* @param string $value The binary value to deserialize
*
- * @return The deserialized value
+ * @return mixed The deserialized value
*/
protected function deserializeResponse($value)
{
diff --git a/src/php/lib/Grpc/BaseStub.php b/src/php/lib/Grpc/BaseStub.php
index 2fec1bd9cc..d850eebc78 100644
--- a/src/php/lib/Grpc/BaseStub.php
+++ b/src/php/lib/Grpc/BaseStub.php
@@ -41,6 +41,7 @@ namespace Grpc;
class BaseStub
{
private $hostname;
+ private $hostname_override;
private $channel;
// a callback function
@@ -75,6 +76,9 @@ class BaseStub
} else {
$opts['grpc.primary_user_agent'] = '';
}
+ if (!empty($opts['grpc.ssl_target_name_override'])) {
+ $this->hostname_override = $opts['grpc.ssl_target_name_override'];
+ }
$opts['grpc.primary_user_agent'] .=
'grpc-php/'.$package_config['version'];
if (!array_key_exists('credentials', $opts)) {
@@ -173,7 +177,12 @@ class BaseStub
}
$service_name = substr($method, 0, $last_slash_idx);
- return 'https://'.$this->hostname.$service_name;
+ if ($this->hostname_override) {
+ $hostname = $this->hostname_override;
+ } else {
+ $hostname = $this->hostname;
+ }
+ return 'https://'.$hostname.$service_name;
}
/**
diff --git a/src/php/lib/Grpc/BidiStreamingCall.php b/src/php/lib/Grpc/BidiStreamingCall.php
index c2fdb94b86..5d6ecfb275 100644
--- a/src/php/lib/Grpc/BidiStreamingCall.php
+++ b/src/php/lib/Grpc/BidiStreamingCall.php
@@ -45,7 +45,7 @@ class BidiStreamingCall extends AbstractCall
*
* @param array $metadata Metadata to send with the call, if applicable
*/
- public function start($metadata = [])
+ public function start(array $metadata = [])
{
$this->call->startBatch([
OP_SEND_INITIAL_METADATA => $metadata,
@@ -55,7 +55,7 @@ class BidiStreamingCall extends AbstractCall
/**
* Reads the next value from the server.
*
- * @return The next value from the server, or null if there is none
+ * @return mixed The next value from the server, or null if there is none
*/
public function read()
{
@@ -82,7 +82,7 @@ class BidiStreamingCall extends AbstractCall
public function write($data, $options = [])
{
$message_array = ['message' => $data->serialize()];
- if (isset($options['flags'])) {
+ if (array_key_exists('flags', $options)) {
$message_array['flags'] = $options['flags'];
}
$this->call->startBatch([
@@ -103,8 +103,8 @@ class BidiStreamingCall extends AbstractCall
/**
* Wait for the server to send the status, and return it.
*
- * @return object The status object, with integer $code, string $details,
- * and array $metadata members
+ * @return \stdClass The status object, with integer $code, string $details,
+ * and array $metadata members
*/
public function getStatus()
{
diff --git a/src/php/lib/Grpc/ClientStreamingCall.php b/src/php/lib/Grpc/ClientStreamingCall.php
index 4050f7ed06..c96e26d033 100644
--- a/src/php/lib/Grpc/ClientStreamingCall.php
+++ b/src/php/lib/Grpc/ClientStreamingCall.php
@@ -60,10 +60,10 @@ class ClientStreamingCall extends AbstractCall
* @param array $options an array of options, possible keys:
* 'flags' => a number
*/
- public function write($data, $options = [])
+ public function write($data, array $options = [])
{
$message_array = ['message' => $data->serialize()];
- if (isset($options['flags'])) {
+ if (array_key_exists('flags', $options)) {
$message_array['flags'] = $options['flags'];
}
$this->call->startBatch([
@@ -74,7 +74,7 @@ class ClientStreamingCall extends AbstractCall
/**
* Wait for the server to respond with data and a status.
*
- * @return [response data, status]
+ * @return array [response data, status]
*/
public function wait()
{
diff --git a/src/php/lib/Grpc/ServerStreamingCall.php b/src/php/lib/Grpc/ServerStreamingCall.php
index ba89d9f972..5f0d42c528 100644
--- a/src/php/lib/Grpc/ServerStreamingCall.php
+++ b/src/php/lib/Grpc/ServerStreamingCall.php
@@ -36,14 +36,14 @@ namespace Grpc;
/**
* Represents an active call that sends a single message and then gets a stream
- * of reponses.
+ * of responses.
*/
class ServerStreamingCall extends AbstractCall
{
/**
* Start the call.
*
- * @param $data The data to send
+ * @param mixed $data The data to send
* @param array $metadata Metadata to send with the call, if applicable
* @param array $options an array of options, possible keys:
* 'flags' => a number
@@ -51,7 +51,7 @@ class ServerStreamingCall extends AbstractCall
public function start($data, $metadata = [], $options = [])
{
$message_array = ['message' => $data->serialize()];
- if (isset($options['flags'])) {
+ if (array_key_exists('flags', $options)) {
$message_array['flags'] = $options['flags'];
}
$event = $this->call->startBatch([
@@ -64,7 +64,7 @@ class ServerStreamingCall extends AbstractCall
}
/**
- * @return An iterator of response values
+ * @return mixed An iterator of response values
*/
public function responses()
{
@@ -82,8 +82,8 @@ class ServerStreamingCall extends AbstractCall
/**
* Wait for the server to send the status, and return it.
*
- * @return object The status object, with integer $code, string $details,
- * and array $metadata members
+ * @return \stdClass The status object, with integer $code, string $details,
+ * and array $metadata members
*/
public function getStatus()
{
diff --git a/src/php/lib/Grpc/UnaryCall.php b/src/php/lib/Grpc/UnaryCall.php
index a71b05dc93..487b89ebc1 100644
--- a/src/php/lib/Grpc/UnaryCall.php
+++ b/src/php/lib/Grpc/UnaryCall.php
@@ -43,7 +43,7 @@ class UnaryCall extends AbstractCall
/**
* Start the call.
*
- * @param $data The data to send
+ * @param mixed $data The data to send
* @param array $metadata Metadata to send with the call, if applicable
* @param array $options an array of options, possible keys:
* 'flags' => a number
@@ -66,7 +66,7 @@ class UnaryCall extends AbstractCall
/**
* Wait for the server to respond with data and a status.
*
- * @return [response data, status]
+ * @return array [response data, status]
*/
public function wait()
{
diff --git a/src/php/tests/interop/interop_client.php b/src/php/tests/interop/interop_client.php
index bf40549a04..94ceeda02c 100755
--- a/src/php/tests/interop/interop_client.php
+++ b/src/php/tests/interop/interop_client.php
@@ -54,6 +54,15 @@ function hardAssert($value, $error_message)
}
}
+function hardAssertIfStatusOk($status)
+{
+ if ($status->code !== Grpc\STATUS_OK) {
+ echo "Call did not complete successfully. Status object:\n";
+ var_dump($status);
+ exit(1);
+ }
+}
+
/**
* Run the empty_unary test.
*
@@ -62,7 +71,7 @@ function hardAssert($value, $error_message)
function emptyUnary($stub)
{
list($result, $status) = $stub->EmptyCall(new grpc\testing\EmptyMessage())->wait();
- hardAssert($status->code === Grpc\STATUS_OK, 'Call did not complete successfully');
+ hardAssertIfStatusOk($status);
hardAssert($result !== null, 'Call completed with a null response');
}
@@ -99,13 +108,13 @@ function performLargeUnary($stub, $fillUsername = false, $fillOauthScope = false
$request->setFillUsername($fillUsername);
$request->setFillOauthScope($fillOauthScope);
- $options = false;
+ $options = [];
if ($callback) {
$options['call_credentials_callback'] = $callback;
}
list($result, $status) = $stub->UnaryCall($request, [], $options)->wait();
- hardAssert($status->code === Grpc\STATUS_OK, 'Call did not complete successfully');
+ hardAssertIfStatusOk($status);
hardAssert($result !== null, 'Call returned a null response');
$payload = $result->getPayload();
hardAssert($payload->getType() === grpc\testing\PayloadType::COMPRESSABLE,
@@ -197,7 +206,12 @@ function updateAuthMetadataCallback($context)
$methodName = $context->method_name;
$auth_credentials = ApplicationDefaultCredentials::getCredentials();
- return $auth_credentials->updateMetadata($metadata = [], $authUri);
+ $metadata = [];
+ $result = $auth_credentials->updateMetadata([], $authUri);
+ foreach ($result as $key => $value) {
+ $metadata[strtolower($key)] = $value;
+ }
+ return $metadata;
}
/**
@@ -242,7 +256,7 @@ function clientStreaming($stub)
$call->write($request);
}
list($result, $status) = $call->wait();
- hardAssert($status->code === Grpc\STATUS_OK, 'Call did not complete successfully');
+ hardAssertIfStatusOk($status);
hardAssert($result->getAggregatedPayloadSize() === 74922,
'aggregated_payload_size was incorrect');
}
@@ -275,8 +289,7 @@ function serverStreaming($stub)
'Response '.$i.' had the wrong length');
$i += 1;
}
- hardAssert($call->getStatus()->code === Grpc\STATUS_OK,
- 'Call did not complete successfully');
+ hardAssertIfStatusOk($call->getStatus());
}
/**
@@ -312,8 +325,7 @@ function pingPong($stub)
}
$call->writesDone();
hardAssert($call->read() === null, 'Server returned too many responses');
- hardAssert($call->getStatus()->code === Grpc\STATUS_OK,
- 'Call did not complete successfully');
+ hardAssertIfStatusOk($call->getStatus());
}
/**
@@ -326,8 +338,7 @@ function emptyStream($stub)
$call = $stub->FullDuplexCall();
$call->writesDone();
hardAssert($call->read() === null, 'Server returned too many responses');
- hardAssert($call->getStatus()->code === Grpc\STATUS_OK,
- 'Call did not complete successfully');
+ hardAssertIfStatusOk($call->getStatus());
}
/**
@@ -419,8 +430,7 @@ function customMetadata($stub)
'Incorrect initial metadata value');
list($result, $status) = $call->wait();
- hardAssert($status->code === Grpc\STATUS_OK,
- 'Call did not complete successfully');
+ hardAssertIfStatusOk($status);
$trailing_metadata = $call->getTrailingMetadata();
hardAssert(array_key_exists($ECHO_TRAILING_KEY, $trailing_metadata),
@@ -435,8 +445,7 @@ function customMetadata($stub)
$streaming_call->write($streaming_request);
$streaming_call->writesDone();
- hardAssert($streaming_call->getStatus()->code === Grpc\STATUS_OK,
- 'Call did not complete successfully');
+ hardAssertIfStatusOk($streaming_call->getStatus());
$streaming_trailing_metadata = $streaming_call->getTrailingMetadata();
hardAssert(array_key_exists($ECHO_TRAILING_KEY,
diff --git a/src/php/tests/unit_tests/CallCredentials2Test.php b/src/php/tests/unit_tests/CallCredentials2Test.php
index a57e2b9b4e..b3b98a22ca 100644
--- a/src/php/tests/unit_tests/CallCredentials2Test.php
+++ b/src/php/tests/unit_tests/CallCredentials2Test.php
@@ -132,4 +132,69 @@ class CallCredentials2Test extends PHPUnit_Framework_TestCase
unset($call);
unset($server_call);
}
+
+ public function invalidKeyCallbackFunc($context)
+ {
+ $this->assertTrue(is_string($context->service_url));
+ $this->assertTrue(is_string($context->method_name));
+
+ return ['K1' => ['v1']];
+ }
+
+ public function testCallbackWithInvalidKey()
+ {
+ $deadline = Grpc\Timeval::infFuture();
+ $status_text = 'xyz';
+ $call = new Grpc\Call($this->channel,
+ '/abc/dummy_method',
+ $deadline,
+ $this->host_override);
+
+ $call_credentials = Grpc\CallCredentials::createFromPlugin(
+ array($this, 'invalidKeyCallbackFunc'));
+ $call->setCredentials($call_credentials);
+
+ $event = $call->startBatch([
+ Grpc\OP_SEND_INITIAL_METADATA => [],
+ Grpc\OP_SEND_CLOSE_FROM_CLIENT => true,
+ Grpc\OP_RECV_STATUS_ON_CLIENT => true,
+ ]);
+
+ $this->assertTrue($event->send_metadata);
+ $this->assertTrue($event->send_close);
+ $this->assertTrue($event->status->code == Grpc\STATUS_UNAUTHENTICATED);
+ }
+
+ public function invalidReturnCallbackFunc($context)
+ {
+ $this->assertTrue(is_string($context->service_url));
+ $this->assertTrue(is_string($context->method_name));
+
+ return "a string";
+ }
+
+ public function testCallbackWithInvalidReturnValue()
+ {
+ $deadline = Grpc\Timeval::infFuture();
+ $status_text = 'xyz';
+ $call = new Grpc\Call($this->channel,
+ '/abc/dummy_method',
+ $deadline,
+ $this->host_override);
+
+ $call_credentials = Grpc\CallCredentials::createFromPlugin(
+ array($this, 'invalidReturnCallbackFunc'));
+ $call->setCredentials($call_credentials);
+
+ $event = $call->startBatch([
+ Grpc\OP_SEND_INITIAL_METADATA => [],
+ Grpc\OP_SEND_CLOSE_FROM_CLIENT => true,
+ Grpc\OP_RECV_STATUS_ON_CLIENT => true,
+ ]);
+
+ $this->assertTrue($event->send_metadata);
+ $this->assertTrue($event->send_close);
+ $this->assertTrue($event->status->code == Grpc\STATUS_UNAUTHENTICATED);
+ }
+
}
diff --git a/src/php/tests/unit_tests/CallCredentials3Test.php b/src/php/tests/unit_tests/CallCredentials3Test.php
deleted file mode 100644
index 8f5e109bf5..0000000000
--- a/src/php/tests/unit_tests/CallCredentials3Test.php
+++ /dev/null
@@ -1,135 +0,0 @@
-<?php
-/*
- *
- * Copyright 2015, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-class CallCredentials3Test extends PHPUnit_Framework_TestCase
-{
- public function setUp()
- {
- $this->credentials = Grpc\ChannelCredentials::createSsl(
- file_get_contents(dirname(__FILE__).'/../data/ca.pem'));
- $server_credentials = Grpc\ServerCredentials::createSsl(
- null,
- file_get_contents(dirname(__FILE__).'/../data/server1.key'),
- file_get_contents(dirname(__FILE__).'/../data/server1.pem'));
- $this->server = new Grpc\Server();
- $this->port = $this->server->addSecureHttp2Port('0.0.0.0:0',
- $server_credentials);
- $this->server->start();
- $this->host_override = 'foo.test.google.fr';
- $this->channel = new Grpc\Channel(
- 'localhost:'.$this->port,
- [
- 'grpc.ssl_target_name_override' => $this->host_override,
- 'grpc.default_authority' => $this->host_override,
- 'credentials' => $this->credentials,
- ]
- );
- }
-
- public function tearDown()
- {
- unset($this->channel);
- unset($this->server);
- }
-
- public function callbackFunc($context)
- {
- $this->assertTrue(is_string($context->service_url));
- $this->assertTrue(is_string($context->method_name));
-
- return ['k1' => ['v1'], 'k2' => ['v2']];
- }
-
- public function testCreateFromPlugin()
- {
- $deadline = Grpc\Timeval::infFuture();
- $status_text = 'xyz';
- $call = new Grpc\Call($this->channel,
- '/abc/dummy_method',
- $deadline,
- $this->host_override);
-
- $call_credentials = Grpc\CallCredentials::createFromPlugin(
- [$this, 'callbackFunc']);
- $call->setCredentials($call_credentials);
-
- $event = $call->startBatch([
- Grpc\OP_SEND_INITIAL_METADATA => [],
- Grpc\OP_SEND_CLOSE_FROM_CLIENT => true,
- ]);
-
- $this->assertTrue($event->send_metadata);
- $this->assertTrue($event->send_close);
-
- $event = $this->server->requestCall();
-
- $this->assertTrue(is_array($event->metadata));
- $metadata = $event->metadata;
- $this->assertTrue(array_key_exists('k1', $metadata));
- $this->assertTrue(array_key_exists('k2', $metadata));
- $this->assertSame($metadata['k1'], ['v1']);
- $this->assertSame($metadata['k2'], ['v2']);
-
- $this->assertSame('/abc/dummy_method', $event->method);
- $server_call = $event->call;
-
- $event = $server_call->startBatch([
- Grpc\OP_SEND_INITIAL_METADATA => [],
- Grpc\OP_SEND_STATUS_FROM_SERVER => [
- 'metadata' => [],
- 'code' => Grpc\STATUS_OK,
- 'details' => $status_text,
- ],
- Grpc\OP_RECV_CLOSE_ON_SERVER => true,
- ]);
-
- $this->assertTrue($event->send_metadata);
- $this->assertTrue($event->send_status);
- $this->assertFalse($event->cancelled);
-
- $event = $call->startBatch([
- Grpc\OP_RECV_INITIAL_METADATA => true,
- Grpc\OP_RECV_STATUS_ON_CLIENT => true,
- ]);
-
- $this->assertSame([], $event->metadata);
- $status = $event->status;
- $this->assertSame([], $status->metadata);
- $this->assertSame(Grpc\STATUS_OK, $status->code);
- $this->assertSame($status_text, $status->details);
-
- unset($call);
- unset($server_call);
- }
-}
diff --git a/src/php/tests/unit_tests/CallTest.php b/src/php/tests/unit_tests/CallTest.php
index d736f51546..1205f0cd8e 100644
--- a/src/php/tests/unit_tests/CallTest.php
+++ b/src/php/tests/unit_tests/CallTest.php
@@ -113,7 +113,7 @@ class CallTest extends PHPUnit_Framework_TestCase
/**
* @expectedException InvalidArgumentException
*/
- public function testInvalidMetadataKey()
+ public function testInvalidStartBatchKey()
{
$batch = [
'invalid' => ['key1' => 'value1'],
@@ -124,6 +124,28 @@ class CallTest extends PHPUnit_Framework_TestCase
/**
* @expectedException InvalidArgumentException
*/
+ public function testInvalidMetadataStrKey()
+ {
+ $batch = [
+ Grpc\OP_SEND_INITIAL_METADATA => ['Key' => ['value1', 'value2']],
+ ];
+ $result = $this->call->startBatch($batch);
+ }
+
+ /**
+ * @expectedException InvalidArgumentException
+ */
+ public function testInvalidMetadataIntKey()
+ {
+ $batch = [
+ Grpc\OP_SEND_INITIAL_METADATA => [1 => ['value1', 'value2']],
+ ];
+ $result = $this->call->startBatch($batch);
+ }
+
+ /**
+ * @expectedException InvalidArgumentException
+ */
public function testInvalidMetadataInnerValue()
{
$batch = [
diff --git a/src/proto/census/trace_context.options b/src/proto/census/trace_context.options
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/src/proto/census/trace_context.options
diff --git a/src/proto/census/trace_context.proto b/src/proto/census/trace_context.proto
new file mode 100644
index 0000000000..a5d5a9595d
--- /dev/null
+++ b/src/proto/census/trace_context.proto
@@ -0,0 +1,48 @@
+// Copyright 2016, Google Inc.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+syntax = "proto3";
+
+package google.trace;
+
+// A TraceId uniquely represents a single Trace. It is a 128-bit nonce.
+message TraceId {
+ fixed64 hi = 1;
+ fixed64 lo = 2;
+}
+
+// Tracing information that is propagated with RPC's.
+message TraceContext {
+ // Trace identifer. Must be present.
+ TraceId trace_id = 1;
+ // ID of parent (client) span. Must be present.
+ fixed64 span_id = 2;
+ // true if this trace is sampled.
+ bool is_sampled = 3;
+}
diff --git a/src/proto/grpc/lb/v1/load_balancer.options b/src/proto/grpc/lb/v1/load_balancer.options
index d90366996e..a9398d5f47 100644
--- a/src/proto/grpc/lb/v1/load_balancer.options
+++ b/src/proto/grpc/lb/v1/load_balancer.options
@@ -1,6 +1,6 @@
grpc.lb.v1.InitialLoadBalanceRequest.name max_size:128
grpc.lb.v1.InitialLoadBalanceResponse.client_config max_size:64
grpc.lb.v1.InitialLoadBalanceResponse.load_balancer_delegate max_size:64
-grpc.lb.v1.Server.ip_address max_size:46
-grpc.lb.v1.Server.load_balance_token max_size:64
+grpc.lb.v1.Server.ip_address max_size:16
+grpc.lb.v1.Server.load_balance_token max_size:65
load_balancer.proto no_unions:true
diff --git a/src/proto/grpc/lb/v1/load_balancer.proto b/src/proto/grpc/lb/v1/load_balancer.proto
index 1bcad0b1d4..b4a33f3338 100644
--- a/src/proto/grpc/lb/v1/load_balancer.proto
+++ b/src/proto/grpc/lb/v1/load_balancer.proto
@@ -32,7 +32,6 @@ syntax = "proto3";
package grpc.lb.v1;
message Duration {
-
// Signed seconds of the span of time. Must be from -315,576,000,000
// to +315,576,000,000 inclusive.
int64 seconds = 1;
@@ -93,16 +92,11 @@ message LoadBalanceResponse {
}
message InitialLoadBalanceResponse {
- oneof initial_response_type {
- // TODO(zhangkun83): ClientConfig not yet defined
- //ClientConfig client_config = 1;
-
- // This is an application layer redirect that indicates the client should
- // use the specified server for load balancing. When this field is set in
- // the response, the client should open a separate connection to the
- // load_balancer_delegate and call the BalanceLoad method.
- string load_balancer_delegate = 2;
- }
+ // This is an application layer redirect that indicates the client should use
+ // the specified server for load balancing. When this field is non-empty in
+ // the response, the client should open a separate connection to the
+ // load_balancer_delegate and call the BalanceLoad method.
+ string load_balancer_delegate = 1;
// This interval defines how often the client should send the client stats
// to the load balancer. Stats should only be reported when the duration is
@@ -125,14 +119,17 @@ message ServerList {
}
message Server {
- // A resolved address and port for the server. The IP address string may
+ // A resolved address for the server, serialized in network-byte-order. It may
// either be an IPv4 or IPv6 address.
- string ip_address = 1;
+ bytes ip_address = 1;
+
+ // A resolved port number for the server.
int32 port = 2;
- // An opaque token that is passed from the client to the server in metadata.
- // The server may expect this token to indicate that the request from the
- // client was load balanced.
+ // An opaque but printable token given to the frontend for each pick. All
+ // frontend requests for that pick must include the token in its initial
+ // metadata. The token is used by the backend to verify the request and to
+ // allow the backend to report load to the gRPC LB system.
string load_balance_token = 3;
// Indicates whether this particular request should be dropped by the client
diff --git a/src/proto/grpc/testing/echo.proto b/src/proto/grpc/testing/echo.proto
index c596aabfcc..ca60a41b4f 100644
--- a/src/proto/grpc/testing/echo.proto
+++ b/src/proto/grpc/testing/echo.proto
@@ -42,7 +42,7 @@ service EchoTestService {
rpc Unimplemented(EchoRequest) returns (EchoResponse);
}
-service UnimplementedService {
+service UnimplementedEchoService {
rpc Unimplemented(EchoRequest) returns (EchoResponse);
}
diff --git a/src/python/grpcio/commands.py b/src/python/grpcio/commands.py
index d36ac23305..ea3b6f3391 100644
--- a/src/python/grpcio/commands.py
+++ b/src/python/grpcio/commands.py
@@ -53,6 +53,7 @@ PYTHON_STEM = os.path.dirname(os.path.abspath(__file__))
GRPC_STEM = os.path.abspath(PYTHON_STEM + '../../../../')
PROTO_STEM = os.path.join(GRPC_STEM, 'src', 'proto')
PROTO_GEN_STEM = os.path.join(GRPC_STEM, 'src', 'python', 'gens')
+CYTHON_STEM = os.path.join(PYTHON_STEM, 'grpc', '_cython')
CONF_PY_ADDENDUM = """
extensions.append('sphinx.ext.napoleon')
@@ -244,7 +245,7 @@ def try_cythonize(extensions, linetracing=False, mandatory=True):
extensions,
include_path=[
include_dir for extension in extensions for include_dir in extension.include_dirs
- ],
+ ] + [CYTHON_STEM],
compiler_directives=cython_compiler_directives
)
diff --git a/src/python/grpcio/grpc/__init__.py b/src/python/grpcio/grpc/__init__.py
index 513839df7d..faf3ab5f0d 100644
--- a/src/python/grpcio/grpc/__init__.py
+++ b/src/python/grpcio/grpc/__init__.py
@@ -1078,7 +1078,7 @@ def access_token_call_credentials(access_token):
Args:
access_token: A string to place directly in the http request
- authorization header, ie "Authorization: Bearer <access_token>".
+ authorization header, ie "authorization: Bearer <access_token>".
Returns:
A CallCredentials.
@@ -1193,7 +1193,7 @@ def insecure_channel(target, options=None):
def secure_channel(target, credentials, options=None):
- """Creates an insecure Channel to a server.
+ """Creates a secure Channel to a server.
Args:
target: The target to which to connect.
diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/security.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/security.pyx.pxi
index 23cee7bd6e..20fc1c5fce 100644
--- a/src/python/grpcio/grpc/_cython/_cygrpc/security.pyx.pxi
+++ b/src/python/grpcio/grpc/_cython/_cygrpc/security.pyx.pxi
@@ -35,7 +35,7 @@ import pkg_resources
cdef grpc_ssl_roots_override_result ssl_roots_override_callback(
char **pem_root_certs) with gil:
temporary_pem_root_certs = pkg_resources.resource_string(
- 'grpc._cython', '_credentials/roots.pem')
+ __name__.rstrip('.cygrpc'), '_credentials/roots.pem')
pem_root_certs[0] = <char *>gpr_malloc(len(temporary_pem_root_certs) + 1)
memcpy(
pem_root_certs[0], <char *>temporary_pem_root_certs,
diff --git a/src/python/grpcio/grpc/_cython/cygrpc.pxd b/src/python/grpcio/grpc/_cython/cygrpc.pxd
index 9779534e38..26454634a1 100644
--- a/src/python/grpcio/grpc/_cython/cygrpc.pxd
+++ b/src/python/grpcio/grpc/_cython/cygrpc.pxd
@@ -27,12 +27,12 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-include "grpc/_cython/_cygrpc/grpc.pxi"
+include "_cygrpc/grpc.pxi"
-include "grpc/_cython/_cygrpc/call.pxd.pxi"
-include "grpc/_cython/_cygrpc/channel.pxd.pxi"
-include "grpc/_cython/_cygrpc/credentials.pxd.pxi"
-include "grpc/_cython/_cygrpc/completion_queue.pxd.pxi"
-include "grpc/_cython/_cygrpc/records.pxd.pxi"
-include "grpc/_cython/_cygrpc/security.pxd.pxi"
-include "grpc/_cython/_cygrpc/server.pxd.pxi"
+include "_cygrpc/call.pxd.pxi"
+include "_cygrpc/channel.pxd.pxi"
+include "_cygrpc/credentials.pxd.pxi"
+include "_cygrpc/completion_queue.pxd.pxi"
+include "_cygrpc/records.pxd.pxi"
+include "_cygrpc/security.pxd.pxi"
+include "_cygrpc/server.pxd.pxi"
diff --git a/src/python/grpcio/grpc/_cython/cygrpc.pyx b/src/python/grpcio/grpc/_cython/cygrpc.pyx
index 08089994a9..e1bd046a1a 100644
--- a/src/python/grpcio/grpc/_cython/cygrpc.pyx
+++ b/src/python/grpcio/grpc/_cython/cygrpc.pyx
@@ -35,14 +35,14 @@ import sys
# TODO(atash): figure out why the coverage tool gets confused about the Cython
# coverage plugin when the following files don't have a '.pxi' suffix.
-include "grpc/_cython/_cygrpc/grpc_string.pyx.pxi"
-include "grpc/_cython/_cygrpc/call.pyx.pxi"
-include "grpc/_cython/_cygrpc/channel.pyx.pxi"
-include "grpc/_cython/_cygrpc/credentials.pyx.pxi"
-include "grpc/_cython/_cygrpc/completion_queue.pyx.pxi"
-include "grpc/_cython/_cygrpc/records.pyx.pxi"
-include "grpc/_cython/_cygrpc/security.pyx.pxi"
-include "grpc/_cython/_cygrpc/server.pyx.pxi"
+include "_cygrpc/grpc_string.pyx.pxi"
+include "_cygrpc/call.pyx.pxi"
+include "_cygrpc/channel.pyx.pxi"
+include "_cygrpc/credentials.pyx.pxi"
+include "_cygrpc/completion_queue.pyx.pxi"
+include "_cygrpc/records.pyx.pxi"
+include "_cygrpc/security.pyx.pxi"
+include "_cygrpc/server.pyx.pxi"
#
# initialize gRPC
diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py
index 7ae76f52c1..be7f30c29b 100644
--- a/src/python/grpcio/grpc_core_dependencies.py
+++ b/src/python/grpcio/grpc_core_dependencies.py
@@ -51,6 +51,7 @@ CORE_SOURCE_FILES = [
'src/core/lib/support/log_posix.c',
'src/core/lib/support/log_windows.c',
'src/core/lib/support/murmur_hash.c',
+ 'src/core/lib/support/percent_encoding.c',
'src/core/lib/support/slice.c',
'src/core/lib/support/slice_buffer.c',
'src/core/lib/support/stack_lockfree.c',
@@ -220,7 +221,6 @@ CORE_SOURCE_FILES = [
'src/core/ext/client_config/channel_connectivity.c',
'src/core/ext/client_config/client_channel.c',
'src/core/ext/client_config/client_channel_factory.c',
- 'src/core/ext/client_config/client_config.c',
'src/core/ext/client_config/client_config_plugin.c',
'src/core/ext/client_config/connector.c',
'src/core/ext/client_config/default_initial_connect_string.c',
@@ -232,8 +232,8 @@ CORE_SOURCE_FILES = [
'src/core/ext/client_config/resolver.c',
'src/core/ext/client_config/resolver_factory.c',
'src/core/ext/client_config/resolver_registry.c',
+ 'src/core/ext/client_config/resolver_result.c',
'src/core/ext/client_config/subchannel.c',
- 'src/core/ext/client_config/subchannel_call_holder.c',
'src/core/ext/client_config/subchannel_index.c',
'src/core/ext/client_config/uri_parser.c',
'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c',
@@ -255,6 +255,7 @@ CORE_SOURCE_FILES = [
'src/core/ext/census/base_resources.c',
'src/core/ext/census/context.c',
'src/core/ext/census/gen/census.pb.c',
+ 'src/core/ext/census/gen/trace_context.pb.c',
'src/core/ext/census/grpc_context.c',
'src/core/ext/census/grpc_filter.c',
'src/core/ext/census/grpc_plugin.c',
diff --git a/src/python/grpcio_tests/setup.py b/src/python/grpcio_tests/setup.py
index 3524355cbf..7384206602 100644
--- a/src/python/grpcio_tests/setup.py
+++ b/src/python/grpcio_tests/setup.py
@@ -31,13 +31,9 @@
import os
import os.path
-import shutil
import sys
-from distutils import core as _core
-from distutils import extension as _extension
import setuptools
-from setuptools.command import egg_info
import grpc.tools.command
diff --git a/src/python/grpcio_tests/tests/unit/_cython/cygrpc_test.py b/src/python/grpcio_tests/tests/unit/_cython/cygrpc_test.py
index 2f50263730..142387d810 100644
--- a/src/python/grpcio_tests/tests/unit/_cython/cygrpc_test.py
+++ b/src/python/grpcio_tests/tests/unit/_cython/cygrpc_test.py
@@ -114,9 +114,6 @@ class TypeSmokeTest(unittest.TestCase):
lambda ignored_a, ignored_b: None, b'')
del plugin
- @unittest.skipIf(
- platform.python_implementation() == "PyPy",
- 'TODO(issue 7672): figure out why this fails on PyPy')
def testCallCredentialsFromPluginUpDown(self):
plugin = cygrpc.CredentialsMetadataPlugin(_metadata_plugin_callback, b'')
call_credentials = cygrpc.call_credentials_metadata_plugin(plugin)
diff --git a/src/ruby/ext/grpc/extconf.rb b/src/ruby/ext/grpc/extconf.rb
index 6d65db8306..66c54aa3e0 100644
--- a/src/ruby/ext/grpc/extconf.rb
+++ b/src/ruby/ext/grpc/extconf.rb
@@ -91,6 +91,10 @@ if grpc_config == 'gcov'
$LDFLAGS << ' -fprofile-arcs -ftest-coverage -rdynamic'
end
+if grpc_config == 'dbg'
+ $CFLAGS << ' -O0'
+end
+
$LDFLAGS << ' -Wl,-wrap,memcpy' if RUBY_PLATFORM =~ /linux/
$LDFLAGS << ' -static' if windows
diff --git a/src/ruby/ext/grpc/rb_compression_options.c b/src/ruby/ext/grpc/rb_compression_options.c
index 0a3a215b1c..c5668fdab4 100644
--- a/src/ruby/ext/grpc/rb_compression_options.c
+++ b/src/ruby/ext/grpc/rb_compression_options.c
@@ -38,7 +38,7 @@
#include <grpc/compression.h>
#include <grpc/grpc.h>
-#include <grpc/impl/codegen/alloc.h>
+#include <grpc/support/alloc.h>
#include <grpc/impl/codegen/compression_types.h>
#include <grpc/impl/codegen/grpc_types.h>
#include <string.h>
diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.c b/src/ruby/ext/grpc/rb_grpc_imports.generated.c
index aee57b11aa..a6cad0db1a 100644
--- a/src/ruby/ext/grpc/rb_grpc_imports.generated.c
+++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.c
@@ -37,6 +37,16 @@
#include "rb_grpc_imports.generated.h"
+grpc_raw_byte_buffer_create_type grpc_raw_byte_buffer_create_import;
+grpc_raw_compressed_byte_buffer_create_type grpc_raw_compressed_byte_buffer_create_import;
+grpc_byte_buffer_copy_type grpc_byte_buffer_copy_import;
+grpc_byte_buffer_length_type grpc_byte_buffer_length_import;
+grpc_byte_buffer_destroy_type grpc_byte_buffer_destroy_import;
+grpc_byte_buffer_reader_init_type grpc_byte_buffer_reader_init_import;
+grpc_byte_buffer_reader_destroy_type grpc_byte_buffer_reader_destroy_import;
+grpc_byte_buffer_reader_next_type grpc_byte_buffer_reader_next_import;
+grpc_byte_buffer_reader_readall_type grpc_byte_buffer_reader_readall_import;
+grpc_raw_byte_buffer_from_reader_type grpc_raw_byte_buffer_from_reader_import;
census_initialize_type census_initialize_import;
census_shutdown_type census_shutdown_import;
census_supported_type census_supported_import;
@@ -80,6 +90,7 @@ grpc_register_plugin_type grpc_register_plugin_import;
grpc_init_type grpc_init_import;
grpc_shutdown_type grpc_shutdown_import;
grpc_version_string_type grpc_version_string_import;
+grpc_g_stands_for_type grpc_g_stands_for_import;
grpc_completion_queue_create_type grpc_completion_queue_create_import;
grpc_completion_queue_next_type grpc_completion_queue_next_import;
grpc_completion_queue_pluck_type grpc_completion_queue_pluck_import;
@@ -163,21 +174,48 @@ gpr_malloc_aligned_type gpr_malloc_aligned_import;
gpr_free_aligned_type gpr_free_aligned_import;
gpr_set_allocation_functions_type gpr_set_allocation_functions_import;
gpr_get_allocation_functions_type gpr_get_allocation_functions_import;
-grpc_raw_byte_buffer_create_type grpc_raw_byte_buffer_create_import;
-grpc_raw_compressed_byte_buffer_create_type grpc_raw_compressed_byte_buffer_create_import;
-grpc_byte_buffer_copy_type grpc_byte_buffer_copy_import;
-grpc_byte_buffer_length_type grpc_byte_buffer_length_import;
-grpc_byte_buffer_destroy_type grpc_byte_buffer_destroy_import;
-grpc_byte_buffer_reader_init_type grpc_byte_buffer_reader_init_import;
-grpc_byte_buffer_reader_destroy_type grpc_byte_buffer_reader_destroy_import;
-grpc_byte_buffer_reader_next_type grpc_byte_buffer_reader_next_import;
-grpc_byte_buffer_reader_readall_type grpc_byte_buffer_reader_readall_import;
-grpc_raw_byte_buffer_from_reader_type grpc_raw_byte_buffer_from_reader_import;
+gpr_avl_create_type gpr_avl_create_import;
+gpr_avl_ref_type gpr_avl_ref_import;
+gpr_avl_unref_type gpr_avl_unref_import;
+gpr_avl_add_type gpr_avl_add_import;
+gpr_avl_remove_type gpr_avl_remove_import;
+gpr_avl_get_type gpr_avl_get_import;
+gpr_avl_maybe_get_type gpr_avl_maybe_get_import;
+gpr_avl_is_empty_type gpr_avl_is_empty_import;
+gpr_cmdline_create_type gpr_cmdline_create_import;
+gpr_cmdline_add_int_type gpr_cmdline_add_int_import;
+gpr_cmdline_add_flag_type gpr_cmdline_add_flag_import;
+gpr_cmdline_add_string_type gpr_cmdline_add_string_import;
+gpr_cmdline_on_extra_arg_type gpr_cmdline_on_extra_arg_import;
+gpr_cmdline_set_survive_failure_type gpr_cmdline_set_survive_failure_import;
+gpr_cmdline_parse_type gpr_cmdline_parse_import;
+gpr_cmdline_destroy_type gpr_cmdline_destroy_import;
+gpr_cmdline_usage_string_type gpr_cmdline_usage_string_import;
+gpr_cpu_num_cores_type gpr_cpu_num_cores_import;
+gpr_cpu_current_cpu_type gpr_cpu_current_cpu_import;
+gpr_histogram_create_type gpr_histogram_create_import;
+gpr_histogram_destroy_type gpr_histogram_destroy_import;
+gpr_histogram_add_type gpr_histogram_add_import;
+gpr_histogram_merge_type gpr_histogram_merge_import;
+gpr_histogram_percentile_type gpr_histogram_percentile_import;
+gpr_histogram_mean_type gpr_histogram_mean_import;
+gpr_histogram_stddev_type gpr_histogram_stddev_import;
+gpr_histogram_variance_type gpr_histogram_variance_import;
+gpr_histogram_maximum_type gpr_histogram_maximum_import;
+gpr_histogram_minimum_type gpr_histogram_minimum_import;
+gpr_histogram_count_type gpr_histogram_count_import;
+gpr_histogram_sum_type gpr_histogram_sum_import;
+gpr_histogram_sum_of_squares_type gpr_histogram_sum_of_squares_import;
+gpr_histogram_get_contents_type gpr_histogram_get_contents_import;
+gpr_histogram_merge_contents_type gpr_histogram_merge_contents_import;
+gpr_join_host_port_type gpr_join_host_port_import;
+gpr_split_host_port_type gpr_split_host_port_import;
gpr_log_type gpr_log_import;
gpr_log_message_type gpr_log_message_import;
gpr_set_log_verbosity_type gpr_set_log_verbosity_import;
gpr_log_verbosity_init_type gpr_log_verbosity_init_import;
gpr_set_log_function_type gpr_set_log_function_import;
+gpr_format_message_type gpr_format_message_import;
gpr_slice_ref_type gpr_slice_ref_import;
gpr_slice_unref_type gpr_slice_unref_import;
gpr_slice_new_type gpr_slice_new_import;
@@ -207,6 +245,13 @@ gpr_slice_buffer_move_into_type gpr_slice_buffer_move_into_import;
gpr_slice_buffer_trim_end_type gpr_slice_buffer_trim_end_import;
gpr_slice_buffer_move_first_type gpr_slice_buffer_move_first_import;
gpr_slice_buffer_take_first_type gpr_slice_buffer_take_first_import;
+gpr_strdup_type gpr_strdup_import;
+gpr_asprintf_type gpr_asprintf_import;
+gpr_subprocess_binary_extension_type gpr_subprocess_binary_extension_import;
+gpr_subprocess_create_type gpr_subprocess_create_import;
+gpr_subprocess_destroy_type gpr_subprocess_destroy_import;
+gpr_subprocess_join_type gpr_subprocess_join_import;
+gpr_subprocess_interrupt_type gpr_subprocess_interrupt_import;
gpr_mu_init_type gpr_mu_init_import;
gpr_mu_destroy_type gpr_mu_destroy_import;
gpr_mu_lock_type gpr_mu_lock_import;
@@ -230,6 +275,14 @@ gpr_unref_type gpr_unref_import;
gpr_stats_init_type gpr_stats_init_import;
gpr_stats_inc_type gpr_stats_inc_import;
gpr_stats_read_type gpr_stats_read_import;
+gpr_thd_new_type gpr_thd_new_import;
+gpr_thd_options_default_type gpr_thd_options_default_import;
+gpr_thd_options_set_detached_type gpr_thd_options_set_detached_import;
+gpr_thd_options_set_joinable_type gpr_thd_options_set_joinable_import;
+gpr_thd_options_is_detached_type gpr_thd_options_is_detached_import;
+gpr_thd_options_is_joinable_type gpr_thd_options_is_joinable_import;
+gpr_thd_currentid_type gpr_thd_currentid_import;
+gpr_thd_join_type gpr_thd_join_import;
gpr_time_0_type gpr_time_0_import;
gpr_inf_future_type gpr_inf_future_import;
gpr_inf_past_type gpr_inf_past_import;
@@ -251,60 +304,18 @@ gpr_time_to_millis_type gpr_time_to_millis_import;
gpr_time_similar_type gpr_time_similar_import;
gpr_sleep_until_type gpr_sleep_until_import;
gpr_timespec_to_micros_type gpr_timespec_to_micros_import;
-gpr_avl_create_type gpr_avl_create_import;
-gpr_avl_ref_type gpr_avl_ref_import;
-gpr_avl_unref_type gpr_avl_unref_import;
-gpr_avl_add_type gpr_avl_add_import;
-gpr_avl_remove_type gpr_avl_remove_import;
-gpr_avl_get_type gpr_avl_get_import;
-gpr_avl_maybe_get_type gpr_avl_maybe_get_import;
-gpr_avl_is_empty_type gpr_avl_is_empty_import;
-gpr_cmdline_create_type gpr_cmdline_create_import;
-gpr_cmdline_add_int_type gpr_cmdline_add_int_import;
-gpr_cmdline_add_flag_type gpr_cmdline_add_flag_import;
-gpr_cmdline_add_string_type gpr_cmdline_add_string_import;
-gpr_cmdline_on_extra_arg_type gpr_cmdline_on_extra_arg_import;
-gpr_cmdline_set_survive_failure_type gpr_cmdline_set_survive_failure_import;
-gpr_cmdline_parse_type gpr_cmdline_parse_import;
-gpr_cmdline_destroy_type gpr_cmdline_destroy_import;
-gpr_cmdline_usage_string_type gpr_cmdline_usage_string_import;
-gpr_cpu_num_cores_type gpr_cpu_num_cores_import;
-gpr_cpu_current_cpu_type gpr_cpu_current_cpu_import;
-gpr_histogram_create_type gpr_histogram_create_import;
-gpr_histogram_destroy_type gpr_histogram_destroy_import;
-gpr_histogram_add_type gpr_histogram_add_import;
-gpr_histogram_merge_type gpr_histogram_merge_import;
-gpr_histogram_percentile_type gpr_histogram_percentile_import;
-gpr_histogram_mean_type gpr_histogram_mean_import;
-gpr_histogram_stddev_type gpr_histogram_stddev_import;
-gpr_histogram_variance_type gpr_histogram_variance_import;
-gpr_histogram_maximum_type gpr_histogram_maximum_import;
-gpr_histogram_minimum_type gpr_histogram_minimum_import;
-gpr_histogram_count_type gpr_histogram_count_import;
-gpr_histogram_sum_type gpr_histogram_sum_import;
-gpr_histogram_sum_of_squares_type gpr_histogram_sum_of_squares_import;
-gpr_histogram_get_contents_type gpr_histogram_get_contents_import;
-gpr_histogram_merge_contents_type gpr_histogram_merge_contents_import;
-gpr_join_host_port_type gpr_join_host_port_import;
-gpr_split_host_port_type gpr_split_host_port_import;
-gpr_format_message_type gpr_format_message_import;
-gpr_strdup_type gpr_strdup_import;
-gpr_asprintf_type gpr_asprintf_import;
-gpr_subprocess_binary_extension_type gpr_subprocess_binary_extension_import;
-gpr_subprocess_create_type gpr_subprocess_create_import;
-gpr_subprocess_destroy_type gpr_subprocess_destroy_import;
-gpr_subprocess_join_type gpr_subprocess_join_import;
-gpr_subprocess_interrupt_type gpr_subprocess_interrupt_import;
-gpr_thd_new_type gpr_thd_new_import;
-gpr_thd_options_default_type gpr_thd_options_default_import;
-gpr_thd_options_set_detached_type gpr_thd_options_set_detached_import;
-gpr_thd_options_set_joinable_type gpr_thd_options_set_joinable_import;
-gpr_thd_options_is_detached_type gpr_thd_options_is_detached_import;
-gpr_thd_options_is_joinable_type gpr_thd_options_is_joinable_import;
-gpr_thd_currentid_type gpr_thd_currentid_import;
-gpr_thd_join_type gpr_thd_join_import;
void grpc_rb_load_imports(HMODULE library) {
+ grpc_raw_byte_buffer_create_import = (grpc_raw_byte_buffer_create_type) GetProcAddress(library, "grpc_raw_byte_buffer_create");
+ grpc_raw_compressed_byte_buffer_create_import = (grpc_raw_compressed_byte_buffer_create_type) GetProcAddress(library, "grpc_raw_compressed_byte_buffer_create");
+ grpc_byte_buffer_copy_import = (grpc_byte_buffer_copy_type) GetProcAddress(library, "grpc_byte_buffer_copy");
+ grpc_byte_buffer_length_import = (grpc_byte_buffer_length_type) GetProcAddress(library, "grpc_byte_buffer_length");
+ grpc_byte_buffer_destroy_import = (grpc_byte_buffer_destroy_type) GetProcAddress(library, "grpc_byte_buffer_destroy");
+ grpc_byte_buffer_reader_init_import = (grpc_byte_buffer_reader_init_type) GetProcAddress(library, "grpc_byte_buffer_reader_init");
+ grpc_byte_buffer_reader_destroy_import = (grpc_byte_buffer_reader_destroy_type) GetProcAddress(library, "grpc_byte_buffer_reader_destroy");
+ grpc_byte_buffer_reader_next_import = (grpc_byte_buffer_reader_next_type) GetProcAddress(library, "grpc_byte_buffer_reader_next");
+ grpc_byte_buffer_reader_readall_import = (grpc_byte_buffer_reader_readall_type) GetProcAddress(library, "grpc_byte_buffer_reader_readall");
+ grpc_raw_byte_buffer_from_reader_import = (grpc_raw_byte_buffer_from_reader_type) GetProcAddress(library, "grpc_raw_byte_buffer_from_reader");
census_initialize_import = (census_initialize_type) GetProcAddress(library, "census_initialize");
census_shutdown_import = (census_shutdown_type) GetProcAddress(library, "census_shutdown");
census_supported_import = (census_supported_type) GetProcAddress(library, "census_supported");
@@ -348,6 +359,7 @@ void grpc_rb_load_imports(HMODULE library) {
grpc_init_import = (grpc_init_type) GetProcAddress(library, "grpc_init");
grpc_shutdown_import = (grpc_shutdown_type) GetProcAddress(library, "grpc_shutdown");
grpc_version_string_import = (grpc_version_string_type) GetProcAddress(library, "grpc_version_string");
+ grpc_g_stands_for_import = (grpc_g_stands_for_type) GetProcAddress(library, "grpc_g_stands_for");
grpc_completion_queue_create_import = (grpc_completion_queue_create_type) GetProcAddress(library, "grpc_completion_queue_create");
grpc_completion_queue_next_import = (grpc_completion_queue_next_type) GetProcAddress(library, "grpc_completion_queue_next");
grpc_completion_queue_pluck_import = (grpc_completion_queue_pluck_type) GetProcAddress(library, "grpc_completion_queue_pluck");
@@ -431,21 +443,48 @@ void grpc_rb_load_imports(HMODULE library) {
gpr_free_aligned_import = (gpr_free_aligned_type) GetProcAddress(library, "gpr_free_aligned");
gpr_set_allocation_functions_import = (gpr_set_allocation_functions_type) GetProcAddress(library, "gpr_set_allocation_functions");
gpr_get_allocation_functions_import = (gpr_get_allocation_functions_type) GetProcAddress(library, "gpr_get_allocation_functions");
- grpc_raw_byte_buffer_create_import = (grpc_raw_byte_buffer_create_type) GetProcAddress(library, "grpc_raw_byte_buffer_create");
- grpc_raw_compressed_byte_buffer_create_import = (grpc_raw_compressed_byte_buffer_create_type) GetProcAddress(library, "grpc_raw_compressed_byte_buffer_create");
- grpc_byte_buffer_copy_import = (grpc_byte_buffer_copy_type) GetProcAddress(library, "grpc_byte_buffer_copy");
- grpc_byte_buffer_length_import = (grpc_byte_buffer_length_type) GetProcAddress(library, "grpc_byte_buffer_length");
- grpc_byte_buffer_destroy_import = (grpc_byte_buffer_destroy_type) GetProcAddress(library, "grpc_byte_buffer_destroy");
- grpc_byte_buffer_reader_init_import = (grpc_byte_buffer_reader_init_type) GetProcAddress(library, "grpc_byte_buffer_reader_init");
- grpc_byte_buffer_reader_destroy_import = (grpc_byte_buffer_reader_destroy_type) GetProcAddress(library, "grpc_byte_buffer_reader_destroy");
- grpc_byte_buffer_reader_next_import = (grpc_byte_buffer_reader_next_type) GetProcAddress(library, "grpc_byte_buffer_reader_next");
- grpc_byte_buffer_reader_readall_import = (grpc_byte_buffer_reader_readall_type) GetProcAddress(library, "grpc_byte_buffer_reader_readall");
- grpc_raw_byte_buffer_from_reader_import = (grpc_raw_byte_buffer_from_reader_type) GetProcAddress(library, "grpc_raw_byte_buffer_from_reader");
+ gpr_avl_create_import = (gpr_avl_create_type) GetProcAddress(library, "gpr_avl_create");
+ gpr_avl_ref_import = (gpr_avl_ref_type) GetProcAddress(library, "gpr_avl_ref");
+ gpr_avl_unref_import = (gpr_avl_unref_type) GetProcAddress(library, "gpr_avl_unref");
+ gpr_avl_add_import = (gpr_avl_add_type) GetProcAddress(library, "gpr_avl_add");
+ gpr_avl_remove_import = (gpr_avl_remove_type) GetProcAddress(library, "gpr_avl_remove");
+ gpr_avl_get_import = (gpr_avl_get_type) GetProcAddress(library, "gpr_avl_get");
+ gpr_avl_maybe_get_import = (gpr_avl_maybe_get_type) GetProcAddress(library, "gpr_avl_maybe_get");
+ gpr_avl_is_empty_import = (gpr_avl_is_empty_type) GetProcAddress(library, "gpr_avl_is_empty");
+ gpr_cmdline_create_import = (gpr_cmdline_create_type) GetProcAddress(library, "gpr_cmdline_create");
+ gpr_cmdline_add_int_import = (gpr_cmdline_add_int_type) GetProcAddress(library, "gpr_cmdline_add_int");
+ gpr_cmdline_add_flag_import = (gpr_cmdline_add_flag_type) GetProcAddress(library, "gpr_cmdline_add_flag");
+ gpr_cmdline_add_string_import = (gpr_cmdline_add_string_type) GetProcAddress(library, "gpr_cmdline_add_string");
+ gpr_cmdline_on_extra_arg_import = (gpr_cmdline_on_extra_arg_type) GetProcAddress(library, "gpr_cmdline_on_extra_arg");
+ gpr_cmdline_set_survive_failure_import = (gpr_cmdline_set_survive_failure_type) GetProcAddress(library, "gpr_cmdline_set_survive_failure");
+ gpr_cmdline_parse_import = (gpr_cmdline_parse_type) GetProcAddress(library, "gpr_cmdline_parse");
+ gpr_cmdline_destroy_import = (gpr_cmdline_destroy_type) GetProcAddress(library, "gpr_cmdline_destroy");
+ gpr_cmdline_usage_string_import = (gpr_cmdline_usage_string_type) GetProcAddress(library, "gpr_cmdline_usage_string");
+ gpr_cpu_num_cores_import = (gpr_cpu_num_cores_type) GetProcAddress(library, "gpr_cpu_num_cores");
+ gpr_cpu_current_cpu_import = (gpr_cpu_current_cpu_type) GetProcAddress(library, "gpr_cpu_current_cpu");
+ gpr_histogram_create_import = (gpr_histogram_create_type) GetProcAddress(library, "gpr_histogram_create");
+ gpr_histogram_destroy_import = (gpr_histogram_destroy_type) GetProcAddress(library, "gpr_histogram_destroy");
+ gpr_histogram_add_import = (gpr_histogram_add_type) GetProcAddress(library, "gpr_histogram_add");
+ gpr_histogram_merge_import = (gpr_histogram_merge_type) GetProcAddress(library, "gpr_histogram_merge");
+ gpr_histogram_percentile_import = (gpr_histogram_percentile_type) GetProcAddress(library, "gpr_histogram_percentile");
+ gpr_histogram_mean_import = (gpr_histogram_mean_type) GetProcAddress(library, "gpr_histogram_mean");
+ gpr_histogram_stddev_import = (gpr_histogram_stddev_type) GetProcAddress(library, "gpr_histogram_stddev");
+ gpr_histogram_variance_import = (gpr_histogram_variance_type) GetProcAddress(library, "gpr_histogram_variance");
+ gpr_histogram_maximum_import = (gpr_histogram_maximum_type) GetProcAddress(library, "gpr_histogram_maximum");
+ gpr_histogram_minimum_import = (gpr_histogram_minimum_type) GetProcAddress(library, "gpr_histogram_minimum");
+ gpr_histogram_count_import = (gpr_histogram_count_type) GetProcAddress(library, "gpr_histogram_count");
+ gpr_histogram_sum_import = (gpr_histogram_sum_type) GetProcAddress(library, "gpr_histogram_sum");
+ gpr_histogram_sum_of_squares_import = (gpr_histogram_sum_of_squares_type) GetProcAddress(library, "gpr_histogram_sum_of_squares");
+ gpr_histogram_get_contents_import = (gpr_histogram_get_contents_type) GetProcAddress(library, "gpr_histogram_get_contents");
+ gpr_histogram_merge_contents_import = (gpr_histogram_merge_contents_type) GetProcAddress(library, "gpr_histogram_merge_contents");
+ gpr_join_host_port_import = (gpr_join_host_port_type) GetProcAddress(library, "gpr_join_host_port");
+ gpr_split_host_port_import = (gpr_split_host_port_type) GetProcAddress(library, "gpr_split_host_port");
gpr_log_import = (gpr_log_type) GetProcAddress(library, "gpr_log");
gpr_log_message_import = (gpr_log_message_type) GetProcAddress(library, "gpr_log_message");
gpr_set_log_verbosity_import = (gpr_set_log_verbosity_type) GetProcAddress(library, "gpr_set_log_verbosity");
gpr_log_verbosity_init_import = (gpr_log_verbosity_init_type) GetProcAddress(library, "gpr_log_verbosity_init");
gpr_set_log_function_import = (gpr_set_log_function_type) GetProcAddress(library, "gpr_set_log_function");
+ gpr_format_message_import = (gpr_format_message_type) GetProcAddress(library, "gpr_format_message");
gpr_slice_ref_import = (gpr_slice_ref_type) GetProcAddress(library, "gpr_slice_ref");
gpr_slice_unref_import = (gpr_slice_unref_type) GetProcAddress(library, "gpr_slice_unref");
gpr_slice_new_import = (gpr_slice_new_type) GetProcAddress(library, "gpr_slice_new");
@@ -475,6 +514,13 @@ void grpc_rb_load_imports(HMODULE library) {
gpr_slice_buffer_trim_end_import = (gpr_slice_buffer_trim_end_type) GetProcAddress(library, "gpr_slice_buffer_trim_end");
gpr_slice_buffer_move_first_import = (gpr_slice_buffer_move_first_type) GetProcAddress(library, "gpr_slice_buffer_move_first");
gpr_slice_buffer_take_first_import = (gpr_slice_buffer_take_first_type) GetProcAddress(library, "gpr_slice_buffer_take_first");
+ gpr_strdup_import = (gpr_strdup_type) GetProcAddress(library, "gpr_strdup");
+ gpr_asprintf_import = (gpr_asprintf_type) GetProcAddress(library, "gpr_asprintf");
+ gpr_subprocess_binary_extension_import = (gpr_subprocess_binary_extension_type) GetProcAddress(library, "gpr_subprocess_binary_extension");
+ gpr_subprocess_create_import = (gpr_subprocess_create_type) GetProcAddress(library, "gpr_subprocess_create");
+ gpr_subprocess_destroy_import = (gpr_subprocess_destroy_type) GetProcAddress(library, "gpr_subprocess_destroy");
+ gpr_subprocess_join_import = (gpr_subprocess_join_type) GetProcAddress(library, "gpr_subprocess_join");
+ gpr_subprocess_interrupt_import = (gpr_subprocess_interrupt_type) GetProcAddress(library, "gpr_subprocess_interrupt");
gpr_mu_init_import = (gpr_mu_init_type) GetProcAddress(library, "gpr_mu_init");
gpr_mu_destroy_import = (gpr_mu_destroy_type) GetProcAddress(library, "gpr_mu_destroy");
gpr_mu_lock_import = (gpr_mu_lock_type) GetProcAddress(library, "gpr_mu_lock");
@@ -498,6 +544,14 @@ void grpc_rb_load_imports(HMODULE library) {
gpr_stats_init_import = (gpr_stats_init_type) GetProcAddress(library, "gpr_stats_init");
gpr_stats_inc_import = (gpr_stats_inc_type) GetProcAddress(library, "gpr_stats_inc");
gpr_stats_read_import = (gpr_stats_read_type) GetProcAddress(library, "gpr_stats_read");
+ gpr_thd_new_import = (gpr_thd_new_type) GetProcAddress(library, "gpr_thd_new");
+ gpr_thd_options_default_import = (gpr_thd_options_default_type) GetProcAddress(library, "gpr_thd_options_default");
+ gpr_thd_options_set_detached_import = (gpr_thd_options_set_detached_type) GetProcAddress(library, "gpr_thd_options_set_detached");
+ gpr_thd_options_set_joinable_import = (gpr_thd_options_set_joinable_type) GetProcAddress(library, "gpr_thd_options_set_joinable");
+ gpr_thd_options_is_detached_import = (gpr_thd_options_is_detached_type) GetProcAddress(library, "gpr_thd_options_is_detached");
+ gpr_thd_options_is_joinable_import = (gpr_thd_options_is_joinable_type) GetProcAddress(library, "gpr_thd_options_is_joinable");
+ gpr_thd_currentid_import = (gpr_thd_currentid_type) GetProcAddress(library, "gpr_thd_currentid");
+ gpr_thd_join_import = (gpr_thd_join_type) GetProcAddress(library, "gpr_thd_join");
gpr_time_0_import = (gpr_time_0_type) GetProcAddress(library, "gpr_time_0");
gpr_inf_future_import = (gpr_inf_future_type) GetProcAddress(library, "gpr_inf_future");
gpr_inf_past_import = (gpr_inf_past_type) GetProcAddress(library, "gpr_inf_past");
@@ -519,58 +573,6 @@ void grpc_rb_load_imports(HMODULE library) {
gpr_time_similar_import = (gpr_time_similar_type) GetProcAddress(library, "gpr_time_similar");
gpr_sleep_until_import = (gpr_sleep_until_type) GetProcAddress(library, "gpr_sleep_until");
gpr_timespec_to_micros_import = (gpr_timespec_to_micros_type) GetProcAddress(library, "gpr_timespec_to_micros");
- gpr_avl_create_import = (gpr_avl_create_type) GetProcAddress(library, "gpr_avl_create");
- gpr_avl_ref_import = (gpr_avl_ref_type) GetProcAddress(library, "gpr_avl_ref");
- gpr_avl_unref_import = (gpr_avl_unref_type) GetProcAddress(library, "gpr_avl_unref");
- gpr_avl_add_import = (gpr_avl_add_type) GetProcAddress(library, "gpr_avl_add");
- gpr_avl_remove_import = (gpr_avl_remove_type) GetProcAddress(library, "gpr_avl_remove");
- gpr_avl_get_import = (gpr_avl_get_type) GetProcAddress(library, "gpr_avl_get");
- gpr_avl_maybe_get_import = (gpr_avl_maybe_get_type) GetProcAddress(library, "gpr_avl_maybe_get");
- gpr_avl_is_empty_import = (gpr_avl_is_empty_type) GetProcAddress(library, "gpr_avl_is_empty");
- gpr_cmdline_create_import = (gpr_cmdline_create_type) GetProcAddress(library, "gpr_cmdline_create");
- gpr_cmdline_add_int_import = (gpr_cmdline_add_int_type) GetProcAddress(library, "gpr_cmdline_add_int");
- gpr_cmdline_add_flag_import = (gpr_cmdline_add_flag_type) GetProcAddress(library, "gpr_cmdline_add_flag");
- gpr_cmdline_add_string_import = (gpr_cmdline_add_string_type) GetProcAddress(library, "gpr_cmdline_add_string");
- gpr_cmdline_on_extra_arg_import = (gpr_cmdline_on_extra_arg_type) GetProcAddress(library, "gpr_cmdline_on_extra_arg");
- gpr_cmdline_set_survive_failure_import = (gpr_cmdline_set_survive_failure_type) GetProcAddress(library, "gpr_cmdline_set_survive_failure");
- gpr_cmdline_parse_import = (gpr_cmdline_parse_type) GetProcAddress(library, "gpr_cmdline_parse");
- gpr_cmdline_destroy_import = (gpr_cmdline_destroy_type) GetProcAddress(library, "gpr_cmdline_destroy");
- gpr_cmdline_usage_string_import = (gpr_cmdline_usage_string_type) GetProcAddress(library, "gpr_cmdline_usage_string");
- gpr_cpu_num_cores_import = (gpr_cpu_num_cores_type) GetProcAddress(library, "gpr_cpu_num_cores");
- gpr_cpu_current_cpu_import = (gpr_cpu_current_cpu_type) GetProcAddress(library, "gpr_cpu_current_cpu");
- gpr_histogram_create_import = (gpr_histogram_create_type) GetProcAddress(library, "gpr_histogram_create");
- gpr_histogram_destroy_import = (gpr_histogram_destroy_type) GetProcAddress(library, "gpr_histogram_destroy");
- gpr_histogram_add_import = (gpr_histogram_add_type) GetProcAddress(library, "gpr_histogram_add");
- gpr_histogram_merge_import = (gpr_histogram_merge_type) GetProcAddress(library, "gpr_histogram_merge");
- gpr_histogram_percentile_import = (gpr_histogram_percentile_type) GetProcAddress(library, "gpr_histogram_percentile");
- gpr_histogram_mean_import = (gpr_histogram_mean_type) GetProcAddress(library, "gpr_histogram_mean");
- gpr_histogram_stddev_import = (gpr_histogram_stddev_type) GetProcAddress(library, "gpr_histogram_stddev");
- gpr_histogram_variance_import = (gpr_histogram_variance_type) GetProcAddress(library, "gpr_histogram_variance");
- gpr_histogram_maximum_import = (gpr_histogram_maximum_type) GetProcAddress(library, "gpr_histogram_maximum");
- gpr_histogram_minimum_import = (gpr_histogram_minimum_type) GetProcAddress(library, "gpr_histogram_minimum");
- gpr_histogram_count_import = (gpr_histogram_count_type) GetProcAddress(library, "gpr_histogram_count");
- gpr_histogram_sum_import = (gpr_histogram_sum_type) GetProcAddress(library, "gpr_histogram_sum");
- gpr_histogram_sum_of_squares_import = (gpr_histogram_sum_of_squares_type) GetProcAddress(library, "gpr_histogram_sum_of_squares");
- gpr_histogram_get_contents_import = (gpr_histogram_get_contents_type) GetProcAddress(library, "gpr_histogram_get_contents");
- gpr_histogram_merge_contents_import = (gpr_histogram_merge_contents_type) GetProcAddress(library, "gpr_histogram_merge_contents");
- gpr_join_host_port_import = (gpr_join_host_port_type) GetProcAddress(library, "gpr_join_host_port");
- gpr_split_host_port_import = (gpr_split_host_port_type) GetProcAddress(library, "gpr_split_host_port");
- gpr_format_message_import = (gpr_format_message_type) GetProcAddress(library, "gpr_format_message");
- gpr_strdup_import = (gpr_strdup_type) GetProcAddress(library, "gpr_strdup");
- gpr_asprintf_import = (gpr_asprintf_type) GetProcAddress(library, "gpr_asprintf");
- gpr_subprocess_binary_extension_import = (gpr_subprocess_binary_extension_type) GetProcAddress(library, "gpr_subprocess_binary_extension");
- gpr_subprocess_create_import = (gpr_subprocess_create_type) GetProcAddress(library, "gpr_subprocess_create");
- gpr_subprocess_destroy_import = (gpr_subprocess_destroy_type) GetProcAddress(library, "gpr_subprocess_destroy");
- gpr_subprocess_join_import = (gpr_subprocess_join_type) GetProcAddress(library, "gpr_subprocess_join");
- gpr_subprocess_interrupt_import = (gpr_subprocess_interrupt_type) GetProcAddress(library, "gpr_subprocess_interrupt");
- gpr_thd_new_import = (gpr_thd_new_type) GetProcAddress(library, "gpr_thd_new");
- gpr_thd_options_default_import = (gpr_thd_options_default_type) GetProcAddress(library, "gpr_thd_options_default");
- gpr_thd_options_set_detached_import = (gpr_thd_options_set_detached_type) GetProcAddress(library, "gpr_thd_options_set_detached");
- gpr_thd_options_set_joinable_import = (gpr_thd_options_set_joinable_type) GetProcAddress(library, "gpr_thd_options_set_joinable");
- gpr_thd_options_is_detached_import = (gpr_thd_options_is_detached_type) GetProcAddress(library, "gpr_thd_options_is_detached");
- gpr_thd_options_is_joinable_import = (gpr_thd_options_is_joinable_type) GetProcAddress(library, "gpr_thd_options_is_joinable");
- gpr_thd_currentid_import = (gpr_thd_currentid_type) GetProcAddress(library, "gpr_thd_currentid");
- gpr_thd_join_import = (gpr_thd_join_type) GetProcAddress(library, "gpr_thd_join");
}
#endif /* GPR_WINDOWS */
diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h
index 3bb76fbb97..b87abfd8ef 100644
--- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h
+++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h
@@ -40,28 +40,58 @@
#include <windows.h>
+#include <grpc/byte_buffer.h>
#include <grpc/census.h>
#include <grpc/compression.h>
#include <grpc/grpc.h>
#include <grpc/grpc_posix.h>
#include <grpc/grpc_security.h>
-#include <grpc/impl/codegen/alloc.h>
-#include <grpc/impl/codegen/byte_buffer.h>
-#include <grpc/impl/codegen/log.h>
-#include <grpc/impl/codegen/slice.h>
-#include <grpc/impl/codegen/slice_buffer.h>
-#include <grpc/impl/codegen/sync.h>
-#include <grpc/impl/codegen/time.h>
+#include <grpc/support/alloc.h>
#include <grpc/support/avl.h>
#include <grpc/support/cmdline.h>
#include <grpc/support/cpu.h>
#include <grpc/support/histogram.h>
#include <grpc/support/host_port.h>
+#include <grpc/support/log.h>
#include <grpc/support/log_windows.h>
+#include <grpc/support/slice.h>
+#include <grpc/support/slice_buffer.h>
#include <grpc/support/string_util.h>
#include <grpc/support/subprocess.h>
+#include <grpc/support/sync.h>
#include <grpc/support/thd.h>
+#include <grpc/support/time.h>
+typedef grpc_byte_buffer *(*grpc_raw_byte_buffer_create_type)(gpr_slice *slices, size_t nslices);
+extern grpc_raw_byte_buffer_create_type grpc_raw_byte_buffer_create_import;
+#define grpc_raw_byte_buffer_create grpc_raw_byte_buffer_create_import
+typedef grpc_byte_buffer *(*grpc_raw_compressed_byte_buffer_create_type)(gpr_slice *slices, size_t nslices, grpc_compression_algorithm compression);
+extern grpc_raw_compressed_byte_buffer_create_type grpc_raw_compressed_byte_buffer_create_import;
+#define grpc_raw_compressed_byte_buffer_create grpc_raw_compressed_byte_buffer_create_import
+typedef grpc_byte_buffer *(*grpc_byte_buffer_copy_type)(grpc_byte_buffer *bb);
+extern grpc_byte_buffer_copy_type grpc_byte_buffer_copy_import;
+#define grpc_byte_buffer_copy grpc_byte_buffer_copy_import
+typedef size_t(*grpc_byte_buffer_length_type)(grpc_byte_buffer *bb);
+extern grpc_byte_buffer_length_type grpc_byte_buffer_length_import;
+#define grpc_byte_buffer_length grpc_byte_buffer_length_import
+typedef void(*grpc_byte_buffer_destroy_type)(grpc_byte_buffer *byte_buffer);
+extern grpc_byte_buffer_destroy_type grpc_byte_buffer_destroy_import;
+#define grpc_byte_buffer_destroy grpc_byte_buffer_destroy_import
+typedef int(*grpc_byte_buffer_reader_init_type)(grpc_byte_buffer_reader *reader, grpc_byte_buffer *buffer);
+extern grpc_byte_buffer_reader_init_type grpc_byte_buffer_reader_init_import;
+#define grpc_byte_buffer_reader_init grpc_byte_buffer_reader_init_import
+typedef void(*grpc_byte_buffer_reader_destroy_type)(grpc_byte_buffer_reader *reader);
+extern grpc_byte_buffer_reader_destroy_type grpc_byte_buffer_reader_destroy_import;
+#define grpc_byte_buffer_reader_destroy grpc_byte_buffer_reader_destroy_import
+typedef int(*grpc_byte_buffer_reader_next_type)(grpc_byte_buffer_reader *reader, gpr_slice *slice);
+extern grpc_byte_buffer_reader_next_type grpc_byte_buffer_reader_next_import;
+#define grpc_byte_buffer_reader_next grpc_byte_buffer_reader_next_import
+typedef gpr_slice(*grpc_byte_buffer_reader_readall_type)(grpc_byte_buffer_reader *reader);
+extern grpc_byte_buffer_reader_readall_type grpc_byte_buffer_reader_readall_import;
+#define grpc_byte_buffer_reader_readall grpc_byte_buffer_reader_readall_import
+typedef grpc_byte_buffer *(*grpc_raw_byte_buffer_from_reader_type)(grpc_byte_buffer_reader *reader);
+extern grpc_raw_byte_buffer_from_reader_type grpc_raw_byte_buffer_from_reader_import;
+#define grpc_raw_byte_buffer_from_reader grpc_raw_byte_buffer_from_reader_import
typedef int(*census_initialize_type)(int features);
extern census_initialize_type census_initialize_import;
#define census_initialize census_initialize_import
@@ -191,6 +221,9 @@ extern grpc_shutdown_type grpc_shutdown_import;
typedef const char *(*grpc_version_string_type)(void);
extern grpc_version_string_type grpc_version_string_import;
#define grpc_version_string grpc_version_string_import
+typedef const char *(*grpc_g_stands_for_type)(void);
+extern grpc_g_stands_for_type grpc_g_stands_for_import;
+#define grpc_g_stands_for grpc_g_stands_for_import
typedef grpc_completion_queue *(*grpc_completion_queue_create_type)(void *reserved);
extern grpc_completion_queue_create_type grpc_completion_queue_create_import;
#define grpc_completion_queue_create grpc_completion_queue_create_import
@@ -440,36 +473,114 @@ extern gpr_set_allocation_functions_type gpr_set_allocation_functions_import;
typedef gpr_allocation_functions(*gpr_get_allocation_functions_type)();
extern gpr_get_allocation_functions_type gpr_get_allocation_functions_import;
#define gpr_get_allocation_functions gpr_get_allocation_functions_import
-typedef grpc_byte_buffer *(*grpc_raw_byte_buffer_create_type)(gpr_slice *slices, size_t nslices);
-extern grpc_raw_byte_buffer_create_type grpc_raw_byte_buffer_create_import;
-#define grpc_raw_byte_buffer_create grpc_raw_byte_buffer_create_import
-typedef grpc_byte_buffer *(*grpc_raw_compressed_byte_buffer_create_type)(gpr_slice *slices, size_t nslices, grpc_compression_algorithm compression);
-extern grpc_raw_compressed_byte_buffer_create_type grpc_raw_compressed_byte_buffer_create_import;
-#define grpc_raw_compressed_byte_buffer_create grpc_raw_compressed_byte_buffer_create_import
-typedef grpc_byte_buffer *(*grpc_byte_buffer_copy_type)(grpc_byte_buffer *bb);
-extern grpc_byte_buffer_copy_type grpc_byte_buffer_copy_import;
-#define grpc_byte_buffer_copy grpc_byte_buffer_copy_import
-typedef size_t(*grpc_byte_buffer_length_type)(grpc_byte_buffer *bb);
-extern grpc_byte_buffer_length_type grpc_byte_buffer_length_import;
-#define grpc_byte_buffer_length grpc_byte_buffer_length_import
-typedef void(*grpc_byte_buffer_destroy_type)(grpc_byte_buffer *byte_buffer);
-extern grpc_byte_buffer_destroy_type grpc_byte_buffer_destroy_import;
-#define grpc_byte_buffer_destroy grpc_byte_buffer_destroy_import
-typedef int(*grpc_byte_buffer_reader_init_type)(grpc_byte_buffer_reader *reader, grpc_byte_buffer *buffer);
-extern grpc_byte_buffer_reader_init_type grpc_byte_buffer_reader_init_import;
-#define grpc_byte_buffer_reader_init grpc_byte_buffer_reader_init_import
-typedef void(*grpc_byte_buffer_reader_destroy_type)(grpc_byte_buffer_reader *reader);
-extern grpc_byte_buffer_reader_destroy_type grpc_byte_buffer_reader_destroy_import;
-#define grpc_byte_buffer_reader_destroy grpc_byte_buffer_reader_destroy_import
-typedef int(*grpc_byte_buffer_reader_next_type)(grpc_byte_buffer_reader *reader, gpr_slice *slice);
-extern grpc_byte_buffer_reader_next_type grpc_byte_buffer_reader_next_import;
-#define grpc_byte_buffer_reader_next grpc_byte_buffer_reader_next_import
-typedef gpr_slice(*grpc_byte_buffer_reader_readall_type)(grpc_byte_buffer_reader *reader);
-extern grpc_byte_buffer_reader_readall_type grpc_byte_buffer_reader_readall_import;
-#define grpc_byte_buffer_reader_readall grpc_byte_buffer_reader_readall_import
-typedef grpc_byte_buffer *(*grpc_raw_byte_buffer_from_reader_type)(grpc_byte_buffer_reader *reader);
-extern grpc_raw_byte_buffer_from_reader_type grpc_raw_byte_buffer_from_reader_import;
-#define grpc_raw_byte_buffer_from_reader grpc_raw_byte_buffer_from_reader_import
+typedef gpr_avl(*gpr_avl_create_type)(const gpr_avl_vtable *vtable);
+extern gpr_avl_create_type gpr_avl_create_import;
+#define gpr_avl_create gpr_avl_create_import
+typedef gpr_avl(*gpr_avl_ref_type)(gpr_avl avl);
+extern gpr_avl_ref_type gpr_avl_ref_import;
+#define gpr_avl_ref gpr_avl_ref_import
+typedef void(*gpr_avl_unref_type)(gpr_avl avl);
+extern gpr_avl_unref_type gpr_avl_unref_import;
+#define gpr_avl_unref gpr_avl_unref_import
+typedef gpr_avl(*gpr_avl_add_type)(gpr_avl avl, void *key, void *value);
+extern gpr_avl_add_type gpr_avl_add_import;
+#define gpr_avl_add gpr_avl_add_import
+typedef gpr_avl(*gpr_avl_remove_type)(gpr_avl avl, void *key);
+extern gpr_avl_remove_type gpr_avl_remove_import;
+#define gpr_avl_remove gpr_avl_remove_import
+typedef void *(*gpr_avl_get_type)(gpr_avl avl, void *key);
+extern gpr_avl_get_type gpr_avl_get_import;
+#define gpr_avl_get gpr_avl_get_import
+typedef int(*gpr_avl_maybe_get_type)(gpr_avl avl, void *key, void **value);
+extern gpr_avl_maybe_get_type gpr_avl_maybe_get_import;
+#define gpr_avl_maybe_get gpr_avl_maybe_get_import
+typedef int(*gpr_avl_is_empty_type)(gpr_avl avl);
+extern gpr_avl_is_empty_type gpr_avl_is_empty_import;
+#define gpr_avl_is_empty gpr_avl_is_empty_import
+typedef gpr_cmdline *(*gpr_cmdline_create_type)(const char *description);
+extern gpr_cmdline_create_type gpr_cmdline_create_import;
+#define gpr_cmdline_create gpr_cmdline_create_import
+typedef void(*gpr_cmdline_add_int_type)(gpr_cmdline *cl, const char *name, const char *help, int *value);
+extern gpr_cmdline_add_int_type gpr_cmdline_add_int_import;
+#define gpr_cmdline_add_int gpr_cmdline_add_int_import
+typedef void(*gpr_cmdline_add_flag_type)(gpr_cmdline *cl, const char *name, const char *help, int *value);
+extern gpr_cmdline_add_flag_type gpr_cmdline_add_flag_import;
+#define gpr_cmdline_add_flag gpr_cmdline_add_flag_import
+typedef void(*gpr_cmdline_add_string_type)(gpr_cmdline *cl, const char *name, const char *help, char **value);
+extern gpr_cmdline_add_string_type gpr_cmdline_add_string_import;
+#define gpr_cmdline_add_string gpr_cmdline_add_string_import
+typedef void(*gpr_cmdline_on_extra_arg_type)(gpr_cmdline *cl, const char *name, const char *help, void (*on_extra_arg)(void *user_data, const char *arg), void *user_data);
+extern gpr_cmdline_on_extra_arg_type gpr_cmdline_on_extra_arg_import;
+#define gpr_cmdline_on_extra_arg gpr_cmdline_on_extra_arg_import
+typedef void(*gpr_cmdline_set_survive_failure_type)(gpr_cmdline *cl);
+extern gpr_cmdline_set_survive_failure_type gpr_cmdline_set_survive_failure_import;
+#define gpr_cmdline_set_survive_failure gpr_cmdline_set_survive_failure_import
+typedef int(*gpr_cmdline_parse_type)(gpr_cmdline *cl, int argc, char **argv);
+extern gpr_cmdline_parse_type gpr_cmdline_parse_import;
+#define gpr_cmdline_parse gpr_cmdline_parse_import
+typedef void(*gpr_cmdline_destroy_type)(gpr_cmdline *cl);
+extern gpr_cmdline_destroy_type gpr_cmdline_destroy_import;
+#define gpr_cmdline_destroy gpr_cmdline_destroy_import
+typedef char *(*gpr_cmdline_usage_string_type)(gpr_cmdline *cl, const char *argv0);
+extern gpr_cmdline_usage_string_type gpr_cmdline_usage_string_import;
+#define gpr_cmdline_usage_string gpr_cmdline_usage_string_import
+typedef unsigned(*gpr_cpu_num_cores_type)(void);
+extern gpr_cpu_num_cores_type gpr_cpu_num_cores_import;
+#define gpr_cpu_num_cores gpr_cpu_num_cores_import
+typedef unsigned(*gpr_cpu_current_cpu_type)(void);
+extern gpr_cpu_current_cpu_type gpr_cpu_current_cpu_import;
+#define gpr_cpu_current_cpu gpr_cpu_current_cpu_import
+typedef gpr_histogram *(*gpr_histogram_create_type)(double resolution, double max_bucket_start);
+extern gpr_histogram_create_type gpr_histogram_create_import;
+#define gpr_histogram_create gpr_histogram_create_import
+typedef void(*gpr_histogram_destroy_type)(gpr_histogram *h);
+extern gpr_histogram_destroy_type gpr_histogram_destroy_import;
+#define gpr_histogram_destroy gpr_histogram_destroy_import
+typedef void(*gpr_histogram_add_type)(gpr_histogram *h, double x);
+extern gpr_histogram_add_type gpr_histogram_add_import;
+#define gpr_histogram_add gpr_histogram_add_import
+typedef int(*gpr_histogram_merge_type)(gpr_histogram *dst, const gpr_histogram *src);
+extern gpr_histogram_merge_type gpr_histogram_merge_import;
+#define gpr_histogram_merge gpr_histogram_merge_import
+typedef double(*gpr_histogram_percentile_type)(gpr_histogram *histogram, double percentile);
+extern gpr_histogram_percentile_type gpr_histogram_percentile_import;
+#define gpr_histogram_percentile gpr_histogram_percentile_import
+typedef double(*gpr_histogram_mean_type)(gpr_histogram *histogram);
+extern gpr_histogram_mean_type gpr_histogram_mean_import;
+#define gpr_histogram_mean gpr_histogram_mean_import
+typedef double(*gpr_histogram_stddev_type)(gpr_histogram *histogram);
+extern gpr_histogram_stddev_type gpr_histogram_stddev_import;
+#define gpr_histogram_stddev gpr_histogram_stddev_import
+typedef double(*gpr_histogram_variance_type)(gpr_histogram *histogram);
+extern gpr_histogram_variance_type gpr_histogram_variance_import;
+#define gpr_histogram_variance gpr_histogram_variance_import
+typedef double(*gpr_histogram_maximum_type)(gpr_histogram *histogram);
+extern gpr_histogram_maximum_type gpr_histogram_maximum_import;
+#define gpr_histogram_maximum gpr_histogram_maximum_import
+typedef double(*gpr_histogram_minimum_type)(gpr_histogram *histogram);
+extern gpr_histogram_minimum_type gpr_histogram_minimum_import;
+#define gpr_histogram_minimum gpr_histogram_minimum_import
+typedef double(*gpr_histogram_count_type)(gpr_histogram *histogram);
+extern gpr_histogram_count_type gpr_histogram_count_import;
+#define gpr_histogram_count gpr_histogram_count_import
+typedef double(*gpr_histogram_sum_type)(gpr_histogram *histogram);
+extern gpr_histogram_sum_type gpr_histogram_sum_import;
+#define gpr_histogram_sum gpr_histogram_sum_import
+typedef double(*gpr_histogram_sum_of_squares_type)(gpr_histogram *histogram);
+extern gpr_histogram_sum_of_squares_type gpr_histogram_sum_of_squares_import;
+#define gpr_histogram_sum_of_squares gpr_histogram_sum_of_squares_import
+typedef const uint32_t *(*gpr_histogram_get_contents_type)(gpr_histogram *histogram, size_t *count);
+extern gpr_histogram_get_contents_type gpr_histogram_get_contents_import;
+#define gpr_histogram_get_contents gpr_histogram_get_contents_import
+typedef void(*gpr_histogram_merge_contents_type)(gpr_histogram *histogram, const uint32_t *data, size_t data_count, double min_seen, double max_seen, double sum, double sum_of_squares, double count);
+extern gpr_histogram_merge_contents_type gpr_histogram_merge_contents_import;
+#define gpr_histogram_merge_contents gpr_histogram_merge_contents_import
+typedef int(*gpr_join_host_port_type)(char **out, const char *host, int port);
+extern gpr_join_host_port_type gpr_join_host_port_import;
+#define gpr_join_host_port gpr_join_host_port_import
+typedef int(*gpr_split_host_port_type)(const char *name, char **host, char **port);
+extern gpr_split_host_port_type gpr_split_host_port_import;
+#define gpr_split_host_port gpr_split_host_port_import
typedef void(*gpr_log_type)(const char *file, int line, gpr_log_severity severity, const char *format, ...) GPRC_PRINT_FORMAT_CHECK(4, 5);
extern gpr_log_type gpr_log_import;
#define gpr_log gpr_log_import
@@ -485,6 +596,9 @@ extern gpr_log_verbosity_init_type gpr_log_verbosity_init_import;
typedef void(*gpr_set_log_function_type)(gpr_log_func func);
extern gpr_set_log_function_type gpr_set_log_function_import;
#define gpr_set_log_function gpr_set_log_function_import
+typedef char *(*gpr_format_message_type)(int messageid);
+extern gpr_format_message_type gpr_format_message_import;
+#define gpr_format_message gpr_format_message_import
typedef gpr_slice(*gpr_slice_ref_type)(gpr_slice s);
extern gpr_slice_ref_type gpr_slice_ref_import;
#define gpr_slice_ref gpr_slice_ref_import
@@ -572,6 +686,27 @@ extern gpr_slice_buffer_move_first_type gpr_slice_buffer_move_first_import;
typedef gpr_slice(*gpr_slice_buffer_take_first_type)(gpr_slice_buffer *src);
extern gpr_slice_buffer_take_first_type gpr_slice_buffer_take_first_import;
#define gpr_slice_buffer_take_first gpr_slice_buffer_take_first_import
+typedef char *(*gpr_strdup_type)(const char *src);
+extern gpr_strdup_type gpr_strdup_import;
+#define gpr_strdup gpr_strdup_import
+typedef int(*gpr_asprintf_type)(char **strp, const char *format, ...) GPRC_PRINT_FORMAT_CHECK(2, 3);
+extern gpr_asprintf_type gpr_asprintf_import;
+#define gpr_asprintf gpr_asprintf_import
+typedef const char *(*gpr_subprocess_binary_extension_type)();
+extern gpr_subprocess_binary_extension_type gpr_subprocess_binary_extension_import;
+#define gpr_subprocess_binary_extension gpr_subprocess_binary_extension_import
+typedef gpr_subprocess *(*gpr_subprocess_create_type)(int argc, const char **argv);
+extern gpr_subprocess_create_type gpr_subprocess_create_import;
+#define gpr_subprocess_create gpr_subprocess_create_import
+typedef void(*gpr_subprocess_destroy_type)(gpr_subprocess *p);
+extern gpr_subprocess_destroy_type gpr_subprocess_destroy_import;
+#define gpr_subprocess_destroy gpr_subprocess_destroy_import
+typedef int(*gpr_subprocess_join_type)(gpr_subprocess *p);
+extern gpr_subprocess_join_type gpr_subprocess_join_import;
+#define gpr_subprocess_join gpr_subprocess_join_import
+typedef void(*gpr_subprocess_interrupt_type)(gpr_subprocess *p);
+extern gpr_subprocess_interrupt_type gpr_subprocess_interrupt_import;
+#define gpr_subprocess_interrupt gpr_subprocess_interrupt_import
typedef void(*gpr_mu_init_type)(gpr_mu *mu);
extern gpr_mu_init_type gpr_mu_init_import;
#define gpr_mu_init gpr_mu_init_import
@@ -641,6 +776,30 @@ extern gpr_stats_inc_type gpr_stats_inc_import;
typedef intptr_t(*gpr_stats_read_type)(const gpr_stats_counter *c);
extern gpr_stats_read_type gpr_stats_read_import;
#define gpr_stats_read gpr_stats_read_import
+typedef int(*gpr_thd_new_type)(gpr_thd_id *t, void (*thd_body)(void *arg), void *arg, const gpr_thd_options *options);
+extern gpr_thd_new_type gpr_thd_new_import;
+#define gpr_thd_new gpr_thd_new_import
+typedef gpr_thd_options(*gpr_thd_options_default_type)(void);
+extern gpr_thd_options_default_type gpr_thd_options_default_import;
+#define gpr_thd_options_default gpr_thd_options_default_import
+typedef void(*gpr_thd_options_set_detached_type)(gpr_thd_options *options);
+extern gpr_thd_options_set_detached_type gpr_thd_options_set_detached_import;
+#define gpr_thd_options_set_detached gpr_thd_options_set_detached_import
+typedef void(*gpr_thd_options_set_joinable_type)(gpr_thd_options *options);
+extern gpr_thd_options_set_joinable_type gpr_thd_options_set_joinable_import;
+#define gpr_thd_options_set_joinable gpr_thd_options_set_joinable_import
+typedef int(*gpr_thd_options_is_detached_type)(const gpr_thd_options *options);
+extern gpr_thd_options_is_detached_type gpr_thd_options_is_detached_import;
+#define gpr_thd_options_is_detached gpr_thd_options_is_detached_import
+typedef int(*gpr_thd_options_is_joinable_type)(const gpr_thd_options *options);
+extern gpr_thd_options_is_joinable_type gpr_thd_options_is_joinable_import;
+#define gpr_thd_options_is_joinable gpr_thd_options_is_joinable_import
+typedef gpr_thd_id(*gpr_thd_currentid_type)(void);
+extern gpr_thd_currentid_type gpr_thd_currentid_import;
+#define gpr_thd_currentid gpr_thd_currentid_import
+typedef void(*gpr_thd_join_type)(gpr_thd_id t);
+extern gpr_thd_join_type gpr_thd_join_import;
+#define gpr_thd_join gpr_thd_join_import
typedef gpr_timespec(*gpr_time_0_type)(gpr_clock_type type);
extern gpr_time_0_type gpr_time_0_import;
#define gpr_time_0 gpr_time_0_import
@@ -704,162 +863,6 @@ extern gpr_sleep_until_type gpr_sleep_until_import;
typedef double(*gpr_timespec_to_micros_type)(gpr_timespec t);
extern gpr_timespec_to_micros_type gpr_timespec_to_micros_import;
#define gpr_timespec_to_micros gpr_timespec_to_micros_import
-typedef gpr_avl(*gpr_avl_create_type)(const gpr_avl_vtable *vtable);
-extern gpr_avl_create_type gpr_avl_create_import;
-#define gpr_avl_create gpr_avl_create_import
-typedef gpr_avl(*gpr_avl_ref_type)(gpr_avl avl);
-extern gpr_avl_ref_type gpr_avl_ref_import;
-#define gpr_avl_ref gpr_avl_ref_import
-typedef void(*gpr_avl_unref_type)(gpr_avl avl);
-extern gpr_avl_unref_type gpr_avl_unref_import;
-#define gpr_avl_unref gpr_avl_unref_import
-typedef gpr_avl(*gpr_avl_add_type)(gpr_avl avl, void *key, void *value);
-extern gpr_avl_add_type gpr_avl_add_import;
-#define gpr_avl_add gpr_avl_add_import
-typedef gpr_avl(*gpr_avl_remove_type)(gpr_avl avl, void *key);
-extern gpr_avl_remove_type gpr_avl_remove_import;
-#define gpr_avl_remove gpr_avl_remove_import
-typedef void *(*gpr_avl_get_type)(gpr_avl avl, void *key);
-extern gpr_avl_get_type gpr_avl_get_import;
-#define gpr_avl_get gpr_avl_get_import
-typedef int(*gpr_avl_maybe_get_type)(gpr_avl avl, void *key, void **value);
-extern gpr_avl_maybe_get_type gpr_avl_maybe_get_import;
-#define gpr_avl_maybe_get gpr_avl_maybe_get_import
-typedef int(*gpr_avl_is_empty_type)(gpr_avl avl);
-extern gpr_avl_is_empty_type gpr_avl_is_empty_import;
-#define gpr_avl_is_empty gpr_avl_is_empty_import
-typedef gpr_cmdline *(*gpr_cmdline_create_type)(const char *description);
-extern gpr_cmdline_create_type gpr_cmdline_create_import;
-#define gpr_cmdline_create gpr_cmdline_create_import
-typedef void(*gpr_cmdline_add_int_type)(gpr_cmdline *cl, const char *name, const char *help, int *value);
-extern gpr_cmdline_add_int_type gpr_cmdline_add_int_import;
-#define gpr_cmdline_add_int gpr_cmdline_add_int_import
-typedef void(*gpr_cmdline_add_flag_type)(gpr_cmdline *cl, const char *name, const char *help, int *value);
-extern gpr_cmdline_add_flag_type gpr_cmdline_add_flag_import;
-#define gpr_cmdline_add_flag gpr_cmdline_add_flag_import
-typedef void(*gpr_cmdline_add_string_type)(gpr_cmdline *cl, const char *name, const char *help, char **value);
-extern gpr_cmdline_add_string_type gpr_cmdline_add_string_import;
-#define gpr_cmdline_add_string gpr_cmdline_add_string_import
-typedef void(*gpr_cmdline_on_extra_arg_type)(gpr_cmdline *cl, const char *name, const char *help, void (*on_extra_arg)(void *user_data, const char *arg), void *user_data);
-extern gpr_cmdline_on_extra_arg_type gpr_cmdline_on_extra_arg_import;
-#define gpr_cmdline_on_extra_arg gpr_cmdline_on_extra_arg_import
-typedef void(*gpr_cmdline_set_survive_failure_type)(gpr_cmdline *cl);
-extern gpr_cmdline_set_survive_failure_type gpr_cmdline_set_survive_failure_import;
-#define gpr_cmdline_set_survive_failure gpr_cmdline_set_survive_failure_import
-typedef int(*gpr_cmdline_parse_type)(gpr_cmdline *cl, int argc, char **argv);
-extern gpr_cmdline_parse_type gpr_cmdline_parse_import;
-#define gpr_cmdline_parse gpr_cmdline_parse_import
-typedef void(*gpr_cmdline_destroy_type)(gpr_cmdline *cl);
-extern gpr_cmdline_destroy_type gpr_cmdline_destroy_import;
-#define gpr_cmdline_destroy gpr_cmdline_destroy_import
-typedef char *(*gpr_cmdline_usage_string_type)(gpr_cmdline *cl, const char *argv0);
-extern gpr_cmdline_usage_string_type gpr_cmdline_usage_string_import;
-#define gpr_cmdline_usage_string gpr_cmdline_usage_string_import
-typedef unsigned(*gpr_cpu_num_cores_type)(void);
-extern gpr_cpu_num_cores_type gpr_cpu_num_cores_import;
-#define gpr_cpu_num_cores gpr_cpu_num_cores_import
-typedef unsigned(*gpr_cpu_current_cpu_type)(void);
-extern gpr_cpu_current_cpu_type gpr_cpu_current_cpu_import;
-#define gpr_cpu_current_cpu gpr_cpu_current_cpu_import
-typedef gpr_histogram *(*gpr_histogram_create_type)(double resolution, double max_bucket_start);
-extern gpr_histogram_create_type gpr_histogram_create_import;
-#define gpr_histogram_create gpr_histogram_create_import
-typedef void(*gpr_histogram_destroy_type)(gpr_histogram *h);
-extern gpr_histogram_destroy_type gpr_histogram_destroy_import;
-#define gpr_histogram_destroy gpr_histogram_destroy_import
-typedef void(*gpr_histogram_add_type)(gpr_histogram *h, double x);
-extern gpr_histogram_add_type gpr_histogram_add_import;
-#define gpr_histogram_add gpr_histogram_add_import
-typedef int(*gpr_histogram_merge_type)(gpr_histogram *dst, const gpr_histogram *src);
-extern gpr_histogram_merge_type gpr_histogram_merge_import;
-#define gpr_histogram_merge gpr_histogram_merge_import
-typedef double(*gpr_histogram_percentile_type)(gpr_histogram *histogram, double percentile);
-extern gpr_histogram_percentile_type gpr_histogram_percentile_import;
-#define gpr_histogram_percentile gpr_histogram_percentile_import
-typedef double(*gpr_histogram_mean_type)(gpr_histogram *histogram);
-extern gpr_histogram_mean_type gpr_histogram_mean_import;
-#define gpr_histogram_mean gpr_histogram_mean_import
-typedef double(*gpr_histogram_stddev_type)(gpr_histogram *histogram);
-extern gpr_histogram_stddev_type gpr_histogram_stddev_import;
-#define gpr_histogram_stddev gpr_histogram_stddev_import
-typedef double(*gpr_histogram_variance_type)(gpr_histogram *histogram);
-extern gpr_histogram_variance_type gpr_histogram_variance_import;
-#define gpr_histogram_variance gpr_histogram_variance_import
-typedef double(*gpr_histogram_maximum_type)(gpr_histogram *histogram);
-extern gpr_histogram_maximum_type gpr_histogram_maximum_import;
-#define gpr_histogram_maximum gpr_histogram_maximum_import
-typedef double(*gpr_histogram_minimum_type)(gpr_histogram *histogram);
-extern gpr_histogram_minimum_type gpr_histogram_minimum_import;
-#define gpr_histogram_minimum gpr_histogram_minimum_import
-typedef double(*gpr_histogram_count_type)(gpr_histogram *histogram);
-extern gpr_histogram_count_type gpr_histogram_count_import;
-#define gpr_histogram_count gpr_histogram_count_import
-typedef double(*gpr_histogram_sum_type)(gpr_histogram *histogram);
-extern gpr_histogram_sum_type gpr_histogram_sum_import;
-#define gpr_histogram_sum gpr_histogram_sum_import
-typedef double(*gpr_histogram_sum_of_squares_type)(gpr_histogram *histogram);
-extern gpr_histogram_sum_of_squares_type gpr_histogram_sum_of_squares_import;
-#define gpr_histogram_sum_of_squares gpr_histogram_sum_of_squares_import
-typedef const uint32_t *(*gpr_histogram_get_contents_type)(gpr_histogram *histogram, size_t *count);
-extern gpr_histogram_get_contents_type gpr_histogram_get_contents_import;
-#define gpr_histogram_get_contents gpr_histogram_get_contents_import
-typedef void(*gpr_histogram_merge_contents_type)(gpr_histogram *histogram, const uint32_t *data, size_t data_count, double min_seen, double max_seen, double sum, double sum_of_squares, double count);
-extern gpr_histogram_merge_contents_type gpr_histogram_merge_contents_import;
-#define gpr_histogram_merge_contents gpr_histogram_merge_contents_import
-typedef int(*gpr_join_host_port_type)(char **out, const char *host, int port);
-extern gpr_join_host_port_type gpr_join_host_port_import;
-#define gpr_join_host_port gpr_join_host_port_import
-typedef int(*gpr_split_host_port_type)(const char *name, char **host, char **port);
-extern gpr_split_host_port_type gpr_split_host_port_import;
-#define gpr_split_host_port gpr_split_host_port_import
-typedef char *(*gpr_format_message_type)(int messageid);
-extern gpr_format_message_type gpr_format_message_import;
-#define gpr_format_message gpr_format_message_import
-typedef char *(*gpr_strdup_type)(const char *src);
-extern gpr_strdup_type gpr_strdup_import;
-#define gpr_strdup gpr_strdup_import
-typedef int(*gpr_asprintf_type)(char **strp, const char *format, ...) GPRC_PRINT_FORMAT_CHECK(2, 3);
-extern gpr_asprintf_type gpr_asprintf_import;
-#define gpr_asprintf gpr_asprintf_import
-typedef const char *(*gpr_subprocess_binary_extension_type)();
-extern gpr_subprocess_binary_extension_type gpr_subprocess_binary_extension_import;
-#define gpr_subprocess_binary_extension gpr_subprocess_binary_extension_import
-typedef gpr_subprocess *(*gpr_subprocess_create_type)(int argc, const char **argv);
-extern gpr_subprocess_create_type gpr_subprocess_create_import;
-#define gpr_subprocess_create gpr_subprocess_create_import
-typedef void(*gpr_subprocess_destroy_type)(gpr_subprocess *p);
-extern gpr_subprocess_destroy_type gpr_subprocess_destroy_import;
-#define gpr_subprocess_destroy gpr_subprocess_destroy_import
-typedef int(*gpr_subprocess_join_type)(gpr_subprocess *p);
-extern gpr_subprocess_join_type gpr_subprocess_join_import;
-#define gpr_subprocess_join gpr_subprocess_join_import
-typedef void(*gpr_subprocess_interrupt_type)(gpr_subprocess *p);
-extern gpr_subprocess_interrupt_type gpr_subprocess_interrupt_import;
-#define gpr_subprocess_interrupt gpr_subprocess_interrupt_import
-typedef int(*gpr_thd_new_type)(gpr_thd_id *t, void (*thd_body)(void *arg), void *arg, const gpr_thd_options *options);
-extern gpr_thd_new_type gpr_thd_new_import;
-#define gpr_thd_new gpr_thd_new_import
-typedef gpr_thd_options(*gpr_thd_options_default_type)(void);
-extern gpr_thd_options_default_type gpr_thd_options_default_import;
-#define gpr_thd_options_default gpr_thd_options_default_import
-typedef void(*gpr_thd_options_set_detached_type)(gpr_thd_options *options);
-extern gpr_thd_options_set_detached_type gpr_thd_options_set_detached_import;
-#define gpr_thd_options_set_detached gpr_thd_options_set_detached_import
-typedef void(*gpr_thd_options_set_joinable_type)(gpr_thd_options *options);
-extern gpr_thd_options_set_joinable_type gpr_thd_options_set_joinable_import;
-#define gpr_thd_options_set_joinable gpr_thd_options_set_joinable_import
-typedef int(*gpr_thd_options_is_detached_type)(const gpr_thd_options *options);
-extern gpr_thd_options_is_detached_type gpr_thd_options_is_detached_import;
-#define gpr_thd_options_is_detached gpr_thd_options_is_detached_import
-typedef int(*gpr_thd_options_is_joinable_type)(const gpr_thd_options *options);
-extern gpr_thd_options_is_joinable_type gpr_thd_options_is_joinable_import;
-#define gpr_thd_options_is_joinable gpr_thd_options_is_joinable_import
-typedef gpr_thd_id(*gpr_thd_currentid_type)(void);
-extern gpr_thd_currentid_type gpr_thd_currentid_import;
-#define gpr_thd_currentid gpr_thd_currentid_import
-typedef void(*gpr_thd_join_type)(gpr_thd_id t);
-extern gpr_thd_join_type gpr_thd_join_import;
-#define gpr_thd_join gpr_thd_join_import
void grpc_rb_load_imports(HMODULE library);
diff --git a/src/ruby/lib/grpc/generic/rpc_server.rb b/src/ruby/lib/grpc/generic/rpc_server.rb
index 8ea798dce0..da0f6503db 100644
--- a/src/ruby/lib/grpc/generic/rpc_server.rb
+++ b/src/ruby/lib/grpc/generic/rpc_server.rb
@@ -31,113 +31,10 @@ require_relative '../grpc'
require_relative 'active_call'
require_relative 'service'
require 'thread'
+require 'concurrent'
# GRPC contains the General RPC module.
module GRPC
- # Pool is a simple thread pool.
- class Pool
- # Default keep alive period is 1s
- DEFAULT_KEEP_ALIVE = 1
-
- def initialize(size, keep_alive: DEFAULT_KEEP_ALIVE)
- fail 'pool size must be positive' unless size > 0
- @jobs = Queue.new
- @size = size
- @stopped = false
- @stop_mutex = Mutex.new # needs to be held when accessing @stopped
- @stop_cond = ConditionVariable.new
- @workers = []
- @keep_alive = keep_alive
- end
-
- # Returns the number of jobs waiting
- def jobs_waiting
- @jobs.size
- end
-
- # Runs the given block on the queue with the provided args.
- #
- # @param args the args passed blk when it is called
- # @param blk the block to call
- def schedule(*args, &blk)
- return if blk.nil?
- @stop_mutex.synchronize do
- if @stopped
- GRPC.logger.warn('did not schedule job, already stopped')
- return
- end
- GRPC.logger.info('schedule another job')
- @jobs << [blk, args]
- end
- end
-
- # Starts running the jobs in the thread pool.
- def start
- @stop_mutex.synchronize do
- fail 'already stopped' if @stopped
- end
- until @workers.size == @size.to_i
- next_thread = Thread.new do
- catch(:exit) do # allows { throw :exit } to kill a thread
- loop_execute_jobs
- end
- remove_current_thread
- end
- @workers << next_thread
- end
- end
-
- # Stops the jobs in the pool
- def stop
- GRPC.logger.info('stopping, will wait for all the workers to exit')
- @workers.size.times { schedule { throw :exit } }
- @stop_mutex.synchronize do # wait @keep_alive for works to stop
- @stopped = true
- @stop_cond.wait(@stop_mutex, @keep_alive) if @workers.size > 0
- end
- forcibly_stop_workers
- GRPC.logger.info('stopped, all workers are shutdown')
- end
-
- protected
-
- # Forcibly shutdown any threads that are still alive.
- def forcibly_stop_workers
- return unless @workers.size > 0
- GRPC.logger.info("forcibly terminating #{@workers.size} worker(s)")
- @workers.each do |t|
- next unless t.alive?
- begin
- t.exit
- rescue StandardError => e
- GRPC.logger.warn('error while terminating a worker')
- GRPC.logger.warn(e)
- end
- end
- end
-
- # removes the threads from workers, and signal when all the
- # threads are complete.
- def remove_current_thread
- @stop_mutex.synchronize do
- @workers.delete(Thread.current)
- @stop_cond.signal if @workers.size.zero?
- end
- end
-
- def loop_execute_jobs
- loop do
- begin
- blk, args = @jobs.pop
- blk.call(*args)
- rescue StandardError => e
- GRPC.logger.warn('Error in worker thread')
- GRPC.logger.warn(e)
- end
- end
- end
- end
-
# RpcServer hosts a number of services and makes them available on the
# network.
class RpcServer
@@ -147,11 +44,14 @@ module GRPC
def_delegators :@server, :add_http2_port
- # Default thread pool size is 3
- DEFAULT_POOL_SIZE = 3
+ # Default max size of the thread pool size is 100
+ DEFAULT_MAX_POOL_SIZE = 100
+
+ # Default minimum size of the thread pool is 5
+ DEFAULT_MIN_POOL_SIZE = 5
- # Default max_waiting_requests size is 20
- DEFAULT_MAX_WAITING_REQUESTS = 20
+ # Default max_waiting_requests size is 60
+ DEFAULT_MAX_WAITING_REQUESTS = 60
# Default poll period is 1s
DEFAULT_POLL_PERIOD = 1
@@ -174,8 +74,8 @@ module GRPC
# There are some specific keyword args used to configure the RpcServer
# instance.
#
- # * pool_size: the size of the thread pool the server uses to run its
- # threads
+ # * pool_size: the maximum size of the thread pool that the server's
+ # thread pool can reach.
#
# * max_waiting_requests: the maximum number of requests that are not
# being handled to allow. When this limit is exceeded, the server responds
@@ -191,7 +91,8 @@ module GRPC
#
# * server_args:
# A server arguments hash to be passed down to the underlying core server
- def initialize(pool_size:DEFAULT_POOL_SIZE,
+ def initialize(pool_size:DEFAULT_MAX_POOL_SIZE,
+ min_pool_size:DEFAULT_MIN_POOL_SIZE,
max_waiting_requests:DEFAULT_MAX_WAITING_REQUESTS,
poll_period:DEFAULT_POLL_PERIOD,
connect_md_proc:nil,
@@ -199,8 +100,12 @@ module GRPC
@connect_md_proc = RpcServer.setup_connect_md_proc(connect_md_proc)
@max_waiting_requests = max_waiting_requests
@poll_period = poll_period
- @pool_size = pool_size
- @pool = Pool.new(@pool_size)
+
+ @pool = Concurrent::ThreadPoolExecutor.new(
+ min_threads: [min_pool_size, pool_size].min,
+ max_threads: pool_size,
+ max_queue: max_waiting_requests,
+ fallback_policy: :discard)
@run_cond = ConditionVariable.new
@run_mutex = Mutex.new
# running_state can take 4 values: :not_started, :running, :stopping, and
@@ -221,7 +126,8 @@ module GRPC
end
deadline = from_relative_time(@poll_period)
@server.close(deadline)
- @pool.stop
+ @pool.shutdown
+ @pool.wait_for_termination
end
def running_state
@@ -318,7 +224,6 @@ module GRPC
def run
@run_mutex.synchronize do
fail 'cannot run without registering services' if rpc_descs.size.zero?
- @pool.start
@server.start
transition_running_state(:running)
@run_cond.broadcast
@@ -330,9 +235,11 @@ module GRPC
# Sends RESOURCE_EXHAUSTED if there are too many unprocessed jobs
def available?(an_rpc)
- jobs_count, max = @pool.jobs_waiting, @max_waiting_requests
+ jobs_count, max = @pool.queue_length, @pool.max_queue
GRPC.logger.info("waiting: #{jobs_count}, max: #{max}")
- return an_rpc if @pool.jobs_waiting <= @max_waiting_requests
+
+ # remaining capacity for ThreadPoolExecutors is -1 if unbounded
+ return an_rpc if @pool.remaining_capacity != 0
GRPC.logger.warn("NOT AVAILABLE: too many jobs_waiting: #{an_rpc}")
noop = proc { |x| x }
@@ -368,7 +275,7 @@ module GRPC
break if (!an_rpc.nil?) && an_rpc.call.nil?
active_call = new_active_server_call(an_rpc)
unless active_call.nil?
- @pool.schedule(active_call) do |ac|
+ @pool.post(active_call) do |ac|
c, mth = ac
begin
rpc_descs[mth].run_server_method(c, rpc_handlers[mth])
diff --git a/src/ruby/lib/grpc/grpc.rb b/src/ruby/lib/grpc/grpc.rb
index b60a828d66..f46710dc74 100644
--- a/src/ruby/lib/grpc/grpc.rb
+++ b/src/ruby/lib/grpc/grpc.rb
@@ -28,7 +28,12 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
begin
- require_relative "#{RUBY_VERSION.sub(/\.\d$/, '')}/grpc_c"
-rescue LoadError
- require_relative 'grpc_c'
+ ruby_version_dirname = /(\d+\.\d+)/.match(RUBY_VERSION).to_s
+ distrib_lib_dir = File.expand_path(ruby_version_dirname,
+ File.dirname(__FILE__))
+ if File.directory?(distrib_lib_dir)
+ require_relative "#{distrib_lib_dir}/grpc_c"
+ else
+ require_relative 'grpc_c'
+ end
end
diff --git a/src/ruby/spec/generic/rpc_server_pool_spec.rb b/src/ruby/spec/generic/rpc_server_pool_spec.rb
deleted file mode 100644
index b67008de48..0000000000
--- a/src/ruby/spec/generic/rpc_server_pool_spec.rb
+++ /dev/null
@@ -1,138 +0,0 @@
-# Copyright 2015, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-require 'grpc'
-
-describe GRPC::Pool do
- Pool = GRPC::Pool
-
- describe '#new' do
- it 'raises if a non-positive size is used' do
- expect { Pool.new(0) }.to raise_error
- expect { Pool.new(-1) }.to raise_error
- expect { Pool.new(Object.new) }.to raise_error
- end
-
- it 'is constructed OK with a positive size' do
- expect { Pool.new(1) }.not_to raise_error
- end
- end
-
- describe '#jobs_waiting' do
- it 'at start, it is zero' do
- p = Pool.new(1)
- expect(p.jobs_waiting).to be(0)
- end
-
- it 'it increases, with each scheduled job if the pool is not running' do
- p = Pool.new(1)
- job = proc {}
- expect(p.jobs_waiting).to be(0)
- 5.times do |i|
- p.schedule(&job)
- expect(p.jobs_waiting).to be(i + 1)
- end
- end
-
- it 'it decreases as jobs are run' do
- p = Pool.new(1)
- job = proc {}
- expect(p.jobs_waiting).to be(0)
- 3.times do
- p.schedule(&job)
- end
- p.start
- sleep 2
- expect(p.jobs_waiting).to be(0)
- end
- end
-
- describe '#schedule' do
- it 'return if the pool is already stopped' do
- p = Pool.new(1)
- p.stop
- job = proc {}
- expect { p.schedule(&job) }.to_not raise_error
- end
-
- it 'adds jobs that get run by the pool' do
- p = Pool.new(1)
- p.start
- o, q = Object.new, Queue.new
- job = proc { q.push(o) }
- p.schedule(&job)
- expect(q.pop).to be(o)
- p.stop
- end
- end
-
- describe '#stop' do
- it 'works when there are no scheduled tasks' do
- p = Pool.new(1)
- expect { p.stop }.not_to raise_error
- end
-
- it 'stops jobs when there are long running jobs' do
- p = Pool.new(1)
- p.start
- o, q = Object.new, Queue.new
- job = proc do
- sleep(5) # long running
- q.push(o)
- end
- p.schedule(&job)
- sleep(1) # should ensure the long job gets scheduled
- expect { p.stop }.not_to raise_error
- end
- end
-
- describe '#start' do
- it 'runs pre-scheduled jobs' do
- p = Pool.new(2)
- o, q = Object.new, Queue.new
- n = 5 # arbitrary
- n.times { p.schedule(o, &q.method(:push)) }
- p.start
- n.times { expect(q.pop).to be(o) }
- p.stop
- end
-
- it 'runs jobs as they are scheduled ' do
- p = Pool.new(2)
- o, q = Object.new, Queue.new
- p.start
- n = 5 # arbitrary
- n.times do
- p.schedule(o, &q.method(:push))
- expect(q.pop).to be(o)
- end
- p.stop
- end
- end
-end
diff --git a/src/ruby/spec/generic/rpc_server_spec.rb b/src/ruby/spec/generic/rpc_server_spec.rb
index 31157cf161..d362e48dee 100644
--- a/src/ruby/spec/generic/rpc_server_spec.rb
+++ b/src/ruby/spec/generic/rpc_server_spec.rb
@@ -395,9 +395,9 @@ describe GRPC::RpcServer do
it 'should return RESOURCE_EXHAUSTED on too many jobs', server: true do
opts = {
server_args: { a_channel_arg: 'an_arg' },
- pool_size: 1,
+ pool_size: 2,
poll_period: 1,
- max_waiting_requests: 0
+ max_waiting_requests: 1
}
alt_srv = RpcServer.new(**opts)
alt_srv.handle(SlowService)
@@ -406,24 +406,23 @@ describe GRPC::RpcServer do
t = Thread.new { alt_srv.run }
alt_srv.wait_till_running
req = EchoMsg.new
- n = 5 # arbitrary, use as many to ensure the server pool is exceeded
+ n = 20 # arbitrary, use as many to ensure the server pool is exceeded
threads = []
- one_failed_as_unavailable = false
+ bad_status_code = nil
n.times do
threads << Thread.new do
stub = SlowStub.new(alt_host, :this_channel_is_insecure)
begin
stub.an_rpc(req)
rescue GRPC::BadStatus => e
- one_failed_as_unavailable =
- e.code == StatusCodes::RESOURCE_EXHAUSTED
+ bad_status_code = e.code
end
end
end
threads.each(&:join)
alt_srv.stop
t.join
- expect(one_failed_as_unavailable).to be(true)
+ expect(bad_status_code).to be(StatusCodes::RESOURCE_EXHAUSTED)
end
end
diff --git a/templates/grpc.gemspec.template b/templates/grpc.gemspec.template
index f95adaf30f..75a6054b81 100644
--- a/templates/grpc.gemspec.template
+++ b/templates/grpc.gemspec.template
@@ -31,6 +31,7 @@
s.add_dependency 'google-protobuf', '~> 3.0'
s.add_dependency 'googleauth', '~> 0.5.1'
+ s.add_dependency 'concurrent-ruby'
s.add_development_dependency 'bundler', '~> 1.9'
s.add_development_dependency 'facter', '~> 2.4'
diff --git a/templates/package.xml.template b/templates/package.xml.template
index 65fef1892f..32ed3b633e 100644
--- a/templates/package.xml.template
+++ b/templates/package.xml.template
@@ -24,7 +24,7 @@
</stability>
<license>BSD</license>
<notes>
- - TBD
+ - Reject metadata keys which are not legal #7881
</notes>
<contents>
<dir baseinstalldir="/" name="/">
@@ -291,7 +291,7 @@
<date>2016-08-22</date>
<license>BSD</license>
<notes>
- - TBD
+ - Reject metadata keys which are not legal #7881
</notes>
</release>
</changelog>
diff --git a/templates/src/core/lib/surface/version.c.template b/templates/src/core/lib/surface/version.c.template
index 5f0273e49d..12c490e6a9 100644
--- a/templates/src/core/lib/surface/version.c.template
+++ b/templates/src/core/lib/surface/version.c.template
@@ -32,10 +32,12 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
-
+
/* This file is autogenerated from:
templates/src/core/surface/version.c.template */
-
+
#include <grpc/grpc.h>
-
+
const char *grpc_version_string(void) { return "${settings.core_version}"; }
+
+ const char *grpc_g_stands_for(void) { return "${settings.g_stands_for}"; }
diff --git a/templates/src/csharp/Grpc.Auth/project.json.template b/templates/src/csharp/Grpc.Auth/project.json.template
index 19d4b42cf0..939a0c8d28 100644
--- a/templates/src/csharp/Grpc.Auth/project.json.template
+++ b/templates/src/csharp/Grpc.Auth/project.json.template
@@ -25,18 +25,13 @@
},
"dependencies": {
"Grpc.Core": "${settings.csharp_version}",
- "Google.Apis.Auth": "1.15.0"
+ "Google.Apis.Auth": "1.16.0"
},
"frameworks": {
"net45": { },
"netstandard1.5": {
- "imports": [
- "portable-net45"
- ],
"dependencies": {
- "Microsoft.NETCore.Portable.Compatibility": "1.0.1",
- "NETStandard.Library": "1.6.0",
- "System.Threading.Tasks": "4.0.11"
+ "NETStandard.Library": "1.6.0"
}
}
}
diff --git a/templates/src/csharp/Grpc.Core.Tests/project.json.template b/templates/src/csharp/Grpc.Core.Tests/project.json.template
index 3452d6b4b0..8a3e0755ff 100644
--- a/templates/src/csharp/Grpc.Core.Tests/project.json.template
+++ b/templates/src/csharp/Grpc.Core.Tests/project.json.template
@@ -20,8 +20,10 @@
"portable-net45"
],
"dependencies": {
- "Microsoft.NETCore.App": "1.0.0",
- "NETStandard.Library": "1.6.0"
+ "Microsoft.NETCore.App": {
+ "type": "platform",
+ "version": "1.0.0"
+ }
}
}
},
diff --git a/templates/src/csharp/Grpc.Core/project.json.template b/templates/src/csharp/Grpc.Core/project.json.template
index e6f8290200..fcbef536c6 100644
--- a/templates/src/csharp/Grpc.Core/project.json.template
+++ b/templates/src/csharp/Grpc.Core/project.json.template
@@ -38,11 +38,9 @@
"frameworks": {
"net45": { },
"netstandard1.5": {
- "imports": [
- "portable-net45"
- ],
"dependencies": {
"NETStandard.Library": "1.6.0",
+ "System.Runtime.Loader": "4.0.0",
"System.Threading.Thread": "4.0.0"
}
}
diff --git a/templates/src/csharp/Grpc.Examples.MathClient/project.json.template b/templates/src/csharp/Grpc.Examples.MathClient/project.json.template
index 67151dbcfa..ae4ea2aaac 100644
--- a/templates/src/csharp/Grpc.Examples.MathClient/project.json.template
+++ b/templates/src/csharp/Grpc.Examples.MathClient/project.json.template
@@ -10,12 +10,11 @@
"frameworks": {
"net45": { },
"netcoreapp1.0": {
- "imports": [
- "portable-net45"
- ],
"dependencies": {
- "Microsoft.NETCore.App": "1.0.0",
- "NETStandard.Library": "1.6.0"
+ "Microsoft.NETCore.App": {
+ "type": "platform",
+ "version": "1.0.0"
+ }
}
}
}
diff --git a/templates/src/csharp/Grpc.Examples.MathServer/project.json.template b/templates/src/csharp/Grpc.Examples.MathServer/project.json.template
index 67151dbcfa..ae4ea2aaac 100644
--- a/templates/src/csharp/Grpc.Examples.MathServer/project.json.template
+++ b/templates/src/csharp/Grpc.Examples.MathServer/project.json.template
@@ -10,12 +10,11 @@
"frameworks": {
"net45": { },
"netcoreapp1.0": {
- "imports": [
- "portable-net45"
- ],
"dependencies": {
- "Microsoft.NETCore.App": "1.0.0",
- "NETStandard.Library": "1.6.0"
+ "Microsoft.NETCore.App": {
+ "type": "platform",
+ "version": "1.0.0"
+ }
}
}
}
diff --git a/templates/src/csharp/Grpc.Examples.Tests/project.json.template b/templates/src/csharp/Grpc.Examples.Tests/project.json.template
index af13cb5850..0a9eb7c74d 100644
--- a/templates/src/csharp/Grpc.Examples.Tests/project.json.template
+++ b/templates/src/csharp/Grpc.Examples.Tests/project.json.template
@@ -16,8 +16,10 @@
"portable-net45"
],
"dependencies": {
- "Microsoft.NETCore.App": "1.0.0",
- "NETStandard.Library": "1.6.0"
+ "Microsoft.NETCore.App": {
+ "type": "platform",
+ "version": "1.0.0"
+ }
}
}
}
diff --git a/templates/src/csharp/Grpc.Examples/project.json.template b/templates/src/csharp/Grpc.Examples/project.json.template
index 117f842e01..b8a8314de1 100644
--- a/templates/src/csharp/Grpc.Examples/project.json.template
+++ b/templates/src/csharp/Grpc.Examples/project.json.template
@@ -6,7 +6,7 @@
"Grpc.Core": {
"target": "project"
},
- "Google.Protobuf": "3.0.0-beta3"
+ "Google.Protobuf": "3.0.0"
},
"frameworks": {
"net45": {
@@ -16,12 +16,11 @@
}
},
"netcoreapp1.0": {
- "imports": [
- "portable-net45"
- ],
"dependencies": {
- "Microsoft.NETCore.App": "1.0.0",
- "NETStandard.Library": "1.6.0"
+ "Microsoft.NETCore.App": {
+ "type": "platform",
+ "version": "1.0.0"
+ }
}
}
}
diff --git a/templates/src/csharp/Grpc.HealthCheck.Tests/project.json.template b/templates/src/csharp/Grpc.HealthCheck.Tests/project.json.template
index 417b773a42..c63da96db7 100644
--- a/templates/src/csharp/Grpc.HealthCheck.Tests/project.json.template
+++ b/templates/src/csharp/Grpc.HealthCheck.Tests/project.json.template
@@ -16,8 +16,10 @@
"portable-net45"
],
"dependencies": {
- "Microsoft.NETCore.App": "1.0.0",
- "NETStandard.Library": "1.6.0"
+ "Microsoft.NETCore.App": {
+ "type": "platform",
+ "version": "1.0.0"
+ }
}
}
}
diff --git a/templates/src/csharp/Grpc.HealthCheck/project.json.template b/templates/src/csharp/Grpc.HealthCheck/project.json.template
index cd2da0089b..46307dda00 100644
--- a/templates/src/csharp/Grpc.HealthCheck/project.json.template
+++ b/templates/src/csharp/Grpc.HealthCheck/project.json.template
@@ -25,7 +25,7 @@
},
"dependencies": {
"Grpc.Core": "${settings.csharp_version}",
- "Google.Protobuf": "3.0.0-beta3"
+ "Google.Protobuf": "3.0.0"
},
"frameworks": {
"net45": {
@@ -35,9 +35,6 @@
}
},
"netstandard1.5": {
- "imports": [
- "portable-net45"
- ],
"dependencies": {
"NETStandard.Library": "1.6.0"
}
diff --git a/templates/src/csharp/Grpc.IntegrationTesting.Client/project.json.template b/templates/src/csharp/Grpc.IntegrationTesting.Client/project.json.template
index 93151f2b89..83b8a9befa 100644
--- a/templates/src/csharp/Grpc.IntegrationTesting.Client/project.json.template
+++ b/templates/src/csharp/Grpc.IntegrationTesting.Client/project.json.template
@@ -11,12 +11,13 @@
"net45": { },
"netcoreapp1.0": {
"imports": [
- "portable-net45",
- "net45"
+ "portable-net45"
],
"dependencies": {
- "Microsoft.NETCore.App": "1.0.0",
- "NETStandard.Library": "1.6.0"
+ "Microsoft.NETCore.App": {
+ "type": "platform",
+ "version": "1.0.0"
+ }
}
}
}
diff --git a/templates/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json.template b/templates/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json.template
index 93151f2b89..83b8a9befa 100644
--- a/templates/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json.template
+++ b/templates/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json.template
@@ -11,12 +11,13 @@
"net45": { },
"netcoreapp1.0": {
"imports": [
- "portable-net45",
- "net45"
+ "portable-net45"
],
"dependencies": {
- "Microsoft.NETCore.App": "1.0.0",
- "NETStandard.Library": "1.6.0"
+ "Microsoft.NETCore.App": {
+ "type": "platform",
+ "version": "1.0.0"
+ }
}
}
}
diff --git a/templates/src/csharp/Grpc.IntegrationTesting.Server/project.json.template b/templates/src/csharp/Grpc.IntegrationTesting.Server/project.json.template
index 93151f2b89..83b8a9befa 100644
--- a/templates/src/csharp/Grpc.IntegrationTesting.Server/project.json.template
+++ b/templates/src/csharp/Grpc.IntegrationTesting.Server/project.json.template
@@ -11,12 +11,13 @@
"net45": { },
"netcoreapp1.0": {
"imports": [
- "portable-net45",
- "net45"
+ "portable-net45"
],
"dependencies": {
- "Microsoft.NETCore.App": "1.0.0",
- "NETStandard.Library": "1.6.0"
+ "Microsoft.NETCore.App": {
+ "type": "platform",
+ "version": "1.0.0"
+ }
}
}
}
diff --git a/templates/src/csharp/Grpc.IntegrationTesting.StressClient/project.json.template b/templates/src/csharp/Grpc.IntegrationTesting.StressClient/project.json.template
index 93151f2b89..83b8a9befa 100644
--- a/templates/src/csharp/Grpc.IntegrationTesting.StressClient/project.json.template
+++ b/templates/src/csharp/Grpc.IntegrationTesting.StressClient/project.json.template
@@ -11,12 +11,13 @@
"net45": { },
"netcoreapp1.0": {
"imports": [
- "portable-net45",
- "net45"
+ "portable-net45"
],
"dependencies": {
- "Microsoft.NETCore.App": "1.0.0",
- "NETStandard.Library": "1.6.0"
+ "Microsoft.NETCore.App": {
+ "type": "platform",
+ "version": "1.0.0"
+ }
}
}
}
diff --git a/templates/src/csharp/Grpc.IntegrationTesting/project.json.template b/templates/src/csharp/Grpc.IntegrationTesting/project.json.template
index 1cb5ca4ba3..3ce94e5838 100644
--- a/templates/src/csharp/Grpc.IntegrationTesting/project.json.template
+++ b/templates/src/csharp/Grpc.IntegrationTesting/project.json.template
@@ -9,16 +9,14 @@
"Grpc.Core": {
"target": "project"
},
- "Google.Protobuf": "3.0.0-beta3",
+ "Google.Protobuf": "3.0.0",
"CommandLineParser.Unofficial": "2.0.275",
+ "Moq": "4.6.38-alpha",
"NUnit": "3.2.0",
"NUnitLite": "3.2.0-*"
},
"frameworks": {
"net45": {
- "dependencies": {
- "Moq": "4.2.1510.2205"
- },
"frameworkAssemblies": {
"System.Runtime": "",
"System.IO": ""
@@ -26,12 +24,13 @@
},
"netcoreapp1.0": {
"imports": [
- "portable-net45",
- "net45"
+ "portable-net45"
],
"dependencies": {
- "Microsoft.NETCore.App": "1.0.0",
- "NETStandard.Library": "1.6.0",
+ "Microsoft.NETCore.App": {
+ "type": "platform",
+ "version": "1.0.0"
+ },
"System.Linq.Expressions": "4.1.0"
}
}
diff --git a/templates/src/csharp/build_options.include b/templates/src/csharp/build_options.include
index 8597ae3367..bda2d76074 100644
--- a/templates/src/csharp/build_options.include
+++ b/templates/src/csharp/build_options.include
@@ -16,10 +16,12 @@
"includeFiles": [ "../Grpc.Core/Version.cs" ]
},
"copyToOutput": {
- % if includeData:
- "include": "data/*",
- % endif
"mappings": {
+ % if includeData:
+ "data/ca.pem": "../Grpc.IntegrationTesting/data/ca.pem",
+ "data/server1.key": "../Grpc.IntegrationTesting/data/server1.key",
+ "data/server1.pem": "../Grpc.IntegrationTesting/data/server1.pem",
+ % endif
"grpc_csharp_ext.x64.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll",
"grpc_csharp_ext.x86.dll": "../../../vsprojects/Debug/grpc_csharp_ext.dll",
"libgrpc_csharp_ext.x64.so": "../../../libs/dbg/libgrpc_csharp_ext.so",
@@ -38,10 +40,12 @@
"includeFiles": [ "../Grpc.Core/Version.cs" ]
},
"copyToOutput": {
- % if includeData:
- "include": "data/*",
- % endif
"mappings": {
+ % if includeData:
+ "data/ca.pem": "../Grpc.IntegrationTesting/data/ca.pem",
+ "data/server1.key": "../Grpc.IntegrationTesting/data/server1.key",
+ "data/server1.pem": "../Grpc.IntegrationTesting/data/server1.pem",
+ % endif
"grpc_csharp_ext.x64.dll": "../../../vsprojects/x64/Release/grpc_csharp_ext.dll",
"grpc_csharp_ext.x86.dll": "../../../vsprojects/Release/grpc_csharp_ext.dll",
"libgrpc_csharp_ext.x64.so": "../../../libs/opt/libgrpc_csharp_ext.so",
@@ -52,8 +56,3 @@
}
},
%endif
- "runtimes": {
- "win7-x64": { },
- "debian.8-x64": { },
- "osx.10.11-x64": { }
- },
diff --git a/templates/src/csharp/build_packages.bat.template b/templates/src/csharp/build_packages.bat.template
index 5cbd8e3746..87c4b5ae27 100644
--- a/templates/src/csharp/build_packages.bat.template
+++ b/templates/src/csharp/build_packages.bat.template
@@ -31,6 +31,10 @@
@rem Builds gRPC NuGet packages
+ @rem This way of building nuget packages is now obsolete. C# nuget packages
+ @rem with CoreCLR support are now being built using the dotnet cli
+ @rem in build_packages_dotnetcli.sh
+
@rem Current package versions
set VERSION=${settings.csharp_version}
set PROTOBUF_VERSION=3.0.0
@@ -79,8 +83,8 @@
xcopy /Y /I *.nupkg ..\..\artifacts${"\\"}
@rem create a zipfile with the artifacts as well
- powershell -Command "Add-Type -Assembly 'System.IO.Compression.FileSystem'; [System.IO.Compression.ZipFile]::CreateFromDirectory('..\..\artifacts', 'csharp_nugets.zip');"
- xcopy /Y /I csharp_nugets.zip ..\..\artifacts${"\\"}
+ powershell -Command "Add-Type -Assembly 'System.IO.Compression.FileSystem'; [System.IO.Compression.ZipFile]::CreateFromDirectory('..\..\artifacts', 'csharp_nugets_obsolete.zip');"
+ xcopy /Y /I csharp_nugets_obsolete.zip ..\..\artifacts${"\\"}
goto :EOF
diff --git a/templates/src/csharp/build_packages_dotnetcli.sh.template b/templates/src/csharp/build_packages_dotnetcli.sh.template
new file mode 100755
index 0000000000..99b049a5a1
--- /dev/null
+++ b/templates/src/csharp/build_packages_dotnetcli.sh.template
@@ -0,0 +1,72 @@
+%YAML 1.2
+--- |
+ #!/bin/bash
+ # Copyright 2016, Google Inc.
+ # All rights reserved.
+ #
+ # Redistribution and use in source and binary forms, with or without
+ # modification, are permitted provided that the following conditions are
+ # met:
+ #
+ # * Redistributions of source code must retain the above copyright
+ # notice, this list of conditions and the following disclaimer.
+ # * Redistributions in binary form must reproduce the above
+ # copyright notice, this list of conditions and the following disclaimer
+ # in the documentation and/or other materials provided with the
+ # distribution.
+ # * Neither the name of Google Inc. nor the names of its
+ # contributors may be used to endorse or promote products derived from
+ # this software without specific prior written permission.
+ #
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ set -ex
+
+ cd $(dirname $0)
+
+ mkdir -p ../../artifacts/
+
+ mkdir -p nativelibs/windows_x86 nativelibs/windows_x64 ${"\\"}
+ nativelibs/linux_x86 nativelibs/linux_x64 ${"\\"}
+ nativelibs/macosx_x86 nativelibs/macosx_x64
+
+ mkdir -p protoc_plugins/windows_x86 protoc_plugins/windows_x64 ${"\\"}
+ protoc_plugins/linux_x86 protoc_plugins/linux_x64 ${"\\"}
+ protoc_plugins/macosx_x86 protoc_plugins/macosx_x64
+
+ # Collect the artifacts built by the previous build step if running on Jenkins
+ cp $EXTERNAL_GIT_ROOT/architecture=x86,language=csharp,platform=windows/artifacts/* nativelibs/windows_x86 || true
+ cp $EXTERNAL_GIT_ROOT/architecture=x64,language=csharp,platform=windows/artifacts/* nativelibs/windows_x64 || true
+ cp $EXTERNAL_GIT_ROOT/architecture=x86,language=csharp,platform=linux/artifacts/* nativelibs/linux_x86 || true
+ cp $EXTERNAL_GIT_ROOT/architecture=x64,language=csharp,platform=linux/artifacts/* nativelibs/linux_x64 || true
+ cp $EXTERNAL_GIT_ROOT/architecture=x86,language=csharp,platform=macos/artifacts/* nativelibs/macosx_x86 || true
+ cp $EXTERNAL_GIT_ROOT/architecture=x64,language=csharp,platform=macos/artifacts/* nativelibs/macosx_x64 || true
+
+ # Collect protoc artifacts built by the previous build step
+ cp $EXTERNAL_GIT_ROOT/architecture=x86,language=protoc,platform=windows/artifacts/* protoc_plugins/windows_x86 || true
+ cp $EXTERNAL_GIT_ROOT/architecture=x64,language=protoc,platform=windows/artifacts/* protoc_plugins/windows_x64 || true
+ cp $EXTERNAL_GIT_ROOT/architecture=x86,language=protoc,platform=linux/artifacts/* protoc_plugins/linux_x86 || true
+ cp $EXTERNAL_GIT_ROOT/architecture=x64,language=protoc,platform=linux/artifacts/* protoc_plugins/linux_x64 || true
+ cp $EXTERNAL_GIT_ROOT/architecture=x86,language=protoc,platform=macos/artifacts/* protoc_plugins/macosx_x86 || true
+ cp $EXTERNAL_GIT_ROOT/architecture=x64,language=protoc,platform=macos/artifacts/* protoc_plugins/macosx_x64 || true
+
+ dotnet restore .
+
+ dotnet pack --configuration Release Grpc.Core/project.json --output ../../artifacts
+ dotnet pack --configuration Release Grpc.Auth/project.json --output ../../artifacts
+ dotnet pack --configuration Release Grpc.HealthCheck/project.json --output ../../artifacts
+
+ nuget pack Grpc.nuspec -Version "${settings.csharp_version}" -OutputDirectory ../../artifacts
+ nuget pack Grpc.Tools.nuspec -Version "${settings.csharp_version}" -OutputDirectory ../../artifacts
+
+ (cd ../../artifacts && zip csharp_nugets_dotnetcli.zip *.nupkg)
diff --git a/templates/tools/dockerfile/csharp_dotnetcli_deps.include b/templates/tools/dockerfile/csharp_dotnetcli_deps.include
new file mode 100644
index 0000000000..430f3fa3f2
--- /dev/null
+++ b/templates/tools/dockerfile/csharp_dotnetcli_deps.include
@@ -0,0 +1,13 @@
+# Install dotnet SDK based on https://www.microsoft.com/net/core#debian
+RUN apt-get update && apt-get install -y curl libunwind8 gettext
+RUN curl -sSL -o dotnet.tar.gz https://go.microsoft.com/fwlink/?LinkID=809130
+RUN mkdir -p /opt/dotnet && tar zxf dotnet.tar.gz -C /opt/dotnet
+RUN ln -s /opt/dotnet/dotnet /usr/local/bin
+
+# Trigger the population of the local package cache
+ENV NUGET_XMLDOC_MODE skip
+RUN mkdir warmup ${'\\'}
+ && cd warmup ${'\\'}
+ && dotnet new ${'\\'}
+ && cd .. ${'\\'}
+ && rm -rf warmup
diff --git a/templates/tools/dockerfile/interoptest/grpc_interop_csharpcoreclr/Dockerfile.template b/templates/tools/dockerfile/interoptest/grpc_interop_csharpcoreclr/Dockerfile.template
new file mode 100644
index 0000000000..092f04dac6
--- /dev/null
+++ b/templates/tools/dockerfile/interoptest/grpc_interop_csharpcoreclr/Dockerfile.template
@@ -0,0 +1,41 @@
+%YAML 1.2
+--- |
+ # Copyright 2015, Google Inc.
+ # All rights reserved.
+ #
+ # Redistribution and use in source and binary forms, with or without
+ # modification, are permitted provided that the following conditions are
+ # met:
+ #
+ # * Redistributions of source code must retain the above copyright
+ # notice, this list of conditions and the following disclaimer.
+ # * Redistributions in binary form must reproduce the above
+ # copyright notice, this list of conditions and the following disclaimer
+ # in the documentation and/or other materials provided with the
+ # distribution.
+ # * Neither the name of Google Inc. nor the names of its
+ # contributors may be used to endorse or promote products derived from
+ # this software without specific prior written permission.
+ #
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ FROM debian:jessie
+
+ <%include file="../../apt_get_basic.include"/>
+ <%include file="../../python_deps.include"/>
+ <%include file="../../csharp_deps.include"/>
+ <%include file="../../csharp_dotnetcli_deps.include"/>
+ <%include file="../../run_tests_addons.include"/>
+ # Define the default command.
+ CMD ["bash"]
+
diff --git a/templates/tools/dockerfile/test/csharp_coreclr_x64/Dockerfile.template b/templates/tools/dockerfile/test/csharp_coreclr_x64/Dockerfile.template
index 24dad48807..092f04dac6 100644
--- a/templates/tools/dockerfile/test/csharp_coreclr_x64/Dockerfile.template
+++ b/templates/tools/dockerfile/test/csharp_coreclr_x64/Dockerfile.template
@@ -34,21 +34,7 @@
<%include file="../../apt_get_basic.include"/>
<%include file="../../python_deps.include"/>
<%include file="../../csharp_deps.include"/>
-
- # Install dotnet SDK based on https://www.microsoft.com/net/core#debian
- RUN apt-get update && apt-get install -y curl libunwind8 gettext
- RUN curl -sSL -o dotnet.tar.gz https://go.microsoft.com/fwlink/?LinkID=809130
- RUN mkdir -p /opt/dotnet && tar zxf dotnet.tar.gz -C /opt/dotnet
- RUN ln -s /opt/dotnet/dotnet /usr/local/bin
-
- # Trigger the population of the local package cache
- ENV NUGET_XMLDOC_MODE skip
- RUN mkdir warmup ${'\\'}
- && cd warmup ${'\\'}
- && dotnet new ${'\\'}
- && cd .. ${'\\'}
- && rm -rf warmup
-
+ <%include file="../../csharp_dotnetcli_deps.include"/>
<%include file="../../run_tests_addons.include"/>
# Define the default command.
CMD ["bash"]
diff --git a/test/core/bad_client/tests/head_of_line_blocking.c b/test/core/bad_client/tests/head_of_line_blocking.c
index e4051bb668..64cb79d82f 100644
--- a/test/core/bad_client/tests/head_of_line_blocking.c
+++ b/test/core/bad_client/tests/head_of_line_blocking.c
@@ -97,7 +97,7 @@ static void verifier(grpc_server *server, grpc_completion_queue *cq,
&deadline, &request_metadata_recv,
&payload, cq, cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(101), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(101), 1);
cq_verify(cqv);
GPR_ASSERT(payload != NULL);
diff --git a/test/core/bad_client/tests/large_metadata.c b/test/core/bad_client/tests/large_metadata.c
index ded5f17d4a..d106ce6210 100644
--- a/test/core/bad_client/tests/large_metadata.c
+++ b/test/core/bad_client/tests/large_metadata.c
@@ -121,7 +121,7 @@ static void server_verifier(grpc_server *server, grpc_completion_queue *cq,
error = grpc_server_request_call(server, &s, &call_details,
&request_metadata_recv, cq, cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(101), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(101), 1);
cq_verify(cqv);
GPR_ASSERT(0 == strcmp(call_details.host, "localhost"));
@@ -148,7 +148,7 @@ static void server_verifier_sends_too_much_metadata(grpc_server *server,
error = grpc_server_request_call(server, &s, &call_details,
&request_metadata_recv, cq, cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(101), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(101), 1);
cq_verify(cqv);
GPR_ASSERT(0 == strcmp(call_details.host, "localhost"));
@@ -171,7 +171,7 @@ static void server_verifier_sends_too_much_metadata(grpc_server *server,
op.reserved = NULL;
error = grpc_call_start_batch(s, &op, 1, tag(102), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(102), 0); // Operation fails.
+ CQ_EXPECT_COMPLETION(cqv, tag(102), 0); // Operation fails.
cq_verify(cqv);
gpr_free((char *)meta.value);
diff --git a/test/core/bad_client/tests/server_registered_method.c b/test/core/bad_client/tests/server_registered_method.c
index 6216553a61..e174af5931 100644
--- a/test/core/bad_client/tests/server_registered_method.c
+++ b/test/core/bad_client/tests/server_registered_method.c
@@ -70,7 +70,7 @@ static void verifier_succeeds(grpc_server *server, grpc_completion_queue *cq,
&deadline, &request_metadata_recv,
&payload, cq, cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(101), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(101), 1);
cq_verify(cqv);
GPR_ASSERT(payload != NULL);
@@ -96,7 +96,7 @@ static void verifier_fails(grpc_server *server, grpc_completion_queue *cq,
&deadline, &request_metadata_recv,
&payload, cq, cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(101), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(101), 1);
cq_verify(cqv);
GPR_ASSERT(payload == NULL);
diff --git a/test/core/bad_client/tests/simple_request.c b/test/core/bad_client/tests/simple_request.c
index 25bbe968e4..c08aa40a0a 100644
--- a/test/core/bad_client/tests/simple_request.c
+++ b/test/core/bad_client/tests/simple_request.c
@@ -114,7 +114,7 @@ static void verifier(grpc_server *server, grpc_completion_queue *cq,
error = grpc_server_request_call(server, &s, &call_details,
&request_metadata_recv, cq, cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(101), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(101), 1);
cq_verify(cqv);
GPR_ASSERT(0 == strcmp(call_details.host, "localhost"));
diff --git a/test/core/bad_ssl/bad_ssl_test.c b/test/core/bad_ssl/bad_ssl_test.c
index bb06ab0bb9..c9cdb169b6 100644
--- a/test/core/bad_ssl/bad_ssl_test.c
+++ b/test/core/bad_ssl/bad_ssl_test.c
@@ -111,7 +111,7 @@ static void run_test(const char *target, size_t nops) {
error = grpc_call_start_batch(c, ops, nops, tag(1), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
cq_verify(cqv);
GPR_ASSERT(status != GRPC_STATUS_OK);
diff --git a/test/core/bad_ssl/gen_build_yaml.py b/test/core/bad_ssl/gen_build_yaml.py
index 69f921989c..c17b17eb13 100755
--- a/test/core/bad_ssl/gen_build_yaml.py
+++ b/test/core/bad_ssl/gen_build_yaml.py
@@ -41,7 +41,8 @@ default_test_options = TestOptions(False, 1.0)
# maps test names to options
BAD_CLIENT_TESTS = {
'cert': default_test_options._replace(cpu_cost=0.1),
- 'alpn': default_test_options._replace(cpu_cost=0.1),
+ # Disabling this test because it does not link correctly as written
+ # 'alpn': default_test_options._replace(cpu_cost=0.1),
}
def main():
diff --git a/test/core/client_config/lb_policies_test.c b/test/core/client_config/lb_policies_test.c
index 3160312db6..0b9648b7e1 100644
--- a/test/core/client_config/lb_policies_test.c
+++ b/test/core/client_config/lb_policies_test.c
@@ -351,9 +351,9 @@ static int *perform_request(servers_fixture *f, grpc_channel *client,
ops, (size_t)(op - ops),
tag(102), NULL));
- cq_expect_completion(cqv, tag(102), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(102), 1);
if (!completed_client) {
- cq_expect_completion(cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
}
cq_verify(cqv);
@@ -376,7 +376,7 @@ static int *perform_request(servers_fixture *f, grpc_channel *client,
} else { /* no response from server */
grpc_call_cancel(c, NULL);
if (!completed_client) {
- cq_expect_completion(cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
cq_verify(cqv);
}
}
@@ -576,7 +576,7 @@ static void test_ping() {
client = create_client(f);
grpc_channel_ping(client, f->cq, tag(0), NULL);
- cq_expect_completion(cqv, tag(0), 0);
+ CQ_EXPECT_COMPLETION(cqv, tag(0), 0);
/* check that we're still in idle, and start connecting */
GPR_ASSERT(grpc_channel_check_connectivity_state(client, 1) ==
@@ -586,7 +586,7 @@ static void test_ping() {
while (state != GRPC_CHANNEL_READY) {
grpc_channel_watch_connectivity_state(
client, state, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(3), f->cq, tag(99));
- cq_expect_completion(cqv, tag(99), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(99), 1);
cq_verify(cqv);
state = grpc_channel_check_connectivity_state(client, 0);
GPR_ASSERT(state == GRPC_CHANNEL_READY ||
@@ -596,7 +596,7 @@ static void test_ping() {
for (i = 1; i <= 5; i++) {
grpc_channel_ping(client, f->cq, tag(i), NULL);
- cq_expect_completion(cqv, tag(i), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(i), 1);
cq_verify(cqv);
}
gpr_free(rdata.call_details);
diff --git a/test/core/client_config/resolvers/dns_resolver_connectivity_test.c b/test/core/client_config/resolvers/dns_resolver_connectivity_test.c
index 69c07d83f4..6a33525f62 100644
--- a/test/core/client_config/resolvers/dns_resolver_connectivity_test.c
+++ b/test/core/client_config/resolvers/dns_resolver_connectivity_test.c
@@ -127,26 +127,26 @@ int main(int argc, char **argv) {
grpc_resolver *resolver = create_resolver("dns:test");
- grpc_client_config *config = (grpc_client_config *)1;
+ grpc_resolver_result *result = (grpc_resolver_result *)1;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
gpr_event ev1;
gpr_event_init(&ev1);
- grpc_resolver_next(&exec_ctx, resolver, &config,
+ grpc_resolver_next(&exec_ctx, resolver, &result,
grpc_closure_create(on_done, &ev1));
grpc_exec_ctx_flush(&exec_ctx);
GPR_ASSERT(wait_loop(5, &ev1));
- GPR_ASSERT(config == NULL);
+ GPR_ASSERT(result == NULL);
gpr_event ev2;
gpr_event_init(&ev2);
- grpc_resolver_next(&exec_ctx, resolver, &config,
+ grpc_resolver_next(&exec_ctx, resolver, &result,
grpc_closure_create(on_done, &ev2));
grpc_exec_ctx_flush(&exec_ctx);
GPR_ASSERT(wait_loop(30, &ev2));
- GPR_ASSERT(config != NULL);
+ GPR_ASSERT(result != NULL);
- grpc_client_config_unref(&exec_ctx, config);
+ grpc_resolver_result_unref(&exec_ctx, result);
GRPC_RESOLVER_UNREF(&exec_ctx, resolver, "test");
grpc_exec_ctx_finish(&exec_ctx);
diff --git a/test/core/end2end/bad_server_response_test.c b/test/core/end2end/bad_server_response_test.c
index ab80adf0e0..5ed0eb64d2 100644
--- a/test/core/end2end/bad_server_response_test.c
+++ b/test/core/end2end/bad_server_response_test.c
@@ -206,7 +206,7 @@ static void start_rpc(int target_port, grpc_status_code expected_status,
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
cq_verify(cqv);
gpr_log(GPR_DEBUG, "Rpc status: %d, details: %s", status, details);
diff --git a/test/core/end2end/cq_verifier.c b/test/core/end2end/cq_verifier.c
index 5331049e89..1f42d3457e 100644
--- a/test/core/end2end/cq_verifier.c
+++ b/test/core/end2end/cq_verifier.c
@@ -61,6 +61,8 @@ typedef struct metadata {
list to detail other expectations */
typedef struct expectation {
struct expectation *next;
+ const char *file;
+ int line;
grpc_completion_type type;
void *tag;
int success;
@@ -180,7 +182,8 @@ static void expectation_to_strvec(gpr_strvec *buf, expectation *e) {
switch (e->type) {
case GRPC_OP_COMPLETE:
- gpr_asprintf(&tmp, "GRPC_OP_COMPLETE result=%d", e->success);
+ gpr_asprintf(&tmp, "GRPC_OP_COMPLETE result=%d %s:%d", e->success,
+ e->file, e->line);
gpr_strvec_add(buf, tmp);
break;
case GRPC_QUEUE_TIMEOUT:
@@ -214,25 +217,16 @@ static void fail_no_event_received(cq_verifier *v) {
}
void cq_verify(cq_verifier *v) {
- gpr_timespec deadline = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10);
- grpc_event ev;
- expectation *e;
- char *s;
- gpr_strvec have_tags;
-
- gpr_strvec_init(&have_tags);
-
+ const gpr_timespec deadline = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10);
while (v->first_expectation != NULL) {
- ev = grpc_completion_queue_next(v->cq, deadline, NULL);
+ grpc_event ev = grpc_completion_queue_next(v->cq, deadline, NULL);
if (ev.type == GRPC_QUEUE_TIMEOUT) {
fail_no_event_received(v);
break;
}
-
+ expectation *e;
expectation *prev = NULL;
for (e = v->first_expectation; e != NULL; e = e->next) {
- gpr_asprintf(&s, " %p", e->tag);
- gpr_strvec_add(&have_tags, s);
if (e->tag == ev.tag) {
verify_matches(e, &ev);
if (e == v->first_expectation) v->first_expectation = e->next;
@@ -243,18 +237,19 @@ void cq_verify(cq_verifier *v) {
prev = e;
}
if (e == NULL) {
- s = grpc_event_string(&ev);
+ char *s = grpc_event_string(&ev);
gpr_log(GPR_ERROR, "cq returned unexpected event: %s", s);
gpr_free(s);
- s = gpr_strvec_flatten(&have_tags, NULL);
- gpr_log(GPR_ERROR, "expected tags:%s", s);
+ gpr_strvec expectations;
+ gpr_strvec_init(&expectations);
+ expectations_to_strvec(&expectations, v);
+ s = gpr_strvec_flatten(&expectations, NULL);
+ gpr_strvec_destroy(&expectations);
+ gpr_log(GPR_ERROR, "expected tags:\n%s", s);
gpr_free(s);
- gpr_strvec_destroy(&have_tags);
abort();
}
}
-
- gpr_strvec_destroy(&have_tags);
}
void cq_verify_empty_timeout(cq_verifier *v, int timeout_sec) {
@@ -276,16 +271,19 @@ void cq_verify_empty_timeout(cq_verifier *v, int timeout_sec) {
void cq_verify_empty(cq_verifier *v) { cq_verify_empty_timeout(v, 1); }
-static void add(cq_verifier *v, grpc_completion_type type, void *tag,
- bool success) {
+static void add(cq_verifier *v, const char *file, int line,
+ grpc_completion_type type, void *tag, bool success) {
expectation *e = gpr_malloc(sizeof(expectation));
e->type = type;
+ e->file = file;
+ e->line = line;
e->tag = tag;
e->success = success;
e->next = v->first_expectation;
v->first_expectation = e;
}
-void cq_expect_completion(cq_verifier *v, void *tag, bool success) {
- add(v, GRPC_OP_COMPLETE, tag, success);
+void cq_expect_completion(cq_verifier *v, const char *file, int line, void *tag,
+ bool success) {
+ add(v, file, line, GRPC_OP_COMPLETE, tag, success);
}
diff --git a/test/core/end2end/cq_verifier.h b/test/core/end2end/cq_verifier.h
index bf82468c9a..0a7c03c090 100644
--- a/test/core/end2end/cq_verifier.h
+++ b/test/core/end2end/cq_verifier.h
@@ -62,7 +62,10 @@ void cq_verify_empty_timeout(cq_verifier *v, int timeout_sec);
Any functions taking ... expect a NULL terminated list of key/value pairs
(each pair using two parameter slots) of metadata that MUST be present in
the event. */
-void cq_expect_completion(cq_verifier *v, void *tag, bool success);
+void cq_expect_completion(cq_verifier *v, const char *file, int line, void *tag,
+ bool success);
+#define CQ_EXPECT_COMPLETION(v, tag, success) \
+ cq_expect_completion(v, __FILE__, __LINE__, tag, success)
int byte_buffer_eq_string(grpc_byte_buffer *byte_buffer, const char *string);
int contains_metadata(grpc_metadata_array *array, const char *key,
diff --git a/test/core/end2end/dualstack_socket_test.c b/test/core/end2end/dualstack_socket_test.c
index 348b9ed5f0..8abb81c803 100644
--- a/test/core/end2end/dualstack_socket_test.c
+++ b/test/core/end2end/dualstack_socket_test.c
@@ -199,7 +199,7 @@ void test_connect(const char *server_host, const char *client_host, int port,
error = grpc_server_request_call(server, &s, &call_details,
&request_metadata_recv, cq, cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(101), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(101), 1);
cq_verify(cqv);
memset(ops, 0, sizeof(ops));
@@ -221,8 +221,8 @@ void test_connect(const char *server_host, const char *client_host, int port,
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(102), 1);
- cq_expect_completion(cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(102), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
cq_verify(cqv);
peer = grpc_call_get_peer(c);
@@ -238,7 +238,7 @@ void test_connect(const char *server_host, const char *client_host, int port,
grpc_call_destroy(s);
} else {
/* Check for a failed connection. */
- cq_expect_completion(cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
cq_verify(cqv);
GPR_ASSERT(status == GRPC_STATUS_UNAVAILABLE);
diff --git a/test/core/end2end/end2end_nosec_tests.c b/test/core/end2end/end2end_nosec_tests.c
index 3efd18cf2e..a630262197 100644
--- a/test/core/end2end/end2end_nosec_tests.c
+++ b/test/core/end2end/end2end_nosec_tests.c
@@ -95,6 +95,8 @@ extern void negative_deadline(grpc_end2end_test_config config);
extern void negative_deadline_pre_init(void);
extern void network_status_change(grpc_end2end_test_config config);
extern void network_status_change_pre_init(void);
+extern void no_logging(grpc_end2end_test_config config);
+extern void no_logging_pre_init(void);
extern void no_op(grpc_end2end_test_config config);
extern void no_op_pre_init(void);
extern void payload(grpc_end2end_test_config config);
@@ -115,6 +117,8 @@ extern void shutdown_finishes_calls(grpc_end2end_test_config config);
extern void shutdown_finishes_calls_pre_init(void);
extern void shutdown_finishes_tags(grpc_end2end_test_config config);
extern void shutdown_finishes_tags_pre_init(void);
+extern void simple_cacheable_request(grpc_end2end_test_config config);
+extern void simple_cacheable_request_pre_init(void);
extern void simple_delayed_request(grpc_end2end_test_config config);
extern void simple_delayed_request_pre_init(void);
extern void simple_metadata(grpc_end2end_test_config config);
@@ -155,6 +159,7 @@ void grpc_end2end_tests_pre_init(void) {
max_message_length_pre_init();
negative_deadline_pre_init();
network_status_change_pre_init();
+ no_logging_pre_init();
no_op_pre_init();
payload_pre_init();
ping_pre_init();
@@ -165,6 +170,7 @@ void grpc_end2end_tests_pre_init(void) {
server_finishes_request_pre_init();
shutdown_finishes_calls_pre_init();
shutdown_finishes_tags_pre_init();
+ simple_cacheable_request_pre_init();
simple_delayed_request_pre_init();
simple_metadata_pre_init();
simple_request_pre_init();
@@ -205,6 +211,7 @@ void grpc_end2end_tests(int argc, char **argv,
max_message_length(config);
negative_deadline(config);
network_status_change(config);
+ no_logging(config);
no_op(config);
payload(config);
ping(config);
@@ -215,6 +222,7 @@ void grpc_end2end_tests(int argc, char **argv,
server_finishes_request(config);
shutdown_finishes_calls(config);
shutdown_finishes_tags(config);
+ simple_cacheable_request(config);
simple_delayed_request(config);
simple_metadata(config);
simple_request(config);
@@ -328,6 +336,10 @@ void grpc_end2end_tests(int argc, char **argv,
network_status_change(config);
continue;
}
+ if (0 == strcmp("no_logging", argv[i])) {
+ no_logging(config);
+ continue;
+ }
if (0 == strcmp("no_op", argv[i])) {
no_op(config);
continue;
@@ -368,6 +380,10 @@ void grpc_end2end_tests(int argc, char **argv,
shutdown_finishes_tags(config);
continue;
}
+ if (0 == strcmp("simple_cacheable_request", argv[i])) {
+ simple_cacheable_request(config);
+ continue;
+ }
if (0 == strcmp("simple_delayed_request", argv[i])) {
simple_delayed_request(config);
continue;
diff --git a/test/core/end2end/end2end_tests.c b/test/core/end2end/end2end_tests.c
index e3d791abc1..925872a71f 100644
--- a/test/core/end2end/end2end_tests.c
+++ b/test/core/end2end/end2end_tests.c
@@ -97,6 +97,8 @@ extern void negative_deadline(grpc_end2end_test_config config);
extern void negative_deadline_pre_init(void);
extern void network_status_change(grpc_end2end_test_config config);
extern void network_status_change_pre_init(void);
+extern void no_logging(grpc_end2end_test_config config);
+extern void no_logging_pre_init(void);
extern void no_op(grpc_end2end_test_config config);
extern void no_op_pre_init(void);
extern void payload(grpc_end2end_test_config config);
@@ -117,6 +119,8 @@ extern void shutdown_finishes_calls(grpc_end2end_test_config config);
extern void shutdown_finishes_calls_pre_init(void);
extern void shutdown_finishes_tags(grpc_end2end_test_config config);
extern void shutdown_finishes_tags_pre_init(void);
+extern void simple_cacheable_request(grpc_end2end_test_config config);
+extern void simple_cacheable_request_pre_init(void);
extern void simple_delayed_request(grpc_end2end_test_config config);
extern void simple_delayed_request_pre_init(void);
extern void simple_metadata(grpc_end2end_test_config config);
@@ -158,6 +162,7 @@ void grpc_end2end_tests_pre_init(void) {
max_message_length_pre_init();
negative_deadline_pre_init();
network_status_change_pre_init();
+ no_logging_pre_init();
no_op_pre_init();
payload_pre_init();
ping_pre_init();
@@ -168,6 +173,7 @@ void grpc_end2end_tests_pre_init(void) {
server_finishes_request_pre_init();
shutdown_finishes_calls_pre_init();
shutdown_finishes_tags_pre_init();
+ simple_cacheable_request_pre_init();
simple_delayed_request_pre_init();
simple_metadata_pre_init();
simple_request_pre_init();
@@ -209,6 +215,7 @@ void grpc_end2end_tests(int argc, char **argv,
max_message_length(config);
negative_deadline(config);
network_status_change(config);
+ no_logging(config);
no_op(config);
payload(config);
ping(config);
@@ -219,6 +226,7 @@ void grpc_end2end_tests(int argc, char **argv,
server_finishes_request(config);
shutdown_finishes_calls(config);
shutdown_finishes_tags(config);
+ simple_cacheable_request(config);
simple_delayed_request(config);
simple_metadata(config);
simple_request(config);
@@ -336,6 +344,10 @@ void grpc_end2end_tests(int argc, char **argv,
network_status_change(config);
continue;
}
+ if (0 == strcmp("no_logging", argv[i])) {
+ no_logging(config);
+ continue;
+ }
if (0 == strcmp("no_op", argv[i])) {
no_op(config);
continue;
@@ -376,6 +388,10 @@ void grpc_end2end_tests(int argc, char **argv,
shutdown_finishes_tags(config);
continue;
}
+ if (0 == strcmp("simple_cacheable_request", argv[i])) {
+ simple_cacheable_request(config);
+ continue;
+ }
if (0 == strcmp("simple_delayed_request", argv[i])) {
simple_delayed_request(config);
continue;
diff --git a/test/core/end2end/end2end_tests.h b/test/core/end2end/end2end_tests.h
index dfa041c0c6..34af0936cd 100644
--- a/test/core/end2end/end2end_tests.h
+++ b/test/core/end2end/end2end_tests.h
@@ -42,6 +42,7 @@ typedef struct grpc_end2end_test_config grpc_end2end_test_config;
#define FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION 1
#define FEATURE_MASK_SUPPORTS_HOSTNAME_VERIFICATION 2
#define FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS 4
+#define FEATURE_MASK_SUPPORTS_REQUEST_PROXYING 8
#define FAIL_AUTH_CHECK_SERVER_ARG_NAME "fail_auth_check"
diff --git a/test/core/end2end/fixtures/h2_proxy.c b/test/core/end2end/fixtures/h2_proxy.c
index 8c50eeb5d5..c7b99863f0 100644
--- a/test/core/end2end/fixtures/h2_proxy.c
+++ b/test/core/end2end/fixtures/h2_proxy.c
@@ -113,7 +113,8 @@ void chttp2_tear_down_fullstack(grpc_end2end_test_fixture *f) {
/* All test configurations */
static grpc_end2end_test_config configs[] = {
- {"chttp2/fullstack+proxy", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION,
+ {"chttp2/fullstack+proxy", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION |
+ FEATURE_MASK_SUPPORTS_REQUEST_PROXYING,
chttp2_create_fixture_fullstack, chttp2_init_client_fullstack,
chttp2_init_server_fullstack, chttp2_tear_down_fullstack},
};
diff --git a/test/core/end2end/fixtures/h2_ssl_cert.c b/test/core/end2end/fixtures/h2_ssl_cert.c
index b476bf5516..ae2604dfb5 100644
--- a/test/core/end2end/fixtures/h2_ssl_cert.c
+++ b/test/core/end2end/fixtures/h2_ssl_cert.c
@@ -331,7 +331,7 @@ static void simple_request_body(grpc_end2end_test_fixture f,
error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(1), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(1), expected_result == SUCCESS);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), expected_result == SUCCESS);
cq_verify(cqv);
grpc_call_destroy(c);
diff --git a/test/core/end2end/fixtures/h2_ssl_proxy.c b/test/core/end2end/fixtures/h2_ssl_proxy.c
index 238e6bca46..eeb54b8b88 100644
--- a/test/core/end2end/fixtures/h2_ssl_proxy.c
+++ b/test/core/end2end/fixtures/h2_ssl_proxy.c
@@ -184,6 +184,7 @@ static void chttp2_init_server_simple_ssl_secure_fullstack(
static grpc_end2end_test_config configs[] = {
{"chttp2/simple_ssl_fullstack",
FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION |
+ FEATURE_MASK_SUPPORTS_REQUEST_PROXYING |
FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS,
chttp2_create_fixture_secure_fullstack,
chttp2_init_client_simple_ssl_secure_fullstack,
diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/22967e8ed837f03b76a980cc1d25054fb84b40e9 b/test/core/end2end/fuzzers/api_fuzzer_corpus/22967e8ed837f03b76a980cc1d25054fb84b40e9
new file mode 100644
index 0000000000..1aa57b990d
--- /dev/null
+++ b/test/core/end2end/fuzzers/api_fuzzer_corpus/22967e8ed837f03b76a980cc1d25054fb84b40e9
Binary files differ
diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/3f464011f8620f227309f6b2c84df6fffb8ed962 b/test/core/end2end/fuzzers/api_fuzzer_corpus/3f464011f8620f227309f6b2c84df6fffb8ed962
new file mode 100644
index 0000000000..385a724f3d
--- /dev/null
+++ b/test/core/end2end/fuzzers/api_fuzzer_corpus/3f464011f8620f227309f6b2c84df6fffb8ed962
Binary files differ
diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/crash-15070b2a2719ed8a6cbbaac25da02b7085993648 b/test/core/end2end/fuzzers/api_fuzzer_corpus/crash-15070b2a2719ed8a6cbbaac25da02b7085993648
new file mode 100644
index 0000000000..e21c7c6d39
--- /dev/null
+++ b/test/core/end2end/fuzzers/api_fuzzer_corpus/crash-15070b2a2719ed8a6cbbaac25da02b7085993648
Binary files differ
diff --git a/test/core/end2end/fuzzers/hpack.dictionary b/test/core/end2end/fuzzers/hpack.dictionary
index 3157dfca3f..e5a73d523f 100644
--- a/test/core/end2end/fuzzers/hpack.dictionary
+++ b/test/core/end2end/fuzzers/hpack.dictionary
@@ -44,6 +44,7 @@
"\x0Dgrpc-encoding"
"\x1Egrpc-internal-encoding-request"
"\x0Cgrpc-message"
+"\x10grpc-payload-bin"
"\x0Bgrpc-status"
"\x0Cgrpc-timeout"
"\x10grpc-tracing-bin"
diff --git a/test/core/end2end/gen_build_yaml.py b/test/core/end2end/gen_build_yaml.py
index e59b7dc9fb..fe0f7baf2c 100755
--- a/test/core/end2end/gen_build_yaml.py
+++ b/test/core/end2end/gen_build_yaml.py
@@ -114,6 +114,7 @@ END2END_TESTS = {
'max_message_length': default_test_options,
'negative_deadline': default_test_options,
'network_status_change': default_test_options,
+ 'no_logging': default_test_options._replace(traceable=False),
'no_op': default_test_options,
'payload': default_test_options,
'load_reporting_hook': default_test_options,
@@ -126,6 +127,7 @@ END2END_TESTS = {
'server_finishes_request': default_test_options,
'shutdown_finishes_calls': default_test_options,
'shutdown_finishes_tags': default_test_options,
+ 'simple_cacheable_request': default_test_options,
'simple_delayed_request': connectivity_test_options,
'simple_metadata': default_test_options,
'simple_request': default_test_options,
@@ -223,7 +225,7 @@ def main():
'name': '%s_nosec_test' % f,
'build': 'test',
'language': 'c',
- 'secure': 'no',
+ 'secure': False,
'src': ['test/core/end2end/fixtures/%s.c' % f],
'run': False,
'platforms': END2END_FIXTURES[f].platforms,
diff --git a/test/core/end2end/goaway_server_test.c b/test/core/end2end/goaway_server_test.c
index 67cc24c74c..a8c7b2be5a 100644
--- a/test/core/end2end/goaway_server_test.c
+++ b/test/core/end2end/goaway_server_test.c
@@ -175,8 +175,8 @@ int main(int argc, char **argv) {
set_resolve_port(port1);
/* first call should now start */
- cq_expect_completion(cqv, tag(0x101), 1);
- cq_expect_completion(cqv, tag(0x301), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(0x101), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(0x301), 1);
cq_verify(cqv);
GPR_ASSERT(GRPC_CHANNEL_READY ==
@@ -200,7 +200,7 @@ int main(int argc, char **argv) {
* we should see a connectivity change and then nothing */
set_resolve_port(-1);
grpc_server_shutdown_and_notify(server1, cq, tag(0xdead1));
- cq_expect_completion(cqv, tag(0x9999), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(0x9999), 1);
cq_verify(cqv);
cq_verify_empty(cqv);
@@ -250,8 +250,8 @@ int main(int argc, char **argv) {
&request_metadata2, cq, cq, tag(0x401)));
/* second call should now start */
- cq_expect_completion(cqv, tag(0x201), 1);
- cq_expect_completion(cqv, tag(0x401), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(0x201), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(0x401), 1);
cq_verify(cqv);
/* listen for close on the server call to probe for finishing */
@@ -273,12 +273,12 @@ int main(int argc, char **argv) {
grpc_call_cancel(call2, NULL);
/* now everything else should finish */
- cq_expect_completion(cqv, tag(0x102), 1);
- cq_expect_completion(cqv, tag(0x202), 1);
- cq_expect_completion(cqv, tag(0x302), 1);
- cq_expect_completion(cqv, tag(0x402), 1);
- cq_expect_completion(cqv, tag(0xdead1), 1);
- cq_expect_completion(cqv, tag(0xdead2), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(0x102), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(0x202), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(0x302), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(0x402), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(0xdead1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(0xdead2), 1);
cq_verify(cqv);
grpc_call_destroy(call1);
diff --git a/test/core/end2end/invalid_call_argument_test.c b/test/core/end2end/invalid_call_argument_test.c
index 3545660701..2b9904a244 100644
--- a/test/core/end2end/invalid_call_argument_test.c
+++ b/test/core/end2end/invalid_call_argument_test.c
@@ -116,8 +116,8 @@ static void prepare_test(int is_client) {
&g_state.call_details,
&g_state.server_initial_metadata_recv,
g_state.cq, g_state.cq, tag(101)));
- cq_expect_completion(g_state.cqv, tag(101), 1);
- cq_expect_completion(g_state.cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(g_state.cqv, tag(101), 1);
+ CQ_EXPECT_COMPLETION(g_state.cqv, tag(1), 1);
cq_verify(g_state.cqv);
}
}
@@ -191,7 +191,7 @@ static void test_send_initial_metadata_more_than_once() {
GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(g_state.call, g_state.ops,
(size_t)(op - g_state.ops),
tag(1), NULL));
- cq_expect_completion(g_state.cqv, tag(1), 0);
+ CQ_EXPECT_COMPLETION(g_state.cqv, tag(1), 0);
cq_verify(g_state.cqv);
op = g_state.ops;
@@ -312,7 +312,7 @@ static void test_receive_initial_metadata_twice_at_client() {
GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(g_state.call, g_state.ops,
(size_t)(op - g_state.ops),
tag(1), NULL));
- cq_expect_completion(g_state.cqv, tag(1), 0);
+ CQ_EXPECT_COMPLETION(g_state.cqv, tag(1), 0);
cq_verify(g_state.cqv);
op = g_state.ops;
op->op = GRPC_OP_RECV_INITIAL_METADATA;
@@ -405,7 +405,7 @@ static void test_recv_status_on_client_twice() {
GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(g_state.call, g_state.ops,
(size_t)(op - g_state.ops),
tag(1), NULL));
- cq_expect_completion(g_state.cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(g_state.cqv, tag(1), 1);
cq_verify(g_state.cqv);
op = g_state.ops;
diff --git a/test/core/end2end/no_server_test.c b/test/core/end2end/no_server_test.c
index 08af382197..03ff70a188 100644
--- a/test/core/end2end/no_server_test.c
+++ b/test/core/end2end/no_server_test.c
@@ -86,7 +86,7 @@ int main(int argc, char **argv) {
GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(
call, ops, (size_t)(op - ops), tag(1), NULL));
/* verify that all tags get completed */
- cq_expect_completion(cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
cq_verify(cqv);
GPR_ASSERT(status == GRPC_STATUS_DEADLINE_EXCEEDED);
diff --git a/test/core/end2end/tests/bad_hostname.c b/test/core/end2end/tests/bad_hostname.c
index c9663c2155..e0c7ac7c02 100644
--- a/test/core/end2end/tests/bad_hostname.c
+++ b/test/core/end2end/tests/bad_hostname.c
@@ -45,8 +45,6 @@
#include "src/core/lib/support/string.h"
#include "test/core/end2end/cq_verifier.h"
-enum { TIMEOUT = 200000 };
-
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@@ -150,7 +148,7 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(1), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
cq_verify(cqv);
GPR_ASSERT(status == GRPC_STATUS_INTERNAL);
diff --git a/test/core/end2end/tests/binary_metadata.c b/test/core/end2end/tests/binary_metadata.c
index 3dd2612077..6b105def33 100644
--- a/test/core/end2end/tests/binary_metadata.c
+++ b/test/core/end2end/tests/binary_metadata.c
@@ -43,8 +43,6 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
-enum { TIMEOUT = 200000 };
-
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@@ -199,7 +197,7 @@ static void test_request_response_with_metadata_and_payload(
grpc_server_request_call(f.server, &s, &call_details,
&request_metadata_recv, f.cq, f.cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(101), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(101), 1);
cq_verify(cqv);
memset(ops, 0, sizeof(ops));
@@ -218,7 +216,7 @@ static void test_request_response_with_metadata_and_payload(
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(102), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(102), 1);
cq_verify(cqv);
memset(ops, 0, sizeof(ops));
@@ -243,8 +241,8 @@ static void test_request_response_with_metadata_and_payload(
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(103), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(103), 1);
- cq_expect_completion(cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(103), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
cq_verify(cqv);
GPR_ASSERT(status == GRPC_STATUS_OK);
diff --git a/test/core/end2end/tests/call_creds.c b/test/core/end2end/tests/call_creds.c
index 694a0aa9ef..981c0fcc8c 100644
--- a/test/core/end2end/tests/call_creds.c
+++ b/test/core/end2end/tests/call_creds.c
@@ -53,8 +53,6 @@ static const char overridden_iam_selector[] = "overridden_selector";
typedef enum { NONE, OVERRIDE, DESTROY } override_mode;
-enum { TIMEOUT = 200000 };
-
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@@ -234,7 +232,7 @@ static void request_response_with_payload_and_call_creds(
grpc_server_request_call(f.server, &s, &call_details,
&request_metadata_recv, f.cq, f.cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(101), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(101), 1);
cq_verify(cqv);
s_auth_context = grpc_call_auth_context(s);
GPR_ASSERT(s_auth_context != NULL);
@@ -264,7 +262,7 @@ static void request_response_with_payload_and_call_creds(
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(102), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(102), 1);
cq_verify(cqv);
memset(ops, 0, sizeof(ops));
@@ -289,8 +287,8 @@ static void request_response_with_payload_and_call_creds(
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(103), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(103), 1);
- cq_expect_completion(cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(103), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
cq_verify(cqv);
GPR_ASSERT(status == GRPC_STATUS_OK);
@@ -450,7 +448,7 @@ static void test_request_with_server_rejecting_client_creds(
error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(1), NULL);
GPR_ASSERT(error == GRPC_CALL_OK);
- cq_expect_completion(cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
cq_verify(cqv);
GPR_ASSERT(status == GRPC_STATUS_UNAUTHENTICATED);
diff --git a/test/core/end2end/tests/cancel_after_accept.c b/test/core/end2end/tests/cancel_after_accept.c
index 51c13da3b1..b4ac3b3249 100644
--- a/test/core/end2end/tests/cancel_after_accept.c
+++ b/test/core/end2end/tests/cancel_after_accept.c
@@ -44,8 +44,6 @@
#include "test/core/end2end/cq_verifier.h"
#include "test/core/end2end/tests/cancel_test_helpers.h"
-enum { TIMEOUT = 200000 };
-
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@@ -172,7 +170,7 @@ static void test_cancel_after_accept(grpc_end2end_test_config config,
error = grpc_server_request_call(f.server, &s, &call_details,
&request_metadata_recv, f.cq, f.cq, tag(2));
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(2), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(2), 1);
cq_verify(cqv);
memset(ops, 0, sizeof(ops));
@@ -202,8 +200,8 @@ static void test_cancel_after_accept(grpc_end2end_test_config config,
GPR_ASSERT(GRPC_CALL_OK == mode.initiate_cancel(c, NULL));
- cq_expect_completion(cqv, tag(3), 1);
- cq_expect_completion(cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(3), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
cq_verify(cqv);
GPR_ASSERT(status == mode.expect_status || status == GRPC_STATUS_INTERNAL);
diff --git a/test/core/end2end/tests/cancel_after_client_done.c b/test/core/end2end/tests/cancel_after_client_done.c
index 2b5a409dee..5adc71e255 100644
--- a/test/core/end2end/tests/cancel_after_client_done.c
+++ b/test/core/end2end/tests/cancel_after_client_done.c
@@ -44,8 +44,6 @@
#include "test/core/end2end/cq_verifier.h"
#include "test/core/end2end/tests/cancel_test_helpers.h"
-enum { TIMEOUT = 200000 };
-
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@@ -176,7 +174,7 @@ static void test_cancel_after_accept_and_writes_closed(
error = grpc_server_request_call(f.server, &s, &call_details,
&request_metadata_recv, f.cq, f.cq, tag(2));
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(2), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(2), 1);
cq_verify(cqv);
memset(ops, 0, sizeof(ops));
@@ -206,8 +204,8 @@ static void test_cancel_after_accept_and_writes_closed(
GPR_ASSERT(GRPC_CALL_OK == mode.initiate_cancel(c, NULL));
- cq_expect_completion(cqv, tag(3), 1);
- cq_expect_completion(cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(3), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
cq_verify(cqv);
GPR_ASSERT(status == mode.expect_status || status == GRPC_STATUS_INTERNAL);
diff --git a/test/core/end2end/tests/cancel_after_invoke.c b/test/core/end2end/tests/cancel_after_invoke.c
index 85fbe9de7b..85d8799f36 100644
--- a/test/core/end2end/tests/cancel_after_invoke.c
+++ b/test/core/end2end/tests/cancel_after_invoke.c
@@ -44,8 +44,6 @@
#include "test/core/end2end/cq_verifier.h"
#include "test/core/end2end/tests/cancel_test_helpers.h"
-enum { TIMEOUT = 200000 };
-
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@@ -170,7 +168,7 @@ static void test_cancel_after_invoke(grpc_end2end_test_config config,
GPR_ASSERT(GRPC_CALL_OK == mode.initiate_cancel(c, NULL));
- cq_expect_completion(cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
cq_verify(cqv);
GPR_ASSERT(status == mode.expect_status || status == GRPC_STATUS_INTERNAL);
diff --git a/test/core/end2end/tests/cancel_before_invoke.c b/test/core/end2end/tests/cancel_before_invoke.c
index d99062c608..c57091476e 100644
--- a/test/core/end2end/tests/cancel_before_invoke.c
+++ b/test/core/end2end/tests/cancel_before_invoke.c
@@ -43,8 +43,6 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
-enum { TIMEOUT = 200000 };
-
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@@ -168,7 +166,7 @@ static void test_cancel_before_invoke(grpc_end2end_test_config config,
error = grpc_call_start_batch(c, ops, test_ops, tag(1), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
cq_verify(cqv);
GPR_ASSERT(status == GRPC_STATUS_CANCELLED);
diff --git a/test/core/end2end/tests/cancel_in_a_vacuum.c b/test/core/end2end/tests/cancel_in_a_vacuum.c
index 0c893b5f9e..3b03616b3b 100644
--- a/test/core/end2end/tests/cancel_in_a_vacuum.c
+++ b/test/core/end2end/tests/cancel_in_a_vacuum.c
@@ -44,8 +44,6 @@
#include "test/core/end2end/cq_verifier.h"
#include "test/core/end2end/tests/cancel_test_helpers.h"
-enum { TIMEOUT = 200000 };
-
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
diff --git a/test/core/end2end/tests/cancel_with_status.c b/test/core/end2end/tests/cancel_with_status.c
index 673c7051ad..e65390ac4a 100644
--- a/test/core/end2end/tests/cancel_with_status.c
+++ b/test/core/end2end/tests/cancel_with_status.c
@@ -45,8 +45,6 @@
#include "src/core/lib/support/string.h"
#include "test/core/end2end/cq_verifier.h"
-enum { TIMEOUT = 200000 };
-
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@@ -152,7 +150,7 @@ static void simple_request_body(grpc_end2end_test_fixture f, size_t num_ops) {
grpc_call_cancel_with_status(c, GRPC_STATUS_UNIMPLEMENTED, "xyz", NULL);
- cq_expect_completion(cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
cq_verify(cqv);
GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED);
diff --git a/test/core/end2end/tests/compressed_payload.c b/test/core/end2end/tests/compressed_payload.c
index ec5c012238..1724da4d0c 100644
--- a/test/core/end2end/tests/compressed_payload.c
+++ b/test/core/end2end/tests/compressed_payload.c
@@ -50,8 +50,6 @@
#include "src/core/lib/surface/call_test_only.h"
#include "test/core/end2end/cq_verifier.h"
-enum { TIMEOUT = 200000 };
-
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@@ -198,7 +196,7 @@ static void request_for_disabled_algorithm(
grpc_server_request_call(f.server, &s, &call_details,
&request_metadata_recv, f.cq, f.cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(101), true);
+ CQ_EXPECT_COMPLETION(cqv, tag(101), true);
cq_verify(cqv);
op = ops;
@@ -215,7 +213,7 @@ static void request_for_disabled_algorithm(
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(102), false);
+ CQ_EXPECT_COMPLETION(cqv, tag(102), false);
op = ops;
op->op = GRPC_OP_RECV_CLOSE_ON_SERVER;
@@ -226,8 +224,8 @@ static void request_for_disabled_algorithm(
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(103), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(103), true);
- cq_expect_completion(cqv, tag(1), true);
+ CQ_EXPECT_COMPLETION(cqv, tag(103), true);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), true);
cq_verify(cqv);
/* call was cancelled (closed) ... */
@@ -361,7 +359,7 @@ static void request_with_payload_template(
grpc_server_request_call(f.server, &s, &call_details,
&request_metadata_recv, f.cq, f.cq, tag(100));
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(100), true);
+ CQ_EXPECT_COMPLETION(cqv, tag(100), true);
cq_verify(cqv);
GPR_ASSERT(GPR_BITCOUNT(grpc_call_test_only_get_encodings_accepted_by_peer(
@@ -421,7 +419,7 @@ static void request_with_payload_template(
op++;
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(102), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(102), 1);
cq_verify(cqv);
GPR_ASSERT(request_payload_recv->type == GRPC_BB_RAW);
@@ -438,8 +436,8 @@ static void request_with_payload_template(
op++;
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(103), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(103), 1);
- cq_expect_completion(cqv, tag(2), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(103), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(2), 1);
cq_verify(cqv);
GPR_ASSERT(response_payload_recv->type == GRPC_BB_RAW);
@@ -484,10 +482,10 @@ static void request_with_payload_template(
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(104), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(1), 1);
- cq_expect_completion(cqv, tag(3), 1);
- cq_expect_completion(cqv, tag(101), 1);
- cq_expect_completion(cqv, tag(104), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(3), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(101), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(104), 1);
cq_verify(cqv);
GPR_ASSERT(status == GRPC_STATUS_OK);
diff --git a/test/core/end2end/tests/connectivity.c b/test/core/end2end/tests/connectivity.c
index 5775976b1c..260297ebd4 100644
--- a/test/core/end2end/tests/connectivity.c
+++ b/test/core/end2end/tests/connectivity.c
@@ -102,7 +102,7 @@ static void test_connectivity(grpc_end2end_test_config config) {
f.cq, tag(2));
/* and now the watch should trigger */
- cq_expect_completion(cqv, tag(2), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(2), 1);
cq_verify(cqv);
state = grpc_channel_check_connectivity_state(f.client, 0);
GPR_ASSERT(state == GRPC_CHANNEL_TRANSIENT_FAILURE ||
@@ -112,7 +112,7 @@ static void test_connectivity(grpc_end2end_test_config config) {
grpc_channel_watch_connectivity_state(f.client, GRPC_CHANNEL_CONNECTING,
GRPC_TIMEOUT_SECONDS_TO_DEADLINE(3),
f.cq, tag(3));
- cq_expect_completion(cqv, tag(3), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(3), 1);
cq_verify(cqv);
state = grpc_channel_check_connectivity_state(f.client, 0);
GPR_ASSERT(state == GRPC_CHANNEL_TRANSIENT_FAILURE ||
@@ -130,7 +130,7 @@ static void test_connectivity(grpc_end2end_test_config config) {
while (state != GRPC_CHANNEL_READY) {
grpc_channel_watch_connectivity_state(
f.client, state, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(3), f.cq, tag(4));
- cq_expect_completion(cqv, tag(4), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(4), 1);
cq_verify(cqv);
state = grpc_channel_check_connectivity_state(f.client, 0);
GPR_ASSERT(state == GRPC_CHANNEL_READY ||
@@ -148,8 +148,8 @@ static void test_connectivity(grpc_end2end_test_config config) {
grpc_server_shutdown_and_notify(f.server, f.cq, tag(0xdead));
- cq_expect_completion(cqv, tag(5), 1);
- cq_expect_completion(cqv, tag(0xdead), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(5), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(0xdead), 1);
cq_verify(cqv);
state = grpc_channel_check_connectivity_state(f.client, 0);
GPR_ASSERT(state == GRPC_CHANNEL_TRANSIENT_FAILURE ||
diff --git a/test/core/end2end/tests/default_host.c b/test/core/end2end/tests/default_host.c
index 728ee597b5..208e31697e 100644
--- a/test/core/end2end/tests/default_host.c
+++ b/test/core/end2end/tests/default_host.c
@@ -45,8 +45,6 @@
#include "src/core/lib/support/string.h"
#include "test/core/end2end/cq_verifier.h"
-enum { TIMEOUT = 200000 };
-
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@@ -162,7 +160,7 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
grpc_server_request_call(f.server, &s, &call_details,
&request_metadata_recv, f.cq, f.cq, tag(101));
GPR_ASSERT(error == GRPC_CALL_OK);
- cq_expect_completion(cqv, tag(101), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(101), 1);
cq_verify(cqv);
peer = grpc_call_get_peer(s);
@@ -196,8 +194,8 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), NULL);
GPR_ASSERT(error == GRPC_CALL_OK);
- cq_expect_completion(cqv, tag(102), 1);
- cq_expect_completion(cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(102), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
cq_verify(cqv);
GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED);
diff --git a/test/core/end2end/tests/disappearing_server.c b/test/core/end2end/tests/disappearing_server.c
index 536fbd0d8a..a0059b9ad5 100644
--- a/test/core/end2end/tests/disappearing_server.c
+++ b/test/core/end2end/tests/disappearing_server.c
@@ -43,8 +43,6 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
-enum { TIMEOUT = 200000 };
-
static void *tag(intptr_t t) { return (void *)t; }
static gpr_timespec n_seconds_time(int n) {
@@ -139,7 +137,7 @@ static void do_request_and_shutdown_server(grpc_end2end_test_fixture *f,
grpc_server_request_call(f->server, &s, &call_details,
&request_metadata_recv, f->cq, f->cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(101), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(101), 1);
cq_verify(cqv);
/* should be able to shut down the server early
@@ -168,9 +166,9 @@ static void do_request_and_shutdown_server(grpc_end2end_test_fixture *f,
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(102), 1);
- cq_expect_completion(cqv, tag(1), 1);
- cq_expect_completion(cqv, tag(1000), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(102), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1000), 1);
cq_verify(cqv);
GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED);
diff --git a/test/core/end2end/tests/empty_batch.c b/test/core/end2end/tests/empty_batch.c
index c05b919914..ac53e1839b 100644
--- a/test/core/end2end/tests/empty_batch.c
+++ b/test/core/end2end/tests/empty_batch.c
@@ -45,8 +45,6 @@
#include "src/core/lib/support/string.h"
#include "test/core/end2end/cq_verifier.h"
-enum { TIMEOUT = 200000 };
-
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@@ -112,7 +110,7 @@ static void empty_batch_body(grpc_end2end_test_fixture f) {
error = grpc_call_start_batch(c, op, 0, tag(1), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
cq_verify(cqv);
grpc_call_destroy(c);
diff --git a/test/core/end2end/tests/filter_call_init_fails.c b/test/core/end2end/tests/filter_call_init_fails.c
index a09183b786..a70f50af98 100644
--- a/test/core/end2end/tests/filter_call_init_fails.c
+++ b/test/core/end2end/tests/filter_call_init_fails.c
@@ -174,7 +174,7 @@ static void test_request(grpc_end2end_test_config config) {
&request_metadata_recv, f.cq, f.cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
cq_verify(cqv);
GPR_ASSERT(status == GRPC_STATUS_PERMISSION_DENIED);
diff --git a/test/core/end2end/tests/filter_causes_close.c b/test/core/end2end/tests/filter_causes_close.c
index c6c36d668b..cdf868377a 100644
--- a/test/core/end2end/tests/filter_causes_close.c
+++ b/test/core/end2end/tests/filter_causes_close.c
@@ -46,8 +46,6 @@
#include "src/core/lib/surface/channel_init.h"
#include "test/core/end2end/cq_verifier.h"
-enum { TIMEOUT = 200000 };
-
static bool g_enable_filter = false;
static void *tag(intptr_t t) { return (void *)t; }
@@ -172,7 +170,7 @@ static void test_request(grpc_end2end_test_config config) {
&request_metadata_recv, f.cq, f.cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
cq_verify(cqv);
GPR_ASSERT(status == GRPC_STATUS_PERMISSION_DENIED);
diff --git a/test/core/end2end/tests/graceful_server_shutdown.c b/test/core/end2end/tests/graceful_server_shutdown.c
index f527b8617d..29347a068a 100644
--- a/test/core/end2end/tests/graceful_server_shutdown.c
+++ b/test/core/end2end/tests/graceful_server_shutdown.c
@@ -43,8 +43,6 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
-enum { TIMEOUT = 200000 };
-
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@@ -154,7 +152,7 @@ static void test_early_server_shutdown_finishes_inflight_calls(
grpc_server_request_call(f.server, &s, &call_details,
&request_metadata_recv, f.cq, f.cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(101), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(101), 1);
cq_verify(cqv);
/* shutdown and destroy the server */
@@ -183,9 +181,9 @@ static void test_early_server_shutdown_finishes_inflight_calls(
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(102), 1);
- cq_expect_completion(cqv, tag(0xdead), 1);
- cq_expect_completion(cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(102), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(0xdead), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
cq_verify(cqv);
grpc_call_destroy(s);
diff --git a/test/core/end2end/tests/high_initial_seqno.c b/test/core/end2end/tests/high_initial_seqno.c
index db45f5eb5a..dab527005c 100644
--- a/test/core/end2end/tests/high_initial_seqno.c
+++ b/test/core/end2end/tests/high_initial_seqno.c
@@ -47,8 +47,6 @@
#include "src/core/lib/support/string.h"
#include "test/core/end2end/cq_verifier.h"
-enum { TIMEOUT = 200000 };
-
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@@ -159,7 +157,7 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
grpc_server_request_call(f.server, &s, &call_details,
&request_metadata_recv, f.cq, f.cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(101), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(101), 1);
cq_verify(cqv);
memset(ops, 0, sizeof(ops));
@@ -184,8 +182,8 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(102), 1);
- cq_expect_completion(cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(102), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
cq_verify(cqv);
GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED);
diff --git a/test/core/end2end/tests/hpack_size.c b/test/core/end2end/tests/hpack_size.c
index 7ff0461f5f..fb00ae4eaa 100644
--- a/test/core/end2end/tests/hpack_size.c
+++ b/test/core/end2end/tests/hpack_size.c
@@ -310,7 +310,7 @@ static void simple_request_body(grpc_end2end_test_fixture f, size_t index) {
grpc_server_request_call(f.server, &s, &call_details,
&request_metadata_recv, f.cq, f.cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(101), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(101), 1);
cq_verify(cqv);
memset(ops, 0, sizeof(ops));
@@ -335,8 +335,8 @@ static void simple_request_body(grpc_end2end_test_fixture f, size_t index) {
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(102), 1);
- cq_expect_completion(cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(102), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
cq_verify(cqv);
GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED);
diff --git a/test/core/end2end/tests/idempotent_request.c b/test/core/end2end/tests/idempotent_request.c
index dfedcfebee..65f6dd08c5 100644
--- a/test/core/end2end/tests/idempotent_request.c
+++ b/test/core/end2end/tests/idempotent_request.c
@@ -45,8 +45,6 @@
#include "src/core/lib/support/string.h"
#include "test/core/end2end/cq_verifier.h"
-enum { TIMEOUT = 200000 };
-
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@@ -163,7 +161,7 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
grpc_server_request_call(f.server, &s, &call_details,
&request_metadata_recv, f.cq, f.cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(101), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(101), 1);
cq_verify(cqv);
peer = grpc_call_get_peer(s);
@@ -197,8 +195,8 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(102), 1);
- cq_expect_completion(cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(102), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
cq_verify(cqv);
GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED);
diff --git a/test/core/end2end/tests/invoke_large_request.c b/test/core/end2end/tests/invoke_large_request.c
index 9c9ca95129..1df237cb6c 100644
--- a/test/core/end2end/tests/invoke_large_request.c
+++ b/test/core/end2end/tests/invoke_large_request.c
@@ -39,12 +39,11 @@
#include <grpc/byte_buffer.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
+#include <grpc/support/string_util.h>
#include <grpc/support/time.h>
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
-enum { TIMEOUT = 200000 };
-
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@@ -101,9 +100,25 @@ static gpr_slice large_slice(void) {
return slice;
}
-static void test_invoke_large_request(grpc_end2end_test_config config) {
+static void test_invoke_large_request(grpc_end2end_test_config config,
+ int max_frame_size, int lookahead_bytes) {
+ char *name;
+ gpr_asprintf(&name,
+ "test_invoke_large_request:max_frame_size=%d:lookahead_bytes=%d",
+ max_frame_size, lookahead_bytes);
+
+ grpc_arg args[2];
+ args[0].type = GRPC_ARG_INTEGER;
+ args[0].key = GRPC_ARG_HTTP2_MAX_FRAME_SIZE;
+ args[0].value.integer = max_frame_size;
+ args[1].type = GRPC_ARG_INTEGER;
+ args[1].key = GRPC_ARG_HTTP2_STREAM_LOOKAHEAD_BYTES;
+ args[1].value.integer = lookahead_bytes;
+ grpc_channel_args channel_args = {GPR_ARRAY_SIZE(args), args};
+
grpc_end2end_test_fixture f =
- begin_test(config, "test_invoke_large_request", NULL, NULL);
+ begin_test(config, name, &channel_args, &channel_args);
+ gpr_free(name);
gpr_slice request_payload_slice = large_slice();
gpr_slice response_payload_slice = large_slice();
@@ -179,7 +194,7 @@ static void test_invoke_large_request(grpc_end2end_test_config config) {
grpc_server_request_call(f.server, &s, &call_details,
&request_metadata_recv, f.cq, f.cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(101), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(101), 1);
cq_verify(cqv);
memset(ops, 0, sizeof(ops));
@@ -197,7 +212,7 @@ static void test_invoke_large_request(grpc_end2end_test_config config) {
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(102), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(102), 1);
cq_verify(cqv);
memset(ops, 0, sizeof(ops));
@@ -222,8 +237,8 @@ static void test_invoke_large_request(grpc_end2end_test_config config) {
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(103), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(103), 1);
- cq_expect_completion(cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(103), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
cq_verify(cqv);
GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED);
@@ -255,7 +270,26 @@ static void test_invoke_large_request(grpc_end2end_test_config config) {
}
void invoke_large_request(grpc_end2end_test_config config) {
- test_invoke_large_request(config);
+ test_invoke_large_request(config, 16384, 65536);
+ test_invoke_large_request(config, 32768, 65536);
+
+ test_invoke_large_request(config, 1000000 - 1, 65536);
+ test_invoke_large_request(config, 1000000, 65536);
+ test_invoke_large_request(config, 1000000 + 1, 65536);
+ test_invoke_large_request(config, 1000000 + 2, 65536);
+ test_invoke_large_request(config, 1000000 + 3, 65536);
+ test_invoke_large_request(config, 1000000 + 4, 65536);
+ test_invoke_large_request(config, 1000000 + 5, 65536);
+ test_invoke_large_request(config, 1000000 + 6, 65536);
+
+ test_invoke_large_request(config, 1000000 - 1, 2000000);
+ test_invoke_large_request(config, 1000000, 2000000);
+ test_invoke_large_request(config, 1000000 + 1, 2000000);
+ test_invoke_large_request(config, 1000000 + 2, 2000000);
+ test_invoke_large_request(config, 1000000 + 3, 2000000);
+ test_invoke_large_request(config, 1000000 + 4, 2000000);
+ test_invoke_large_request(config, 1000000 + 5, 2000000);
+ test_invoke_large_request(config, 1000000 + 6, 2000000);
}
void invoke_large_request_pre_init(void) {}
diff --git a/test/core/end2end/tests/large_metadata.c b/test/core/end2end/tests/large_metadata.c
index 1f27896019..eb174a2dbb 100644
--- a/test/core/end2end/tests/large_metadata.c
+++ b/test/core/end2end/tests/large_metadata.c
@@ -43,8 +43,6 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
-enum { TIMEOUT = 200000 };
-
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@@ -181,7 +179,7 @@ static void test_request_with_large_metadata(grpc_end2end_test_config config) {
&request_metadata_recv, f.cq, f.cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(101), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(101), 1);
cq_verify(cqv);
memset(ops, 0, sizeof(ops));
@@ -200,7 +198,7 @@ static void test_request_with_large_metadata(grpc_end2end_test_config config) {
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(102), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(102), 1);
cq_verify(cqv);
memset(ops, 0, sizeof(ops));
@@ -222,8 +220,8 @@ static void test_request_with_large_metadata(grpc_end2end_test_config config) {
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(103), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(103), 1);
- cq_expect_completion(cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(103), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
cq_verify(cqv);
GPR_ASSERT(status == GRPC_STATUS_OK);
diff --git a/test/core/end2end/tests/load_reporting_hook.c b/test/core/end2end/tests/load_reporting_hook.c
index 2c6519881a..59d054cf87 100644
--- a/test/core/end2end/tests/load_reporting_hook.c
+++ b/test/core/end2end/tests/load_reporting_hook.c
@@ -204,7 +204,7 @@ static void request_response_with_payload(grpc_end2end_test_fixture f,
grpc_server_request_call(f.server, &s, &call_details,
&request_metadata_recv, f.cq, f.cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(101), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(101), 1);
cq_verify(cqv);
memset(ops, 0, sizeof(ops));
@@ -222,7 +222,7 @@ static void request_response_with_payload(grpc_end2end_test_fixture f,
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(102), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(102), 1);
cq_verify(cqv);
memset(ops, 0, sizeof(ops));
@@ -249,8 +249,8 @@ static void request_response_with_payload(grpc_end2end_test_fixture f,
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(103), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(103), 1);
- cq_expect_completion(cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(103), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
cq_verify(cqv);
GPR_ASSERT(status == GRPC_STATUS_OK);
diff --git a/test/core/end2end/tests/max_concurrent_streams.c b/test/core/end2end/tests/max_concurrent_streams.c
index 41de74ff87..65fa946838 100644
--- a/test/core/end2end/tests/max_concurrent_streams.c
+++ b/test/core/end2end/tests/max_concurrent_streams.c
@@ -43,8 +43,6 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
-enum { TIMEOUT = 200000 };
-
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@@ -155,7 +153,7 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
grpc_server_request_call(f.server, &s, &call_details,
&request_metadata_recv, f.cq, f.cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(101), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(101), 1);
cq_verify(cqv);
memset(ops, 0, sizeof(ops));
@@ -180,8 +178,8 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(102), 1);
- cq_expect_completion(cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(102), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
cq_verify(cqv);
GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED);
@@ -382,17 +380,17 @@ static void test_max_concurrent_streams(grpc_end2end_test_config config) {
error = grpc_call_start_batch(s1, ops, (size_t)(op - ops), tag(102), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(102), 1);
- cq_expect_completion(cqv, tag(live_call + 2), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(102), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(live_call + 2), 1);
/* first request is finished, we should be able to start the second */
live_call = (live_call == 300) ? 400 : 300;
- cq_expect_completion(cqv, tag(live_call + 1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(live_call + 1), 1);
cq_verify(cqv);
GPR_ASSERT(GRPC_CALL_OK == grpc_server_request_call(
f.server, &s2, &call_details,
&request_metadata_recv, f.cq, f.cq, tag(201)));
- cq_expect_completion(cqv, tag(201), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(201), 1);
cq_verify(cqv);
memset(ops, 0, sizeof(ops));
@@ -417,8 +415,8 @@ static void test_max_concurrent_streams(grpc_end2end_test_config config) {
error = grpc_call_start_batch(s2, ops, (size_t)(op - ops), tag(202), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(live_call + 2), 1);
- cq_expect_completion(cqv, tag(202), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(live_call + 2), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(202), 1);
cq_verify(cqv);
cq_verifier_destroy(cqv);
diff --git a/test/core/end2end/tests/max_message_length.c b/test/core/end2end/tests/max_message_length.c
index 08d326ab4d..43f71f51d1 100644
--- a/test/core/end2end/tests/max_message_length.c
+++ b/test/core/end2end/tests/max_message_length.c
@@ -43,8 +43,6 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
-enum { TIMEOUT = 200000 };
-
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@@ -179,7 +177,7 @@ static void test_max_message_length(grpc_end2end_test_config config) {
grpc_server_request_call(f.server, &s, &call_details,
&request_metadata_recv, f.cq, f.cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(101), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(101), 1);
cq_verify(cqv);
memset(ops, 0, sizeof(ops));
@@ -197,8 +195,8 @@ static void test_max_message_length(grpc_end2end_test_config config) {
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(102), 1);
- cq_expect_completion(cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(102), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
cq_verify(cqv);
GPR_ASSERT(status != GRPC_STATUS_OK);
diff --git a/test/core/end2end/tests/negative_deadline.c b/test/core/end2end/tests/negative_deadline.c
index dff7992f63..c999ac116a 100644
--- a/test/core/end2end/tests/negative_deadline.c
+++ b/test/core/end2end/tests/negative_deadline.c
@@ -45,8 +45,6 @@
#include "src/core/lib/support/string.h"
#include "test/core/end2end/cq_verifier.h"
-enum { TIMEOUT = 200000 };
-
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@@ -150,7 +148,7 @@ static void simple_request_body(grpc_end2end_test_fixture f, size_t num_ops) {
error = grpc_call_start_batch(c, ops, num_ops, tag(1), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
cq_verify(cqv);
GPR_ASSERT(status == GRPC_STATUS_DEADLINE_EXCEEDED);
diff --git a/test/core/end2end/tests/network_status_change.c b/test/core/end2end/tests/network_status_change.c
index 39ddc13754..1d4b6dbb18 100644
--- a/test/core/end2end/tests/network_status_change.c
+++ b/test/core/end2end/tests/network_status_change.c
@@ -46,8 +46,6 @@
/* this is a private API but exposed here for testing*/
extern void grpc_network_status_shutdown_all_endpoints();
-enum { TIMEOUT = 200000 };
-
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@@ -168,7 +166,7 @@ static void test_invoke_network_status_change(grpc_end2end_test_config config) {
GPR_ASSERT(GRPC_CALL_OK == grpc_server_request_call(
f.server, &s, &call_details,
&request_metadata_recv, f.cq, f.cq, tag(101)));
- cq_expect_completion(cqv, tag(101), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(101), 1);
cq_verify(cqv);
op = ops;
@@ -185,7 +183,7 @@ static void test_invoke_network_status_change(grpc_end2end_test_config config) {
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(102), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(102), 1);
cq_verify(cqv);
// Simulate the network loss event
@@ -207,8 +205,8 @@ static void test_invoke_network_status_change(grpc_end2end_test_config config) {
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(103), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(103), 1);
- cq_expect_completion(cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(103), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
cq_verify(cqv);
// Expected behavior of a RPC when network is lost.
diff --git a/test/core/end2end/tests/no_logging.c b/test/core/end2end/tests/no_logging.c
new file mode 100644
index 0000000000..3c40e5dbac
--- /dev/null
+++ b/test/core/end2end/tests/no_logging.c
@@ -0,0 +1,293 @@
+/*
+ *
+ * Copyright 2016, Google Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#include "test/core/end2end/end2end_tests.h"
+
+#include <stdio.h>
+#include <string.h>
+
+#include <grpc/byte_buffer.h>
+#include <grpc/grpc.h>
+#include <grpc/support/alloc.h>
+#include <grpc/support/log.h>
+#include <grpc/support/string_util.h>
+#include <grpc/support/time.h>
+#include <grpc/support/useful.h>
+#include "src/core/lib/iomgr/error.h"
+#include "src/core/lib/support/string.h"
+#include "test/core/end2end/cq_verifier.h"
+
+enum { TIMEOUT = 200000 };
+
+static void *tag(intptr_t t) { return (void *)t; }
+
+extern void gpr_default_log(gpr_log_func_args *args);
+
+static void test_no_log(gpr_log_func_args *args) {
+ char *message = NULL;
+ gpr_asprintf(&message, "Unwanted log: %s", args->message);
+ args->message = message;
+ gpr_default_log(args);
+ gpr_free(message);
+ abort();
+}
+
+static void test_no_error_log(gpr_log_func_args *args) {
+ if (args->severity == GPR_LOG_SEVERITY_ERROR) {
+ test_no_log(args);
+ }
+}
+
+static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
+ const char *test_name,
+ grpc_channel_args *client_args,
+ grpc_channel_args *server_args) {
+ grpc_end2end_test_fixture f;
+ gpr_log(GPR_INFO, "%s/%s", test_name, config.name);
+ f = config.create_fixture(client_args, server_args);
+ config.init_server(&f, server_args);
+ config.init_client(&f, client_args);
+ return f;
+}
+
+static gpr_timespec n_seconds_time(int n) {
+ return GRPC_TIMEOUT_SECONDS_TO_DEADLINE(n);
+}
+
+static gpr_timespec five_seconds_time(void) { return n_seconds_time(5); }
+
+static void drain_cq(grpc_completion_queue *cq) {
+ grpc_event ev;
+ do {
+ ev = grpc_completion_queue_next(cq, five_seconds_time(), NULL);
+ } while (ev.type != GRPC_QUEUE_SHUTDOWN);
+}
+
+static void shutdown_server(grpc_end2end_test_fixture *f) {
+ if (!f->server) return;
+ grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000));
+ GPR_ASSERT(grpc_completion_queue_pluck(
+ f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL)
+ .type == GRPC_OP_COMPLETE);
+ grpc_server_destroy(f->server);
+ f->server = NULL;
+}
+
+static void shutdown_client(grpc_end2end_test_fixture *f) {
+ if (!f->client) return;
+ grpc_channel_destroy(f->client);
+ f->client = NULL;
+}
+
+static void end_test(grpc_end2end_test_fixture *f) {
+ shutdown_server(f);
+ shutdown_client(f);
+
+ grpc_completion_queue_shutdown(f->cq);
+ drain_cq(f->cq);
+ grpc_completion_queue_destroy(f->cq);
+}
+
+static void simple_request_body(grpc_end2end_test_fixture f) {
+ grpc_call *c;
+ grpc_call *s;
+ gpr_timespec deadline = five_seconds_time();
+ cq_verifier *cqv = cq_verifier_create(f.cq);
+ grpc_op ops[6];
+ grpc_op *op;
+ grpc_metadata_array initial_metadata_recv;
+ grpc_metadata_array trailing_metadata_recv;
+ grpc_metadata_array request_metadata_recv;
+ grpc_call_details call_details;
+ grpc_status_code status;
+ grpc_call_error error;
+ char *details = NULL;
+ size_t details_capacity = 0;
+ int was_cancelled = 2;
+ char *peer;
+
+ c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
+ "/foo", "foo.test.google.fr:1234", deadline,
+ NULL);
+ GPR_ASSERT(c);
+
+ peer = grpc_call_get_peer(c);
+ GPR_ASSERT(peer != NULL);
+ gpr_free(peer);
+
+ grpc_metadata_array_init(&initial_metadata_recv);
+ grpc_metadata_array_init(&trailing_metadata_recv);
+ grpc_metadata_array_init(&request_metadata_recv);
+ grpc_call_details_init(&call_details);
+
+ memset(ops, 0, sizeof(ops));
+ op = ops;
+ op->op = GRPC_OP_SEND_INITIAL_METADATA;
+ op->data.send_initial_metadata.count = 0;
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT;
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ op->op = GRPC_OP_RECV_INITIAL_METADATA;
+ op->data.recv_initial_metadata = &initial_metadata_recv;
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ op->op = GRPC_OP_RECV_STATUS_ON_CLIENT;
+ op->data.recv_status_on_client.trailing_metadata = &trailing_metadata_recv;
+ op->data.recv_status_on_client.status = &status;
+ op->data.recv_status_on_client.status_details = &details;
+ op->data.recv_status_on_client.status_details_capacity = &details_capacity;
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(1), NULL);
+ GPR_ASSERT(GRPC_CALL_OK == error);
+
+ error =
+ grpc_server_request_call(f.server, &s, &call_details,
+ &request_metadata_recv, f.cq, f.cq, tag(101));
+ GPR_ASSERT(GRPC_CALL_OK == error);
+ CQ_EXPECT_COMPLETION(cqv, tag(101), 1);
+ cq_verify(cqv);
+
+ peer = grpc_call_get_peer(s);
+ GPR_ASSERT(peer != NULL);
+ gpr_free(peer);
+ peer = grpc_call_get_peer(c);
+ GPR_ASSERT(peer != NULL);
+ gpr_free(peer);
+
+ memset(ops, 0, sizeof(ops));
+ op = ops;
+ op->op = GRPC_OP_SEND_INITIAL_METADATA;
+ op->data.send_initial_metadata.count = 0;
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ op->op = GRPC_OP_SEND_STATUS_FROM_SERVER;
+ op->data.send_status_from_server.trailing_metadata_count = 0;
+ op->data.send_status_from_server.status = GRPC_STATUS_UNIMPLEMENTED;
+ op->data.send_status_from_server.status_details = "xyz";
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ op->op = GRPC_OP_RECV_CLOSE_ON_SERVER;
+ op->data.recv_close_on_server.cancelled = &was_cancelled;
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), NULL);
+ GPR_ASSERT(GRPC_CALL_OK == error);
+
+ CQ_EXPECT_COMPLETION(cqv, tag(102), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
+ cq_verify(cqv);
+
+ GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED);
+ GPR_ASSERT(0 == strcmp(details, "xyz"));
+ GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
+ GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr:1234"));
+ GPR_ASSERT(0 == call_details.flags);
+ GPR_ASSERT(was_cancelled == 1);
+
+ gpr_free(details);
+ grpc_metadata_array_destroy(&initial_metadata_recv);
+ grpc_metadata_array_destroy(&trailing_metadata_recv);
+ grpc_metadata_array_destroy(&request_metadata_recv);
+ grpc_call_details_destroy(&call_details);
+
+ grpc_call_destroy(c);
+ grpc_call_destroy(s);
+
+ cq_verifier_destroy(cqv);
+}
+
+static void test_invoke_simple_request(grpc_end2end_test_config config) {
+ grpc_end2end_test_fixture f;
+
+ f = begin_test(config, "test_invoke_simple_request_with_no_error_logging",
+ NULL, NULL);
+ simple_request_body(f);
+ end_test(&f);
+ config.tear_down_data(&f);
+}
+
+static void test_invoke_10_simple_requests(grpc_end2end_test_config config) {
+ int i;
+ grpc_end2end_test_fixture f =
+ begin_test(config, "test_invoke_10_simple_requests_with_no_error_logging",
+ NULL, NULL);
+ for (i = 0; i < 10; i++) {
+ simple_request_body(f);
+ gpr_log(GPR_INFO, "Passed simple request %d", i);
+ }
+ simple_request_body(f);
+ end_test(&f);
+ config.tear_down_data(&f);
+}
+
+static void test_no_error_logging_in_entire_process(
+ grpc_end2end_test_config config) {
+ int i;
+ gpr_set_log_function(test_no_error_log);
+ for (i = 0; i < 10; i++) {
+ test_invoke_simple_request(config);
+ }
+ test_invoke_10_simple_requests(config);
+ gpr_set_log_function(gpr_default_log);
+}
+
+static void test_no_logging_in_one_request(grpc_end2end_test_config config) {
+ int i;
+ grpc_end2end_test_fixture f =
+ begin_test(config, "test_no_logging_in_last_request", NULL, NULL);
+ for (i = 0; i < 10; i++) {
+ simple_request_body(f);
+ }
+ gpr_set_log_function(test_no_log);
+ simple_request_body(f);
+ gpr_set_log_function(gpr_default_log);
+ end_test(&f);
+ config.tear_down_data(&f);
+}
+
+void no_logging(grpc_end2end_test_config config) {
+ test_no_logging_in_one_request(config);
+ test_no_error_logging_in_entire_process(config);
+}
+
+void no_logging_pre_init(void) {}
diff --git a/test/core/end2end/tests/no_op.c b/test/core/end2end/tests/no_op.c
index 284be7af2a..8b29c219dc 100644
--- a/test/core/end2end/tests/no_op.c
+++ b/test/core/end2end/tests/no_op.c
@@ -43,8 +43,6 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
-enum { TIMEOUT = 200000 };
-
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
diff --git a/test/core/end2end/tests/payload.c b/test/core/end2end/tests/payload.c
index 443d85eecc..c71704ff61 100644
--- a/test/core/end2end/tests/payload.c
+++ b/test/core/end2end/tests/payload.c
@@ -43,8 +43,6 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
-enum { TIMEOUT = 200000 };
-
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@@ -172,7 +170,7 @@ static void request_response_with_payload(grpc_end2end_test_fixture f) {
grpc_server_request_call(f.server, &s, &call_details,
&request_metadata_recv, f.cq, f.cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(101), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(101), 1);
cq_verify(cqv);
memset(ops, 0, sizeof(ops));
@@ -190,7 +188,7 @@ static void request_response_with_payload(grpc_end2end_test_fixture f) {
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(102), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(102), 1);
cq_verify(cqv);
memset(ops, 0, sizeof(ops));
@@ -215,8 +213,8 @@ static void request_response_with_payload(grpc_end2end_test_fixture f) {
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(103), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(103), 1);
- cq_expect_completion(cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(103), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
cq_verify(cqv);
GPR_ASSERT(status == GRPC_STATUS_OK);
diff --git a/test/core/end2end/tests/ping.c b/test/core/end2end/tests/ping.c
index d49bec983b..5e5169dedc 100644
--- a/test/core/end2end/tests/ping.c
+++ b/test/core/end2end/tests/ping.c
@@ -52,7 +52,7 @@ static void test_ping(grpc_end2end_test_config config) {
config.init_server(&f, NULL);
grpc_channel_ping(f.client, f.cq, tag(0), NULL);
- cq_expect_completion(cqv, tag(0), 0);
+ CQ_EXPECT_COMPLETION(cqv, tag(0), 0);
/* check that we're still in idle, and start connecting */
GPR_ASSERT(grpc_channel_check_connectivity_state(f.client, 1) ==
@@ -62,7 +62,7 @@ static void test_ping(grpc_end2end_test_config config) {
while (state != GRPC_CHANNEL_READY) {
grpc_channel_watch_connectivity_state(
f.client, state, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(3), f.cq, tag(99));
- cq_expect_completion(cqv, tag(99), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(99), 1);
cq_verify(cqv);
state = grpc_channel_check_connectivity_state(f.client, 0);
GPR_ASSERT(state == GRPC_CHANNEL_READY ||
@@ -72,12 +72,12 @@ static void test_ping(grpc_end2end_test_config config) {
for (i = 1; i <= 5; i++) {
grpc_channel_ping(f.client, f.cq, tag(i), NULL);
- cq_expect_completion(cqv, tag(i), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(i), 1);
cq_verify(cqv);
}
grpc_server_shutdown_and_notify(f.server, f.cq, tag(0xdead));
- cq_expect_completion(cqv, tag(0xdead), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(0xdead), 1);
cq_verify(cqv);
/* cleanup server */
diff --git a/test/core/end2end/tests/ping_pong_streaming.c b/test/core/end2end/tests/ping_pong_streaming.c
index 1d2f7943c1..7e360c415b 100644
--- a/test/core/end2end/tests/ping_pong_streaming.c
+++ b/test/core/end2end/tests/ping_pong_streaming.c
@@ -43,8 +43,6 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
-enum { TIMEOUT = 200000 };
-
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@@ -162,7 +160,7 @@ static void test_pingpong_streaming(grpc_end2end_test_config config,
grpc_server_request_call(f.server, &s, &call_details,
&request_metadata_recv, f.cq, f.cq, tag(100));
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(100), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(100), 1);
cq_verify(cqv);
memset(ops, 0, sizeof(ops));
@@ -208,7 +206,7 @@ static void test_pingpong_streaming(grpc_end2end_test_config config,
op++;
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(102), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(102), 1);
cq_verify(cqv);
memset(ops, 0, sizeof(ops));
@@ -220,8 +218,8 @@ static void test_pingpong_streaming(grpc_end2end_test_config config,
op++;
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(103), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(103), 1);
- cq_expect_completion(cqv, tag(2), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(103), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(2), 1);
cq_verify(cqv);
grpc_byte_buffer_destroy(request_payload);
@@ -254,10 +252,10 @@ static void test_pingpong_streaming(grpc_end2end_test_config config,
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(104), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(1), 1);
- cq_expect_completion(cqv, tag(3), 1);
- cq_expect_completion(cqv, tag(101), 1);
- cq_expect_completion(cqv, tag(104), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(3), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(101), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(104), 1);
cq_verify(cqv);
grpc_call_destroy(c);
diff --git a/test/core/end2end/tests/registered_call.c b/test/core/end2end/tests/registered_call.c
index ece6250ea1..9b2b42b558 100644
--- a/test/core/end2end/tests/registered_call.c
+++ b/test/core/end2end/tests/registered_call.c
@@ -45,8 +45,6 @@
#include "src/core/lib/support/string.h"
#include "test/core/end2end/cq_verifier.h"
-enum { TIMEOUT = 200000 };
-
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@@ -156,7 +154,7 @@ static void simple_request_body(grpc_end2end_test_fixture f, void *rc) {
grpc_server_request_call(f.server, &s, &call_details,
&request_metadata_recv, f.cq, f.cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(101), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(101), 1);
cq_verify(cqv);
memset(ops, 0, sizeof(ops));
@@ -181,8 +179,8 @@ static void simple_request_body(grpc_end2end_test_fixture f, void *rc) {
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(102), 1);
- cq_expect_completion(cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(102), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
cq_verify(cqv);
GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED);
diff --git a/test/core/end2end/tests/request_with_flags.c b/test/core/end2end/tests/request_with_flags.c
index b5d398bba9..25150e6f2d 100644
--- a/test/core/end2end/tests/request_with_flags.c
+++ b/test/core/end2end/tests/request_with_flags.c
@@ -44,8 +44,6 @@
#include "src/core/lib/transport/byte_stream.h"
#include "test/core/end2end/cq_verifier.h"
-enum { TIMEOUT = 200000 };
-
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@@ -165,7 +163,7 @@ static void test_invoke_request_with_flags(
GPR_ASSERT(expectation == error);
if (expectation == GRPC_CALL_OK) {
- cq_expect_completion(cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
cq_verify(cqv);
}
diff --git a/test/core/end2end/tests/request_with_payload.c b/test/core/end2end/tests/request_with_payload.c
index d94267e09c..67208c050c 100644
--- a/test/core/end2end/tests/request_with_payload.c
+++ b/test/core/end2end/tests/request_with_payload.c
@@ -43,8 +43,6 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
-enum { TIMEOUT = 200000 };
-
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@@ -165,7 +163,7 @@ static void test_invoke_request_with_payload(grpc_end2end_test_config config) {
GPR_ASSERT(GRPC_CALL_OK == grpc_server_request_call(
f.server, &s, &call_details,
&request_metadata_recv, f.cq, f.cq, tag(101)));
- cq_expect_completion(cqv, tag(101), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(101), 1);
cq_verify(cqv);
memset(ops, 0, sizeof(ops));
@@ -183,7 +181,7 @@ static void test_invoke_request_with_payload(grpc_end2end_test_config config) {
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(102), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(102), 1);
cq_verify(cqv);
memset(ops, 0, sizeof(ops));
@@ -203,8 +201,8 @@ static void test_invoke_request_with_payload(grpc_end2end_test_config config) {
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(103), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(103), 1);
- cq_expect_completion(cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(103), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
cq_verify(cqv);
GPR_ASSERT(status == GRPC_STATUS_OK);
diff --git a/test/core/end2end/tests/server_finishes_request.c b/test/core/end2end/tests/server_finishes_request.c
index a723c6fd2c..7fb9025aa3 100644
--- a/test/core/end2end/tests/server_finishes_request.c
+++ b/test/core/end2end/tests/server_finishes_request.c
@@ -45,8 +45,6 @@
#include "src/core/lib/support/string.h"
#include "test/core/end2end/cq_verifier.h"
-enum { TIMEOUT = 200000 };
-
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@@ -153,7 +151,7 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
grpc_server_request_call(f.server, &s, &call_details,
&request_metadata_recv, f.cq, f.cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(101), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(101), 1);
cq_verify(cqv);
memset(ops, 0, sizeof(ops));
@@ -178,8 +176,8 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(102), 1);
- cq_expect_completion(cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(102), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
cq_verify(cqv);
GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED);
diff --git a/test/core/end2end/tests/shutdown_finishes_calls.c b/test/core/end2end/tests/shutdown_finishes_calls.c
index abb6b26a87..dff2e6f280 100644
--- a/test/core/end2end/tests/shutdown_finishes_calls.c
+++ b/test/core/end2end/tests/shutdown_finishes_calls.c
@@ -43,8 +43,6 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
-enum { TIMEOUT = 200000 };
-
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@@ -147,7 +145,7 @@ static void test_early_server_shutdown_finishes_inflight_calls(
grpc_server_request_call(f.server, &s, &call_details,
&request_metadata_recv, f.cq, f.cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(101), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(101), 1);
cq_verify(cqv);
memset(ops, 0, sizeof(ops));
@@ -164,9 +162,9 @@ static void test_early_server_shutdown_finishes_inflight_calls(
grpc_server_shutdown_and_notify(f.server, f.cq, tag(1000));
grpc_server_cancel_all_calls(f.server);
- cq_expect_completion(cqv, tag(1000), 1);
- cq_expect_completion(cqv, tag(102), 1);
- cq_expect_completion(cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1000), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(102), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
cq_verify(cqv);
grpc_server_destroy(f.server);
diff --git a/test/core/end2end/tests/shutdown_finishes_tags.c b/test/core/end2end/tests/shutdown_finishes_tags.c
index b1f3c94562..1d110a74ea 100644
--- a/test/core/end2end/tests/shutdown_finishes_tags.c
+++ b/test/core/end2end/tests/shutdown_finishes_tags.c
@@ -43,8 +43,6 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
-enum { TIMEOUT = 200000 };
-
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@@ -104,8 +102,8 @@ static void test_early_server_shutdown_finishes_tags(
f.server, &s, &call_details,
&request_metadata_recv, f.cq, f.cq, tag(101)));
grpc_server_shutdown_and_notify(f.server, f.cq, tag(1000));
- cq_expect_completion(cqv, tag(101), 0);
- cq_expect_completion(cqv, tag(1000), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(101), 0);
+ CQ_EXPECT_COMPLETION(cqv, tag(1000), 1);
cq_verify(cqv);
GPR_ASSERT(s == NULL);
diff --git a/test/core/end2end/tests/simple_cacheable_request.c b/test/core/end2end/tests/simple_cacheable_request.c
new file mode 100644
index 0000000000..b52eb19315
--- /dev/null
+++ b/test/core/end2end/tests/simple_cacheable_request.c
@@ -0,0 +1,276 @@
+/*
+ *
+ * Copyright 2015, Google Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#include "test/core/end2end/end2end_tests.h"
+
+#include <stdio.h>
+#include <string.h>
+
+#include <grpc/byte_buffer.h>
+#include <grpc/support/alloc.h>
+#include <grpc/support/log.h>
+#include <grpc/support/time.h>
+#include <grpc/support/useful.h>
+#include "test/core/end2end/cq_verifier.h"
+
+enum { TIMEOUT = 200000 };
+
+static void *tag(intptr_t t) { return (void *)t; }
+
+static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
+ const char *test_name,
+ grpc_channel_args *client_args,
+ grpc_channel_args *server_args) {
+ grpc_end2end_test_fixture f;
+ gpr_log(GPR_INFO, "%s/%s", test_name, config.name);
+ f = config.create_fixture(client_args, server_args);
+ config.init_server(&f, server_args);
+ config.init_client(&f, client_args);
+ return f;
+}
+
+static gpr_timespec n_seconds_time(int n) {
+ return GRPC_TIMEOUT_SECONDS_TO_DEADLINE(n);
+}
+
+static gpr_timespec five_seconds_time(void) { return n_seconds_time(5); }
+
+static void drain_cq(grpc_completion_queue *cq) {
+ grpc_event ev;
+ do {
+ ev = grpc_completion_queue_next(cq, five_seconds_time(), NULL);
+ } while (ev.type != GRPC_QUEUE_SHUTDOWN);
+}
+
+static void shutdown_server(grpc_end2end_test_fixture *f) {
+ if (!f->server) return;
+ grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000));
+ GPR_ASSERT(grpc_completion_queue_pluck(
+ f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL)
+ .type == GRPC_OP_COMPLETE);
+ grpc_server_destroy(f->server);
+ f->server = NULL;
+}
+
+static void shutdown_client(grpc_end2end_test_fixture *f) {
+ if (!f->client) return;
+ grpc_channel_destroy(f->client);
+ f->client = NULL;
+}
+
+static void end_test(grpc_end2end_test_fixture *f) {
+ shutdown_server(f);
+ shutdown_client(f);
+
+ grpc_completion_queue_shutdown(f->cq);
+ drain_cq(f->cq);
+ grpc_completion_queue_destroy(f->cq);
+}
+
+/* Request/response with metadata and payload.*/
+static void test_cacheable_request_response_with_metadata_and_payload(
+ grpc_end2end_test_config config) {
+ grpc_call *c;
+ grpc_call *s;
+ gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world");
+ gpr_slice response_payload_slice = gpr_slice_from_copied_string("hello you");
+ grpc_byte_buffer *request_payload =
+ grpc_raw_byte_buffer_create(&request_payload_slice, 1);
+ grpc_byte_buffer *response_payload =
+ grpc_raw_byte_buffer_create(&response_payload_slice, 1);
+ gpr_timespec deadline = five_seconds_time();
+ grpc_metadata meta_c[2] = {
+ {"key1", "val1", 4, 0, {{NULL, NULL, NULL, NULL}}},
+ {"key2", "val2", 4, 0, {{NULL, NULL, NULL, NULL}}}};
+ grpc_metadata meta_s[2] = {
+ {"key3", "val3", 4, 0, {{NULL, NULL, NULL, NULL}}},
+ {"key4", "val4", 4, 0, {{NULL, NULL, NULL, NULL}}}};
+ grpc_end2end_test_fixture f = begin_test(
+ config, "test_cacheable_request_response_with_metadata_and_payload", NULL,
+ NULL);
+ cq_verifier *cqv = cq_verifier_create(f.cq);
+ grpc_op ops[6];
+ grpc_op *op;
+ grpc_metadata_array initial_metadata_recv;
+ grpc_metadata_array trailing_metadata_recv;
+ grpc_metadata_array request_metadata_recv;
+ grpc_byte_buffer *request_payload_recv = NULL;
+ grpc_byte_buffer *response_payload_recv = NULL;
+ grpc_call_details call_details;
+ grpc_status_code status;
+ grpc_call_error error;
+ char *details = NULL;
+ size_t details_capacity = 0;
+ int was_cancelled = 2;
+
+ c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
+ "/foo", "foo.test.google.fr", deadline, NULL);
+ GPR_ASSERT(c);
+
+ grpc_metadata_array_init(&initial_metadata_recv);
+ grpc_metadata_array_init(&trailing_metadata_recv);
+ grpc_metadata_array_init(&request_metadata_recv);
+ grpc_call_details_init(&call_details);
+
+ memset(ops, 0, sizeof(ops));
+ op = ops;
+ op->op = GRPC_OP_SEND_INITIAL_METADATA;
+ op->data.send_initial_metadata.count = 2;
+ op->data.send_initial_metadata.metadata = meta_c;
+ op->flags = GRPC_INITIAL_METADATA_CACHEABLE_REQUEST;
+ op->reserved = NULL;
+ op++;
+ op->op = GRPC_OP_SEND_MESSAGE;
+ op->data.send_message = request_payload;
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT;
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ op->op = GRPC_OP_RECV_INITIAL_METADATA;
+ op->data.recv_initial_metadata = &initial_metadata_recv;
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ op->op = GRPC_OP_RECV_MESSAGE;
+ op->data.recv_message = &response_payload_recv;
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ op->op = GRPC_OP_RECV_STATUS_ON_CLIENT;
+ op->data.recv_status_on_client.trailing_metadata = &trailing_metadata_recv;
+ op->data.recv_status_on_client.status = &status;
+ op->data.recv_status_on_client.status_details = &details;
+ op->data.recv_status_on_client.status_details_capacity = &details_capacity;
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(1), NULL);
+ GPR_ASSERT(GRPC_CALL_OK == error);
+
+ error =
+ grpc_server_request_call(f.server, &s, &call_details,
+ &request_metadata_recv, f.cq, f.cq, tag(101));
+ GPR_ASSERT(GRPC_CALL_OK == error);
+ CQ_EXPECT_COMPLETION(cqv, tag(101), 1);
+ cq_verify(cqv);
+
+ memset(ops, 0, sizeof(ops));
+ op = ops;
+ op->op = GRPC_OP_SEND_INITIAL_METADATA;
+ op->data.send_initial_metadata.count = 2;
+ op->data.send_initial_metadata.metadata = meta_s;
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ op->op = GRPC_OP_RECV_MESSAGE;
+ op->data.recv_message = &request_payload_recv;
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), NULL);
+ GPR_ASSERT(GRPC_CALL_OK == error);
+
+ CQ_EXPECT_COMPLETION(cqv, tag(102), 1);
+ cq_verify(cqv);
+
+ memset(ops, 0, sizeof(ops));
+ op = ops;
+ op->op = GRPC_OP_RECV_CLOSE_ON_SERVER;
+ op->data.recv_close_on_server.cancelled = &was_cancelled;
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ op->op = GRPC_OP_SEND_MESSAGE;
+ op->data.send_message = response_payload;
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ op->op = GRPC_OP_SEND_STATUS_FROM_SERVER;
+ op->data.send_status_from_server.trailing_metadata_count = 0;
+ op->data.send_status_from_server.status = GRPC_STATUS_OK;
+ op->data.send_status_from_server.status_details = "xyz";
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(103), NULL);
+ GPR_ASSERT(GRPC_CALL_OK == error);
+
+ CQ_EXPECT_COMPLETION(cqv, tag(103), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
+ cq_verify(cqv);
+
+ GPR_ASSERT(status == GRPC_STATUS_OK);
+ GPR_ASSERT(0 == strcmp(details, "xyz"));
+ GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
+ GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr"));
+ if (config.feature_mask & FEATURE_MASK_SUPPORTS_REQUEST_PROXYING) {
+ // Our simple proxy does not support cacheable requests
+ } else {
+ GPR_ASSERT(GRPC_INITIAL_METADATA_CACHEABLE_REQUEST & call_details.flags);
+ }
+ GPR_ASSERT(was_cancelled == 0);
+ GPR_ASSERT(byte_buffer_eq_string(request_payload_recv, "hello world"));
+ GPR_ASSERT(byte_buffer_eq_string(response_payload_recv, "hello you"));
+ GPR_ASSERT(contains_metadata(&request_metadata_recv, "key1", "val1"));
+ GPR_ASSERT(contains_metadata(&request_metadata_recv, "key2", "val2"));
+ GPR_ASSERT(contains_metadata(&initial_metadata_recv, "key3", "val3"));
+ GPR_ASSERT(contains_metadata(&initial_metadata_recv, "key4", "val4"));
+
+ gpr_free(details);
+ grpc_metadata_array_destroy(&initial_metadata_recv);
+ grpc_metadata_array_destroy(&trailing_metadata_recv);
+ grpc_metadata_array_destroy(&request_metadata_recv);
+ grpc_call_details_destroy(&call_details);
+
+ grpc_call_destroy(c);
+ grpc_call_destroy(s);
+
+ cq_verifier_destroy(cqv);
+
+ grpc_byte_buffer_destroy(request_payload);
+ grpc_byte_buffer_destroy(response_payload);
+ grpc_byte_buffer_destroy(request_payload_recv);
+ grpc_byte_buffer_destroy(response_payload_recv);
+
+ end_test(&f);
+ config.tear_down_data(&f);
+}
+
+void simple_cacheable_request(grpc_end2end_test_config config) {
+ test_cacheable_request_response_with_metadata_and_payload(config);
+}
+
+void simple_cacheable_request_pre_init(void) {}
diff --git a/test/core/end2end/tests/simple_delayed_request.c b/test/core/end2end/tests/simple_delayed_request.c
index e1fcc035bb..74f1232d78 100644
--- a/test/core/end2end/tests/simple_delayed_request.c
+++ b/test/core/end2end/tests/simple_delayed_request.c
@@ -43,8 +43,6 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
-enum { TIMEOUT = 200000 };
-
static void *tag(intptr_t t) { return (void *)t; }
static gpr_timespec n_seconds_time(int n) {
@@ -150,7 +148,7 @@ static void simple_delayed_request_body(grpc_end2end_test_config config,
grpc_server_request_call(f->server, &s, &call_details,
&request_metadata_recv, f->cq, f->cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(101), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(101), 1);
cq_verify(cqv);
memset(ops, 0, sizeof(ops));
@@ -175,8 +173,8 @@ static void simple_delayed_request_body(grpc_end2end_test_config config,
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(102), 1);
- cq_expect_completion(cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(102), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
cq_verify(cqv);
GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED);
diff --git a/test/core/end2end/tests/simple_metadata.c b/test/core/end2end/tests/simple_metadata.c
index c9b1a03da5..13c77c033e 100644
--- a/test/core/end2end/tests/simple_metadata.c
+++ b/test/core/end2end/tests/simple_metadata.c
@@ -43,8 +43,6 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
-enum { TIMEOUT = 200000 };
-
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@@ -183,7 +181,7 @@ static void test_request_response_with_metadata_and_payload(
grpc_server_request_call(f.server, &s, &call_details,
&request_metadata_recv, f.cq, f.cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(101), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(101), 1);
cq_verify(cqv);
memset(ops, 0, sizeof(ops));
@@ -202,7 +200,7 @@ static void test_request_response_with_metadata_and_payload(
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(102), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(102), 1);
cq_verify(cqv);
memset(ops, 0, sizeof(ops));
@@ -227,8 +225,8 @@ static void test_request_response_with_metadata_and_payload(
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(103), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(103), 1);
- cq_expect_completion(cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(103), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
cq_verify(cqv);
GPR_ASSERT(status == GRPC_STATUS_OK);
diff --git a/test/core/end2end/tests/simple_request.c b/test/core/end2end/tests/simple_request.c
index a8014e6894..ed7b850808 100644
--- a/test/core/end2end/tests/simple_request.c
+++ b/test/core/end2end/tests/simple_request.c
@@ -45,8 +45,6 @@
#include "src/core/lib/support/string.h"
#include "test/core/end2end/cq_verifier.h"
-enum { TIMEOUT = 200000 };
-
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@@ -163,7 +161,7 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
grpc_server_request_call(f.server, &s, &call_details,
&request_metadata_recv, f.cq, f.cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(101), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(101), 1);
cq_verify(cqv);
peer = grpc_call_get_peer(s);
@@ -197,8 +195,8 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(102), 1);
- cq_expect_completion(cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(102), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
cq_verify(cqv);
GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED);
diff --git a/test/core/end2end/tests/streaming_error_response.c b/test/core/end2end/tests/streaming_error_response.c
index e15c132d63..8285468321 100644
--- a/test/core/end2end/tests/streaming_error_response.c
+++ b/test/core/end2end/tests/streaming_error_response.c
@@ -43,8 +43,6 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
-enum { TIMEOUT = 200000 };
-
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@@ -163,7 +161,7 @@ static void test(grpc_end2end_test_config config, bool request_status_early) {
GPR_ASSERT(GRPC_CALL_OK == grpc_server_request_call(
f.server, &s, &call_details,
&request_metadata_recv, f.cq, f.cq, tag(101)));
- cq_expect_completion(cqv, tag(101), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(101), 1);
cq_verify(cqv);
memset(ops, 0, sizeof(ops));
@@ -177,7 +175,7 @@ static void test(grpc_end2end_test_config config, bool request_status_early) {
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(102), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(102), 1);
cq_verify(cqv);
memset(ops, 0, sizeof(ops));
@@ -188,9 +186,9 @@ static void test(grpc_end2end_test_config config, bool request_status_early) {
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(103), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(103), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(103), 1);
if (!request_status_early) {
- cq_expect_completion(cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
}
cq_verify(cqv);
@@ -217,11 +215,11 @@ static void test(grpc_end2end_test_config config, bool request_status_early) {
GPR_ASSERT(GRPC_CALL_OK == error);
}
- cq_expect_completion(cqv, tag(104), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(104), 1);
if (request_status_early) {
- cq_expect_completion(cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
} else {
- cq_expect_completion(cqv, tag(2), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(2), 1);
}
cq_verify(cqv);
@@ -237,7 +235,7 @@ static void test(grpc_end2end_test_config config, bool request_status_early) {
error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(3), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(3), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(3), 1);
cq_verify(cqv);
GPR_ASSERT(response_payload1_recv != NULL);
diff --git a/test/core/end2end/tests/trailing_metadata.c b/test/core/end2end/tests/trailing_metadata.c
index 41e0f00911..d7093ae723 100644
--- a/test/core/end2end/tests/trailing_metadata.c
+++ b/test/core/end2end/tests/trailing_metadata.c
@@ -43,8 +43,6 @@
#include <grpc/support/useful.h>
#include "test/core/end2end/cq_verifier.h"
-enum { TIMEOUT = 200000 };
-
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
@@ -186,7 +184,7 @@ static void test_request_response_with_metadata_and_payload(
grpc_server_request_call(f.server, &s, &call_details,
&request_metadata_recv, f.cq, f.cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(101), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(101), 1);
cq_verify(cqv);
memset(ops, 0, sizeof(ops));
@@ -205,7 +203,7 @@ static void test_request_response_with_metadata_and_payload(
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(102), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(102), 1);
cq_verify(cqv);
memset(ops, 0, sizeof(ops));
@@ -231,8 +229,8 @@ static void test_request_response_with_metadata_and_payload(
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(103), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(103), 1);
- cq_expect_completion(cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(103), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
cq_verify(cqv);
GPR_ASSERT(status == GRPC_STATUS_OK);
diff --git a/test/core/support/percent_decode_corpus/04cb8ccc553f9b2f5e52c421aff6d1c954d3dae6 b/test/core/support/percent_decode_corpus/04cb8ccc553f9b2f5e52c421aff6d1c954d3dae6
new file mode 100644
index 0000000000..a0c7605580
--- /dev/null
+++ b/test/core/support/percent_decode_corpus/04cb8ccc553f9b2f5e52c421aff6d1c954d3dae6
@@ -0,0 +1 @@
+:Ê%cE'yzŠ \ No newline at end of file
diff --git a/test/core/support/percent_decode_corpus/0dd8f3a63745b3a2d39791559b5c1b311447b537 b/test/core/support/percent_decode_corpus/0dd8f3a63745b3a2d39791559b5c1b311447b537
new file mode 100644
index 0000000000..8b36124b3f
--- /dev/null
+++ b/test/core/support/percent_decode_corpus/0dd8f3a63745b3a2d39791559b5c1b311447b537
@@ -0,0 +1 @@
+x;x_%C88 \ No newline at end of file
diff --git a/test/core/support/percent_decode_corpus/17eeaca784409adbe43365c32ac87915d736bba3 b/test/core/support/percent_decode_corpus/17eeaca784409adbe43365c32ac87915d736bba3
new file mode 100644
index 0000000000..ea02afac49
--- /dev/null
+++ b/test/core/support/percent_decode_corpus/17eeaca784409adbe43365c32ac87915d736bba3
@@ -0,0 +1,2 @@
+xxyyz%øyzŠ[zxy'z
+
diff --git a/test/core/support/percent_decode_corpus/2040c1ff65f52a7ae668c2c8f324de5dacc9d695 b/test/core/support/percent_decode_corpus/2040c1ff65f52a7ae668c2c8f324de5dacc9d695
new file mode 100644
index 0000000000..9e9b466b2f
--- /dev/null
+++ b/test/core/support/percent_decode_corpus/2040c1ff65f52a7ae668c2c8f324de5dacc9d695
@@ -0,0 +1 @@
+xx;x_%;:Ê%C)x_%C88c8E'yzŠ8 \ No newline at end of file
diff --git a/test/core/support/percent_decode_corpus/26b0d1da23027ae54db96e125e4a9e98842d77fb b/test/core/support/percent_decode_corpus/26b0d1da23027ae54db96e125e4a9e98842d77fb
new file mode 100644
index 0000000000..88c739ecaa
--- /dev/null
+++ b/test/core/support/percent_decode_corpus/26b0d1da23027ae54db96e125e4a9e98842d77fb
@@ -0,0 +1 @@
+))'x;x_%C88xy(Pyz) \ No newline at end of file
diff --git a/test/core/support/percent_decode_corpus/2a089c0db45acdb4c6ed8e7ff81ca7235792c0b9 b/test/core/support/percent_decode_corpus/2a089c0db45acdb4c6ed8e7ff81ca7235792c0b9
new file mode 100644
index 0000000000..5e6f546ff5
--- /dev/null
+++ b/test/core/support/percent_decode_corpus/2a089c0db45acdb4c6ed8e7ff81ca7235792c0b9
@@ -0,0 +1 @@
+_x;x)x;x_x;x_%88%8888: \ No newline at end of file
diff --git a/test/core/support/percent_decode_corpus/35b7b3bc3a740d5c3abca0d75b53f0e1e1ee998a b/test/core/support/percent_decode_corpus/35b7b3bc3a740d5c3abca0d75b53f0e1e1ee998a
new file mode 100644
index 0000000000..71d688b694
--- /dev/null
+++ b/test/core/support/percent_decode_corpus/35b7b3bc3a740d5c3abca0d75b53f0e1e1ee998a
@@ -0,0 +1 @@
+x8 \ No newline at end of file
diff --git a/test/core/support/percent_decode_corpus/36367ba1adba47a1cbc3a88707fde8cc7abdc248 b/test/core/support/percent_decode_corpus/36367ba1adba47a1cbc3a88707fde8cc7abdc248
new file mode 100644
index 0000000000..5a89a07ba7
--- /dev/null
+++ b/test/core/support/percent_decode_corpus/36367ba1adba47a1cbc3a88707fde8cc7abdc248
@@ -0,0 +1 @@
+x);x(_%88x;x_%88 \ No newline at end of file
diff --git a/test/core/support/percent_decode_corpus/39c2ba51548a0beaf0d6d1164531f1447dc311b5 b/test/core/support/percent_decode_corpus/39c2ba51548a0beaf0d6d1164531f1447dc311b5
new file mode 100644
index 0000000000..cfa2be994f
--- /dev/null
+++ b/test/core/support/percent_decode_corpus/39c2ba51548a0beaf0d6d1164531f1447dc311b5
@@ -0,0 +1 @@
+)x;x_x;x_%88%88: \ No newline at end of file
diff --git a/test/core/support/percent_decode_corpus/56d08fea787c041395c6697ce26cfbc0decbe688 b/test/core/support/percent_decode_corpus/56d08fea787c041395c6697ce26cfbc0decbe688
new file mode 100644
index 0000000000..c1ddf65acd
--- /dev/null
+++ b/test/core/support/percent_decode_corpus/56d08fea787c041395c6697ce26cfbc0decbe688
@@ -0,0 +1 @@
+%cyzŠ \ No newline at end of file
diff --git a/test/core/support/percent_decode_corpus/678d981fdabb9f0d6640235cf1719dd1e1e66ae9 b/test/core/support/percent_decode_corpus/678d981fdabb9f0d6640235cf1719dd1e1e66ae9
new file mode 100644
index 0000000000..dc427d1e12
--- /dev/null
+++ b/test/core/support/percent_decode_corpus/678d981fdabb9f0d6640235cf1719dd1e1e66ae9
@@ -0,0 +1 @@
+%øyzŠ \ No newline at end of file
diff --git a/test/core/support/percent_decode_corpus/68751961609ec010565de0aa87521dcbf0722c5d b/test/core/support/percent_decode_corpus/68751961609ec010565de0aa87521dcbf0722c5d
new file mode 100644
index 0000000000..154449d0ef
--- /dev/null
+++ b/test/core/support/percent_decode_corpus/68751961609ec010565de0aa87521dcbf0722c5d
@@ -0,0 +1 @@
+Ê:%Ec \ No newline at end of file
diff --git a/test/core/support/percent_decode_corpus/7875c06c6f03c9aa2f8e9c59f8d8957c8a32e759 b/test/core/support/percent_decode_corpus/7875c06c6f03c9aa2f8e9c59f8d8957c8a32e759
new file mode 100644
index 0000000000..841ced83c3
--- /dev/null
+++ b/test/core/support/percent_decode_corpus/7875c06c6f03c9aa2f8e9c59f8d8957c8a32e759
@@ -0,0 +1,2 @@
+xxyyz!úyzŠ[zxy'zyz
diff --git a/test/core/support/percent_decode_corpus/7b302090e090a5829b6d1dd7be30bd4e36a7e60f b/test/core/support/percent_decode_corpus/7b302090e090a5829b6d1dd7be30bd4e36a7e60f
new file mode 100644
index 0000000000..6790bc2798
--- /dev/null
+++ b/test/core/support/percent_decode_corpus/7b302090e090a5829b6d1dd7be30bd4e36a7e60f
@@ -0,0 +1 @@
+x;:Ê%)x_%C8cE'yzŠ8 \ No newline at end of file
diff --git a/test/core/support/percent_decode_corpus/875e1022169c9e4c541a9ad894e69e989df22ba1 b/test/core/support/percent_decode_corpus/875e1022169c9e4c541a9ad894e69e989df22ba1
new file mode 100644
index 0000000000..1625d0a1ae
--- /dev/null
+++ b/test/core/support/percent_decode_corpus/875e1022169c9e4c541a9ad894e69e989df22ba1
@@ -0,0 +1 @@
+x;x_%88 \ No newline at end of file
diff --git a/test/core/support/percent_decode_corpus/8c1051ce066f5a26de9a9d133180621d0da957b4 b/test/core/support/percent_decode_corpus/8c1051ce066f5a26de9a9d133180621d0da957b4
new file mode 100644
index 0000000000..125c330b3e
--- /dev/null
+++ b/test/core/support/percent_decode_corpus/8c1051ce066f5a26de9a9d133180621d0da957b4
@@ -0,0 +1 @@
+)))'x;x_%C88)'x;x_%C89xyyzxyyz) \ No newline at end of file
diff --git a/test/core/support/percent_decode_corpus/8e084e628ab83a18ac7ca7cb3506525263655c63 b/test/core/support/percent_decode_corpus/8e084e628ab83a18ac7ca7cb3506525263655c63
new file mode 100644
index 0000000000..6e6f08cb07
--- /dev/null
+++ b/test/core/support/percent_decode_corpus/8e084e628ab83a18ac7ca7cb3506525263655c63
@@ -0,0 +1 @@
+))'x;x_%C88xyyz) \ No newline at end of file
diff --git a/test/core/support/percent_decode_corpus/9d316c4675f40ddccaf8f1cc7aea94170b1e4223 b/test/core/support/percent_decode_corpus/9d316c4675f40ddccaf8f1cc7aea94170b1e4223
new file mode 100644
index 0000000000..ab4a1c7657
--- /dev/null
+++ b/test/core/support/percent_decode_corpus/9d316c4675f40ddccaf8f1cc7aea94170b1e4223
@@ -0,0 +1 @@
+x%8 \ No newline at end of file
diff --git a/test/core/support/percent_decode_corpus/ad1c7c11d18a7d116e2c2ef4d4c5afb1270836ae b/test/core/support/percent_decode_corpus/ad1c7c11d18a7d116e2c2ef4d4c5afb1270836ae
new file mode 100644
index 0000000000..4ac1945a84
--- /dev/null
+++ b/test/core/support/percent_decode_corpus/ad1c7c11d18a7d116e2c2ef4d4c5afb1270836ae
@@ -0,0 +1 @@
+x);x(_%88x;x_xxyyz \ No newline at end of file
diff --git a/test/core/support/percent_decode_corpus/b471f94aa4facf502e622e4a248f1ba4063ae681 b/test/core/support/percent_decode_corpus/b471f94aa4facf502e622e4a248f1ba4063ae681
new file mode 100644
index 0000000000..5c673ae28a
--- /dev/null
+++ b/test/core/support/percent_decode_corpus/b471f94aa4facf502e622e4a248f1ba4063ae681
@@ -0,0 +1 @@
+Ê%ccyzyzŠ \ No newline at end of file
diff --git a/test/core/support/percent_decode_corpus/bf52ece030f16136d46e0dc97f58d60a0d8a1f0b b/test/core/support/percent_decode_corpus/bf52ece030f16136d46e0dc97f58d60a0d8a1f0b
new file mode 100644
index 0000000000..e478275ed4
--- /dev/null
+++ b/test/core/support/percent_decode_corpus/bf52ece030f16136d46e0dc97f58d60a0d8a1f0b
@@ -0,0 +1,2 @@
+)'xyyz!úyzŠ[zxÊ%ccyzyzy'z*zŠ
diff --git a/test/core/support/percent_decode_corpus/d5b2a7177339ba2b7ce2f60e5f4459bef1e72758 b/test/core/support/percent_decode_corpus/d5b2a7177339ba2b7ce2f60e5f4459bef1e72758
new file mode 100644
index 0000000000..c73cbfe8af
--- /dev/null
+++ b/test/core/support/percent_decode_corpus/d5b2a7177339ba2b7ce2f60e5f4459bef1e72758
@@ -0,0 +1,2 @@
+)'xyyz)úyzŠ[zxÊ%cCyzyzy'z*zŠ
diff --git a/test/core/support/percent_decode_corpus/de867b64c54a7ed773dc611fc5cd2f17c5433113 b/test/core/support/percent_decode_corpus/de867b64c54a7ed773dc611fc5cd2f17c5433113
new file mode 100644
index 0000000000..f9f7246e9c
--- /dev/null
+++ b/test/core/support/percent_decode_corpus/de867b64c54a7ed773dc611fc5cd2f17c5433113
@@ -0,0 +1,2 @@
+xxyyz%%øyzŠ[zxy'zyz
diff --git a/test/core/support/percent_decode_corpus/e3948dbe004950591630dd5c52f4e0fcbd5e388a b/test/core/support/percent_decode_corpus/e3948dbe004950591630dd5c52f4e0fcbd5e388a
new file mode 100644
index 0000000000..83ac46d833
--- /dev/null
+++ b/test/core/support/percent_decode_corpus/e3948dbe004950591630dd5c52f4e0fcbd5e388a
@@ -0,0 +1 @@
+Ê:%Dx;:Ê%)x_%C8cc \ No newline at end of file
diff --git a/test/core/support/percent_decode_corpus/e7064f0b80f61dbc65915311032d27baa569ae2a b/test/core/support/percent_decode_corpus/e7064f0b80f61dbc65915311032d27baa569ae2a
new file mode 100644
index 0000000000..e8a0f87653
--- /dev/null
+++ b/test/core/support/percent_decode_corpus/e7064f0b80f61dbc65915311032d27baa569ae2a
@@ -0,0 +1 @@
+) \ No newline at end of file
diff --git a/test/core/support/percent_decode_corpus/xyz b/test/core/support/percent_decode_corpus/xyz
new file mode 100644
index 0000000000..cd470e6190
--- /dev/null
+++ b/test/core/support/percent_decode_corpus/xyz
@@ -0,0 +1 @@
+xyz
diff --git a/test/core/support/percent_decode_fuzzer.c b/test/core/support/percent_decode_fuzzer.c
new file mode 100644
index 0000000000..3e02980e05
--- /dev/null
+++ b/test/core/support/percent_decode_fuzzer.c
@@ -0,0 +1,66 @@
+/*
+ *
+ * Copyright 2016, Google Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#include <stdbool.h>
+#include <stdint.h>
+#include <string.h>
+
+#include <grpc/support/alloc.h>
+#include <grpc/support/log.h>
+
+#include "src/core/lib/support/percent_encoding.h"
+#include "test/core/util/memory_counters.h"
+
+bool squelch = true;
+bool leak_check = true;
+
+int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
+ struct grpc_memory_counters counters;
+ grpc_memory_counters_init();
+ gpr_slice input = gpr_slice_from_copied_buffer((const char *)data, size);
+ gpr_slice output;
+ if (gpr_strict_percent_decode_slice(
+ input, gpr_url_percent_encoding_unreserved_bytes, &output)) {
+ gpr_slice_unref(output);
+ }
+ if (gpr_strict_percent_decode_slice(
+ input, gpr_compatible_percent_encoding_unreserved_bytes, &output)) {
+ gpr_slice_unref(output);
+ }
+ gpr_slice_unref(gpr_permissive_percent_decode_slice(input));
+ gpr_slice_unref(input);
+ counters = grpc_memory_counters_snapshot();
+ grpc_memory_counters_destroy();
+ GPR_ASSERT(counters.total_size_relative == 0);
+ return 0;
+}
diff --git a/test/core/support/percent_encode_corpus/0d3ee7fa54e6c66103965fd4409b044ba7db6c3f b/test/core/support/percent_encode_corpus/0d3ee7fa54e6c66103965fd4409b044ba7db6c3f
new file mode 100644
index 0000000000..d09c4a039c
--- /dev/null
+++ b/test/core/support/percent_encode_corpus/0d3ee7fa54e6c66103965fd4409b044ba7db6c3f
@@ -0,0 +1,3 @@
+_x;7y
+xyz')S)xy-zý
+Æ* \ No newline at end of file
diff --git a/test/core/support/percent_encode_corpus/2e7ccf75e27b9501e3b28cf1c50ed0c45ab7c226 b/test/core/support/percent_encode_corpus/2e7ccf75e27b9501e3b28cf1c50ed0c45ab7c226
new file mode 100644
index 0000000000..4d0c38d0e2
--- /dev/null
+++ b/test/core/support/percent_encode_corpus/2e7ccf75e27b9501e3b28cf1c50ed0c45ab7c226
@@ -0,0 +1 @@
+xyx \ No newline at end of file
diff --git a/test/core/support/percent_encode_corpus/55bb859f3942c462b03b7cbcf22ab4a0ac9705cf b/test/core/support/percent_encode_corpus/55bb859f3942c462b03b7cbcf22ab4a0ac9705cf
new file mode 100644
index 0000000000..fc6e93342a
--- /dev/null
+++ b/test/core/support/percent_encode_corpus/55bb859f3942c462b03b7cbcf22ab4a0ac9705cf
@@ -0,0 +1 @@
+.yx.yxxxyzxyyzxy \ No newline at end of file
diff --git a/test/core/support/percent_encode_corpus/56070cecd54c845b6d4334953b17b712eb000d93 b/test/core/support/percent_encode_corpus/56070cecd54c845b6d4334953b17b712eb000d93
new file mode 100644
index 0000000000..6823c73f76
--- /dev/null
+++ b/test/core/support/percent_encode_corpus/56070cecd54c845b6d4334953b17b712eb000d93
@@ -0,0 +1 @@
+xyrxyxyzxxyzxyzxyxyy \ No newline at end of file
diff --git a/test/core/support/percent_encode_corpus/61f50e891bf7ff5eb7a7af206f1e25d77f8756e7 b/test/core/support/percent_encode_corpus/61f50e891bf7ff5eb7a7af206f1e25d77f8756e7
new file mode 100644
index 0000000000..a65cbb4d5b
--- /dev/null
+++ b/test/core/support/percent_encode_corpus/61f50e891bf7ff5eb7a7af206f1e25d77f8756e7
@@ -0,0 +1,3 @@
+xy
+xyz
+)S-Æþ \ No newline at end of file
diff --git a/test/core/support/percent_encode_corpus/6e0c60cefc704c7940e475a87dd9ae423061cb5a b/test/core/support/percent_encode_corpus/6e0c60cefc704c7940e475a87dd9ae423061cb5a
new file mode 100644
index 0000000000..8d031d7e2d
--- /dev/null
+++ b/test/core/support/percent_encode_corpus/6e0c60cefc704c7940e475a87dd9ae423061cb5a
@@ -0,0 +1,3 @@
+xy
+xyz
+)S)Æ* \ No newline at end of file
diff --git a/test/core/support/percent_encode_corpus/7271ebcc6d22a0f186f7bc3c1973a7ed1bec8d8e b/test/core/support/percent_encode_corpus/7271ebcc6d22a0f186f7bc3c1973a7ed1bec8d8e
new file mode 100644
index 0000000000..4d82ca3953
--- /dev/null
+++ b/test/core/support/percent_encode_corpus/7271ebcc6d22a0f186f7bc3c1973a7ed1bec8d8e
@@ -0,0 +1,4 @@
+x;7y
+xyz
+)S)xyz
+Æ* \ No newline at end of file
diff --git a/test/core/support/percent_encode_corpus/74c83ece3e2920a67593a9be9c82468f16cbb969 b/test/core/support/percent_encode_corpus/74c83ece3e2920a67593a9be9c82468f16cbb969
new file mode 100644
index 0000000000..bb7f4ae07e
--- /dev/null
+++ b/test/core/support/percent_encode_corpus/74c83ece3e2920a67593a9be9c82468f16cbb969
@@ -0,0 +1 @@
+xyzxy \ No newline at end of file
diff --git a/test/core/support/percent_encode_corpus/98e004fd2a9f141a7a019720820080e12d637c06 b/test/core/support/percent_encode_corpus/98e004fd2a9f141a7a019720820080e12d637c06
new file mode 100644
index 0000000000..50879d0f37
--- /dev/null
+++ b/test/core/support/percent_encode_corpus/98e004fd2a9f141a7a019720820080e12d637c06
@@ -0,0 +1,3 @@
+xy
+xz
+)Sxy-Æzx_yþ \ No newline at end of file
diff --git a/test/core/support/percent_encode_corpus/ba2c1e98227aa21ea3bb2ca4d0e504119717da8b b/test/core/support/percent_encode_corpus/ba2c1e98227aa21ea3bb2ca4d0e504119717da8b
new file mode 100644
index 0000000000..dc1ab9bfc2
--- /dev/null
+++ b/test/core/support/percent_encode_corpus/ba2c1e98227aa21ea3bb2ca4d0e504119717da8b
@@ -0,0 +1,3 @@
+_x;7y
+xyz')S)xyz
+Æ* \ No newline at end of file
diff --git a/test/core/support/percent_encode_corpus/c16b9fd45370d4afb5d3ebd307a6e263c25ffd45 b/test/core/support/percent_encode_corpus/c16b9fd45370d4afb5d3ebd307a6e263c25ffd45
new file mode 100644
index 0000000000..3476e0b70b
--- /dev/null
+++ b/test/core/support/percent_encode_corpus/c16b9fd45370d4afb5d3ebd307a6e263c25ffd45
@@ -0,0 +1,2 @@
+xyz
+)S \ No newline at end of file
diff --git a/test/core/support/percent_encode_corpus/d58c3cd4eab9b6d2343abfa1c25c90a383fe0ec3 b/test/core/support/percent_encode_corpus/d58c3cd4eab9b6d2343abfa1c25c90a383fe0ec3
new file mode 100644
index 0000000000..822d50abf8
--- /dev/null
+++ b/test/core/support/percent_encode_corpus/d58c3cd4eab9b6d2343abfa1c25c90a383fe0ec3
@@ -0,0 +1 @@
+.yx \ No newline at end of file
diff --git a/test/core/support/percent_encode_corpus/e2619218ede30d2b7b8ecd601a9f0ae754b728b4 b/test/core/support/percent_encode_corpus/e2619218ede30d2b7b8ecd601a9f0ae754b728b4
new file mode 100644
index 0000000000..101639c93d
--- /dev/null
+++ b/test/core/support/percent_encode_corpus/e2619218ede30d2b7b8ecd601a9f0ae754b728b4
@@ -0,0 +1,4 @@
+x;y
+xyz
+)S)xyz
+Æ* \ No newline at end of file
diff --git a/test/core/support/percent_encode_corpus/f93b3653e453f0e3eea3198001be6ce46e64bd21 b/test/core/support/percent_encode_corpus/f93b3653e453f0e3eea3198001be6ce46e64bd21
new file mode 100644
index 0000000000..6e07ab342f
--- /dev/null
+++ b/test/core/support/percent_encode_corpus/f93b3653e453f0e3eea3198001be6ce46e64bd21
@@ -0,0 +1,5 @@
+x;y
+xøyz
+)S)xyz
+Æ.y~
+)S \ No newline at end of file
diff --git a/test/core/support/percent_encode_corpus/fd41d029c7682ad3d1c40a9fd017a4c85b673a54 b/test/core/support/percent_encode_corpus/fd41d029c7682ad3d1c40a9fd017a4c85b673a54
new file mode 100644
index 0000000000..13d7fab596
--- /dev/null
+++ b/test/core/support/percent_encode_corpus/fd41d029c7682ad3d1c40a9fd017a4c85b673a54
@@ -0,0 +1,3 @@
+xy
+xyz
+)S)S \ No newline at end of file
diff --git a/test/core/support/percent_encode_corpus/xyz b/test/core/support/percent_encode_corpus/xyz
new file mode 100644
index 0000000000..cd470e6190
--- /dev/null
+++ b/test/core/support/percent_encode_corpus/xyz
@@ -0,0 +1 @@
+xyz
diff --git a/test/core/support/percent_encode_fuzzer.c b/test/core/support/percent_encode_fuzzer.c
new file mode 100644
index 0000000000..c9548232b5
--- /dev/null
+++ b/test/core/support/percent_encode_fuzzer.c
@@ -0,0 +1,73 @@
+/*
+ *
+ * Copyright 2016, Google Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#include <stdbool.h>
+#include <stdint.h>
+#include <string.h>
+
+#include <grpc/support/alloc.h>
+#include <grpc/support/log.h>
+
+#include "src/core/lib/support/percent_encoding.h"
+#include "test/core/util/memory_counters.h"
+
+bool squelch = true;
+bool leak_check = true;
+
+static void test(const uint8_t *data, size_t size, const uint8_t *dict) {
+ struct grpc_memory_counters counters;
+ grpc_memory_counters_init();
+ gpr_slice input = gpr_slice_from_copied_buffer((const char *)data, size);
+ gpr_slice output = gpr_percent_encode_slice(input, dict);
+ gpr_slice decoded_output;
+ // encoder must always produce decodable output
+ GPR_ASSERT(gpr_strict_percent_decode_slice(output, dict, &decoded_output));
+ gpr_slice permissive_decoded_output =
+ gpr_permissive_percent_decode_slice(output);
+ // and decoded output must always match the input
+ GPR_ASSERT(gpr_slice_cmp(input, decoded_output) == 0);
+ GPR_ASSERT(gpr_slice_cmp(input, permissive_decoded_output) == 0);
+ gpr_slice_unref(input);
+ gpr_slice_unref(output);
+ gpr_slice_unref(decoded_output);
+ gpr_slice_unref(permissive_decoded_output);
+ counters = grpc_memory_counters_snapshot();
+ grpc_memory_counters_destroy();
+ GPR_ASSERT(counters.total_size_relative == 0);
+}
+
+int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
+ test(data, size, gpr_url_percent_encoding_unreserved_bytes);
+ test(data, size, gpr_compatible_percent_encoding_unreserved_bytes);
+ return 0;
+}
diff --git a/test/core/support/percent_encoding_test.c b/test/core/support/percent_encoding_test.c
new file mode 100644
index 0000000000..ab5f3f2d14
--- /dev/null
+++ b/test/core/support/percent_encoding_test.c
@@ -0,0 +1,157 @@
+/*
+ *
+ * Copyright 2016, Google Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#include "src/core/lib/support/percent_encoding.h"
+
+#include <grpc/support/alloc.h>
+#include <grpc/support/log.h>
+
+#include "src/core/lib/support/string.h"
+#include "test/core/util/test_config.h"
+
+#define TEST_VECTOR(raw, encoded, dict) \
+ test_vector(raw, sizeof(raw) - 1, encoded, sizeof(encoded) - 1, dict)
+
+#define TEST_NONCONFORMANT_VECTOR(encoded, permissive_unencoded, dict) \
+ test_nonconformant_vector(encoded, sizeof(encoded) - 1, \
+ permissive_unencoded, \
+ sizeof(permissive_unencoded) - 1, dict)
+
+static void test_vector(const char *raw, size_t raw_length, const char *encoded,
+ size_t encoded_length, const uint8_t *dict) {
+ char *raw_msg = gpr_dump(raw, raw_length, GPR_DUMP_HEX | GPR_DUMP_ASCII);
+ char *encoded_msg =
+ gpr_dump(encoded, encoded_length, GPR_DUMP_HEX | GPR_DUMP_ASCII);
+ gpr_log(GPR_DEBUG, "Trial:\nraw = %s\nencoded = %s", raw_msg, encoded_msg);
+ gpr_free(raw_msg);
+ gpr_free(encoded_msg);
+
+ gpr_slice raw_slice = gpr_slice_from_copied_buffer(raw, raw_length);
+ gpr_slice encoded_slice =
+ gpr_slice_from_copied_buffer(encoded, encoded_length);
+ gpr_slice raw2encoded_slice = gpr_percent_encode_slice(raw_slice, dict);
+ gpr_slice encoded2raw_slice;
+ GPR_ASSERT(
+ gpr_strict_percent_decode_slice(encoded_slice, dict, &encoded2raw_slice));
+ gpr_slice encoded2raw_permissive_slice =
+ gpr_permissive_percent_decode_slice(encoded_slice);
+
+ char *raw2encoded_msg =
+ gpr_dump_slice(raw2encoded_slice, GPR_DUMP_HEX | GPR_DUMP_ASCII);
+ char *encoded2raw_msg =
+ gpr_dump_slice(encoded2raw_slice, GPR_DUMP_HEX | GPR_DUMP_ASCII);
+ char *encoded2raw_permissive_msg = gpr_dump_slice(
+ encoded2raw_permissive_slice, GPR_DUMP_HEX | GPR_DUMP_ASCII);
+ gpr_log(GPR_DEBUG,
+ "Result:\nraw2encoded = %s\nencoded2raw = %s\nencoded2raw_permissive "
+ "= %s",
+ raw2encoded_msg, encoded2raw_msg, encoded2raw_permissive_msg);
+ gpr_free(raw2encoded_msg);
+ gpr_free(encoded2raw_msg);
+ gpr_free(encoded2raw_permissive_msg);
+
+ GPR_ASSERT(0 == gpr_slice_cmp(raw_slice, encoded2raw_slice));
+ GPR_ASSERT(0 == gpr_slice_cmp(raw_slice, encoded2raw_permissive_slice));
+ GPR_ASSERT(0 == gpr_slice_cmp(encoded_slice, raw2encoded_slice));
+
+ gpr_slice_unref(encoded2raw_slice);
+ gpr_slice_unref(encoded2raw_permissive_slice);
+ gpr_slice_unref(raw2encoded_slice);
+ gpr_slice_unref(raw_slice);
+ gpr_slice_unref(encoded_slice);
+}
+
+static void test_nonconformant_vector(const char *encoded,
+ size_t encoded_length,
+ const char *permissive_unencoded,
+ size_t permissive_unencoded_length,
+ const uint8_t *dict) {
+ char *permissive_unencoded_msg =
+ gpr_dump(permissive_unencoded, permissive_unencoded_length,
+ GPR_DUMP_HEX | GPR_DUMP_ASCII);
+ char *encoded_msg =
+ gpr_dump(encoded, encoded_length, GPR_DUMP_HEX | GPR_DUMP_ASCII);
+ gpr_log(GPR_DEBUG, "Trial:\nraw = %s\nencoded = %s", permissive_unencoded_msg,
+ encoded_msg);
+ gpr_free(permissive_unencoded_msg);
+ gpr_free(encoded_msg);
+
+ gpr_slice permissive_unencoded_slice = gpr_slice_from_copied_buffer(
+ permissive_unencoded, permissive_unencoded_length);
+ gpr_slice encoded_slice =
+ gpr_slice_from_copied_buffer(encoded, encoded_length);
+ gpr_slice encoded2raw_slice;
+ GPR_ASSERT(!gpr_strict_percent_decode_slice(encoded_slice, dict,
+ &encoded2raw_slice));
+ gpr_slice encoded2raw_permissive_slice =
+ gpr_permissive_percent_decode_slice(encoded_slice);
+
+ char *encoded2raw_permissive_msg = gpr_dump_slice(
+ encoded2raw_permissive_slice, GPR_DUMP_HEX | GPR_DUMP_ASCII);
+ gpr_log(GPR_DEBUG, "Result:\nencoded2raw_permissive = %s",
+ encoded2raw_permissive_msg);
+ gpr_free(encoded2raw_permissive_msg);
+
+ GPR_ASSERT(0 == gpr_slice_cmp(permissive_unencoded_slice,
+ encoded2raw_permissive_slice));
+
+ gpr_slice_unref(permissive_unencoded_slice);
+ gpr_slice_unref(encoded2raw_permissive_slice);
+ gpr_slice_unref(encoded_slice);
+}
+
+int main(int argc, char **argv) {
+ grpc_test_init(argc, argv);
+ TEST_VECTOR(
+ "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.~",
+ "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.~",
+ gpr_url_percent_encoding_unreserved_bytes);
+ TEST_VECTOR("\x00", "%00", gpr_url_percent_encoding_unreserved_bytes);
+ TEST_VECTOR("\x01", "%01", gpr_url_percent_encoding_unreserved_bytes);
+ TEST_VECTOR("a b", "a%20b", gpr_url_percent_encoding_unreserved_bytes);
+ TEST_VECTOR(" b", "%20b", gpr_url_percent_encoding_unreserved_bytes);
+ TEST_VECTOR("a b", "a b", gpr_compatible_percent_encoding_unreserved_bytes);
+ TEST_VECTOR(" b", " b", gpr_compatible_percent_encoding_unreserved_bytes);
+ TEST_VECTOR("\x0f", "%0F", gpr_url_percent_encoding_unreserved_bytes);
+ TEST_VECTOR("\xff", "%FF", gpr_url_percent_encoding_unreserved_bytes);
+ TEST_VECTOR("\xee", "%EE", gpr_url_percent_encoding_unreserved_bytes);
+ TEST_NONCONFORMANT_VECTOR("%", "%",
+ gpr_url_percent_encoding_unreserved_bytes);
+ TEST_NONCONFORMANT_VECTOR("%A", "%A",
+ gpr_url_percent_encoding_unreserved_bytes);
+ TEST_NONCONFORMANT_VECTOR("%AG", "%AG",
+ gpr_url_percent_encoding_unreserved_bytes);
+ TEST_NONCONFORMANT_VECTOR("\0", "\0",
+ gpr_url_percent_encoding_unreserved_bytes);
+ return 0;
+}
diff --git a/test/core/surface/lame_client_test.c b/test/core/surface/lame_client_test.c
index f36f980575..2894b0c66f 100644
--- a/test/core/surface/lame_client_test.c
+++ b/test/core/surface/lame_client_test.c
@@ -132,7 +132,7 @@ int main(int argc, char **argv) {
GPR_ASSERT(GRPC_CALL_OK == error);
/* the call should immediately fail */
- cq_expect_completion(cqv, tag(1), 0);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 0);
cq_verify(cqv);
memset(ops, 0, sizeof(ops));
@@ -149,7 +149,7 @@ int main(int argc, char **argv) {
GPR_ASSERT(GRPC_CALL_OK == error);
/* the call should immediately fail */
- cq_expect_completion(cqv, tag(2), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(2), 1);
cq_verify(cqv);
peer = grpc_call_get_peer(call);
diff --git a/test/core/surface/public_headers_must_be_c89.c b/test/core/surface/public_headers_must_be_c89.c
index 3eeb55d033..53bdf612fc 100644
--- a/test/core/surface/public_headers_must_be_c89.c
+++ b/test/core/surface/public_headers_must_be_c89.c
@@ -38,22 +38,18 @@
#include <grpc/grpc.h>
#include <grpc/grpc_security.h>
#include <grpc/grpc_security_constants.h>
-#include <grpc/impl/codegen/alloc.h>
#include <grpc/impl/codegen/atm.h>
-#include <grpc/impl/codegen/byte_buffer.h>
#include <grpc/impl/codegen/byte_buffer_reader.h>
#include <grpc/impl/codegen/compression_types.h>
#include <grpc/impl/codegen/connectivity_state.h>
+#include <grpc/impl/codegen/gpr_types.h>
#include <grpc/impl/codegen/grpc_types.h>
-#include <grpc/impl/codegen/log.h>
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/impl/codegen/propagation_bits.h>
#include <grpc/impl/codegen/slice.h>
-#include <grpc/impl/codegen/slice_buffer.h>
#include <grpc/impl/codegen/status.h>
#include <grpc/impl/codegen/sync.h>
#include <grpc/impl/codegen/sync_generic.h>
-#include <grpc/impl/codegen/time.h>
#include <grpc/status.h>
#include <grpc/support/alloc.h>
#include <grpc/support/atm.h>
diff --git a/test/core/transport/chttp2/hpack_encoder_test.c b/test/core/transport/chttp2/hpack_encoder_test.c
index 186bb6406f..1c1c74879b 100644
--- a/test/core/transport/chttp2/hpack_encoder_test.c
+++ b/test/core/transport/chttp2/hpack_encoder_test.c
@@ -97,7 +97,7 @@ static void verify(size_t window_available, int eof, size_t expect_window_used,
grpc_transport_one_way_stats stats;
memset(&stats, 0, sizeof(stats));
- grpc_chttp2_encode_header(&g_compressor, 0xdeadbeef, &b, eof, &stats,
+ grpc_chttp2_encode_header(&g_compressor, 0xdeadbeef, &b, eof, 16384, &stats,
&output);
merged = grpc_slice_merge(output.slices, output.count);
gpr_slice_buffer_destroy(&output);
@@ -202,7 +202,8 @@ static void verify_table_size_change_match_elem_size(const char *key,
grpc_transport_one_way_stats stats;
memset(&stats, 0, sizeof(stats));
- grpc_chttp2_encode_header(&g_compressor, 0xdeadbeef, &b, 0, &stats, &output);
+ grpc_chttp2_encode_header(&g_compressor, 0xdeadbeef, &b, 0, 16384, &stats,
+ &output);
gpr_slice_buffer_destroy(&output);
grpc_metadata_batch_destroy(&b);
diff --git a/test/core/util/test_config.c b/test/core/util/test_config.c
index 270d16600d..479aeda898 100644
--- a/test/core/util/test_config.c
+++ b/test/core/util/test_config.c
@@ -34,7 +34,6 @@
#include "test/core/util/test_config.h"
#include <grpc/support/log.h>
-#include <grpc/support/port_platform.h>
#include <signal.h>
#include <stdbool.h>
#include <stdio.h>
diff --git a/test/cpp/codegen/codegen_test_full.cc b/test/cpp/codegen/codegen_test_full.cc
index 4500540baf..d6e2416b55 100644
--- a/test/cpp/codegen/codegen_test_full.cc
+++ b/test/cpp/codegen/codegen_test_full.cc
@@ -32,6 +32,7 @@
*/
#include <grpc++/completion_queue.h>
+#include <grpc/support/time.h>
#include <gtest/gtest.h>
namespace grpc {
diff --git a/test/cpp/codegen/compiler_test_golden b/test/cpp/codegen/compiler_test_golden
index ef3d1aaa51..7b0fd6ce80 100644
--- a/test/cpp/codegen/compiler_test_golden
+++ b/test/cpp/codegen/compiler_test_golden
@@ -43,6 +43,7 @@
#include <grpc++/impl/codegen/async_stream.h>
#include <grpc++/impl/codegen/async_unary_call.h>
+#include <grpc++/impl/codegen/method_handler_impl.h>
#include <grpc++/impl/codegen/proto_utils.h>
#include <grpc++/impl/codegen/rpc_method.h>
#include <grpc++/impl/codegen/service_type.h>
@@ -206,6 +207,27 @@ class ServiceA GRPC_FINAL {
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
};
+ template <class BaseClass>
+ class WithStreamedUnaryMethod_MethodA1 : public BaseClass {
+ private:
+ void BaseClassMustBeDerivedFromService(const Service *service) {}
+ public:
+ WithStreamedUnaryMethod_MethodA1() {
+ ::grpc::Service::MarkMethodStreamedUnary(0,
+ new ::grpc::StreamedUnaryHandler< ::grpc::testing::Request, ::grpc::testing::Response>(std::bind(&WithStreamedUnaryMethod_MethodA1<BaseClass>::StreamedMethodA1, this, std::placeholders::_1, std::placeholders::_2)));
+ }
+ ~WithStreamedUnaryMethod_MethodA1() GRPC_OVERRIDE {
+ BaseClassMustBeDerivedFromService(this);
+ }
+ // disable regular version of this method
+ ::grpc::Status MethodA1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response) GRPC_FINAL GRPC_OVERRIDE {
+ abort();
+ return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
+ }
+ // replace default version of method with streamed unary
+ virtual ::grpc::Status StreamedMethodA1(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::grpc::testing::Request,::grpc::testing::Response>* server_unary_streamer) = 0;
+ };
+ typedef WithStreamedUnaryMethod_MethodA1<Service > StreamedUnaryService;
};
// ServiceB leading comment 1
@@ -284,6 +306,27 @@ class ServiceB GRPC_FINAL {
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
};
+ template <class BaseClass>
+ class WithStreamedUnaryMethod_MethodB1 : public BaseClass {
+ private:
+ void BaseClassMustBeDerivedFromService(const Service *service) {}
+ public:
+ WithStreamedUnaryMethod_MethodB1() {
+ ::grpc::Service::MarkMethodStreamedUnary(0,
+ new ::grpc::StreamedUnaryHandler< ::grpc::testing::Request, ::grpc::testing::Response>(std::bind(&WithStreamedUnaryMethod_MethodB1<BaseClass>::StreamedMethodB1, this, std::placeholders::_1, std::placeholders::_2)));
+ }
+ ~WithStreamedUnaryMethod_MethodB1() GRPC_OVERRIDE {
+ BaseClassMustBeDerivedFromService(this);
+ }
+ // disable regular version of this method
+ ::grpc::Status MethodB1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response) GRPC_FINAL GRPC_OVERRIDE {
+ abort();
+ return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
+ }
+ // replace default version of method with streamed unary
+ virtual ::grpc::Status StreamedMethodB1(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::grpc::testing::Request,::grpc::testing::Response>* server_unary_streamer) = 0;
+ };
+ typedef WithStreamedUnaryMethod_MethodB1<Service > StreamedUnaryService;
};
// ServiceB trailing comment 1
diff --git a/test/cpp/end2end/async_end2end_test.cc b/test/cpp/end2end/async_end2end_test.cc
index ac79fe8274..a9b7c8f8d3 100644
--- a/test/cpp/end2end/async_end2end_test.cc
+++ b/test/cpp/end2end/async_end2end_test.cc
@@ -897,8 +897,8 @@ TEST_P(AsyncEnd2endTest, UnimplementedRpc) {
GetChannelCredentials(GetParam().credentials_type, &args);
std::shared_ptr<Channel> channel =
CreateCustomChannel(server_address_.str(), channel_creds, args);
- std::unique_ptr<grpc::testing::UnimplementedService::Stub> stub;
- stub = grpc::testing::UnimplementedService::NewStub(channel);
+ std::unique_ptr<grpc::testing::UnimplementedEchoService::Stub> stub;
+ stub = grpc::testing::UnimplementedEchoService::NewStub(channel);
EchoRequest send_request;
EchoResponse recv_response;
Status recv_status;
diff --git a/test/cpp/end2end/client_crash_test.cc b/test/cpp/end2end/client_crash_test.cc
index 30b04fb9b9..c452ad2beb 100644
--- a/test/cpp/end2end/client_crash_test.cc
+++ b/test/cpp/end2end/client_crash_test.cc
@@ -38,6 +38,7 @@
#include <grpc++/server_builder.h>
#include <grpc++/server_context.h>
#include <grpc/grpc.h>
+#include <grpc/support/log.h>
#include <grpc/support/thd.h>
#include <grpc/support/time.h>
#include <gtest/gtest.h>
diff --git a/test/cpp/end2end/client_crash_test_server.cc b/test/cpp/end2end/client_crash_test_server.cc
index 9568ca26be..6e1457407c 100644
--- a/test/cpp/end2end/client_crash_test_server.cc
+++ b/test/cpp/end2end/client_crash_test_server.cc
@@ -39,6 +39,8 @@
#include <grpc++/server.h>
#include <grpc++/server_builder.h>
#include <grpc++/server_context.h>
+#include <grpc/support/log.h>
+
#include "src/proto/grpc/testing/echo.grpc.pb.h"
DEFINE_string(address, "", "Address to bind to");
diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc
index 46a58d3ac3..66614922f1 100644
--- a/test/cpp/end2end/end2end_test.cc
+++ b/test/cpp/end2end/end2end_test.cc
@@ -44,6 +44,7 @@
#include <grpc++/server_builder.h>
#include <grpc++/server_context.h>
#include <grpc/grpc.h>
+#include <grpc/support/log.h>
#include <grpc/support/thd.h>
#include <grpc/support/time.h>
#include <gtest/gtest.h>
@@ -967,8 +968,8 @@ TEST_P(End2endTest, ChannelStateTimeout) {
// Talking to a non-existing service.
TEST_P(End2endTest, NonExistingService) {
ResetChannel();
- std::unique_ptr<grpc::testing::UnimplementedService::Stub> stub;
- stub = grpc::testing::UnimplementedService::NewStub(channel_);
+ std::unique_ptr<grpc::testing::UnimplementedEchoService::Stub> stub;
+ stub = grpc::testing::UnimplementedEchoService::NewStub(channel_);
EchoRequest request;
EchoResponse response;
diff --git a/test/cpp/end2end/hybrid_end2end_test.cc b/test/cpp/end2end/hybrid_end2end_test.cc
index 7e0c0e8a7c..82361d0e90 100644
--- a/test/cpp/end2end/hybrid_end2end_test.cc
+++ b/test/cpp/end2end/hybrid_end2end_test.cc
@@ -199,7 +199,8 @@ class HybridEnd2endTest : public ::testing::Test {
HybridEnd2endTest() {}
void SetUpServer(::grpc::Service* service1, ::grpc::Service* service2,
- AsyncGenericService* generic_service) {
+ AsyncGenericService* generic_service,
+ int max_message_size = 0) {
int port = grpc_pick_unused_port_or_die();
server_address_ << "localhost:" << port;
@@ -217,6 +218,11 @@ class HybridEnd2endTest : public ::testing::Test {
if (generic_service) {
builder.RegisterAsyncGenericService(generic_service);
}
+
+ if (max_message_size != 0) {
+ builder.SetMaxMessageSize(max_message_size);
+ }
+
// Create a separate cq for each potential handler.
for (int i = 0; i < 5; i++) {
cqs_.push_back(builder.AddCompletionQueue(false));
@@ -346,7 +352,7 @@ class HybridEnd2endTest : public ::testing::Test {
EXPECT_TRUE(s.ok());
}
- grpc::testing::UnimplementedService::Service unimplemented_service_;
+ grpc::testing::UnimplementedEchoService::Service unimplemented_service_;
std::vector<std::unique_ptr<ServerCompletionQueue>> cqs_;
std::unique_ptr<grpc::testing::EchoTestService::Stub> stub_;
std::unique_ptr<Server> server_;
@@ -415,6 +421,83 @@ TEST_F(HybridEnd2endTest, AsyncRequestStreamResponseStream_SyncDupService) {
request_stream_handler_thread.join();
}
+// Add a second service with one sync streamed unary method.
+class StreamedUnaryDupPkg
+ : public duplicate::EchoTestService::WithStreamedUnaryMethod_Echo<
+ TestServiceImplDupPkg> {
+ public:
+ Status StreamedEcho(ServerContext* context,
+ ServerUnaryStreamer<EchoRequest, EchoResponse>* stream)
+ GRPC_OVERRIDE {
+ EchoRequest req;
+ EchoResponse resp;
+ uint32_t next_msg_sz;
+ stream->NextMessageSize(&next_msg_sz);
+ gpr_log(GPR_INFO, "Streamed Unary Next Message Size is %u", next_msg_sz);
+ GPR_ASSERT(stream->Read(&req));
+ resp.set_message(req.message() + "_dup");
+ GPR_ASSERT(stream->Write(resp));
+ return Status::OK;
+ }
+};
+
+TEST_F(HybridEnd2endTest,
+ AsyncRequestStreamResponseStream_SyncStreamedUnaryDupService) {
+ typedef EchoTestService::WithAsyncMethod_RequestStream<
+ EchoTestService::WithAsyncMethod_ResponseStream<TestServiceImpl>>
+ SType;
+ SType service;
+ StreamedUnaryDupPkg dup_service;
+ SetUpServer(&service, &dup_service, nullptr, 8192);
+ ResetStub();
+ std::thread response_stream_handler_thread(HandleServerStreaming<SType>,
+ &service, cqs_[0].get());
+ std::thread request_stream_handler_thread(HandleClientStreaming<SType>,
+ &service, cqs_[1].get());
+ TestAllMethods();
+ SendEchoToDupService();
+ response_stream_handler_thread.join();
+ request_stream_handler_thread.join();
+}
+
+// Add a second service that is fully Streamed Unary
+class FullyStreamedUnaryDupPkg
+ : public duplicate::EchoTestService::StreamedUnaryService {
+ public:
+ Status StreamedEcho(ServerContext* context,
+ ServerUnaryStreamer<EchoRequest, EchoResponse>* stream)
+ GRPC_OVERRIDE {
+ EchoRequest req;
+ EchoResponse resp;
+ uint32_t next_msg_sz;
+ stream->NextMessageSize(&next_msg_sz);
+ gpr_log(GPR_INFO, "Streamed Unary Next Message Size is %u", next_msg_sz);
+ GPR_ASSERT(stream->Read(&req));
+ resp.set_message(req.message() + "_dup");
+ GPR_ASSERT(stream->Write(resp));
+ return Status::OK;
+ }
+};
+
+TEST_F(HybridEnd2endTest,
+ AsyncRequestStreamResponseStream_SyncFullyStreamedUnaryDupService) {
+ typedef EchoTestService::WithAsyncMethod_RequestStream<
+ EchoTestService::WithAsyncMethod_ResponseStream<TestServiceImpl>>
+ SType;
+ SType service;
+ FullyStreamedUnaryDupPkg dup_service;
+ SetUpServer(&service, &dup_service, nullptr, 8192);
+ ResetStub();
+ std::thread response_stream_handler_thread(HandleServerStreaming<SType>,
+ &service, cqs_[0].get());
+ std::thread request_stream_handler_thread(HandleClientStreaming<SType>,
+ &service, cqs_[1].get());
+ TestAllMethods();
+ SendEchoToDupService();
+ response_stream_handler_thread.join();
+ request_stream_handler_thread.join();
+}
+
// Add a second service with one async method.
TEST_F(HybridEnd2endTest, AsyncRequestStreamResponseStream_AsyncDupService) {
typedef EchoTestService::WithAsyncMethod_RequestStream<
diff --git a/test/cpp/end2end/mock_test.cc b/test/cpp/end2end/mock_test.cc
index 0ace5d9418..0da5861b67 100644
--- a/test/cpp/end2end/mock_test.cc
+++ b/test/cpp/end2end/mock_test.cc
@@ -31,6 +31,7 @@
*
*/
+#include <climits>
#include <thread>
#include <grpc++/channel.h>
@@ -40,6 +41,7 @@
#include <grpc++/server_builder.h>
#include <grpc++/server_context.h>
#include <grpc/grpc.h>
+#include <grpc/support/log.h>
#include <grpc/support/thd.h>
#include <grpc/support/time.h>
#include <gtest/gtest.h>
@@ -63,6 +65,10 @@ class MockClientReaderWriter GRPC_FINAL
: public ClientReaderWriterInterface<W, R> {
public:
void WaitForInitialMetadata() GRPC_OVERRIDE {}
+ bool NextMessageSize(uint32_t* sz) GRPC_OVERRIDE {
+ *sz = UINT_MAX;
+ return true;
+ }
bool Read(R* msg) GRPC_OVERRIDE { return true; }
bool Write(const W& msg) GRPC_OVERRIDE { return true; }
bool WritesDone() GRPC_OVERRIDE { return true; }
@@ -74,6 +80,10 @@ class MockClientReaderWriter<EchoRequest, EchoResponse> GRPC_FINAL
public:
MockClientReaderWriter() : writes_done_(false) {}
void WaitForInitialMetadata() GRPC_OVERRIDE {}
+ bool NextMessageSize(uint32_t* sz) GRPC_OVERRIDE {
+ *sz = UINT_MAX;
+ return true;
+ }
bool Read(EchoResponse* msg) GRPC_OVERRIDE {
if (writes_done_) return false;
msg->set_message(last_message_);
diff --git a/test/cpp/end2end/server_crash_test.cc b/test/cpp/end2end/server_crash_test.cc
index e447360276..16a5fa2322 100644
--- a/test/cpp/end2end/server_crash_test.cc
+++ b/test/cpp/end2end/server_crash_test.cc
@@ -38,6 +38,7 @@
#include <grpc++/server_builder.h>
#include <grpc++/server_context.h>
#include <grpc/grpc.h>
+#include <grpc/support/log.h>
#include <grpc/support/thd.h>
#include <grpc/support/time.h>
#include <gtest/gtest.h>
diff --git a/test/cpp/end2end/server_crash_test_client.cc b/test/cpp/end2end/server_crash_test_client.cc
index ece948d5a7..10a251c952 100644
--- a/test/cpp/end2end/server_crash_test_client.cc
+++ b/test/cpp/end2end/server_crash_test_client.cc
@@ -40,6 +40,8 @@
#include <grpc++/channel.h>
#include <grpc++/client_context.h>
#include <grpc++/create_channel.h>
+#include <grpc/support/log.h>
+
#include "src/proto/grpc/testing/echo.grpc.pb.h"
DEFINE_string(address, "", "Address to connect to");
diff --git a/test/cpp/end2end/shutdown_test.cc b/test/cpp/end2end/shutdown_test.cc
index 3f98de6db7..4cba3b1c81 100644
--- a/test/cpp/end2end/shutdown_test.cc
+++ b/test/cpp/end2end/shutdown_test.cc
@@ -33,6 +33,8 @@
#include <thread>
+#include <gtest/gtest.h>
+
#include <grpc++/channel.h>
#include <grpc++/client_context.h>
#include <grpc++/create_channel.h>
@@ -40,8 +42,8 @@
#include <grpc++/server_builder.h>
#include <grpc++/server_context.h>
#include <grpc/grpc.h>
+#include <grpc/support/log.h>
#include <grpc/support/sync.h>
-#include <gtest/gtest.h>
#include "src/core/lib/support/env.h"
#include "src/proto/grpc/testing/echo.grpc.pb.h"
diff --git a/test/cpp/end2end/streaming_throughput_test.cc b/test/cpp/end2end/streaming_throughput_test.cc
index 9e82c30701..fbef761ca9 100644
--- a/test/cpp/end2end/streaming_throughput_test.cc
+++ b/test/cpp/end2end/streaming_throughput_test.cc
@@ -35,6 +35,8 @@
#include <mutex>
#include <thread>
+#include <gtest/gtest.h>
+
#include <grpc++/channel.h>
#include <grpc++/client_context.h>
#include <grpc++/create_channel.h>
@@ -45,9 +47,9 @@
#include <grpc++/server_context.h>
#include <grpc/grpc.h>
#include <grpc/support/atm.h>
+#include <grpc/support/log.h>
#include <grpc/support/thd.h>
#include <grpc/support/time.h>
-#include <gtest/gtest.h>
#include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h"
#include "src/proto/grpc/testing/echo.grpc.pb.h"
diff --git a/test/cpp/end2end/test_service_impl.cc b/test/cpp/end2end/test_service_impl.cc
index 52abd80d69..2de344efd5 100644
--- a/test/cpp/end2end/test_service_impl.cc
+++ b/test/cpp/end2end/test_service_impl.cc
@@ -38,7 +38,8 @@
#include <grpc++/security/credentials.h>
#include <grpc++/server_context.h>
-#include <grpc/grpc.h>
+#include <grpc/support/log.h>
+
#include <gtest/gtest.h>
#include "src/proto/grpc/testing/echo.grpc.pb.h"
diff --git a/test/cpp/grpclb/grpclb_api_test.cc b/test/cpp/grpclb/grpclb_api_test.cc
index 33de1ee93c..e67189c69e 100644
--- a/test/cpp/grpclb/grpclb_api_test.cc
+++ b/test/cpp/grpclb/grpclb_api_test.cc
@@ -31,10 +31,12 @@
*
*/
+#include <grpc++/impl/codegen/config.h>
#include <gtest/gtest.h>
-#include <string>
#include "src/core/ext/lb_policy/grpclb/load_balancer_api.h"
+#include "src/core/lib/iomgr/sockaddr.h"
+#include "src/core/lib/iomgr/sockaddr_utils.h"
#include "src/proto/grpc/lb/v1/load_balancer.pb.h" // C++ version
namespace grpc {
@@ -45,8 +47,28 @@ using grpc::lb::v1::LoadBalanceResponse;
class GrpclbTest : public ::testing::Test {};
+grpc::string Ip4ToPackedString(const char* ip_str) {
+ struct in_addr ip4;
+ GPR_ASSERT(inet_pton(AF_INET, ip_str, &ip4) == 1);
+ return grpc::string(reinterpret_cast<const char*>(&ip4), sizeof(ip4));
+}
+
+grpc::string PackedStringToIp(const grpc_grpclb_ip_address& pb_ip) {
+ char ip_str[46] = {0};
+ int af = -1;
+ if (pb_ip.size == 4) {
+ af = AF_INET;
+ } else if (pb_ip.size == 16) {
+ af = AF_INET6;
+ } else {
+ abort();
+ }
+ GPR_ASSERT(inet_ntop(af, pb_ip.bytes, ip_str, 46) != NULL);
+ return ip_str;
+}
+
TEST_F(GrpclbTest, CreateRequest) {
- const std::string service_name = "AServiceName";
+ const grpc::string service_name = "AServiceName";
LoadBalanceRequest request;
grpc_grpclb_request* c_req = grpc_grpclb_request_create(service_name.c_str());
gpr_slice slice = grpc_grpclb_request_encode(c_req);
@@ -65,7 +87,7 @@ TEST_F(GrpclbTest, ParseInitialResponse) {
initial_response->mutable_client_stats_report_interval();
client_stats_report_interval->set_seconds(123);
client_stats_report_interval->set_nanos(456);
- const std::string encoded_response = response.SerializeAsString();
+ const grpc::string encoded_response = response.SerializeAsString();
gpr_slice encoded_slice =
gpr_slice_from_copied_string(encoded_response.c_str());
@@ -82,29 +104,31 @@ TEST_F(GrpclbTest, ParseResponseServerList) {
LoadBalanceResponse response;
auto* serverlist = response.mutable_server_list();
auto* server = serverlist->add_servers();
- server->set_ip_address("127.0.0.1");
+ server->set_ip_address(Ip4ToPackedString("127.0.0.1"));
server->set_port(12345);
server->set_drop_request(true);
server = response.mutable_server_list()->add_servers();
- server->set_ip_address("10.0.0.1");
+ server->set_ip_address(Ip4ToPackedString("10.0.0.1"));
server->set_port(54321);
server->set_drop_request(false);
auto* expiration_interval = serverlist->mutable_expiration_interval();
expiration_interval->set_seconds(888);
expiration_interval->set_nanos(999);
- const std::string encoded_response = response.SerializeAsString();
- gpr_slice encoded_slice =
- gpr_slice_from_copied_string(encoded_response.c_str());
+ const grpc::string encoded_response = response.SerializeAsString();
+ const gpr_slice encoded_slice = gpr_slice_from_copied_buffer(
+ encoded_response.data(), encoded_response.size());
grpc_grpclb_serverlist* c_serverlist =
grpc_grpclb_response_parse_serverlist(encoded_slice);
ASSERT_EQ(c_serverlist->num_servers, 2ul);
EXPECT_TRUE(c_serverlist->servers[0]->has_ip_address);
- EXPECT_TRUE(strcmp(c_serverlist->servers[0]->ip_address, "127.0.0.1") == 0);
+ EXPECT_EQ(PackedStringToIp(c_serverlist->servers[0]->ip_address),
+ "127.0.0.1");
EXPECT_EQ(c_serverlist->servers[0]->port, 12345);
EXPECT_TRUE(c_serverlist->servers[0]->drop_request);
EXPECT_TRUE(c_serverlist->servers[1]->has_ip_address);
- EXPECT_TRUE(strcmp(c_serverlist->servers[1]->ip_address, "10.0.0.1") == 0);
+
+ EXPECT_EQ(PackedStringToIp(c_serverlist->servers[1]->ip_address), "10.0.0.1");
EXPECT_EQ(c_serverlist->servers[1]->port, 54321);
EXPECT_FALSE(c_serverlist->servers[1]->drop_request);
diff --git a/test/cpp/grpclb/grpclb_test.cc b/test/cpp/grpclb/grpclb_test.cc
index b2fdce2963..95abe38031 100644
--- a/test/cpp/grpclb/grpclb_test.cc
+++ b/test/cpp/grpclb/grpclb_test.cc
@@ -37,8 +37,10 @@
#include <cstring>
#include <string>
-extern "C" {
+#include <gtest/gtest.h>
+
#include <grpc/grpc.h>
+#include <grpc/impl/codegen/byte_buffer_reader.h>
#include <grpc/support/alloc.h>
#include <grpc/support/host_port.h>
#include <grpc/support/log.h>
@@ -47,8 +49,11 @@ extern "C" {
#include <grpc/support/thd.h>
#include <grpc/support/time.h>
+#include <grpc++/impl/codegen/config.h>
+extern "C" {
#include "src/core/ext/client_config/client_channel.h"
#include "src/core/lib/channel/channel_stack.h"
+#include "src/core/lib/iomgr/sockaddr.h"
#include "src/core/lib/support/string.h"
#include "src/core/lib/support/tmpfile.h"
#include "src/core/lib/surface/channel.h"
@@ -61,16 +66,19 @@ extern "C" {
#include "src/proto/grpc/lb/v1/load_balancer.pb.h"
#define NUM_BACKENDS 4
+#define PAYLOAD "hello you"
// TODO(dgq): Other scenarios in need of testing:
// - Send an empty serverlist update and verify that the client request blocks
// until a new serverlist with actual contents is available.
// - Send identical serverlist update
+// - Send a serverlist with faulty ip:port addresses (port > 2^16, etc).
// - Test reception of invalid serverlist
// - Test pinging
// - Test against a non-LB server. That server should return UNIMPLEMENTED and
// the call should fail.
// - Random LB server closing the stream unexpectedly.
+// - Test using DNS-resolvable names (localhost?)
namespace grpc {
namespace {
@@ -105,8 +113,8 @@ static gpr_slice build_response_payload_slice(
int64_t expiration_interval_secs, int32_t expiration_interval_nanos) {
// server_list {
// servers {
- // ip_address: "127.0.0.1"
- // port: ...
+ // ip_address: <in_addr/6 bytes of an IP>
+ // port: <16 bit uint>
// load_balance_token: "token..."
// }
// ...
@@ -125,21 +133,21 @@ static gpr_slice build_response_payload_slice(
}
for (size_t i = 0; i < nports; i++) {
auto *server = serverlist->add_servers();
- server->set_ip_address(host);
+ // TODO(dgq): test ipv6
+ struct in_addr ip4;
+ GPR_ASSERT(inet_pton(AF_INET, host, &ip4) == 1);
+ server->set_ip_address(
+ grpc::string(reinterpret_cast<const char *>(&ip4), sizeof(ip4)));
server->set_port(ports[i]);
// The following long long int cast is meant to work around the
// disfunctional implementation of std::to_string in gcc 4.4, which doesn't
// have a version for int but does have one for long long int.
- server->set_load_balance_token("token" +
- std::to_string((long long int)ports[i]));
+ string token_data = "token" + std::to_string((long long int)ports[i]);
+ token_data.resize(64, '-');
+ server->set_load_balance_token(token_data);
}
-
- gpr_log(GPR_INFO, "generating response: %s",
- response.ShortDebugString().c_str());
-
- const gpr_slice response_slice =
- gpr_slice_from_copied_string(response.SerializeAsString().c_str());
- return response_slice;
+ const grpc::string &enc_resp = response.SerializeAsString();
+ return gpr_slice_from_copied_buffer(enc_resp.data(), enc_resp.size());
}
static void drain_cq(grpc_completion_queue *cq) {
@@ -177,10 +185,41 @@ static void start_lb_server(server_fixture *sf, int *ports, size_t nports,
tag(200));
GPR_ASSERT(GRPC_CALL_OK == error);
gpr_log(GPR_INFO, "LB Server[%s] up", sf->servers_hostport);
- cq_expect_completion(cqv, tag(200), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(200), 1);
cq_verify(cqv);
gpr_log(GPR_INFO, "LB Server[%s] after tag 200", sf->servers_hostport);
+ // make sure we've received the initial metadata from the grpclb request.
+ GPR_ASSERT(request_metadata_recv.count > 0);
+ GPR_ASSERT(request_metadata_recv.metadata != NULL);
+
+ // receive request for backends
+ op = ops;
+ op->op = GRPC_OP_RECV_MESSAGE;
+ op->data.recv_message = &request_payload_recv;
+ op->flags = 0;
+ op->reserved = NULL;
+ op++;
+ error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(202), NULL);
+ GPR_ASSERT(GRPC_CALL_OK == error);
+ CQ_EXPECT_COMPLETION(cqv, tag(202), 1);
+ cq_verify(cqv);
+ gpr_log(GPR_INFO, "LB Server[%s] after RECV_MSG", sf->servers_hostport);
+
+ // validate initial request.
+ grpc_byte_buffer_reader bbr;
+ grpc_byte_buffer_reader_init(&bbr, request_payload_recv);
+ gpr_slice request_payload_slice = grpc_byte_buffer_reader_readall(&bbr);
+ grpc::lb::v1::LoadBalanceRequest request;
+ request.ParseFromArray(GPR_SLICE_START_PTR(request_payload_slice),
+ GPR_SLICE_LENGTH(request_payload_slice));
+ GPR_ASSERT(request.has_initial_request());
+ GPR_ASSERT(request.initial_request().name() == "load.balanced.service.name");
+ gpr_slice_unref(request_payload_slice);
+ grpc_byte_buffer_reader_destroy(&bbr);
+ grpc_byte_buffer_destroy(request_payload_recv);
+
+ gpr_slice response_payload_slice;
op = ops;
op->op = GRPC_OP_SEND_INITIAL_METADATA;
op->data.send_initial_metadata.count = 0;
@@ -196,21 +235,6 @@ static void start_lb_server(server_fixture *sf, int *ports, size_t nports,
GPR_ASSERT(GRPC_CALL_OK == error);
gpr_log(GPR_INFO, "LB Server[%s] after tag 201", sf->servers_hostport);
- // receive request for backends
- op = ops;
- op->op = GRPC_OP_RECV_MESSAGE;
- op->data.recv_message = &request_payload_recv;
- op->flags = 0;
- op->reserved = NULL;
- op++;
- error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(202), NULL);
- GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(202), 1);
- cq_verify(cqv);
- gpr_log(GPR_INFO, "LB Server[%s] after RECV_MSG", sf->servers_hostport);
- // TODO(dgq): validate request.
- grpc_byte_buffer_destroy(request_payload_recv);
- gpr_slice response_payload_slice;
for (int i = 0; i < 2; i++) {
if (i == 0) {
// First half of the ports.
@@ -233,7 +257,7 @@ static void start_lb_server(server_fixture *sf, int *ports, size_t nports,
op++;
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(203), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(203), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(203), 1);
cq_verify(cqv);
gpr_log(GPR_INFO, "LB Server[%s] after SEND_MESSAGE, iter %d",
sf->servers_hostport, i);
@@ -254,8 +278,8 @@ static void start_lb_server(server_fixture *sf, int *ports, size_t nports,
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(204), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(201), 1);
- cq_expect_completion(cqv, tag(204), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(201), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(204), 1);
cq_verify(cqv);
gpr_log(GPR_INFO, "LB Server[%s] after tag 204. All done. LB server out",
sf->servers_hostport);
@@ -303,6 +327,16 @@ static void start_backend_server(server_fixture *sf) {
return;
}
GPR_ASSERT(ev.type == GRPC_OP_COMPLETE);
+
+ // The following long long int cast is meant to work around the
+ // disfunctional implementation of std::to_string in gcc 4.4, which doesn't
+ // have a version for int but does have one for long long int.
+ string expected_token = "token" + std::to_string((long long int)sf->port);
+ expected_token.resize(64, '-');
+ GPR_ASSERT(contains_metadata(&request_metadata_recv,
+ "load-reporting-initial",
+ expected_token.c_str()));
+
gpr_log(GPR_INFO, "Server[%s] after tag 100", sf->servers_hostport);
op = ops;
@@ -321,8 +355,7 @@ static void start_backend_server(server_fixture *sf) {
gpr_log(GPR_INFO, "Server[%s] after tag 101", sf->servers_hostport);
bool exit = false;
- gpr_slice response_payload_slice =
- gpr_slice_from_copied_string("hello you");
+ gpr_slice response_payload_slice = gpr_slice_from_copied_string(PAYLOAD);
while (!exit) {
op = ops;
op->op = GRPC_OP_RECV_MESSAGE;
@@ -394,8 +427,8 @@ static void start_backend_server(server_fixture *sf) {
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(104), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(101), 1);
- cq_expect_completion(cqv, tag(104), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(101), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(104), 1);
cq_verify(cqv);
gpr_log(GPR_INFO, "Server[%s] DONE. After servicing %d calls",
sf->servers_hostport, sf->num_calls_serviced);
@@ -474,10 +507,9 @@ static void perform_request(client_fixture *cf) {
error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(2), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- peer = grpc_call_get_peer(c);
- cq_expect_completion(cqv, tag(2), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(2), 1);
cq_verify(cqv);
- gpr_free(peer);
+ GPR_ASSERT(byte_buffer_eq_string(response_payload_recv, PAYLOAD));
grpc_byte_buffer_destroy(request_payload);
grpc_byte_buffer_destroy(response_payload_recv);
@@ -493,8 +525,8 @@ static void perform_request(client_fixture *cf) {
error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(3), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
- cq_expect_completion(cqv, tag(1), 1);
- cq_expect_completion(cqv, tag(3), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(3), 1);
cq_verify(cqv);
peer = grpc_call_get_peer(c);
gpr_log(GPR_INFO, "Client DONE WITH SERVER %s ", peer);
@@ -583,27 +615,30 @@ static void fork_lb_server(void *arg) {
tf->lb_server_update_delay_ms);
}
-static void setup_test_fixture(test_fixture *tf,
- int lb_server_update_delay_ms) {
- tf->lb_server_update_delay_ms = lb_server_update_delay_ms;
+static test_fixture setup_test_fixture(int lb_server_update_delay_ms) {
+ test_fixture tf;
+ memset(&tf, 0, sizeof(tf));
+ tf.lb_server_update_delay_ms = lb_server_update_delay_ms;
gpr_thd_options options = gpr_thd_options_default();
gpr_thd_options_set_joinable(&options);
for (int i = 0; i < NUM_BACKENDS; ++i) {
- setup_server("127.0.0.1", &tf->lb_backends[i]);
- gpr_thd_new(&tf->lb_backends[i].tid, fork_backend_server,
- &tf->lb_backends[i], &options);
+ setup_server("127.0.0.1", &tf.lb_backends[i]);
+ gpr_thd_new(&tf.lb_backends[i].tid, fork_backend_server, &tf.lb_backends[i],
+ &options);
}
- setup_server("127.0.0.1", &tf->lb_server);
- gpr_thd_new(&tf->lb_server.tid, fork_lb_server, &tf->lb_server, &options);
+ setup_server("127.0.0.1", &tf.lb_server);
+ gpr_thd_new(&tf.lb_server.tid, fork_lb_server, &tf.lb_server, &options);
char *server_uri;
gpr_asprintf(&server_uri, "ipv4:%s?lb_policy=grpclb&lb_enabled=1",
- tf->lb_server.servers_hostport);
- setup_client(server_uri, &tf->client);
+ tf.lb_server.servers_hostport);
+ setup_client(server_uri, &tf.client);
gpr_free(server_uri);
+
+ return tf;
}
static void teardown_test_fixture(test_fixture *tf) {
@@ -614,19 +649,13 @@ static void teardown_test_fixture(test_fixture *tf) {
teardown_server(&tf->lb_server);
}
-// The LB server will send two updates: batch 1 and batch 2. Each batch
-// contains
-// two addresses, both of a valid and running backend server. Batch 1 is
-// readily
-// available and provided as soon as the client establishes the streaming
-// call.
-// Batch 2 is sent after a delay of \a lb_server_update_delay_ms
-// milliseconds.
+// The LB server will send two updates: batch 1 and batch 2. Each batch contains
+// two addresses, both of a valid and running backend server. Batch 1 is readily
+// available and provided as soon as the client establishes the streaming call.
+// Batch 2 is sent after a delay of \a lb_server_update_delay_ms milliseconds.
static test_fixture test_update(int lb_server_update_delay_ms) {
gpr_log(GPR_INFO, "start %s(%d)", __func__, lb_server_update_delay_ms);
- test_fixture tf;
- memset(&tf, 0, sizeof(tf));
- setup_test_fixture(&tf, lb_server_update_delay_ms);
+ test_fixture tf = setup_test_fixture(lb_server_update_delay_ms);
perform_request(
&tf.client); // "consumes" 1st backend server of 1st serverlist
perform_request(
@@ -642,13 +671,7 @@ static test_fixture test_update(int lb_server_update_delay_ms) {
return tf;
}
-} // namespace
-} // namespace grpc
-
-int main(int argc, char **argv) {
- grpc_test_init(argc, argv);
- grpc_init();
-
+TEST(GrpclbTest, Updates) {
grpc::test_fixture tf_result;
// Clients take a bit over one second to complete a call (the last part of the
// call sleeps for 1 second while verifying the client's completion queue is
@@ -683,7 +706,18 @@ int main(int argc, char **argv) {
GPR_ASSERT(tf_result.lb_backends[1].num_calls_serviced > 0);
GPR_ASSERT(tf_result.lb_backends[2].num_calls_serviced > 0);
GPR_ASSERT(tf_result.lb_backends[3].num_calls_serviced == 0);
+}
+TEST(GrpclbTest, InvalidAddressInServerlist) {}
+
+} // namespace
+} // namespace grpc
+
+int main(int argc, char **argv) {
+ ::testing::InitGoogleTest(&argc, argv);
+ grpc_test_init(argc, argv);
+ grpc_init();
+ const auto result = RUN_ALL_TESTS();
grpc_shutdown();
- return 0;
+ return result;
}
diff --git a/test/cpp/interop/client.cc b/test/cpp/interop/client.cc
index e8ae6ee572..032b378b1a 100644
--- a/test/cpp/interop/client.cc
+++ b/test/cpp/interop/client.cc
@@ -39,6 +39,7 @@
#include <grpc++/channel.h>
#include <grpc++/client_context.h>
#include <grpc/grpc.h>
+#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/useful.h>
diff --git a/test/cpp/interop/interop_client.cc b/test/cpp/interop/interop_client.cc
index 8861bc1163..6117878a33 100644
--- a/test/cpp/interop/interop_client.cc
+++ b/test/cpp/interop/interop_client.cc
@@ -40,6 +40,7 @@
#include <grpc++/client_context.h>
#include <grpc++/security/credentials.h>
#include <grpc/grpc.h>
+#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
#include <grpc/support/useful.h>
diff --git a/test/cpp/interop/metrics_client.cc b/test/cpp/interop/metrics_client.cc
index 179de30805..9d5212e9d5 100644
--- a/test/cpp/interop/metrics_client.cc
+++ b/test/cpp/interop/metrics_client.cc
@@ -36,6 +36,7 @@
#include <gflags/gflags.h>
#include <grpc++/grpc++.h>
+#include <grpc/support/log.h>
#include "src/proto/grpc/testing/metrics.grpc.pb.h"
#include "src/proto/grpc/testing/metrics.pb.h"
diff --git a/test/cpp/interop/stress_interop_client.cc b/test/cpp/interop/stress_interop_client.cc
index 1d5fc80cf2..0ea71e4cf4 100644
--- a/test/cpp/interop/stress_interop_client.cc
+++ b/test/cpp/interop/stress_interop_client.cc
@@ -38,6 +38,7 @@
#include <vector>
#include <grpc++/create_channel.h>
+#include <grpc/support/log.h>
#include "test/cpp/interop/interop_client.h"
#include "test/cpp/util/metrics_server.h"
diff --git a/test/cpp/interop/stress_test.cc b/test/cpp/interop/stress_test.cc
index 7787931900..5647cb5531 100644
--- a/test/cpp/interop/stress_test.cc
+++ b/test/cpp/interop/stress_test.cc
@@ -41,6 +41,7 @@
#include <grpc++/create_channel.h>
#include <grpc++/grpc++.h>
#include <grpc++/impl/thd.h>
+#include <grpc/support/log.h>
#include <grpc/support/time.h>
#include "src/proto/grpc/testing/metrics.grpc.pb.h"
diff --git a/test/cpp/qps/client.h b/test/cpp/qps/client.h
index fada4ba767..c8809cbc5b 100644
--- a/test/cpp/qps/client.h
+++ b/test/cpp/qps/client.h
@@ -129,13 +129,17 @@ class HistogramEntry GRPC_FINAL {
class Client {
public:
- Client() : timer_(new UsageTimer), interarrival_timer_() {}
+ Client() : timer_(new UsageTimer), interarrival_timer_() {
+ gpr_event_init(&start_requests_);
+ }
virtual ~Client() {}
ClientStats Mark(bool reset) {
Histogram latencies;
UsageTimer::Result timer_result;
+ MaybeStartRequests();
+
// avoid std::vector for old compilers that expect a copy constructor
if (reset) {
Histogram* to_merge = new Histogram[threads_.size()];
@@ -189,7 +193,10 @@ class Client {
}
}
- void EndThreads() { threads_.clear(); }
+ void EndThreads() {
+ MaybeStartRequests();
+ threads_.clear();
+ }
virtual void DestroyMultithreading() = 0;
virtual bool ThreadFunc(HistogramEntry* histogram, size_t thread_idx) = 0;
@@ -265,6 +272,13 @@ class Client {
Thread& operator=(const Thread&);
void ThreadFunc() {
+ while (!gpr_event_wait(
+ &client_->start_requests_,
+ gpr_time_add(gpr_now(GPR_CLOCK_REALTIME),
+ gpr_time_from_seconds(1, GPR_TIMESPAN)))) {
+ gpr_log(GPR_INFO, "Waiting for benchmark to start");
+ }
+
for (;;) {
// run the loop body
HistogramEntry entry;
@@ -302,6 +316,16 @@ class Client {
size_t threads_remaining_;
std::condition_variable threads_complete_;
+ gpr_event start_requests_;
+ bool started_requests_;
+
+ void MaybeStartRequests() {
+ if (!started_requests_) {
+ started_requests_ = true;
+ gpr_event_set(&start_requests_, (void*)1);
+ }
+ }
+
void CompleteThread() {
std::lock_guard<std::mutex> g(thread_completion_mu_);
threads_remaining_--;
@@ -359,7 +383,7 @@ class ClientImpl : public Client {
gpr_log(GPR_INFO, "Connecting to %s", target.c_str());
GPR_ASSERT(channel_->WaitForConnected(
gpr_time_add(gpr_now(GPR_CLOCK_REALTIME),
- gpr_time_from_seconds(30, GPR_TIMESPAN))));
+ gpr_time_from_seconds(300, GPR_TIMESPAN))));
stub_ = create_stub(channel_);
}
Channel* get_channel() { return channel_.get(); }
diff --git a/test/cpp/qps/driver.cc b/test/cpp/qps/driver.cc
index 93f9271553..b4c18bcb46 100644
--- a/test/cpp/qps/driver.cc
+++ b/test/cpp/qps/driver.cc
@@ -186,6 +186,9 @@ std::unique_ptr<ScenarioResult> RunScenario(
const ClientConfig& initial_client_config, size_t num_clients,
const ServerConfig& initial_server_config, size_t num_servers,
int warmup_seconds, int benchmark_seconds, int spawn_local_worker_count) {
+ // Log everything from the driver
+ gpr_set_log_verbosity(GPR_LOG_SEVERITY_DEBUG);
+
// ClientContext allocations (all are destroyed at scope exit)
list<ClientContext> contexts;
@@ -363,12 +366,37 @@ std::unique_ptr<ScenarioResult> RunScenario(
if (!clients[i].stream->Write(args)) {
gpr_log(GPR_ERROR, "Could not write args to client %zu", i);
}
+ }
+
+ for (size_t i = 0; i < num_clients; i++) {
ClientStatus init_status;
if (!clients[i].stream->Read(&init_status)) {
gpr_log(GPR_ERROR, "Client %zu did not yield initial status", i);
}
}
+ // Send an initial mark: clients can use this to know that everything is ready
+ // to start
+ gpr_log(GPR_INFO, "Initiating");
+ ServerArgs server_mark;
+ server_mark.mutable_mark()->set_reset(true);
+ ClientArgs client_mark;
+ client_mark.mutable_mark()->set_reset(true);
+ ServerStatus server_status;
+ ClientStatus client_status;
+ for (size_t i = 0; i < num_clients; i++) {
+ auto client = &clients[i];
+ if (!client->stream->Write(client_mark)) {
+ gpr_log(GPR_ERROR, "Couldn't write mark to client %zu", i);
+ }
+ }
+ for (size_t i = 0; i < num_clients; i++) {
+ auto client = &clients[i];
+ if (!client->stream->Read(&client_status)) {
+ gpr_log(GPR_ERROR, "Couldn't get status from client %zu", i);
+ }
+ }
+
// Let everything warmup
gpr_log(GPR_INFO, "Warming up");
gpr_timespec start = gpr_now(GPR_CLOCK_REALTIME);
@@ -377,10 +405,6 @@ std::unique_ptr<ScenarioResult> RunScenario(
// Start a run
gpr_log(GPR_INFO, "Starting");
- ServerArgs server_mark;
- server_mark.mutable_mark()->set_reset(true);
- ClientArgs client_mark;
- client_mark.mutable_mark()->set_reset(true);
for (size_t i = 0; i < num_servers; i++) {
auto server = &servers[i];
if (!server->stream->Write(server_mark)) {
@@ -393,8 +417,6 @@ std::unique_ptr<ScenarioResult> RunScenario(
gpr_log(GPR_ERROR, "Couldn't write mark to client %zu", i);
}
}
- ServerStatus server_status;
- ClientStatus client_status;
for (size_t i = 0; i < num_servers; i++) {
auto server = &servers[i];
if (!server->stream->Read(&server_status)) {
diff --git a/test/cpp/util/grpc_tool.cc b/test/cpp/util/grpc_tool.cc
index f06053ca23..4af00cdc96 100644
--- a/test/cpp/util/grpc_tool.cc
+++ b/test/cpp/util/grpc_tool.cc
@@ -57,7 +57,7 @@ DEFINE_bool(remotedb, true, "Use server types to parse and format messages");
DEFINE_string(metadata, "",
"Metadata to send to server, in the form of key1:val1:key2:val2");
DEFINE_string(proto_path, ".", "Path to look for the proto file.");
-DEFINE_string(proto_file, "", "Name of the proto file.");
+DEFINE_string(protofiles, "", "Name of the proto file.");
DEFINE_bool(binary_input, false, "Input in binary format");
DEFINE_bool(binary_output, false, "Output in binary format");
DEFINE_string(infile, "", "Input file (default is stdin)");
@@ -71,9 +71,9 @@ class GrpcTool {
explicit GrpcTool();
virtual ~GrpcTool() {}
- bool Help(int argc, const char** argv, CliCredentials cred,
+ bool Help(int argc, const char** argv, const CliCredentials& cred,
GrpcToolOutputCallback callback);
- bool CallMethod(int argc, const char** argv, CliCredentials cred,
+ bool CallMethod(int argc, const char** argv, const CliCredentials& cred,
GrpcToolOutputCallback callback);
// TODO(zyc): implement the following methods
// bool ListServices(int argc, const char** argv, GrpcToolOutputCallback
@@ -101,7 +101,7 @@ class GrpcTool {
};
template <typename T>
-std::function<bool(GrpcTool*, int, const char**, const CliCredentials,
+std::function<bool(GrpcTool*, int, const char**, const CliCredentials&,
GrpcToolOutputCallback)>
BindWith5Args(T&& func) {
return std::bind(std::forward<T>(func), std::placeholders::_1,
@@ -156,7 +156,7 @@ void PrintMetadata(const T& m, const grpc::string& message) {
struct Command {
const char* command;
- std::function<bool(GrpcTool*, int, const char**, const CliCredentials,
+ std::function<bool(GrpcTool*, int, const char**, const CliCredentials&,
GrpcToolOutputCallback)>
function;
int min_args;
@@ -201,7 +201,7 @@ const Command* FindCommand(const grpc::string& name) {
}
} // namespace
-int GrpcToolMainLib(int argc, const char** argv, const CliCredentials cred,
+int GrpcToolMainLib(int argc, const char** argv, const CliCredentials& cred,
GrpcToolOutputCallback callback) {
if (argc < 2) {
Usage("No command specified");
@@ -238,7 +238,7 @@ void GrpcTool::CommandUsage(const grpc::string& usage) const {
}
}
-bool GrpcTool::Help(int argc, const char** argv, const CliCredentials cred,
+bool GrpcTool::Help(int argc, const char** argv, const CliCredentials& cred,
GrpcToolOutputCallback callback) {
CommandUsage(
"Print help\n"
@@ -258,7 +258,7 @@ bool GrpcTool::Help(int argc, const char** argv, const CliCredentials cred,
}
bool GrpcTool::CallMethod(int argc, const char** argv,
- const CliCredentials cred,
+ const CliCredentials& cred,
GrpcToolOutputCallback callback) {
CommandUsage(
"Call method\n"
@@ -267,10 +267,10 @@ bool GrpcTool::CallMethod(int argc, const char** argv,
" <service> ; Exported service name\n"
" <method> ; Method name\n"
" <request> ; Text protobuffer (overrides infile)\n"
- " --proto_file ; Comma separated proto files used as a"
+ " --protofiles ; Comma separated proto files used as a"
" fallback when parsing request/response\n"
" --proto_path ; The search path of proto files, valid"
- " only when --proto_file is given\n"
+ " only when --protofiles is given\n"
" --metadata ; The metadata to be sent to the server\n"
" --infile ; Input filename (defaults to stdin)\n"
" --outfile ; Output filename (defaults to stdout)\n"
@@ -310,7 +310,7 @@ bool GrpcTool::CallMethod(int argc, const char** argv,
if (!FLAGS_binary_input || !FLAGS_binary_output) {
parser.reset(
new grpc::testing::ProtoFileParser(FLAGS_remotedb ? channel : nullptr,
- FLAGS_proto_path, FLAGS_proto_file));
+ FLAGS_proto_path, FLAGS_protofiles));
if (parser->HasError()) {
return false;
}
diff --git a/test/cpp/util/grpc_tool.h b/test/cpp/util/grpc_tool.h
index 3da86937c2..df3680258b 100644
--- a/test/cpp/util/grpc_tool.h
+++ b/test/cpp/util/grpc_tool.h
@@ -45,7 +45,7 @@ namespace testing {
typedef std::function<bool(const grpc::string &)> GrpcToolOutputCallback;
-int GrpcToolMainLib(int argc, const char **argv, CliCredentials cred,
+int GrpcToolMainLib(int argc, const char **argv, const CliCredentials &cred,
GrpcToolOutputCallback callback);
} // namespace testing
diff --git a/test/cpp/util/metrics_server.cc b/test/cpp/util/metrics_server.cc
index 1c7cd6382a..9296d6515e 100644
--- a/test/cpp/util/metrics_server.cc
+++ b/test/cpp/util/metrics_server.cc
@@ -35,6 +35,7 @@
#include <grpc++/server.h>
#include <grpc++/server_builder.h>
+#include <grpc/support/log.h>
#include "src/proto/grpc/testing/metrics.grpc.pb.h"
#include "src/proto/grpc/testing/metrics.pb.h"
diff --git a/test/cpp/util/proto_reflection_descriptor_database.h b/test/cpp/util/proto_reflection_descriptor_database.h
index eb7cf4907d..0e69696d5f 100644
--- a/test/cpp/util/proto_reflection_descriptor_database.h
+++ b/test/cpp/util/proto_reflection_descriptor_database.h
@@ -45,6 +45,8 @@
#include <grpc++/ext/reflection.grpc.pb.h>
#endif // GRPC_NO_GENERATED_CODE
#include <grpc++/grpc++.h>
+#include <grpc++/impl/codegen/config_protobuf.h>
+
namespace grpc {
// ProtoReflectionDescriptorDatabase takes a stub of ServerReflection and
diff --git a/test/cpp/util/test_config.cc b/test/cpp/util/test_config_cc.cc
index 8711746129..8711746129 100644
--- a/test/cpp/util/test_config.cc
+++ b/test/cpp/util/test_config_cc.cc
diff --git a/test/cpp/util/test_credentials_provider.cc b/test/cpp/util/test_credentials_provider.cc
index 6e68f59e6a..ca15f29795 100644
--- a/test/cpp/util/test_credentials_provider.cc
+++ b/test/cpp/util/test_credentials_provider.cc
@@ -37,6 +37,7 @@
#include <unordered_map>
#include <grpc++/impl/sync.h>
+#include <grpc/support/log.h>
#include <grpc/support/sync.h>
#include "test/core/end2end/data/ssl_test_data.h"
diff --git a/test/distrib/csharp/DistribTest/.gitignore b/test/distrib/csharp/DistribTest/.gitignore
index 1746e3269e..07f3d570e5 100644
--- a/test/distrib/csharp/DistribTest/.gitignore
+++ b/test/distrib/csharp/DistribTest/.gitignore
@@ -1,2 +1,3 @@
bin
obj
+*.lock.json
diff --git a/test/distrib/csharp/DistribTest/DistribTest.csproj b/test/distrib/csharp/DistribTest/DistribTest.csproj
index 6ca03b2c80..0bff9ff3e0 100644
--- a/test/distrib/csharp/DistribTest/DistribTest.csproj
+++ b/test/distrib/csharp/DistribTest/DistribTest.csproj
@@ -65,7 +65,7 @@
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Interactive.Async">
- <HintPath>..\packages\Ix-Async.1.2.3\lib\net45\System.Interactive.Async.dll</HintPath>
+ <HintPath>..\packages\System.Interactive.Async.3.0.0\lib\net45\System.Interactive.Async.dll</HintPath>
</Reference>
<Reference Include="System.Net" />
<Reference Include="System.Net.Http" />
diff --git a/test/distrib/csharp/DistribTest/DistribTest.project.json b/test/distrib/csharp/DistribTest/DistribTest.project.json
new file mode 100644
index 0000000000..422545ea8f
--- /dev/null
+++ b/test/distrib/csharp/DistribTest/DistribTest.project.json
@@ -0,0 +1,11 @@
+// This file exists only to prevent VS2015 from mistakenly picking up
+// project.json file when building .csproj project.
+// See https://github.com/Microsoft/msbuild/issues/394
+{
+ "frameworks": {
+ "net45": { }
+ },
+ "runtimes": {
+ "win": { }
+ }
+}
diff --git a/test/distrib/csharp/DistribTest/packages.config b/test/distrib/csharp/DistribTest/packages.config
index e5d2d9d383..84be8f76b5 100644
--- a/test/distrib/csharp/DistribTest/packages.config
+++ b/test/distrib/csharp/DistribTest/packages.config
@@ -6,6 +6,6 @@
<package id="Grpc" version="__GRPC_NUGET_VERSION__" targetFramework="net45" />
<package id="Grpc.Auth" version="__GRPC_NUGET_VERSION__" targetFramework="net45" />
<package id="Grpc.Core" version="__GRPC_NUGET_VERSION__" targetFramework="net45" />
- <package id="Ix-Async" version="1.2.3" targetFramework="net45" />
+ <package id="System.Interactive.Async" version="3.0.0" targetFramework="net45" />
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
-</packages>
+</packages> \ No newline at end of file
diff --git a/test/distrib/csharp/DistribTest/project.json b/test/distrib/csharp/DistribTest/project.json
new file mode 100644
index 0000000000..09266e5d4d
--- /dev/null
+++ b/test/distrib/csharp/DistribTest/project.json
@@ -0,0 +1,22 @@
+{
+ "buildOptions": {
+ "emitEntryPoint": true
+ },
+ "dependencies": {
+ "Grpc.Auth": "__GRPC_NUGET_VERSION__",
+ "Grpc.Core": "__GRPC_NUGET_VERSION__",
+ // Necessary for native deps to get copied correctly.
+ "Microsoft.NETCore.Platforms": "1.0.1"
+ },
+ "frameworks": {
+ "net45": { },
+ "netcoreapp1.0": {
+ "dependencies": {
+ "Microsoft.NETCore.App": {
+ "type": "platform",
+ "version": "1.0.0"
+ }
+ }
+ }
+ }
+}
diff --git a/test/distrib/csharp/run_distrib_test.bat b/test/distrib/csharp/run_distrib_test.bat
index 67bfc58ac8..6cf381142f 100644
--- a/test/distrib/csharp/run_distrib_test.bat
+++ b/test/distrib/csharp/run_distrib_test.bat
@@ -31,12 +31,22 @@
cd /d %~dp0
@rem extract input artifacts
-powershell -Command "Add-Type -Assembly 'System.IO.Compression.FileSystem'; [System.IO.Compression.ZipFile]::ExtractToDirectory('../../../input_artifacts/csharp_nugets.zip', 'TestNugetFeed');"
+powershell -Command "Add-Type -Assembly 'System.IO.Compression.FileSystem'; [System.IO.Compression.ZipFile]::ExtractToDirectory('../../../input_artifacts/csharp_nugets_dotnetcli.zip', 'TestNugetFeed');"
update_version.sh auto
set NUGET=C:\nuget\nuget.exe
-%NUGET% restore || goto :error
+
+@rem TODO(jtattermusch): Get rid of this hack. See #8034
+@rem We can't do just "nuget restore" because restoring a .sln solution doesn't work
+@rem with nuget 3.X. On the other hand, we need nuget 2.12+ to be able to restore
+@rem some of the packages (e.g. System.Interactive.Async), but nuget 2.12
+@rem hasn't been officially released.
+@rem Please note that "Restore nuget packages" in VS2013 and VS2015 GUI works as usual.
+
+cd DistribTest || goto :error
+%NUGET% restore -PackagesDirectory ../packages || goto :error
+cd ..
@call build_vs2015.bat DistribTest.sln %MSBUILD_EXTRA_ARGS% || goto :error
diff --git a/test/distrib/csharp/run_distrib_test.sh b/test/distrib/csharp/run_distrib_test.sh
index 64e98d8009..0a77c1af44 100755
--- a/test/distrib/csharp/run_distrib_test.sh
+++ b/test/distrib/csharp/run_distrib_test.sh
@@ -32,7 +32,7 @@ set -ex
cd $(dirname $0)
-unzip -o "$EXTERNAL_GIT_ROOT/input_artifacts/csharp_nugets.zip" -d TestNugetFeed
+unzip -o "$EXTERNAL_GIT_ROOT/input_artifacts/csharp_nugets_dotnetcli.zip" -d TestNugetFeed
./update_version.sh auto
diff --git a/test/distrib/csharp/run_distrib_test_dotnetcli.sh b/test/distrib/csharp/run_distrib_test_dotnetcli.sh
new file mode 100755
index 0000000000..493c5049fb
--- /dev/null
+++ b/test/distrib/csharp/run_distrib_test_dotnetcli.sh
@@ -0,0 +1,58 @@
+#!/bin/bash
+# Copyright 2015, Google Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+set -ex
+
+cd $(dirname $0)
+
+unzip -o "$EXTERNAL_GIT_ROOT/input_artifacts/csharp_nugets_dotnetcli.zip" -d TestNugetFeed
+
+./update_version.sh auto
+
+cd DistribTest
+
+# TODO(jtattermusch): make sure we don't pollute the global nuget cache with
+# the nugets being tested.
+dotnet restore
+
+dotnet build
+dotnet publish
+
+# .NET 4.5 target after dotnet build
+mono bin/Debug/net45/*-x64/DistribTest.exe
+
+# .NET 4.5 target after dotnet publish
+mono bin/Debug/net45/*-x64/publish/DistribTest.exe
+
+# .NET Core target after dotnet build
+dotnet exec bin/Debug/netcoreapp1.0/DistribTest.dll
+
+# .NET Core target after dotnet publish
+dotnet exec bin/Debug/netcoreapp1.0/publish/DistribTest.dll
diff --git a/test/distrib/csharp/update_version.sh b/test/distrib/csharp/update_version.sh
index 189d0ad357..2961d0c5ef 100755
--- a/test/distrib/csharp/update_version.sh
+++ b/test/distrib/csharp/update_version.sh
@@ -35,10 +35,10 @@ cd $(dirname $0)
CSHARP_VERSION="$1"
if [ "$CSHARP_VERSION" == "auto" ]
then
- # autodetect C# version
- CSHARP_VERSION=$(ls TestNugetFeed | grep '^Grpc\.[0-9].*\.nupkg$' | sed s/^Grpc\.// | sed s/\.nupkg$//)
+ # autodetect C# version from the name of Grpc.Core.0.0.0-x.nupkg file
+ CSHARP_VERSION=$(ls TestNugetFeed | grep -m 1 '^Grpc\.Core\.[0-9].*\.nupkg$' | sed s/^Grpc\.Core\.// | sed s/\.nupkg$// | sed s/\.symbols$//)
echo "Autodetected nuget ${CSHARP_VERSION}"
fi
# Replaces version placeholder with value provided as first argument.
-sed -ibak "s/__GRPC_NUGET_VERSION__/${CSHARP_VERSION}/g" DistribTest/packages.config DistribTest/DistribTest.csproj
+sed -ibak "s/__GRPC_NUGET_VERSION__/${CSHARP_VERSION}/g" DistribTest/packages.config DistribTest/DistribTest.csproj DistribTest/project.json
diff --git a/third_party/nanopb b/third_party/nanopb
-Subproject f8ac463766281625ad710900479130c7fcb4d63
+Subproject 68a86e96481e6bea987df8de47027847b30c325
diff --git a/third_party/protobuf b/third_party/protobuf
-Subproject e8ae137c96444ea313485ed1118c5e43b2099cf
+Subproject bba446bbf2ac7b0b9923d4eb07d5acd0665a8cf
diff --git a/tools/codegen/core/gen_nano_proto.sh b/tools/codegen/core/gen_nano_proto.sh
index c880fc23a2..df107c208f 100755
--- a/tools/codegen/core/gen_nano_proto.sh
+++ b/tools/codegen/core/gen_nano_proto.sh
@@ -123,7 +123,7 @@ popd
# this should be the same version as the submodule we compile against
# ideally we'd update this as a template to ensure that
-pip install protobuf==3.0.0b2
+pip install protobuf==3.0.0
pushd "$(dirname $INPUT_PROTO)" > /dev/null
diff --git a/include/grpc/impl/codegen/alloc.h b/tools/codegen/core/gen_percent_encoding_tables.c
index 683c755f2c..93f30deeb3 100644
--- a/include/grpc/impl/codegen/alloc.h
+++ b/tools/codegen/core/gen_percent_encoding_tables.c
@@ -31,44 +31,54 @@
*
*/
-#ifndef GRPC_IMPL_CODEGEN_ALLOC_H
-#define GRPC_IMPL_CODEGEN_ALLOC_H
+/* generates constant table for metadata.c */
-#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
-#include <grpc/impl/codegen/port_platform.h>
+static unsigned char legal_bits[256 / 8];
-#ifdef __cplusplus
-extern "C" {
-#endif
+static void legal(int x) {
+ int byte = x / 8;
+ int bit = x % 8;
+ /* NB: the following integer arithmetic operation needs to be in its
+ * expanded form due to the "integral promotion" performed (see section
+ * 3.2.1.1 of the C89 draft standard). A cast to the smaller container type
+ * is then required to avoid the compiler warning */
+ legal_bits[byte] =
+ (unsigned char)((legal_bits[byte] | (unsigned char)(1 << bit)));
+}
-typedef struct gpr_allocation_functions {
- void *(*malloc_fn)(size_t size);
- void *(*realloc_fn)(void *ptr, size_t size);
- void (*free_fn)(void *ptr);
-} gpr_allocation_functions;
+static void dump(const char *name) {
+ int i;
-/* malloc, never returns NULL */
-GPRAPI void *gpr_malloc(size_t size);
-/* free */
-GPRAPI void gpr_free(void *ptr);
-/* realloc, never returns NULL */
-GPRAPI void *gpr_realloc(void *p, size_t size);
-/* aligned malloc, never returns NULL, will align to 1 << alignment_log */
-GPRAPI void *gpr_malloc_aligned(size_t size, size_t alignment_log);
-/* free memory allocated by gpr_malloc_aligned */
-GPRAPI void gpr_free_aligned(void *ptr);
+ printf("const uint8_t %s[256/8] = ", name);
+ for (i = 0; i < 256 / 8; i++)
+ printf("%c 0x%02x", i ? ',' : '{', legal_bits[i]);
+ printf(" };\n");
+}
-/** Request the family of allocation functions in \a functions be used. NOTE
- * that this request will be honored in a *best effort* basis and that no
- * guarantees are made about the default functions (eg, malloc) being called. */
-GPRAPI void gpr_set_allocation_functions(gpr_allocation_functions functions);
+static void clear(void) { memset(legal_bits, 0, sizeof(legal_bits)); }
-/** Return the family of allocation functions currently in effect. */
-GPRAPI gpr_allocation_functions gpr_get_allocation_functions();
+int main(void) {
+ int i;
-#ifdef __cplusplus
-}
-#endif
+ clear();
+ for (i = 'a'; i <= 'z'; i++) legal(i);
+ for (i = 'A'; i <= 'Z'; i++) legal(i);
+ for (i = '0'; i <= '9'; i++) legal(i);
+ legal('-');
+ legal('_');
+ legal('.');
+ legal('~');
+ dump("gpr_url_percent_encoding_unreserved_bytes");
-#endif /* GRPC_IMPL_CODEGEN_ALLOC_H */
+ clear();
+ for (i = 32; i <= 126; i++) {
+ if (i == '%') continue;
+ legal(i);
+ }
+ dump("gpr_compatible_percent_encoding_unreserved_bytes");
+
+ return 0;
+}
diff --git a/tools/codegen/core/gen_static_metadata.py b/tools/codegen/core/gen_static_metadata.py
index 859adcbeb1..2a16baa1b9 100755
--- a/tools/codegen/core/gen_static_metadata.py
+++ b/tools/codegen/core/gen_static_metadata.py
@@ -42,6 +42,7 @@ import sys
CONFIG = [
'grpc-timeout',
'grpc-internal-encoding-request',
+ 'grpc-payload-bin',
':path',
'grpc-encoding',
'grpc-accept-encoding',
diff --git a/tools/distrib/c-ish/check_documentation.py b/tools/distrib/c-ish/check_documentation.py
new file mode 100755
index 0000000000..0bb3ca6961
--- /dev/null
+++ b/tools/distrib/c-ish/check_documentation.py
@@ -0,0 +1,91 @@
+#!/usr/bin/env python2.7
+
+# Copyright 2015, Google Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# check for directory level 'README.md' files
+# check that all implementation and interface files have a \file doxygen comment
+
+import os
+import sys
+
+# where do we run
+_TARGET_DIRS = [
+ 'include/grpc',
+ 'include/grpc++',
+ 'src/core',
+ 'src/cpp',
+ 'test/core',
+ 'test/cpp'
+]
+
+# which file extensions do we care about
+_INTERESTING_EXTENSIONS = [
+ '.c',
+ '.h',
+ '.cc'
+]
+
+# find our home
+_ROOT = os.path.abspath(
+ os.path.join(os.path.dirname(sys.argv[0]), '../../..'))
+os.chdir(_ROOT)
+
+errors = 0
+
+# walk directories, find things
+printed_banner = False
+for target_dir in _TARGET_DIRS:
+ for root, dirs, filenames in os.walk(target_dir):
+ if 'README.md' not in filenames:
+ if not printed_banner:
+ print 'Missing README.md'
+ print '================='
+ printed_banner = True
+ print root
+ errors += 1
+if printed_banner: print
+printed_banner = False
+for target_dir in _TARGET_DIRS:
+ for root, dirs, filenames in os.walk(target_dir):
+ for filename in filenames:
+ if os.path.splitext(filename)[1] not in _INTERESTING_EXTENSIONS:
+ continue
+ path = os.path.join(root, filename)
+ with open(path) as f:
+ contents = f.read()
+ if '\\file' not in contents:
+ if not printed_banner:
+ print 'Missing \\file comment'
+ print '======================'
+ printed_banner = True
+ print path
+ errors += 1
+
+assert errors == 0, 'error count = %d' % errors
diff --git a/tools/dockerfile/distribtest/csharp_centos7_x64/Dockerfile b/tools/dockerfile/distribtest/csharp_centos7_x64/Dockerfile
index c917b29113..6584845721 100644
--- a/tools/dockerfile/distribtest/csharp_centos7_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/csharp_centos7_x64/Dockerfile
@@ -34,4 +34,6 @@ RUN yum-config-manager --add-repo http://download.mono-project.com/repo/centos/
RUN yum install -y mono
RUN yum install -y unzip
-RUN yum install -y nuget
+
+# --nogpgcheck because nuget-2.12 package is not signed.
+RUN yum install -y nuget --nogpgcheck
diff --git a/tools/dockerfile/distribtest/csharp_jessie_x64/Dockerfile b/tools/dockerfile/distribtest/csharp_jessie_x64/Dockerfile
index 249095a47b..c8cd575632 100644
--- a/tools/dockerfile/distribtest/csharp_jessie_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/csharp_jessie_x64/Dockerfile
@@ -40,4 +40,7 @@ RUN apt-get update && apt-get install -y \
ca-certificates-mono \
nuget
+# make sure we have nuget 2.12+ (in case there's an older cached docker image)
+RUN apt-get update && apt-get install -y nuget
+
RUN apt-get update && apt-get install -y unzip
diff --git a/tools/dockerfile/distribtest/csharp_jessie_x86/Dockerfile b/tools/dockerfile/distribtest/csharp_jessie_x86/Dockerfile
index 9eda551d9c..28cc65468a 100644
--- a/tools/dockerfile/distribtest/csharp_jessie_x86/Dockerfile
+++ b/tools/dockerfile/distribtest/csharp_jessie_x86/Dockerfile
@@ -40,4 +40,7 @@ RUN apt-get update && apt-get install -y \
ca-certificates-mono \
nuget
+# make sure we have nuget 2.12+ (in case there's an older cached docker image)
+RUN apt-get update && apt-get install -y nuget
+
RUN apt-get update && apt-get install -y unzip
diff --git a/tools/dockerfile/distribtest/csharp_ubuntu1404_x64/Dockerfile b/tools/dockerfile/distribtest/csharp_ubuntu1404_x64/Dockerfile
index 85daea450d..1f9a42e13f 100644
--- a/tools/dockerfile/distribtest/csharp_ubuntu1404_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/csharp_ubuntu1404_x64/Dockerfile
@@ -37,4 +37,24 @@ RUN apt-get update && apt-get install -y \
ca-certificates-mono \
nuget
+# make sure we have nuget 2.12+ (in case there's an older cached docker image)
+RUN apt-get update && apt-get install -y nuget
+
RUN apt-get update && apt-get install -y unzip
+
+# Install dotnet CLI
+RUN apt-get install -y apt-transport-https
+RUN sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list'
+RUN apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893
+RUN apt-get update && apt-get install -y dotnet-dev-1.0.0-preview2-003121
+
+# Trigger the population of the local package cache for dotnet CLI
+RUN mkdir warmup \
+ && cd warmup \
+ && dotnet new \
+ && cd .. \
+ && rm -rf warmup
+
+# TODO(jtattermusch): without libc-dev, netcoreapp1.0 targets fail with
+# System.DllNotFoundException: Unable to load DLL 'libdl.so'
+RUN apt-get install -y libc-dev \ No newline at end of file
diff --git a/tools/dockerfile/distribtest/csharp_ubuntu1504_x64/Dockerfile b/tools/dockerfile/distribtest/csharp_ubuntu1504_x64/Dockerfile
index ec16105155..fd39ab2b0a 100644
--- a/tools/dockerfile/distribtest/csharp_ubuntu1504_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/csharp_ubuntu1504_x64/Dockerfile
@@ -37,4 +37,7 @@ RUN apt-get update && apt-get install -y \
ca-certificates-mono \
nuget
+# make sure we have nuget 2.12+ (in case there's an older cached docker image)
+RUN apt-get update && apt-get install -y nuget
+
RUN apt-get update && apt-get install -y unzip
diff --git a/tools/dockerfile/distribtest/csharp_ubuntu1510_x64/Dockerfile b/tools/dockerfile/distribtest/csharp_ubuntu1510_x64/Dockerfile
index 110aa2ab86..1d86dbd4d8 100644
--- a/tools/dockerfile/distribtest/csharp_ubuntu1510_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/csharp_ubuntu1510_x64/Dockerfile
@@ -37,4 +37,7 @@ RUN apt-get update && apt-get install -y \
ca-certificates-mono \
nuget
+# make sure we have nuget 2.12+ (in case there's an older cached docker image)
+RUN apt-get update && apt-get install -y nuget
+
RUN apt-get update && apt-get install -y unzip
diff --git a/tools/dockerfile/distribtest/csharp_ubuntu1604_x64/Dockerfile b/tools/dockerfile/distribtest/csharp_ubuntu1604_x64/Dockerfile
index 4ef076669b..05fa32b986 100644
--- a/tools/dockerfile/distribtest/csharp_ubuntu1604_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/csharp_ubuntu1604_x64/Dockerfile
@@ -34,4 +34,9 @@ RUN apt-get update && apt-get install -y \
ca-certificates-mono \
nuget
+# make sure we have nuget 2.12+ (in case there's an older cached docker image)
+RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
+RUN echo "deb http://download.mono-project.com/repo/debian wheezy main" | tee /etc/apt/sources.list.d/mono-xamarin.list
+RUN apt-get update && apt-get install -y nuget
+
RUN apt-get update && apt-get install -y unzip
diff --git a/tools/dockerfile/distribtest/csharp_wheezy_x64/Dockerfile b/tools/dockerfile/distribtest/csharp_wheezy_x64/Dockerfile
index d9e64fe9d1..0ab2a62a08 100644
--- a/tools/dockerfile/distribtest/csharp_wheezy_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/csharp_wheezy_x64/Dockerfile
@@ -27,6 +27,9 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-FROM mono:4.2.2.30
+FROM mono:4.4.2.11
+
+# make sure we have nuget 2.12+ (in case there's an older cached docker image)
+RUN apt-get update && apt-get install -y nuget
RUN apt-get update && apt-get install -y unzip
diff --git a/tools/dockerfile/interoptest/grpc_interop_csharpcoreclr/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_csharpcoreclr/Dockerfile
new file mode 100644
index 0000000000..efe6e39118
--- /dev/null
+++ b/tools/dockerfile/interoptest/grpc_interop_csharpcoreclr/Dockerfile
@@ -0,0 +1,126 @@
+# Copyright 2015, Google Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+FROM debian:jessie
+
+# Install Git and basic packages.
+RUN apt-get update && apt-get install -y \
+ autoconf \
+ autotools-dev \
+ build-essential \
+ bzip2 \
+ ccache \
+ curl \
+ gcc \
+ gcc-multilib \
+ git \
+ golang \
+ gyp \
+ lcov \
+ libc6 \
+ libc6-dbg \
+ libc6-dev \
+ libgtest-dev \
+ libtool \
+ make \
+ perl \
+ strace \
+ python-dev \
+ python-setuptools \
+ python-yaml \
+ telnet \
+ unzip \
+ wget \
+ zip && apt-get clean
+
+#================
+# Build profiling
+RUN apt-get update && apt-get install -y time && apt-get clean
+
+#====================
+# Python dependencies
+
+# Install dependencies
+
+RUN apt-get update && apt-get install -y \
+ python-all-dev \
+ python3-all-dev \
+ python-pip
+
+# Install Python packages from PyPI
+RUN pip install pip --upgrade
+RUN pip install virtualenv
+RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.0.0a2 six==1.10.0
+
+#================
+# C# dependencies
+
+# Update to a newer version of mono
+RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
+RUN echo "deb http://download.mono-project.com/repo/debian wheezy main" | tee /etc/apt/sources.list.d/mono-xamarin.list
+RUN echo "deb http://download.mono-project.com/repo/debian wheezy-apache24-compat main" | tee -a /etc/apt/sources.list.d/mono-xamarin.list
+RUN echo "deb http://download.mono-project.com/repo/debian wheezy-libjpeg62-compat main" | tee -a /etc/apt/sources.list.d/mono-xamarin.list
+RUN echo "deb http://download.mono-project.com/repo/debian wheezy-libtiff-compat main" | tee -a /etc/apt/sources.list.d/mono-xamarin.list
+
+# Install dependencies
+RUN apt-get update && apt-get -y dist-upgrade && apt-get install -y \
+ mono-devel \
+ ca-certificates-mono \
+ nuget \
+ && apt-get clean
+
+RUN nuget update -self
+
+# Install dotnet SDK based on https://www.microsoft.com/net/core#debian
+RUN apt-get update && apt-get install -y curl libunwind8 gettext
+RUN curl -sSL -o dotnet.tar.gz https://go.microsoft.com/fwlink/?LinkID=809130
+RUN mkdir -p /opt/dotnet && tar zxf dotnet.tar.gz -C /opt/dotnet
+RUN ln -s /opt/dotnet/dotnet /usr/local/bin
+
+# Trigger the population of the local package cache
+ENV NUGET_XMLDOC_MODE skip
+RUN mkdir warmup \
+ && cd warmup \
+ && dotnet new \
+ && cd .. \
+ && rm -rf warmup
+
+# Prepare ccache
+RUN ln -s /usr/bin/ccache /usr/local/bin/gcc
+RUN ln -s /usr/bin/ccache /usr/local/bin/g++
+RUN ln -s /usr/bin/ccache /usr/local/bin/cc
+RUN ln -s /usr/bin/ccache /usr/local/bin/c++
+RUN ln -s /usr/bin/ccache /usr/local/bin/clang
+RUN ln -s /usr/bin/ccache /usr/local/bin/clang++
+
+
+RUN mkdir /var/local/jenkins
+
+# Define the default command.
+CMD ["bash"]
diff --git a/tools/dockerfile/interoptest/grpc_interop_csharpcoreclr/build_interop.sh b/tools/dockerfile/interoptest/grpc_interop_csharpcoreclr/build_interop.sh
new file mode 100755
index 0000000000..77cd65cce3
--- /dev/null
+++ b/tools/dockerfile/interoptest/grpc_interop_csharpcoreclr/build_interop.sh
@@ -0,0 +1,43 @@
+#!/bin/bash
+# Copyright 2015, Google Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# Builds C# interop server and client in a base image.
+set -e
+
+mkdir -p /var/local/git
+git clone --recursive /var/local/jenkins/grpc /var/local/git/grpc
+
+# copy service account keys if available
+cp -r /var/local/jenkins/service_account $HOME || true
+
+cd /var/local/git/grpc
+
+# build C# interop client & server
+tools/run_tests/run_tests.py -l csharp -c dbg --compiler coreclr --build_only
diff --git a/tools/dockerfile/test/csharp_coreclr_x64/Dockerfile b/tools/dockerfile/test/csharp_coreclr_x64/Dockerfile
index 4921815190..efe6e39118 100644
--- a/tools/dockerfile/test/csharp_coreclr_x64/Dockerfile
+++ b/tools/dockerfile/test/csharp_coreclr_x64/Dockerfile
@@ -97,7 +97,6 @@ RUN apt-get update && apt-get -y dist-upgrade && apt-get install -y \
RUN nuget update -self
-
# Install dotnet SDK based on https://www.microsoft.com/net/core#debian
RUN apt-get update && apt-get install -y curl libunwind8 gettext
RUN curl -sSL -o dotnet.tar.gz https://go.microsoft.com/fwlink/?LinkID=809130
diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++
index 314a42d989..2a56d40c63 100644
--- a/tools/doxygen/Doxyfile.c++
+++ b/tools/doxygen/Doxyfile.c++
@@ -814,27 +814,23 @@ include/grpc/grpc.h \
include/grpc/grpc_posix.h \
include/grpc/grpc_security_constants.h \
include/grpc/status.h \
-include/grpc/impl/codegen/byte_buffer.h \
include/grpc/impl/codegen/byte_buffer_reader.h \
include/grpc/impl/codegen/compression_types.h \
include/grpc/impl/codegen/connectivity_state.h \
include/grpc/impl/codegen/grpc_types.h \
include/grpc/impl/codegen/propagation_bits.h \
include/grpc/impl/codegen/status.h \
-include/grpc/impl/codegen/alloc.h \
include/grpc/impl/codegen/atm.h \
include/grpc/impl/codegen/atm_gcc_atomic.h \
include/grpc/impl/codegen/atm_gcc_sync.h \
include/grpc/impl/codegen/atm_windows.h \
-include/grpc/impl/codegen/log.h \
+include/grpc/impl/codegen/gpr_types.h \
include/grpc/impl/codegen/port_platform.h \
include/grpc/impl/codegen/slice.h \
-include/grpc/impl/codegen/slice_buffer.h \
include/grpc/impl/codegen/sync.h \
include/grpc/impl/codegen/sync_generic.h \
include/grpc/impl/codegen/sync_posix.h \
include/grpc/impl/codegen/sync_windows.h \
-include/grpc/impl/codegen/time.h \
include/grpc++/impl/codegen/async_stream.h \
include/grpc++/impl/codegen/async_unary_call.h \
include/grpc++/impl/codegen/call.h \
@@ -858,6 +854,7 @@ include/grpc++/impl/codegen/server_interface.h \
include/grpc++/impl/codegen/service_type.h \
include/grpc++/impl/codegen/status.h \
include/grpc++/impl/codegen/status_code_enum.h \
+include/grpc++/impl/codegen/status_helper.h \
include/grpc++/impl/codegen/string_ref.h \
include/grpc++/impl/codegen/stub_options.h \
include/grpc++/impl/codegen/sync.h \
diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal
index 12eb651384..c7b0ab773f 100644
--- a/tools/doxygen/Doxyfile.c++.internal
+++ b/tools/doxygen/Doxyfile.c++.internal
@@ -814,27 +814,23 @@ include/grpc/grpc.h \
include/grpc/grpc_posix.h \
include/grpc/grpc_security_constants.h \
include/grpc/status.h \
-include/grpc/impl/codegen/byte_buffer.h \
include/grpc/impl/codegen/byte_buffer_reader.h \
include/grpc/impl/codegen/compression_types.h \
include/grpc/impl/codegen/connectivity_state.h \
include/grpc/impl/codegen/grpc_types.h \
include/grpc/impl/codegen/propagation_bits.h \
include/grpc/impl/codegen/status.h \
-include/grpc/impl/codegen/alloc.h \
include/grpc/impl/codegen/atm.h \
include/grpc/impl/codegen/atm_gcc_atomic.h \
include/grpc/impl/codegen/atm_gcc_sync.h \
include/grpc/impl/codegen/atm_windows.h \
-include/grpc/impl/codegen/log.h \
+include/grpc/impl/codegen/gpr_types.h \
include/grpc/impl/codegen/port_platform.h \
include/grpc/impl/codegen/slice.h \
-include/grpc/impl/codegen/slice_buffer.h \
include/grpc/impl/codegen/sync.h \
include/grpc/impl/codegen/sync_generic.h \
include/grpc/impl/codegen/sync_posix.h \
include/grpc/impl/codegen/sync_windows.h \
-include/grpc/impl/codegen/time.h \
include/grpc++/impl/codegen/async_stream.h \
include/grpc++/impl/codegen/async_unary_call.h \
include/grpc++/impl/codegen/call.h \
@@ -858,6 +854,7 @@ include/grpc++/impl/codegen/server_interface.h \
include/grpc++/impl/codegen/service_type.h \
include/grpc++/impl/codegen/status.h \
include/grpc++/impl/codegen/status_code_enum.h \
+include/grpc++/impl/codegen/status_helper.h \
include/grpc++/impl/codegen/string_ref.h \
include/grpc++/impl/codegen/stub_options.h \
include/grpc++/impl/codegen/sync.h \
@@ -953,39 +950,39 @@ src/core/lib/transport/static_metadata.h \
src/core/lib/transport/timeout_encoding.h \
src/core/lib/transport/transport.h \
src/core/lib/transport/transport_impl.h \
+src/cpp/client/insecure_credentials.cc \
src/cpp/client/secure_credentials.cc \
src/cpp/common/auth_property_iterator.cc \
src/cpp/common/secure_auth_context.cc \
src/cpp/common/secure_channel_arguments.cc \
src/cpp/common/secure_create_auth_context.cc \
+src/cpp/server/insecure_server_credentials.cc \
src/cpp/server/secure_server_credentials.cc \
-src/cpp/client/channel.cc \
+src/cpp/client/channel_cc.cc \
src/cpp/client/client_context.cc \
src/cpp/client/create_channel.cc \
src/cpp/client/create_channel_internal.cc \
src/cpp/client/create_channel_posix.cc \
-src/cpp/client/credentials.cc \
+src/cpp/client/credentials_cc.cc \
src/cpp/client/generic_stub.cc \
-src/cpp/client/insecure_credentials.cc \
src/cpp/common/channel_arguments.cc \
src/cpp/common/channel_filter.cc \
-src/cpp/common/completion_queue.cc \
+src/cpp/common/completion_queue_cc.cc \
src/cpp/common/core_codegen.cc \
src/cpp/common/rpc_method.cc \
src/cpp/server/async_generic_service.cc \
src/cpp/server/create_default_thread_pool.cc \
src/cpp/server/dynamic_thread_pool.cc \
-src/cpp/server/insecure_server_credentials.cc \
-src/cpp/server/server.cc \
src/cpp/server/server_builder.cc \
+src/cpp/server/server_cc.cc \
src/cpp/server/server_context.cc \
src/cpp/server/server_credentials.cc \
src/cpp/server/server_posix.cc \
-src/cpp/util/byte_buffer.cc \
-src/cpp/util/slice.cc \
+src/cpp/util/byte_buffer_cc.cc \
+src/cpp/util/slice_cc.cc \
src/cpp/util/status.cc \
src/cpp/util/string_ref.cc \
-src/cpp/util/time.cc \
+src/cpp/util/time_cc.cc \
src/core/lib/channel/channel_args.c \
src/core/lib/channel/channel_stack.c \
src/core/lib/channel/channel_stack_builder.c \
diff --git a/tools/doxygen/Doxyfile.core b/tools/doxygen/Doxyfile.core
index 27f878e8ab..003686cee6 100644
--- a/tools/doxygen/Doxyfile.core
+++ b/tools/doxygen/Doxyfile.core
@@ -767,27 +767,23 @@ include/grpc/grpc.h \
include/grpc/grpc_posix.h \
include/grpc/grpc_security_constants.h \
include/grpc/status.h \
-include/grpc/impl/codegen/byte_buffer.h \
include/grpc/impl/codegen/byte_buffer_reader.h \
include/grpc/impl/codegen/compression_types.h \
include/grpc/impl/codegen/connectivity_state.h \
include/grpc/impl/codegen/grpc_types.h \
include/grpc/impl/codegen/propagation_bits.h \
include/grpc/impl/codegen/status.h \
-include/grpc/impl/codegen/alloc.h \
include/grpc/impl/codegen/atm.h \
include/grpc/impl/codegen/atm_gcc_atomic.h \
include/grpc/impl/codegen/atm_gcc_sync.h \
include/grpc/impl/codegen/atm_windows.h \
-include/grpc/impl/codegen/log.h \
+include/grpc/impl/codegen/gpr_types.h \
include/grpc/impl/codegen/port_platform.h \
include/grpc/impl/codegen/slice.h \
-include/grpc/impl/codegen/slice_buffer.h \
include/grpc/impl/codegen/sync.h \
include/grpc/impl/codegen/sync_generic.h \
include/grpc/impl/codegen/sync_posix.h \
include/grpc/impl/codegen/sync_windows.h \
-include/grpc/impl/codegen/time.h \
include/grpc/grpc_security.h \
include/grpc/census.h \
include/grpc/support/alloc.h \
@@ -818,20 +814,17 @@ include/grpc/support/tls_gcc.h \
include/grpc/support/tls_msvc.h \
include/grpc/support/tls_pthread.h \
include/grpc/support/useful.h \
-include/grpc/impl/codegen/alloc.h \
include/grpc/impl/codegen/atm.h \
include/grpc/impl/codegen/atm_gcc_atomic.h \
include/grpc/impl/codegen/atm_gcc_sync.h \
include/grpc/impl/codegen/atm_windows.h \
-include/grpc/impl/codegen/log.h \
+include/grpc/impl/codegen/gpr_types.h \
include/grpc/impl/codegen/port_platform.h \
include/grpc/impl/codegen/slice.h \
-include/grpc/impl/codegen/slice_buffer.h \
include/grpc/impl/codegen/sync.h \
include/grpc/impl/codegen/sync_generic.h \
include/grpc/impl/codegen/sync_posix.h \
-include/grpc/impl/codegen/sync_windows.h \
-include/grpc/impl/codegen/time.h
+include/grpc/impl/codegen/sync_windows.h
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal
index 426c6d91e3..e2d44e8bfa 100644
--- a/tools/doxygen/Doxyfile.core.internal
+++ b/tools/doxygen/Doxyfile.core.internal
@@ -767,27 +767,23 @@ include/grpc/grpc.h \
include/grpc/grpc_posix.h \
include/grpc/grpc_security_constants.h \
include/grpc/status.h \
-include/grpc/impl/codegen/byte_buffer.h \
include/grpc/impl/codegen/byte_buffer_reader.h \
include/grpc/impl/codegen/compression_types.h \
include/grpc/impl/codegen/connectivity_state.h \
include/grpc/impl/codegen/grpc_types.h \
include/grpc/impl/codegen/propagation_bits.h \
include/grpc/impl/codegen/status.h \
-include/grpc/impl/codegen/alloc.h \
include/grpc/impl/codegen/atm.h \
include/grpc/impl/codegen/atm_gcc_atomic.h \
include/grpc/impl/codegen/atm_gcc_sync.h \
include/grpc/impl/codegen/atm_windows.h \
-include/grpc/impl/codegen/log.h \
+include/grpc/impl/codegen/gpr_types.h \
include/grpc/impl/codegen/port_platform.h \
include/grpc/impl/codegen/slice.h \
-include/grpc/impl/codegen/slice_buffer.h \
include/grpc/impl/codegen/sync.h \
include/grpc/impl/codegen/sync_generic.h \
include/grpc/impl/codegen/sync_posix.h \
include/grpc/impl/codegen/sync_windows.h \
-include/grpc/impl/codegen/time.h \
include/grpc/grpc_security.h \
include/grpc/census.h \
src/core/lib/channel/channel_args.h \
@@ -917,7 +913,6 @@ src/core/lib/tsi/transport_security.h \
src/core/lib/tsi/transport_security_interface.h \
src/core/ext/client_config/client_channel.h \
src/core/ext/client_config/client_channel_factory.h \
-src/core/ext/client_config/client_config.h \
src/core/ext/client_config/connector.h \
src/core/ext/client_config/initial_connect_string.h \
src/core/ext/client_config/lb_policy.h \
@@ -927,8 +922,8 @@ src/core/ext/client_config/parse_address.h \
src/core/ext/client_config/resolver.h \
src/core/ext/client_config/resolver_factory.h \
src/core/ext/client_config/resolver_registry.h \
+src/core/ext/client_config/resolver_result.h \
src/core/ext/client_config/subchannel.h \
-src/core/ext/client_config/subchannel_call_holder.h \
src/core/ext/client_config/subchannel_index.h \
src/core/ext/client_config/uri_parser.h \
src/core/ext/lb_policy/grpclb/grpclb.h \
@@ -945,6 +940,7 @@ src/core/ext/census/base_resources.h \
src/core/ext/census/census_interface.h \
src/core/ext/census/census_rpc_stats.h \
src/core/ext/census/gen/census.pb.h \
+src/core/ext/census/gen/trace_context.pb.h \
src/core/ext/census/grpc_filter.h \
src/core/ext/census/mlog.h \
src/core/ext/census/resource.h \
@@ -1094,7 +1090,6 @@ src/core/ext/transport/chttp2/client/secure/secure_channel_create.c \
src/core/ext/client_config/channel_connectivity.c \
src/core/ext/client_config/client_channel.c \
src/core/ext/client_config/client_channel_factory.c \
-src/core/ext/client_config/client_config.c \
src/core/ext/client_config/client_config_plugin.c \
src/core/ext/client_config/connector.c \
src/core/ext/client_config/default_initial_connect_string.c \
@@ -1106,8 +1101,8 @@ src/core/ext/client_config/parse_address.c \
src/core/ext/client_config/resolver.c \
src/core/ext/client_config/resolver_factory.c \
src/core/ext/client_config/resolver_registry.c \
+src/core/ext/client_config/resolver_result.c \
src/core/ext/client_config/subchannel.c \
-src/core/ext/client_config/subchannel_call_holder.c \
src/core/ext/client_config/subchannel_index.c \
src/core/ext/client_config/uri_parser.c \
src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \
@@ -1129,6 +1124,7 @@ src/core/ext/load_reporting/load_reporting_filter.c \
src/core/ext/census/base_resources.c \
src/core/ext/census/context.c \
src/core/ext/census/gen/census.pb.c \
+src/core/ext/census/gen/trace_context.pb.c \
src/core/ext/census/grpc_context.c \
src/core/ext/census/grpc_filter.c \
src/core/ext/census/grpc_plugin.c \
@@ -1167,25 +1163,23 @@ include/grpc/support/tls_gcc.h \
include/grpc/support/tls_msvc.h \
include/grpc/support/tls_pthread.h \
include/grpc/support/useful.h \
-include/grpc/impl/codegen/alloc.h \
include/grpc/impl/codegen/atm.h \
include/grpc/impl/codegen/atm_gcc_atomic.h \
include/grpc/impl/codegen/atm_gcc_sync.h \
include/grpc/impl/codegen/atm_windows.h \
-include/grpc/impl/codegen/log.h \
+include/grpc/impl/codegen/gpr_types.h \
include/grpc/impl/codegen/port_platform.h \
include/grpc/impl/codegen/slice.h \
-include/grpc/impl/codegen/slice_buffer.h \
include/grpc/impl/codegen/sync.h \
include/grpc/impl/codegen/sync_generic.h \
include/grpc/impl/codegen/sync_posix.h \
include/grpc/impl/codegen/sync_windows.h \
-include/grpc/impl/codegen/time.h \
src/core/lib/profiling/timers.h \
src/core/lib/support/backoff.h \
src/core/lib/support/block_annotate.h \
src/core/lib/support/env.h \
src/core/lib/support/murmur_hash.h \
+src/core/lib/support/percent_encoding.h \
src/core/lib/support/stack_lockfree.h \
src/core/lib/support/string.h \
src/core/lib/support/string_windows.h \
@@ -1213,6 +1207,7 @@ src/core/lib/support/log_linux.c \
src/core/lib/support/log_posix.c \
src/core/lib/support/log_windows.c \
src/core/lib/support/murmur_hash.c \
+src/core/lib/support/percent_encoding.c \
src/core/lib/support/slice.c \
src/core/lib/support/slice_buffer.c \
src/core/lib/support/stack_lockfree.c \
diff --git a/tools/fuzzer/runners/percent_decode_fuzzer.sh b/tools/fuzzer/runners/percent_decode_fuzzer.sh
new file mode 100644
index 0000000000..5a47fa222c
--- /dev/null
+++ b/tools/fuzzer/runners/percent_decode_fuzzer.sh
@@ -0,0 +1,45 @@
+#!/bin/bash
+# Copyright 2016, Google Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+flags="-max_total_time=$runtime -artifact_prefix=fuzzer_output/ -max_len=32 -timeout=120"
+
+
+if [ "$jobs" != "1" ]
+then
+ flags="-jobs=$jobs -workers=$jobs $flags"
+fi
+
+if [ "$config" == "asan-trace-cmp" ]
+then
+ flags="-use_traces=1 $flags"
+fi
+
+bins/$config/percent_decode_fuzzer $flags fuzzer_output test/core/support/percent_decode_corpus
diff --git a/tools/fuzzer/runners/percent_encode_fuzzer.sh b/tools/fuzzer/runners/percent_encode_fuzzer.sh
new file mode 100644
index 0000000000..8136ef8be9
--- /dev/null
+++ b/tools/fuzzer/runners/percent_encode_fuzzer.sh
@@ -0,0 +1,45 @@
+#!/bin/bash
+# Copyright 2016, Google Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+flags="-max_total_time=$runtime -artifact_prefix=fuzzer_output/ -max_len=32 -timeout=120"
+
+
+if [ "$jobs" != "1" ]
+then
+ flags="-jobs=$jobs -workers=$jobs $flags"
+fi
+
+if [ "$config" == "asan-trace-cmp" ]
+then
+ flags="-use_traces=1 $flags"
+fi
+
+bins/$config/percent_encode_fuzzer $flags fuzzer_output test/core/support/percent_encode_corpus
diff --git a/tools/gce/linux_performance_worker_init.sh b/tools/gce/linux_performance_worker_init.sh
index 23a8f082b2..ea80d74bdf 100755
--- a/tools/gce/linux_performance_worker_init.sh
+++ b/tools/gce/linux_performance_worker_init.sh
@@ -112,6 +112,11 @@ echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /
sudo apt-get update
sudo apt-get install -y mono-devel nuget
+# The version of nuget that is installed using apt-get is too old to download
+# the System.Interactive.Async.3.0.0 C# dependency. Update to the latest version
+# in order to be able download it.
+sudo nuget update -self
+
# Ruby dependencies
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
curl -sSL https://get.rvm.io | bash -s stable --ruby
diff --git a/tools/gource/gen-all-logs.sh b/tools/gource/gen-all-logs.sh
index ab60c3c1b1..2512cc2259 100755
--- a/tools/gource/gen-all-logs.sh
+++ b/tools/gource/gen-all-logs.sh
@@ -34,7 +34,7 @@ outdir=`pwd`
tmpdir=`mktemp -d`
mkdir -p $tmpdir/logs
-repos="grpc grpc-common grpc-go grpc-java grpc.github.io grpc-tools homebrew-grpc grpc-docker-library"
+repos="grpc grpc-common grpc-go grpc-java grpc.github.io"
for repo in $repos
do
cd $tmpdir
diff --git a/tools/jenkins/run_full_interop.sh b/tools/jenkins/run_full_cloud_prod.sh
index a82da1cb68..ea51b50066 100755
--- a/tools/jenkins/run_full_interop.sh
+++ b/tools/jenkins/run_full_cloud_prod.sh
@@ -31,7 +31,14 @@
# This script is invoked by Jenkins and runs interop test suite.
set -ex
+export LANG=en_US.UTF-8
+
# Enter the gRPC repo root
cd $(dirname $0)/../..
-tools/run_tests/run_interop_tests.py -l all -s all --cloud_to_prod --cloud_to_prod_auth --prod_servers default cloud_gateway gateway_v2 cloud_gateway_v2 gateway_v4 cloud_gateway_v4 --use_docker --http2_interop -t -j 12 $@ || true
+tools/run_tests/run_interop_tests.py \
+ -l all \
+ --cloud_to_prod \
+ --cloud_to_prod_auth \
+ --prod_servers default cloud_gateway gateway_v4 cloud_gateway_v4 \
+ --use_docker -t -j 12 $@ || true
diff --git a/tools/jenkins/run_sweep_performance.sh b/tools/jenkins/run_sweep_performance.sh
new file mode 100755
index 0000000000..6cd7a9129b
--- /dev/null
+++ b/tools/jenkins/run_sweep_performance.sh
@@ -0,0 +1,45 @@
+#!/usr/bin/env bash
+# Copyright 2016, Google Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# This script is invoked by Jenkins and runs full performance test suite.
+set -ex
+
+# Enter the gRPC repo root
+cd $(dirname $0)/../..
+
+# scalability with 32cores (and upload to a different BQ table)
+tools/run_tests/run_performance_tests.py \
+ -l c++ \
+ --category sweep \
+ --bq_result_table performance_test.performance_experiment_32core \
+ --remote_worker_host grpc-performance-server-32core grpc-performance-client-32core grpc-performance-client2-32core \
+ || EXIT_CODE=1
+
+exit $EXIT_CODE
diff --git a/tools/run_tests/build_artifact_protoc.bat b/tools/run_tests/build_artifact_protoc.bat
index e1dc032188..3246a903d0 100644
--- a/tools/run_tests/build_artifact_protoc.bat
+++ b/tools/run_tests/build_artifact_protoc.bat
@@ -32,12 +32,8 @@ mkdir artifacts
setlocal
cd third_party/protobuf
-powershell -Command "Invoke-WebRequest https://googlemock.googlecode.com/files/gmock-1.7.0.zip -OutFile gmock.zip"
-powershell -Command "Add-Type -Assembly 'System.IO.Compression.FileSystem'; [System.IO.Compression.ZipFile]::ExtractToDirectory('gmock.zip', '.');"
-rename gmock-1.7.0 gmock
-
cd cmake
-cmake -G "%generator%" || goto :error
+cmake -G "%generator%" -Dprotobuf_BUILD_TESTS=OFF || goto :error
endlocal
call vsprojects/build_plugins.bat || goto :error
diff --git a/tools/run_tests/build_csharp_coreclr.bat b/tools/run_tests/build_csharp_coreclr.bat
index cead6d0e02..b6e3ccbd2b 100644
--- a/tools/run_tests/build_csharp_coreclr.bat
+++ b/tools/run_tests/build_csharp_coreclr.bat
@@ -33,7 +33,7 @@ cd /d %~dp0\..\..\src\csharp
dotnet restore . || goto :error
-dotnet build -f netstandard1.5 --configuration %MSBUILD_CONFIG% "**/project.json" || goto :error
+dotnet build --configuration %MSBUILD_CONFIG% "**/project.json" || goto :error
endlocal
diff --git a/tools/run_tests/distribtest_targets.py b/tools/run_tests/distribtest_targets.py
index 7930f2a0a4..a16daac4fe 100644
--- a/tools/run_tests/distribtest_targets.py
+++ b/tools/run_tests/distribtest_targets.py
@@ -72,15 +72,22 @@ def create_jobspec(name, cmdline, environ=None, shell=False,
class CSharpDistribTest(object):
"""Tests C# NuGet package"""
- def __init__(self, platform, arch, docker_suffix=None):
+ def __init__(self, platform, arch, docker_suffix=None, use_dotnet_cli=False):
self.name = 'csharp_nuget_%s_%s' % (platform, arch)
self.platform = platform
self.arch = arch
self.docker_suffix = docker_suffix
self.labels = ['distribtest', 'csharp', platform, arch]
+ self.script_suffix = ''
if docker_suffix:
self.name += '_%s' % docker_suffix
self.labels.append(docker_suffix)
+ if use_dotnet_cli:
+ self.name += '_dotnetcli'
+ self.script_suffix = '_dotnetcli'
+ self.labels.append('dotnetcli')
+ else:
+ self.labels.append('olddotnet')
def pre_build_jobspecs(self):
return []
@@ -91,10 +98,10 @@ class CSharpDistribTest(object):
'tools/dockerfile/distribtest/csharp_%s_%s' % (
self.docker_suffix,
self.arch),
- 'test/distrib/csharp/run_distrib_test.sh')
+ 'test/distrib/csharp/run_distrib_test%s.sh' % self.script_suffix)
elif self.platform == 'macos':
return create_jobspec(self.name,
- ['test/distrib/csharp/run_distrib_test.sh'],
+ ['test/distrib/csharp/run_distrib_test%s.sh' % self.script_suffix],
environ={'EXTERNAL_GIT_ROOT': '../../..'})
elif self.platform == 'windows':
if self.arch == 'x64':
@@ -103,7 +110,7 @@ class CSharpDistribTest(object):
else:
environ={'DISTRIBTEST_OUTPATH': 'DistribTest\\bin\\\Debug'}
return create_jobspec(self.name,
- ['test\\distrib\\csharp\\run_distrib_test.bat'],
+ ['test\\distrib\\csharp\\run_distrib_test%s.bat' % self.script_suffix],
environ=environ)
else:
raise Exception("Not supported yet.")
@@ -276,6 +283,7 @@ def targets():
CSharpDistribTest('linux', 'x64', 'ubuntu1504'),
CSharpDistribTest('linux', 'x64', 'ubuntu1510'),
CSharpDistribTest('linux', 'x64', 'ubuntu1604'),
+ CSharpDistribTest('linux', 'x64', 'ubuntu1404', use_dotnet_cli=True),
CSharpDistribTest('macos', 'x86'),
CSharpDistribTest('windows', 'x86'),
CSharpDistribTest('windows', 'x64'),
diff --git a/tools/run_tests/package_targets.py b/tools/run_tests/package_targets.py
index 5e6de2e317..abbb5fa905 100644
--- a/tools/run_tests/package_targets.py
+++ b/tools/run_tests/package_targets.py
@@ -71,11 +71,11 @@ def create_jobspec(name, cmdline, environ=None, cwd=None, shell=False,
class CSharpPackage:
"""Builds C# nuget packages."""
- def __init__(self, use_coreclr=False):
- self.use_coreclr = use_coreclr
- self.name = 'csharp_package_coreclr' if use_coreclr else 'csharp_package'
+ def __init__(self, use_dotnet_cli=False):
+ self.use_dotnet_cli = use_dotnet_cli
+ self.name = 'csharp_package_dotnetcli' if use_dotnet_cli else 'csharp_package'
self.labels = ['package', 'csharp']
- if use_coreclr:
+ if use_dotnet_cli:
self.labels += ['linux']
else:
self.labels += ['windows']
@@ -91,11 +91,11 @@ class CSharpPackage:
return []
def build_jobspec(self):
- if self.use_coreclr:
+ if self.use_dotnet_cli:
return create_docker_jobspec(
self.name,
'tools/dockerfile/test/csharp_coreclr_x64',
- 'tools/run_tests/build_package_csharp_coreclr.sh')
+ 'src/csharp/build_packages_dotnetcli.sh')
else:
return create_jobspec(self.name,
['build_packages.bat'],
@@ -177,7 +177,7 @@ class PHPPackage:
def targets():
"""Gets list of supported targets"""
return [CSharpPackage(),
- CSharpPackage(use_coreclr=True),
+ CSharpPackage(use_dotnet_cli=True),
NodePackage(),
RubyPackage(),
PythonPackage(),
diff --git a/tools/run_tests/performance/scenario_config.py b/tools/run_tests/performance/scenario_config.py
index 4dfd01fc66..99b5596a4b 100644
--- a/tools/run_tests/performance/scenario_config.py
+++ b/tools/run_tests/performance/scenario_config.py
@@ -29,12 +29,15 @@
# performance scenario configuration for various languages
+import math
+
WARMUP_SECONDS=5
JAVA_WARMUP_SECONDS=15 # Java needs more warmup time for JIT to kick in.
BENCHMARK_SECONDS=30
SMOKETEST='smoketest'
SCALABLE='scalable'
+SWEEP='sweep'
SECURE_SECARGS = {'use_test_ca': True,
'server_host_override': 'foo.test.google.fr'}
@@ -63,17 +66,17 @@ BIG_GENERIC_PAYLOAD = {
}
}
-# deep is the number of RPCs outstanding on a channel in non-ping-pong tests
-# (the value used is 1 otherwise)
-DEEP=100
+# target number of RPCs outstanding on across all client channels in
+# non-ping-pong tests (since we can only specify per-channel numbers, the
+# actual target will be slightly higher)
+OUTSTANDING_REQUESTS={
+ 'async': 6400,
+ 'sync': 1000
+}
# wide is the number of client channels in multi-channel tests (1 otherwise)
WIDE=64
-# For most synchronous clients, DEEP*WIDE threads will be created.
-SYNC_DEEP=10
-SYNC_WIDE=8
-
def _get_secargs(is_secure):
if is_secure:
@@ -101,7 +104,8 @@ def _ping_pong_scenario(name, rpc_type,
server_core_limit=0,
async_server_threads=0,
warmup_seconds=WARMUP_SECONDS,
- categories=[]):
+ categories=[],
+ channels=None):
"""Creates a basic ping pong scenario."""
scenario = {
'name': name,
@@ -138,14 +142,8 @@ def _ping_pong_scenario(name, rpc_type,
scenario['client_config']['payload_config'] = EMPTY_PROTO_PAYLOAD
if unconstrained_client:
- if unconstrained_client == 'async':
- deep = DEEP
- wide = WIDE
- elif unconstrained_client == 'sync':
- deep = SYNC_DEEP
- wide = SYNC_WIDE
- else:
- raise Exception('Illegal value of unconstrained_client option.')
+ wide = channels if channels is not None else WIDE
+ deep = int(math.ceil(1.0 * OUTSTANDING_REQUESTS[unconstrained_client] / wide))
scenario['num_clients'] = 0 # use as many client as available.
scenario['client_config']['outstanding_rpcs_per_channel'] = deep
@@ -185,59 +183,76 @@ class CXXLanguage:
smoketest_categories = [SMOKETEST] if secure else []
yield _ping_pong_scenario(
- 'cpp_generic_async_streaming_ping_pong_%s' % secstr, rpc_type='STREAMING',
- client_type='ASYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER',
+ 'cpp_generic_async_streaming_ping_pong_%s' % secstr,
+ rpc_type='STREAMING',
+ client_type='ASYNC_CLIENT',
+ server_type='ASYNC_GENERIC_SERVER',
use_generic_payload=True, server_core_limit=1, async_server_threads=1,
secure=secure,
categories=smoketest_categories)
yield _ping_pong_scenario(
- 'cpp_protobuf_async_streaming_ping_pong_%s' % secstr, rpc_type='STREAMING',
- client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER',
- server_core_limit=1, async_server_threads=1,
- secure=secure)
-
- yield _ping_pong_scenario(
- 'cpp_protobuf_async_unary_ping_pong_%s' % secstr, rpc_type='UNARY',
- client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER',
- server_core_limit=1, async_server_threads=1,
- secure=secure,
- categories=smoketest_categories)
-
- yield _ping_pong_scenario(
- 'cpp_protobuf_sync_unary_ping_pong_%s' % secstr, rpc_type='UNARY',
- client_type='SYNC_CLIENT', server_type='SYNC_SERVER',
- server_core_limit=1, async_server_threads=1,
- secure=secure)
-
- yield _ping_pong_scenario(
- 'cpp_protobuf_async_unary_qps_unconstrained_%s' % secstr, rpc_type='UNARY',
- client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER',
- unconstrained_client='async',
- secure=secure,
- categories=smoketest_categories+[SCALABLE])
-
- yield _ping_pong_scenario(
- 'cpp_protobuf_async_streaming_qps_unconstrained_%s' % secstr, rpc_type='STREAMING',
- client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER',
- unconstrained_client='async',
- secure=secure,
- categories=[SCALABLE])
-
- yield _ping_pong_scenario(
- 'cpp_generic_async_streaming_qps_unconstrained_%s' % secstr, rpc_type='STREAMING',
- client_type='ASYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER',
+ 'cpp_generic_async_streaming_qps_unconstrained_%s' % secstr,
+ rpc_type='STREAMING',
+ client_type='ASYNC_CLIENT',
+ server_type='ASYNC_GENERIC_SERVER',
unconstrained_client='async', use_generic_payload=True,
secure=secure,
categories=smoketest_categories+[SCALABLE])
yield _ping_pong_scenario(
- 'cpp_generic_async_streaming_qps_one_server_core_%s' % secstr, rpc_type='STREAMING',
- client_type='ASYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER',
+ 'cpp_generic_async_streaming_qps_one_server_core_%s' % secstr,
+ rpc_type='STREAMING',
+ client_type='ASYNC_CLIENT',
+ server_type='ASYNC_GENERIC_SERVER',
unconstrained_client='async', use_generic_payload=True,
server_core_limit=1, async_server_threads=1,
secure=secure)
+ for synchronicity in ['sync', 'async']:
+ yield _ping_pong_scenario(
+ 'cpp_protobuf_%s_streaming_ping_pong_%s' % (synchronicity, secstr),
+ rpc_type='STREAMING',
+ client_type='%s_CLIENT' % synchronicity.upper(),
+ server_type='%s_SERVER' % synchronicity.upper(),
+ server_core_limit=1, async_server_threads=1,
+ secure=secure)
+
+ yield _ping_pong_scenario(
+ 'cpp_protobuf_%s_unary_ping_pong_%s' % (synchronicity, secstr),
+ rpc_type='UNARY',
+ client_type='%s_CLIENT' % synchronicity.upper(),
+ server_type='%s_SERVER' % synchronicity.upper(),
+ server_core_limit=1, async_server_threads=1,
+ secure=secure,
+ categories=smoketest_categories)
+
+ yield _ping_pong_scenario(
+ 'cpp_protobuf_%s_unary_qps_unconstrained_%s' % (synchronicity, secstr),
+ rpc_type='UNARY',
+ client_type='%s_CLIENT' % synchronicity.upper(),
+ server_type='%s_SERVER' % synchronicity.upper(),
+ unconstrained_client=synchronicity,
+ secure=secure,
+ categories=smoketest_categories+[SCALABLE])
+
+ yield _ping_pong_scenario(
+ 'cpp_protobuf_%s_streaming_qps_unconstrained_%s' % (synchronicity, secstr),
+ rpc_type='STREAMING',
+ client_type='%s_CLIENT' % synchronicity.upper(),
+ server_type='%s_SERVER' % synchronicity.upper(),
+ unconstrained_client=synchronicity,
+ secure=secure,
+ categories=[SCALABLE])
+
+ for channels in [1, 3, 10, 31, 100, 316, 1000]:
+ yield _ping_pong_scenario(
+ 'cpp_protobuf_%s_unary_qps_unconstrained_%s_%d_channels' % (synchronicity, secstr, channels),
+ rpc_type='UNARY',
+ client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER',
+ unconstrained_client=synchronicity, secure=secure,
+ categories=[SWEEP], channels=channels)
+
def __str__(self):
return 'c++'
@@ -548,7 +563,7 @@ class JavaLanguage:
async_server_threads=1,
secure=secure, warmup_seconds=JAVA_WARMUP_SECONDS)
- # TODO(jtattermusch): add scenarios java vs C++
+ # TODO(jtattermusch): add scenarios java vs C++
def __str__(self):
return 'java'
@@ -572,7 +587,7 @@ class GoLanguage:
smoketest_categories = [SMOKETEST] if secure else []
# ASYNC_GENERIC_SERVER for Go actually uses a sync streaming server,
- # but that's mostly because of lack of better name of the enum value.
+ # but that's mostly because of lack of better name of the enum value.
yield _ping_pong_scenario(
'go_generic_sync_streaming_ping_pong_%s' % secstr, rpc_type='STREAMING',
client_type='SYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER',
@@ -619,7 +634,7 @@ class GoLanguage:
secure=secure,
categories=[SCALABLE])
- # TODO(jtattermusch): add scenarios go vs C++
+ # TODO(jtattermusch): add scenarios go vs C++
def __str__(self):
return 'go'
diff --git a/tools/run_tests/pre_build_csharp.bat b/tools/run_tests/pre_build_csharp.bat
index 580d5638fd..f15979a96b 100644
--- a/tools/run_tests/pre_build_csharp.bat
+++ b/tools/run_tests/pre_build_csharp.bat
@@ -38,9 +38,10 @@ cd /d %~dp0\..\..
set NUGET=C:\nuget\nuget.exe
if exist %NUGET% (
+ @rem TODO(jtattermusch): Get rid of this hack. See #8034
@rem Restore Grpc packages by packages since Nuget client 3.4.4 doesnt support restore
@rem by solution
- @rem Moving into each directory to let the restores work with both nuget 3.4 and 2.8
+ @rem Moving into each directory to let the restores work based on per-project packages.config files
%NUGET% restore vsprojects/grpc_csharp_ext.sln || goto :error
cd src/csharp
diff --git a/tools/run_tests/pre_build_csharp.sh b/tools/run_tests/pre_build_csharp.sh
index 0fd3b92a95..ee678ddce5 100755
--- a/tools/run_tests/pre_build_csharp.sh
+++ b/tools/run_tests/pre_build_csharp.sh
@@ -37,9 +37,10 @@ root=`pwd`
if [ -x "$(command -v nuget)" ]
then
+ # TODO(jtattermusch): Get rid of this hack. See #8034
# Restoring Nuget packages by packages rather than by solution because of
# inability to restore by solution with Nuget client 3.4.4
- # Moving into each directory to let the restores work with nuget 3.4 and 2.8
+ # Moving into each directory to let the restores work based on per-project packages.config files
cd Grpc.Auth
nuget restore -PackagesDirectory ../packages
cd ..
diff --git a/tools/run_tests/run_build_statistics.py b/tools/run_tests/run_build_statistics.py
index 92c53782a8..89aad2a399 100755
--- a/tools/run_tests/run_build_statistics.py
+++ b/tools/run_tests/run_build_statistics.py
@@ -56,13 +56,28 @@ _BUILDS = {'gRPC_master': _HAS_MATRIX,
'gRPC_interop_pull_requests': not _HAS_MATRIX,
}
_URL_BASE = 'https://grpc-testing.appspot.com/job'
+
+# This is a dynamic list where known and active issues should be added.
+# Fixed ones should be removed.
+# Also try not to add multiple messages from the same failure.
_KNOWN_ERRORS = [
'Failed to build workspace Tests with scheme AllTests',
'Build timed out',
'FATAL: Unable to produce a script file',
- 'FAILED: Failed to build interop docker images',
+ 'FAILED: build_docker_c\+\+',
+ 'cannot find package \"cloud.google.com/go/compute/metadata\"',
'LLVM ERROR: IO failure on output stream.',
'MSBUILD : error MSB1009: Project file does not exist.',
+ 'fatal: git fetch_pack: expected ACK/NAK',
+ 'Failed to fetch from http://github.com/grpc/grpc.git',
+ ('hudson.remoting.RemotingSystemException: java.io.IOException: '
+ 'Backing channel is disconnected.'),
+ 'hudson.remoting.ChannelClosedException',
+ 'FAILED: bins/tsan/qps_openloop_test GRPC_POLL_STRATEGY=epoll',
+ 'FAILED: bins/tsan/qps_openloop_test GRPC_POLL_STRATEGY=legacy',
+ 'FAILED: bins/tsan/qps_openloop_test GRPC_POLL_STRATEGY=poll',
+ ('tests.bins/asan/h2_proxy_test streaming_error_response '
+ 'GRPC_POLL_STRATEGY=legacy'),
]
_UNKNOWN_ERROR = 'Unknown error'
_DATASET_ID = 'build_statistics'
diff --git a/tools/run_tests/run_interop_tests.py b/tools/run_tests/run_interop_tests.py
index 0d402d67e5..389d070d63 100755
--- a/tools/run_tests/run_interop_tests.py
+++ b/tools/run_tests/run_interop_tests.py
@@ -127,6 +127,35 @@ class CSharpLanguage:
return 'csharp'
+class CSharpCoreCLRLanguage:
+
+ def __init__(self):
+ self.client_cwd = 'src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/netcoreapp1.0'
+ self.server_cwd = 'src/csharp/Grpc.IntegrationTesting.Server/bin/Debug/netcoreapp1.0'
+ self.safename = str(self)
+
+ def client_cmd(self, args):
+ return ['dotnet', 'exec', 'Grpc.IntegrationTesting.Client.dll'] + args
+
+ def cloud_to_prod_env(self):
+ return {}
+
+ def server_cmd(self, args):
+ return ['dotnet', 'exec', 'Grpc.IntegrationTesting.Server.dll', '--use_tls=true'] + args
+
+ def global_env(self):
+ return {}
+
+ def unimplemented_test_cases(self):
+ return _SKIP_SERVER_COMPRESSION
+
+ def unimplemented_test_cases_server(self):
+ return _SKIP_COMPRESSION
+
+ def __str__(self):
+ return 'csharpcoreclr'
+
+
class JavaLanguage:
def __init__(self):
@@ -367,6 +396,7 @@ class PythonLanguage:
_LANGUAGES = {
'c++' : CXXLanguage(),
'csharp' : CSharpLanguage(),
+ 'csharpcoreclr' : CSharpCoreCLRLanguage(),
'go' : GoLanguage(),
'java' : JavaLanguage(),
'node' : NodeLanguage(),
@@ -377,7 +407,7 @@ _LANGUAGES = {
}
# languages supported as cloud_to_cloud servers
-_SERVERS = ['c++', 'node', 'csharp', 'java', 'go', 'ruby', 'python']
+_SERVERS = ['c++', 'node', 'csharp', 'csharpcoreclr', 'java', 'go', 'ruby', 'python']
_TEST_CASES = ['large_unary', 'empty_unary', 'ping_pong',
'empty_stream', 'client_streaming', 'server_streaming',
@@ -435,7 +465,7 @@ def auth_options(language, test_case):
default_account_arg = '--default_service_account=830293263384-compute@developer.gserviceaccount.com'
if test_case in ['jwt_token_creds', 'per_rpc_creds', 'oauth2_auth_token']:
- if language in ['csharp', 'node', 'php', 'php7', 'python', 'ruby']:
+ if language in ['csharp', 'csharpcoreclr', 'node', 'php', 'php7', 'python', 'ruby']:
env['GOOGLE_APPLICATION_CREDENTIALS'] = key_filepath
else:
cmdargs += [key_file_arg]
@@ -623,15 +653,15 @@ def aggregate_http2_results(stdout):
# TODO(adelez): implement logic for errors_allowed where if the indicated tests
# fail, they don't impact the overall test result.
prod_servers = {
- 'default': ('grpc-test.sandbox.googleapis.com',
+ 'default': ('216.239.32.254',
'grpc-test.sandbox.googleapis.com', False),
- 'gateway_v2': ('grpc-test2.sandbox.googleapis.com',
+ 'gateway_v2': ('216.239.32.254',
'grpc-test2.sandbox.googleapis.com', True),
'cloud_gateway': ('216.239.32.255', 'grpc-test.sandbox.googleapis.com',
False),
'cloud_gateway_v2': ('216.239.32.255', 'grpc-test2.sandbox.googleapis.com',
True),
- 'gateway_v4': ('grpc-test4.sandbox.googleapis.com',
+ 'gateway_v4': ('216.239.32.254',
'grpc-test4.sandbox.googleapis.com', True),
'cloud_gateway_v4': ('216.239.32.255', 'grpc-test4.sandbox.googleapis.com',
True),
diff --git a/tools/run_tests/run_performance_tests.py b/tools/run_tests/run_performance_tests.py
index 5fdf7a407d..b8e16af231 100755
--- a/tools/run_tests/run_performance_tests.py
+++ b/tools/run_tests/run_performance_tests.py
@@ -33,11 +33,13 @@
from __future__ import print_function
import argparse
+import collections
import itertools
import jobset
import json
import multiprocessing
import os
+import performance.scenario_config as scenario_config
import pipes
import re
import subprocess
@@ -46,7 +48,6 @@ import tempfile
import time
import traceback
import uuid
-import performance.scenario_config as scenario_config
_ROOT = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), '../..'))
@@ -63,14 +64,19 @@ class QpsWorkerJob:
self._spec = spec
self.language = language
self.host_and_port = host_and_port
- self._job = jobset.Job(spec, newline_on_success=True, travis=True, add_env={})
+ self._job = None
+
+ def start(self):
+ self._job = jobset.Job(self._spec, newline_on_success=True, travis=True, add_env={})
def is_running(self):
"""Polls a job and returns True if given job is still running."""
- return self._job.state() == jobset._RUNNING
+ return self._job and self._job.state() == jobset._RUNNING
def kill(self):
- return self._job.kill()
+ if self._job:
+ self._job.kill()
+ self._job = None
def create_qpsworker_job(language, shortname=None,
@@ -119,7 +125,7 @@ def create_scenario_jobspec(scenario_json, workers, remote_host=None,
def create_quit_jobspec(workers, remote_host=None):
"""Runs quit using QPS driver."""
# setting QPS_WORKERS env variable here makes sure it works with SSH too.
- cmd = 'QPS_WORKERS="%s" bins/opt/qps_json_driver --quit' % ','.join(workers)
+ cmd = 'QPS_WORKERS="%s" bins/opt/qps_json_driver --quit' % ','.join(w.host_and_port for w in workers)
if remote_host:
user_at_host = '%s@%s' % (_REMOTE_HOST_USERNAME, remote_host)
cmd = 'ssh %s "cd ~/performance_workspace/grpc/ && "%s' % (user_at_host, pipes.quote(cmd))
@@ -253,8 +259,8 @@ def build_on_remote_hosts(hosts, languages=scenario_config.LANGUAGES.keys(), bui
sys.exit(1)
-def start_qpsworkers(languages, worker_hosts):
- """Starts QPS workers as background jobs."""
+def create_qpsworkers(languages, worker_hosts):
+ """Creates QPS workers (but does not start them)."""
if not worker_hosts:
# run two workers locally (for each language)
workers=[(None, 10000), (None, 10010)]
@@ -274,6 +280,9 @@ def start_qpsworkers(languages, worker_hosts):
for worker_idx, worker in enumerate(workers)]
+Scenario = collections.namedtuple('Scenario', 'jobspec workers')
+
+
def create_scenarios(languages, workers_by_lang, remote_host=None, regex='.*',
category='all', bq_result_table=None,
netperf=False, netperf_hosts=[]):
@@ -282,6 +291,7 @@ def create_scenarios(languages, workers_by_lang, remote_host=None, regex='.*',
for workers in workers_by_lang.values()
for worker in workers]
scenarios = []
+ _NO_WORKERS = []
if netperf:
if not netperf_hosts:
@@ -293,15 +303,18 @@ def create_scenarios(languages, workers_by_lang, remote_host=None, regex='.*',
else:
netperf_server=netperf_hosts[0]
netperf_client=netperf_hosts[1]
- scenarios.append(create_netperf_jobspec(server_host=netperf_server,
- client_host=netperf_client,
- bq_result_table=bq_result_table))
+ scenarios.append(Scenario(
+ create_netperf_jobspec(server_host=netperf_server,
+ client_host=netperf_client,
+ bq_result_table=bq_result_table),
+ _NO_WORKERS))
for language in languages:
for scenario_json in language.scenarios():
if re.search(args.regex, scenario_json['name']):
- if category in scenario_json.get('CATEGORIES', []) or category == 'all':
- workers = workers_by_lang[str(language)]
+ categories = scenario_json.get('CATEGORIES', [])
+ if category in categories or (category == 'all' and categories != ['sweep']):
+ workers = workers_by_lang[str(language)][:]
# 'SERVER_LANGUAGE' is an indicator for this script to pick
# a server in different language.
custom_server_lang = scenario_json.get('SERVER_LANGUAGE', None)
@@ -329,14 +342,14 @@ def create_scenarios(languages, workers_by_lang, remote_host=None, regex='.*',
# replace all client workers by workers of a different language,
# leave num_server workers as they are server workers.
workers[idx] = workers_by_lang[custom_client_lang][idx]
- scenario = create_scenario_jobspec(scenario_json,
- workers,
- remote_host=remote_host,
- bq_result_table=bq_result_table)
+ scenario = Scenario(
+ create_scenario_jobspec(scenario_json,
+ [w.host_and_port for w in workers],
+ remote_host=remote_host,
+ bq_result_table=bq_result_table),
+ workers)
scenarios.append(scenario)
- # the very last scenario requests shutting down the workers.
- scenarios.append(create_quit_jobspec(all_workers, remote_host=remote_host))
return scenarios
@@ -374,7 +387,7 @@ argp.add_argument('-r', '--regex', default='.*', type=str,
argp.add_argument('--bq_result_table', default=None, type=str,
help='Bigquery "dataset.table" to upload results to.')
argp.add_argument('--category',
- choices=['smoketest','all','scalable'],
+ choices=['smoketest','all','scalable','sweep'],
default='all',
help='Select a category of tests to run.')
argp.add_argument('--netperf',
@@ -410,42 +423,31 @@ if not args.remote_driver_host:
build_local = True
build_on_remote_hosts(remote_hosts, languages=[str(l) for l in languages], build_local=build_local)
-qpsworker_jobs = start_qpsworkers(languages, args.remote_worker_host)
-
-# TODO(jtattermusch): see https://github.com/grpc/grpc/issues/6174
-time.sleep(5)
+qpsworker_jobs = create_qpsworkers(languages, args.remote_worker_host)
# get list of worker addresses for each language.
-worker_addresses = dict([(str(language), []) for language in languages])
+workers_by_lang = dict([(str(language), []) for language in languages])
for job in qpsworker_jobs:
- worker_addresses[str(job.language)].append(job.host_and_port)
-
-try:
- scenarios = create_scenarios(languages,
- workers_by_lang=worker_addresses,
- remote_host=args.remote_driver_host,
- regex=args.regex,
- category=args.category,
- bq_result_table=args.bq_result_table,
- netperf=args.netperf,
- netperf_hosts=args.remote_worker_host)
-
- if not scenarios:
- raise Exception('No scenarios to run')
-
- jobset.message('START', 'Running scenarios.', do_newline=True)
- num_failures, _ = jobset.run(
- scenarios, newline_on_success=True, maxjobs=1)
- if num_failures == 0:
- jobset.message('SUCCESS',
- 'All scenarios finished successfully.',
- do_newline=True)
- else:
- jobset.message('FAILED', 'Some of the scenarios failed.',
- do_newline=True)
- sys.exit(1)
-except:
- traceback.print_exc()
- raise
-finally:
- finish_qps_workers(qpsworker_jobs)
+ workers_by_lang[str(job.language)].append(job)
+
+scenarios = create_scenarios(languages,
+ workers_by_lang=workers_by_lang,
+ remote_host=args.remote_driver_host,
+ regex=args.regex,
+ category=args.category,
+ bq_result_table=args.bq_result_table,
+ netperf=args.netperf,
+ netperf_hosts=args.remote_worker_host)
+
+if not scenarios:
+ raise Exception('No scenarios to run')
+
+for scenario in scenarios:
+ try:
+ for worker in scenario.workers:
+ worker.start()
+ jobset.run([scenario.jobspec,
+ create_quit_jobspec(scenario.workers, remote_host=args.remote_driver_host)],
+ newline_on_success=True, maxjobs=1)
+ finally:
+ finish_qps_workers(scenario.workers)
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py
index 78ef05b635..c579f14f91 100755
--- a/tools/run_tests/run_tests.py
+++ b/tools/run_tests/run_tests.py
@@ -346,7 +346,7 @@ class NodeLanguage(object):
self.config = config
self.args = args
_check_compiler(self.args.compiler, ['default', 'node0.12',
- 'node4', 'node5'])
+ 'node4', 'node5', 'node6'])
if self.args.compiler == 'default':
self.node_version = '4'
else:
@@ -654,15 +654,9 @@ class CSharpLanguage(object):
assembly_extension = '.exe'
if self.args.compiler == 'coreclr':
- if self.platform == 'linux':
- assembly_subdir += '/netstandard1.5/debian.8-x64'
- assembly_extension = ''
- elif self.platform == 'mac':
- assembly_subdir += '/netstandard1.5/osx.10.11-x64'
- assembly_extension = ''
- else:
- assembly_subdir += '/netstandard1.5/win7-x64'
- runtime_cmd = []
+ assembly_subdir += '/netcoreapp1.0'
+ runtime_cmd = ['dotnet', 'exec']
+ assembly_extension = '.dll'
else:
nunit_args += ['--noresult', '--workers=1']
if self.platform == 'windows':
diff --git a/tools/run_tests/sanity/check_sources_and_headers.py b/tools/run_tests/sanity/check_sources_and_headers.py
index 28c1dc46d7..ec0876ece2 100755
--- a/tools/run_tests/sanity/check_sources_and_headers.py
+++ b/tools/run_tests/sanity/check_sources_and_headers.py
@@ -63,7 +63,8 @@ def target_has_header(target, name):
def produces_object(name):
return os.path.splitext(name)[1] in ['.c', '.cc']
-obj_producer_to_source = {'c': {}, 'c++': {}, 'csharp': {}}
+c_ish = {}
+obj_producer_to_source = {'c': c_ish, 'c++': c_ish, 'csharp': {}}
errors = 0
for target in js:
@@ -86,7 +87,7 @@ for target in js:
'target %s (%s) does not name header %s as a dependency' % (
target['name'], fn, m.group(1)))
errors += 1
- if target['type'] == 'lib':
+ if target['type'] in ['lib', 'filegroup']:
for fn in target['src']:
language = target['language']
if produces_object(fn):
diff --git a/tools/run_tests/sanity/check_submodules.sh b/tools/run_tests/sanity/check_submodules.sh
index d2ab5b01cc..f1d9d5a57f 100755
--- a/tools/run_tests/sanity/check_submodules.sh
+++ b/tools/run_tests/sanity/check_submodules.sh
@@ -44,8 +44,8 @@ cat << EOF | awk '{ print $1 }' | sort > $want_submodules
c880e42ba1c8032d4cdde2aba0541d8a9d9fa2e9 third_party/boringssl (version_for_cocoapods_2.0-100-gc880e42)
05b155ff59114735ec8cd089f669c4c3d8f59029 third_party/gflags (v2.1.0-45-g05b155f)
c99458533a9b4c743ed51537e25989ea55944908 third_party/googletest (release-1.7.0)
- f8ac463766281625ad710900479130c7fcb4d63b third_party/nanopb (nanopb-0.3.4-29-gf8ac463)
- e8ae137c96444ea313485ed1118c5e43b2099cf1 third_party/protobuf (v3.0.0-beta-4-74-ge8ae137)
+ 68a86e96481e6bea987df8de47027847b30c325b third_party/nanopb (nanopb-0.3.6-6-g68a86e9)
+ bba446bbf2ac7b0b9923d4eb07d5acd0665a8cf0 third_party/protobuf (v3.0.0-beta-4-160-gbba446b)
50893291621658f355bc5b4d450a8d06a563053d third_party/zlib (v1.2.8)
bcad91771b7f0bff28a1cac1981d7ef2b9bcef3c third_party/thrift
EOF
diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json
index 11daf24e0a..47aa25a656 100644
--- a/tools/run_tests/sources_and_headers.json
+++ b/tools/run_tests/sources_and_headers.json
@@ -486,6 +486,17 @@
"type": "target"
},
{
+ "deps": [],
+ "headers": [],
+ "language": "c",
+ "name": "gen_percent_encoding_tables",
+ "src": [
+ "tools/codegen/core/gen_percent_encoding_tables.c"
+ ],
+ "third_party": false,
+ "type": "target"
+ },
+ {
"deps": [
"gpr",
"gpr_test_util",
@@ -620,6 +631,20 @@
],
"headers": [],
"language": "c",
+ "name": "gpr_percent_encoding_test",
+ "src": [
+ "test/core/support/percent_encoding_test.c"
+ ],
+ "third_party": false,
+ "type": "target"
+ },
+ {
+ "deps": [
+ "gpr",
+ "gpr_test_util"
+ ],
+ "headers": [],
+ "language": "c",
"name": "gpr_slice_buffer_test",
"src": [
"test/core/support/slice_buffer_test.c"
@@ -1458,6 +1483,38 @@
],
"headers": [],
"language": "c",
+ "name": "percent_decode_fuzzer",
+ "src": [
+ "test/core/support/percent_decode_fuzzer.c"
+ ],
+ "third_party": false,
+ "type": "target"
+ },
+ {
+ "deps": [
+ "gpr",
+ "gpr_test_util",
+ "grpc",
+ "grpc_test_util"
+ ],
+ "headers": [],
+ "language": "c",
+ "name": "percent_encode_fuzzer",
+ "src": [
+ "test/core/support/percent_encode_fuzzer.c"
+ ],
+ "third_party": false,
+ "type": "target"
+ },
+ {
+ "deps": [
+ "gpr",
+ "gpr_test_util",
+ "grpc",
+ "grpc_test_util"
+ ],
+ "headers": [],
+ "language": "c",
"name": "resolve_address_test",
"src": [
"test/core/iomgr/resolve_address_test.c"
@@ -3507,23 +3564,6 @@
],
"headers": [],
"language": "c",
- "name": "bad_ssl_alpn_server",
- "src": [
- "test/core/bad_ssl/servers/alpn.c"
- ],
- "third_party": false,
- "type": "target"
- },
- {
- "deps": [
- "bad_ssl_test_server",
- "gpr",
- "gpr_test_util",
- "grpc",
- "grpc_test_util"
- ],
- "headers": [],
- "language": "c",
"name": "bad_ssl_cert_server",
"src": [
"test/core/bad_ssl/servers/cert.c"
@@ -3540,22 +3580,6 @@
],
"headers": [],
"language": "c",
- "name": "bad_ssl_alpn_test",
- "src": [
- "test/core/bad_ssl/bad_ssl_test.c"
- ],
- "third_party": false,
- "type": "target"
- },
- {
- "deps": [
- "gpr",
- "gpr_test_util",
- "grpc",
- "grpc_test_util"
- ],
- "headers": [],
- "language": "c",
"name": "bad_ssl_cert_test",
"src": [
"test/core/bad_ssl/bad_ssl_test.c"
@@ -4201,6 +4225,40 @@
],
"headers": [],
"language": "c",
+ "name": "percent_decode_fuzzer_one_entry",
+ "src": [
+ "test/core/support/percent_decode_fuzzer.c",
+ "test/core/util/one_corpus_entry_fuzzer.c"
+ ],
+ "third_party": false,
+ "type": "target"
+ },
+ {
+ "deps": [
+ "gpr",
+ "gpr_test_util",
+ "grpc",
+ "grpc_test_util"
+ ],
+ "headers": [],
+ "language": "c",
+ "name": "percent_encode_fuzzer_one_entry",
+ "src": [
+ "test/core/support/percent_encode_fuzzer.c",
+ "test/core/util/one_corpus_entry_fuzzer.c"
+ ],
+ "third_party": false,
+ "type": "target"
+ },
+ {
+ "deps": [
+ "gpr",
+ "gpr_test_util",
+ "grpc",
+ "grpc_test_util"
+ ],
+ "headers": [],
+ "language": "c",
"name": "server_fuzzer_one_entry",
"src": [
"test/core/end2end/fuzzers/server_fuzzer.c",
@@ -4429,6 +4487,7 @@
"name": "grpc++",
"src": [
"include/grpc++/impl/codegen/core_codegen.h",
+ "src/cpp/client/insecure_credentials.cc",
"src/cpp/client/secure_credentials.cc",
"src/cpp/client/secure_credentials.h",
"src/cpp/common/auth_property_iterator.cc",
@@ -4436,6 +4495,7 @@
"src/cpp/common/secure_auth_context.h",
"src/cpp/common/secure_channel_arguments.cc",
"src/cpp/common/secure_create_auth_context.cc",
+ "src/cpp/server/insecure_server_credentials.cc",
"src/cpp/server/secure_server_credentials.cc",
"src/cpp/server/secure_server_credentials.h"
],
@@ -4482,8 +4542,8 @@
"language": "c++",
"name": "grpc++_test_config",
"src": [
- "test/cpp/util/test_config.cc",
- "test/cpp/util/test_config.h"
+ "test/cpp/util/test_config.h",
+ "test/cpp/util/test_config_cc.cc"
],
"third_party": false,
"type": "lib"
@@ -4543,7 +4603,9 @@
"language": "c++",
"name": "grpc++_unsecure",
"src": [
- "src/cpp/common/insecure_create_auth_context.cc"
+ "src/cpp/client/insecure_credentials.cc",
+ "src/cpp/common/insecure_create_auth_context.cc",
+ "src/cpp/server/insecure_server_credentials.cc"
],
"third_party": false,
"type": "lib"
@@ -5501,6 +5563,7 @@
"test/core/end2end/tests/max_message_length.c",
"test/core/end2end/tests/negative_deadline.c",
"test/core/end2end/tests/network_status_change.c",
+ "test/core/end2end/tests/no_logging.c",
"test/core/end2end/tests/no_op.c",
"test/core/end2end/tests/payload.c",
"test/core/end2end/tests/ping.c",
@@ -5511,6 +5574,7 @@
"test/core/end2end/tests/server_finishes_request.c",
"test/core/end2end/tests/shutdown_finishes_calls.c",
"test/core/end2end/tests/shutdown_finishes_tags.c",
+ "test/core/end2end/tests/simple_cacheable_request.c",
"test/core/end2end/tests/simple_delayed_request.c",
"test/core/end2end/tests/simple_metadata.c",
"test/core/end2end/tests/simple_request.c",
@@ -5563,6 +5627,7 @@
"test/core/end2end/tests/max_message_length.c",
"test/core/end2end/tests/negative_deadline.c",
"test/core/end2end/tests/network_status_change.c",
+ "test/core/end2end/tests/no_logging.c",
"test/core/end2end/tests/no_op.c",
"test/core/end2end/tests/payload.c",
"test/core/end2end/tests/ping.c",
@@ -5573,6 +5638,7 @@
"test/core/end2end/tests/server_finishes_request.c",
"test/core/end2end/tests/shutdown_finishes_calls.c",
"test/core/end2end/tests/shutdown_finishes_tags.c",
+ "test/core/end2end/tests/simple_cacheable_request.c",
"test/core/end2end/tests/simple_delayed_request.c",
"test/core/end2end/tests/simple_metadata.c",
"test/core/end2end/tests/simple_request.c",
@@ -5595,6 +5661,7 @@
"src/core/ext/census/census_interface.h",
"src/core/ext/census/census_rpc_stats.h",
"src/core/ext/census/gen/census.pb.h",
+ "src/core/ext/census/gen/trace_context.pb.h",
"src/core/ext/census/grpc_filter.h",
"src/core/ext/census/mlog.h",
"src/core/ext/census/resource.h",
@@ -5612,6 +5679,8 @@
"src/core/ext/census/context.c",
"src/core/ext/census/gen/census.pb.c",
"src/core/ext/census/gen/census.pb.h",
+ "src/core/ext/census/gen/trace_context.pb.c",
+ "src/core/ext/census/gen/trace_context.pb.h",
"src/core/ext/census/grpc_context.c",
"src/core/ext/census/grpc_filter.c",
"src/core/ext/census/grpc_filter.h",
@@ -5667,6 +5736,7 @@
"src/core/lib/support/block_annotate.h",
"src/core/lib/support/env.h",
"src/core/lib/support/murmur_hash.h",
+ "src/core/lib/support/percent_encoding.h",
"src/core/lib/support/stack_lockfree.h",
"src/core/lib/support/string.h",
"src/core/lib/support/string_windows.h",
@@ -5731,6 +5801,8 @@
"src/core/lib/support/log_windows.c",
"src/core/lib/support/murmur_hash.c",
"src/core/lib/support/murmur_hash.h",
+ "src/core/lib/support/percent_encoding.c",
+ "src/core/lib/support/percent_encoding.h",
"src/core/lib/support/slice.c",
"src/core/lib/support/slice_buffer.c",
"src/core/lib/support/stack_lockfree.c",
@@ -5768,38 +5840,32 @@
{
"deps": [],
"headers": [
- "include/grpc/impl/codegen/alloc.h",
"include/grpc/impl/codegen/atm.h",
"include/grpc/impl/codegen/atm_gcc_atomic.h",
"include/grpc/impl/codegen/atm_gcc_sync.h",
"include/grpc/impl/codegen/atm_windows.h",
- "include/grpc/impl/codegen/log.h",
+ "include/grpc/impl/codegen/gpr_types.h",
"include/grpc/impl/codegen/port_platform.h",
"include/grpc/impl/codegen/slice.h",
- "include/grpc/impl/codegen/slice_buffer.h",
"include/grpc/impl/codegen/sync.h",
"include/grpc/impl/codegen/sync_generic.h",
"include/grpc/impl/codegen/sync_posix.h",
- "include/grpc/impl/codegen/sync_windows.h",
- "include/grpc/impl/codegen/time.h"
+ "include/grpc/impl/codegen/sync_windows.h"
],
"language": "c",
"name": "gpr_codegen",
"src": [
- "include/grpc/impl/codegen/alloc.h",
"include/grpc/impl/codegen/atm.h",
"include/grpc/impl/codegen/atm_gcc_atomic.h",
"include/grpc/impl/codegen/atm_gcc_sync.h",
"include/grpc/impl/codegen/atm_windows.h",
- "include/grpc/impl/codegen/log.h",
+ "include/grpc/impl/codegen/gpr_types.h",
"include/grpc/impl/codegen/port_platform.h",
"include/grpc/impl/codegen/slice.h",
- "include/grpc/impl/codegen/slice_buffer.h",
"include/grpc/impl/codegen/sync.h",
"include/grpc/impl/codegen/sync_generic.h",
"include/grpc/impl/codegen/sync_posix.h",
- "include/grpc/impl/codegen/sync_windows.h",
- "include/grpc/impl/codegen/time.h"
+ "include/grpc/impl/codegen/sync_windows.h"
],
"third_party": false,
"type": "filegroup"
@@ -6089,7 +6155,6 @@
"headers": [
"src/core/ext/client_config/client_channel.h",
"src/core/ext/client_config/client_channel_factory.h",
- "src/core/ext/client_config/client_config.h",
"src/core/ext/client_config/connector.h",
"src/core/ext/client_config/initial_connect_string.h",
"src/core/ext/client_config/lb_policy.h",
@@ -6099,8 +6164,8 @@
"src/core/ext/client_config/resolver.h",
"src/core/ext/client_config/resolver_factory.h",
"src/core/ext/client_config/resolver_registry.h",
+ "src/core/ext/client_config/resolver_result.h",
"src/core/ext/client_config/subchannel.h",
- "src/core/ext/client_config/subchannel_call_holder.h",
"src/core/ext/client_config/subchannel_index.h",
"src/core/ext/client_config/uri_parser.h"
],
@@ -6112,8 +6177,6 @@
"src/core/ext/client_config/client_channel.h",
"src/core/ext/client_config/client_channel_factory.c",
"src/core/ext/client_config/client_channel_factory.h",
- "src/core/ext/client_config/client_config.c",
- "src/core/ext/client_config/client_config.h",
"src/core/ext/client_config/client_config_plugin.c",
"src/core/ext/client_config/connector.c",
"src/core/ext/client_config/connector.h",
@@ -6134,10 +6197,10 @@
"src/core/ext/client_config/resolver_factory.h",
"src/core/ext/client_config/resolver_registry.c",
"src/core/ext/client_config/resolver_registry.h",
+ "src/core/ext/client_config/resolver_result.c",
+ "src/core/ext/client_config/resolver_result.h",
"src/core/ext/client_config/subchannel.c",
"src/core/ext/client_config/subchannel.h",
- "src/core/ext/client_config/subchannel_call_holder.c",
- "src/core/ext/client_config/subchannel_call_holder.h",
"src/core/ext/client_config/subchannel_index.c",
"src/core/ext/client_config/subchannel_index.h",
"src/core/ext/client_config/uri_parser.c",
@@ -6151,7 +6214,6 @@
"gpr_codegen"
],
"headers": [
- "include/grpc/impl/codegen/byte_buffer.h",
"include/grpc/impl/codegen/byte_buffer_reader.h",
"include/grpc/impl/codegen/compression_types.h",
"include/grpc/impl/codegen/connectivity_state.h",
@@ -6162,7 +6224,6 @@
"language": "c",
"name": "grpc_codegen",
"src": [
- "include/grpc/impl/codegen/byte_buffer.h",
"include/grpc/impl/codegen/byte_buffer_reader.h",
"include/grpc/impl/codegen/compression_types.h",
"include/grpc/impl/codegen/connectivity_state.h",
@@ -6738,37 +6799,35 @@
"include/grpc++/support/stub_options.h",
"include/grpc++/support/sync_stream.h",
"include/grpc++/support/time.h",
- "src/cpp/client/channel.cc",
+ "src/cpp/client/channel_cc.cc",
"src/cpp/client/client_context.cc",
"src/cpp/client/create_channel.cc",
"src/cpp/client/create_channel_internal.cc",
"src/cpp/client/create_channel_internal.h",
"src/cpp/client/create_channel_posix.cc",
- "src/cpp/client/credentials.cc",
+ "src/cpp/client/credentials_cc.cc",
"src/cpp/client/generic_stub.cc",
- "src/cpp/client/insecure_credentials.cc",
"src/cpp/common/channel_arguments.cc",
"src/cpp/common/channel_filter.cc",
"src/cpp/common/channel_filter.h",
- "src/cpp/common/completion_queue.cc",
+ "src/cpp/common/completion_queue_cc.cc",
"src/cpp/common/core_codegen.cc",
"src/cpp/common/rpc_method.cc",
"src/cpp/server/async_generic_service.cc",
"src/cpp/server/create_default_thread_pool.cc",
"src/cpp/server/dynamic_thread_pool.cc",
"src/cpp/server/dynamic_thread_pool.h",
- "src/cpp/server/insecure_server_credentials.cc",
- "src/cpp/server/server.cc",
"src/cpp/server/server_builder.cc",
+ "src/cpp/server/server_cc.cc",
"src/cpp/server/server_context.cc",
"src/cpp/server/server_credentials.cc",
"src/cpp/server/server_posix.cc",
"src/cpp/server/thread_pool_interface.h",
- "src/cpp/util/byte_buffer.cc",
- "src/cpp/util/slice.cc",
+ "src/cpp/util/byte_buffer_cc.cc",
+ "src/cpp/util/slice_cc.cc",
"src/cpp/util/status.cc",
"src/cpp/util/string_ref.cc",
- "src/cpp/util/time.cc"
+ "src/cpp/util/time_cc.cc"
],
"third_party": false,
"type": "filegroup"
@@ -6801,6 +6860,7 @@
"include/grpc++/impl/codegen/service_type.h",
"include/grpc++/impl/codegen/status.h",
"include/grpc++/impl/codegen/status_code_enum.h",
+ "include/grpc++/impl/codegen/status_helper.h",
"include/grpc++/impl/codegen/string_ref.h",
"include/grpc++/impl/codegen/stub_options.h",
"include/grpc++/impl/codegen/sync.h",
@@ -6835,6 +6895,7 @@
"include/grpc++/impl/codegen/service_type.h",
"include/grpc++/impl/codegen/status.h",
"include/grpc++/impl/codegen/status_code_enum.h",
+ "include/grpc++/impl/codegen/status_helper.h",
"include/grpc++/impl/codegen/string_ref.h",
"include/grpc++/impl/codegen/stub_options.h",
"include/grpc++/impl/codegen/sync.h",
diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json
index b0c09ace5b..cbc8f584f4 100644
--- a/tools/run_tests/tests.json
+++ b/tools/run_tests/tests.json
@@ -710,6 +710,27 @@
"flaky": false,
"gtest": false,
"language": "c",
+ "name": "gpr_percent_encoding_test",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ]
+ },
+ {
+ "args": [],
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "gtest": false,
+ "language": "c",
"name": "gpr_slice_buffer_test",
"platforms": [
"linux",
@@ -2880,25 +2901,6 @@
"flaky": false,
"gtest": false,
"language": "c",
- "name": "bad_ssl_alpn_test",
- "platforms": [
- "linux",
- "mac",
- "posix"
- ]
- },
- {
- "args": [],
- "ci_platforms": [
- "linux",
- "mac",
- "posix"
- ],
- "cpu_cost": 0.1,
- "exclude_configs": [],
- "flaky": false,
- "gtest": false,
- "language": "c",
"name": "bad_ssl_cert_test",
"platforms": [
"linux",
@@ -5048,6 +5050,28 @@
},
{
"args": [
+ "no_logging"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_census_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"no_op"
],
"ci_platforms": [
@@ -5268,6 +5292,28 @@
},
{
"args": [
+ "simple_cacheable_request"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_census_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"simple_delayed_request"
],
"ci_platforms": [
@@ -5972,6 +6018,28 @@
},
{
"args": [
+ "no_logging"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_compress_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"no_op"
],
"ci_platforms": [
@@ -6192,6 +6260,28 @@
},
{
"args": [
+ "simple_cacheable_request"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_compress_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"simple_delayed_request"
],
"ci_platforms": [
@@ -6869,6 +6959,27 @@
},
{
"args": [
+ "no_logging"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_fakesec_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"no_op"
],
"ci_platforms": [
@@ -7079,6 +7190,27 @@
},
{
"args": [
+ "simple_cacheable_request"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_fakesec_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"simple_delayed_request"
],
"ci_platforms": [
@@ -7664,6 +7796,26 @@
},
{
"args": [
+ "no_logging"
+ ],
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_fd_test",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"no_op"
],
"ci_platforms": [
@@ -7844,6 +7996,26 @@
},
{
"args": [
+ "simple_cacheable_request"
+ ],
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_fd_test",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"simple_metadata"
],
"ci_platforms": [
@@ -8518,6 +8690,28 @@
},
{
"args": [
+ "no_logging"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_full_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"no_op"
],
"ci_platforms": [
@@ -8738,6 +8932,28 @@
},
{
"args": [
+ "simple_cacheable_request"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_full_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"simple_delayed_request"
],
"ci_platforms": [
@@ -9280,6 +9496,22 @@
},
{
"args": [
+ "no_logging"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_full+pipe_test",
+ "platforms": [
+ "linux"
+ ]
+ },
+ {
+ "args": [
"no_op"
],
"ci_platforms": [
@@ -9440,6 +9672,22 @@
},
{
"args": [
+ "simple_cacheable_request"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_full+pipe_test",
+ "platforms": [
+ "linux"
+ ]
+ },
+ {
+ "args": [
"simple_delayed_request"
],
"ci_platforms": [
@@ -10312,6 +10560,28 @@
},
{
"args": [
+ "simple_cacheable_request"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_full+trace_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"simple_delayed_request"
],
"ci_platforms": [
@@ -11016,6 +11286,28 @@
},
{
"args": [
+ "no_logging"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_load_reporting_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"no_op"
],
"ci_platforms": [
@@ -11236,6 +11528,28 @@
},
{
"args": [
+ "simple_cacheable_request"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_load_reporting_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"simple_delayed_request"
],
"ci_platforms": [
@@ -11913,6 +12227,27 @@
},
{
"args": [
+ "no_logging"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_oauth2_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"no_op"
],
"ci_platforms": [
@@ -12123,6 +12458,27 @@
},
{
"args": [
+ "simple_cacheable_request"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_oauth2_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"simple_delayed_request"
],
"ci_platforms": [
@@ -12711,6 +13067,27 @@
},
{
"args": [
+ "no_logging"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_proxy_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"no_op"
],
"ci_platforms": [
@@ -12879,6 +13256,27 @@
},
{
"args": [
+ "simple_cacheable_request"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_proxy_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"simple_delayed_request"
],
"ci_platforms": [
@@ -13488,6 +13886,27 @@
},
{
"args": [
+ "no_logging"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_sockpair_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"no_op"
],
"ci_platforms": [
@@ -13677,6 +14096,27 @@
},
{
"args": [
+ "simple_cacheable_request"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_sockpair_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"simple_metadata"
],
"ci_platforms": [
@@ -14433,6 +14873,27 @@
},
{
"args": [
+ "simple_cacheable_request"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_sockpair+trace_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"simple_metadata"
],
"ci_platforms": [
@@ -15021,6 +15482,27 @@
},
{
"args": [
+ "no_logging"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_sockpair_1byte_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"no_op"
],
"ci_platforms": [
@@ -15210,6 +15692,27 @@
},
{
"args": [
+ "simple_cacheable_request"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_sockpair_1byte_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"simple_metadata"
],
"ci_platforms": [
@@ -15888,6 +16391,28 @@
},
{
"args": [
+ "no_logging"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_ssl_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"no_op"
],
"ci_platforms": [
@@ -16108,6 +16633,28 @@
},
{
"args": [
+ "simple_cacheable_request"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_ssl_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"simple_delayed_request"
],
"ci_platforms": [
@@ -16812,6 +17359,28 @@
},
{
"args": [
+ "no_logging"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_ssl_cert_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"no_op"
],
"ci_platforms": [
@@ -17032,6 +17601,28 @@
},
{
"args": [
+ "simple_cacheable_request"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_ssl_cert_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"simple_delayed_request"
],
"ci_platforms": [
@@ -17625,6 +18216,27 @@
},
{
"args": [
+ "no_logging"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_ssl_proxy_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"no_op"
],
"ci_platforms": [
@@ -17793,6 +18405,27 @@
},
{
"args": [
+ "simple_cacheable_request"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_ssl_proxy_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"simple_delayed_request"
],
"ci_platforms": [
@@ -18418,6 +19051,26 @@
},
{
"args": [
+ "no_logging"
+ ],
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_uds_test",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"no_op"
],
"ci_platforms": [
@@ -18618,6 +19271,26 @@
},
{
"args": [
+ "simple_cacheable_request"
+ ],
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_uds_test",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"simple_delayed_request"
],
"ci_platforms": [
@@ -19290,6 +19963,28 @@
},
{
"args": [
+ "no_logging"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_census_nosec_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"no_op"
],
"ci_platforms": [
@@ -19510,6 +20205,28 @@
},
{
"args": [
+ "simple_cacheable_request"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_census_nosec_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"simple_delayed_request"
],
"ci_platforms": [
@@ -20192,6 +20909,28 @@
},
{
"args": [
+ "no_logging"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_compress_nosec_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"no_op"
],
"ci_platforms": [
@@ -20412,6 +21151,28 @@
},
{
"args": [
+ "simple_cacheable_request"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_compress_nosec_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"simple_delayed_request"
],
"ci_platforms": [
@@ -20982,6 +21743,26 @@
},
{
"args": [
+ "no_logging"
+ ],
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_fd_nosec_test",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"no_op"
],
"ci_platforms": [
@@ -21162,6 +21943,26 @@
},
{
"args": [
+ "simple_cacheable_request"
+ ],
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_fd_nosec_test",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"simple_metadata"
],
"ci_platforms": [
@@ -21814,6 +22615,28 @@
},
{
"args": [
+ "no_logging"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_full_nosec_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"no_op"
],
"ci_platforms": [
@@ -22034,6 +22857,28 @@
},
{
"args": [
+ "simple_cacheable_request"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_full_nosec_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"simple_delayed_request"
],
"ci_platforms": [
@@ -22560,6 +23405,22 @@
},
{
"args": [
+ "no_logging"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_full+pipe_nosec_test",
+ "platforms": [
+ "linux"
+ ]
+ },
+ {
+ "args": [
"no_op"
],
"ci_platforms": [
@@ -22720,6 +23581,22 @@
},
{
"args": [
+ "simple_cacheable_request"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_full+pipe_nosec_test",
+ "platforms": [
+ "linux"
+ ]
+ },
+ {
+ "args": [
"simple_delayed_request"
],
"ci_platforms": [
@@ -23570,6 +24447,28 @@
},
{
"args": [
+ "simple_cacheable_request"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_full+trace_nosec_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"simple_delayed_request"
],
"ci_platforms": [
@@ -24252,6 +25151,28 @@
},
{
"args": [
+ "no_logging"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_load_reporting_nosec_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"no_op"
],
"ci_platforms": [
@@ -24472,6 +25393,28 @@
},
{
"args": [
+ "simple_cacheable_request"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_load_reporting_nosec_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"simple_delayed_request"
],
"ci_platforms": [
@@ -25044,6 +25987,27 @@
},
{
"args": [
+ "no_logging"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_proxy_nosec_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"no_op"
],
"ci_platforms": [
@@ -25212,6 +26176,27 @@
},
{
"args": [
+ "simple_cacheable_request"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_proxy_nosec_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"simple_delayed_request"
],
"ci_platforms": [
@@ -25800,6 +26785,27 @@
},
{
"args": [
+ "no_logging"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_sockpair_nosec_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"no_op"
],
"ci_platforms": [
@@ -25989,6 +26995,27 @@
},
{
"args": [
+ "simple_cacheable_request"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_sockpair_nosec_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"simple_metadata"
],
"ci_platforms": [
@@ -26724,6 +27751,27 @@
},
{
"args": [
+ "simple_cacheable_request"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_sockpair+trace_nosec_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"simple_metadata"
],
"ci_platforms": [
@@ -27337,6 +28385,29 @@
},
{
"args": [
+ "no_logging"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [
+ "msan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_sockpair_1byte_nosec_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"no_op"
],
"ci_platforms": [
@@ -27544,6 +28615,29 @@
},
{
"args": [
+ "simple_cacheable_request"
+ ],
+ "ci_platforms": [
+ "windows",
+ "linux",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [
+ "msan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_sockpair_1byte_nosec_test",
+ "platforms": [
+ "windows",
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"simple_metadata"
],
"ci_platforms": [
@@ -28136,6 +29230,26 @@
},
{
"args": [
+ "no_logging"
+ ],
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_uds_nosec_test",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"no_op"
],
"ci_platforms": [
@@ -28336,6 +29450,26 @@
},
{
"args": [
+ "simple_cacheable_request"
+ ],
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c",
+ "name": "h2_uds_nosec_test",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix"
+ ]
+ },
+ {
+ "args": [
"simple_delayed_request"
],
"ci_platforms": [
@@ -28464,7 +29598,7 @@
{
"args": [
"--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_streaming_ping_pong_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}]}"
+ "{\"scenarios\": [{\"name\": \"cpp_generic_async_streaming_qps_unconstrained_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}"
],
"boringssl": true,
"ci_platforms": [
@@ -28473,7 +29607,7 @@
"posix",
"windows"
],
- "cpu_cost": 2,
+ "cpu_cost": 8,
"defaults": "boringssl",
"exclude_configs": [],
"flaky": false,
@@ -28485,13 +29619,40 @@
"posix",
"windows"
],
- "shortname": "json_run_localhost:cpp_protobuf_async_streaming_ping_pong_secure",
+ "shortname": "json_run_localhost:cpp_generic_async_streaming_qps_unconstrained_secure",
"timeout_seconds": 180
},
{
"args": [
"--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_unary_ping_pong_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}]}"
+ "{\"scenarios\": [{\"name\": \"cpp_generic_async_streaming_qps_one_server_core_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "cpu_cost": 1,
+ "defaults": "boringssl",
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "shortname": "json_run_localhost:cpp_generic_async_streaming_qps_one_server_core_secure",
+ "timeout_seconds": 180
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_streaming_ping_pong_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"SYNC_SERVER\"}, \"client_config\": {\"client_type\": \"SYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}]}"
],
"boringssl": true,
"ci_platforms": [
@@ -28512,7 +29673,7 @@
"posix",
"windows"
],
- "shortname": "json_run_localhost:cpp_protobuf_async_unary_ping_pong_secure",
+ "shortname": "json_run_localhost:cpp_protobuf_sync_streaming_ping_pong_secure",
"timeout_seconds": 180
},
{
@@ -28545,6 +29706,303 @@
{
"args": [
"--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_unary_qps_unconstrained_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"SYNC_SERVER\"}, \"client_config\": {\"client_type\": \"SYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 16, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "cpu_cost": 8,
+ "defaults": "boringssl",
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_sync_unary_qps_unconstrained_secure",
+ "timeout_seconds": 180
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_streaming_qps_unconstrained_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"SYNC_SERVER\"}, \"client_config\": {\"client_type\": \"SYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 16, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "cpu_cost": 8,
+ "defaults": "boringssl",
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_sync_streaming_qps_unconstrained_secure",
+ "timeout_seconds": 180
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_unary_qps_unconstrained_secure_1_channels\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 1000, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "cpu_cost": 8,
+ "defaults": "boringssl",
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_sync_unary_qps_unconstrained_secure_1_channels",
+ "timeout_seconds": 180
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_unary_qps_unconstrained_secure_3_channels\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 3, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 334, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "cpu_cost": 8,
+ "defaults": "boringssl",
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_sync_unary_qps_unconstrained_secure_3_channels",
+ "timeout_seconds": 180
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_unary_qps_unconstrained_secure_10_channels\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 10, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "cpu_cost": 8,
+ "defaults": "boringssl",
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_sync_unary_qps_unconstrained_secure_10_channels",
+ "timeout_seconds": 180
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_unary_qps_unconstrained_secure_31_channels\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 31, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 33, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "cpu_cost": 8,
+ "defaults": "boringssl",
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_sync_unary_qps_unconstrained_secure_31_channels",
+ "timeout_seconds": 180
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_unary_qps_unconstrained_secure_100_channels\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 100, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 10, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "cpu_cost": 8,
+ "defaults": "boringssl",
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_sync_unary_qps_unconstrained_secure_100_channels",
+ "timeout_seconds": 180
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_unary_qps_unconstrained_secure_316_channels\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 316, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 4, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "cpu_cost": 8,
+ "defaults": "boringssl",
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_sync_unary_qps_unconstrained_secure_316_channels",
+ "timeout_seconds": 180
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_unary_qps_unconstrained_secure_1000_channels\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1000, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "cpu_cost": 8,
+ "defaults": "boringssl",
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_sync_unary_qps_unconstrained_secure_1000_channels",
+ "timeout_seconds": 180
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_streaming_ping_pong_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "cpu_cost": 2,
+ "defaults": "boringssl",
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_async_streaming_ping_pong_secure",
+ "timeout_seconds": 180
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_unary_ping_pong_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "cpu_cost": 2,
+ "defaults": "boringssl",
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_async_unary_ping_pong_secure",
+ "timeout_seconds": 180
+ },
+ {
+ "args": [
+ "--scenarios_json",
"{\"scenarios\": [{\"name\": \"cpp_protobuf_async_unary_qps_unconstrained_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}"
],
"boringssl": true,
@@ -28599,7 +30057,7 @@
{
"args": [
"--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_generic_async_streaming_qps_unconstrained_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}"
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_unary_qps_unconstrained_secure_1_channels\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 6400, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}"
],
"boringssl": true,
"ci_platforms": [
@@ -28620,13 +30078,13 @@
"posix",
"windows"
],
- "shortname": "json_run_localhost:cpp_generic_async_streaming_qps_unconstrained_secure",
+ "shortname": "json_run_localhost:cpp_protobuf_async_unary_qps_unconstrained_secure_1_channels",
"timeout_seconds": 180
},
{
"args": [
"--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_generic_async_streaming_qps_one_server_core_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}"
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_unary_qps_unconstrained_secure_3_channels\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 3, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 2134, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}"
],
"boringssl": true,
"ci_platforms": [
@@ -28635,7 +30093,7 @@
"posix",
"windows"
],
- "cpu_cost": 1,
+ "cpu_cost": 8,
"defaults": "boringssl",
"exclude_configs": [],
"flaky": false,
@@ -28647,7 +30105,142 @@
"posix",
"windows"
],
- "shortname": "json_run_localhost:cpp_generic_async_streaming_qps_one_server_core_secure",
+ "shortname": "json_run_localhost:cpp_protobuf_async_unary_qps_unconstrained_secure_3_channels",
+ "timeout_seconds": 180
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_unary_qps_unconstrained_secure_10_channels\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 10, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 640, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "cpu_cost": 8,
+ "defaults": "boringssl",
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_async_unary_qps_unconstrained_secure_10_channels",
+ "timeout_seconds": 180
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_unary_qps_unconstrained_secure_31_channels\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 31, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 207, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "cpu_cost": 8,
+ "defaults": "boringssl",
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_async_unary_qps_unconstrained_secure_31_channels",
+ "timeout_seconds": 180
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_unary_qps_unconstrained_secure_100_channels\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 100, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 64, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "cpu_cost": 8,
+ "defaults": "boringssl",
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_async_unary_qps_unconstrained_secure_100_channels",
+ "timeout_seconds": 180
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_unary_qps_unconstrained_secure_316_channels\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 316, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 21, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "cpu_cost": 8,
+ "defaults": "boringssl",
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_async_unary_qps_unconstrained_secure_316_channels",
+ "timeout_seconds": 180
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_unary_qps_unconstrained_secure_1000_channels\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1000, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 7, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "cpu_cost": 8,
+ "defaults": "boringssl",
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_async_unary_qps_unconstrained_secure_1000_channels",
"timeout_seconds": 180
},
{
@@ -28680,7 +30273,7 @@
{
"args": [
"--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_streaming_ping_pong_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}]}"
+ "{\"scenarios\": [{\"name\": \"cpp_generic_async_streaming_qps_unconstrained_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}"
],
"boringssl": true,
"ci_platforms": [
@@ -28689,7 +30282,7 @@
"posix",
"windows"
],
- "cpu_cost": 2,
+ "cpu_cost": 8,
"defaults": "boringssl",
"exclude_configs": [],
"flaky": false,
@@ -28701,13 +30294,40 @@
"posix",
"windows"
],
- "shortname": "json_run_localhost:cpp_protobuf_async_streaming_ping_pong_insecure",
+ "shortname": "json_run_localhost:cpp_generic_async_streaming_qps_unconstrained_insecure",
"timeout_seconds": 180
},
{
"args": [
"--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_unary_ping_pong_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}]}"
+ "{\"scenarios\": [{\"name\": \"cpp_generic_async_streaming_qps_one_server_core_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "cpu_cost": 1,
+ "defaults": "boringssl",
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "shortname": "json_run_localhost:cpp_generic_async_streaming_qps_one_server_core_insecure",
+ "timeout_seconds": 180
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_streaming_ping_pong_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": null, \"server_type\": \"SYNC_SERVER\"}, \"client_config\": {\"client_type\": \"SYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}]}"
],
"boringssl": true,
"ci_platforms": [
@@ -28728,7 +30348,7 @@
"posix",
"windows"
],
- "shortname": "json_run_localhost:cpp_protobuf_async_unary_ping_pong_insecure",
+ "shortname": "json_run_localhost:cpp_protobuf_sync_streaming_ping_pong_insecure",
"timeout_seconds": 180
},
{
@@ -28761,6 +30381,303 @@
{
"args": [
"--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_unary_qps_unconstrained_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": null, \"server_type\": \"SYNC_SERVER\"}, \"client_config\": {\"client_type\": \"SYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 16, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "cpu_cost": 8,
+ "defaults": "boringssl",
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_sync_unary_qps_unconstrained_insecure",
+ "timeout_seconds": 180
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_streaming_qps_unconstrained_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": null, \"server_type\": \"SYNC_SERVER\"}, \"client_config\": {\"client_type\": \"SYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 16, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "cpu_cost": 8,
+ "defaults": "boringssl",
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_sync_streaming_qps_unconstrained_insecure",
+ "timeout_seconds": 180
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_unary_qps_unconstrained_insecure_1_channels\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 1000, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "cpu_cost": 8,
+ "defaults": "boringssl",
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_sync_unary_qps_unconstrained_insecure_1_channels",
+ "timeout_seconds": 180
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_unary_qps_unconstrained_insecure_3_channels\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 3, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 334, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "cpu_cost": 8,
+ "defaults": "boringssl",
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_sync_unary_qps_unconstrained_insecure_3_channels",
+ "timeout_seconds": 180
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_unary_qps_unconstrained_insecure_10_channels\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 10, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "cpu_cost": 8,
+ "defaults": "boringssl",
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_sync_unary_qps_unconstrained_insecure_10_channels",
+ "timeout_seconds": 180
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_unary_qps_unconstrained_insecure_31_channels\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 31, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 33, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "cpu_cost": 8,
+ "defaults": "boringssl",
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_sync_unary_qps_unconstrained_insecure_31_channels",
+ "timeout_seconds": 180
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_unary_qps_unconstrained_insecure_100_channels\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 100, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 10, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "cpu_cost": 8,
+ "defaults": "boringssl",
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_sync_unary_qps_unconstrained_insecure_100_channels",
+ "timeout_seconds": 180
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_unary_qps_unconstrained_insecure_316_channels\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 316, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 4, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "cpu_cost": 8,
+ "defaults": "boringssl",
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_sync_unary_qps_unconstrained_insecure_316_channels",
+ "timeout_seconds": 180
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_unary_qps_unconstrained_insecure_1000_channels\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1000, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "cpu_cost": 8,
+ "defaults": "boringssl",
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_sync_unary_qps_unconstrained_insecure_1000_channels",
+ "timeout_seconds": 180
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_streaming_ping_pong_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "cpu_cost": 2,
+ "defaults": "boringssl",
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_async_streaming_ping_pong_insecure",
+ "timeout_seconds": 180
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_unary_ping_pong_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "cpu_cost": 2,
+ "defaults": "boringssl",
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_async_unary_ping_pong_insecure",
+ "timeout_seconds": 180
+ },
+ {
+ "args": [
+ "--scenarios_json",
"{\"scenarios\": [{\"name\": \"cpp_protobuf_async_unary_qps_unconstrained_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}"
],
"boringssl": true,
@@ -28815,7 +30732,7 @@
{
"args": [
"--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_generic_async_streaming_qps_unconstrained_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}"
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_unary_qps_unconstrained_insecure_1_channels\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 6400, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}"
],
"boringssl": true,
"ci_platforms": [
@@ -28836,13 +30753,13 @@
"posix",
"windows"
],
- "shortname": "json_run_localhost:cpp_generic_async_streaming_qps_unconstrained_insecure",
+ "shortname": "json_run_localhost:cpp_protobuf_async_unary_qps_unconstrained_insecure_1_channels",
"timeout_seconds": 180
},
{
"args": [
"--scenarios_json",
- "{\"scenarios\": [{\"name\": \"cpp_generic_async_streaming_qps_one_server_core_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}"
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_unary_qps_unconstrained_insecure_3_channels\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 3, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 2134, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}"
],
"boringssl": true,
"ci_platforms": [
@@ -28851,7 +30768,7 @@
"posix",
"windows"
],
- "cpu_cost": 1,
+ "cpu_cost": 8,
"defaults": "boringssl",
"exclude_configs": [],
"flaky": false,
@@ -28863,7 +30780,142 @@
"posix",
"windows"
],
- "shortname": "json_run_localhost:cpp_generic_async_streaming_qps_one_server_core_insecure",
+ "shortname": "json_run_localhost:cpp_protobuf_async_unary_qps_unconstrained_insecure_3_channels",
+ "timeout_seconds": 180
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_unary_qps_unconstrained_insecure_10_channels\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 10, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 640, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "cpu_cost": 8,
+ "defaults": "boringssl",
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_async_unary_qps_unconstrained_insecure_10_channels",
+ "timeout_seconds": 180
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_unary_qps_unconstrained_insecure_31_channels\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 31, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 207, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "cpu_cost": 8,
+ "defaults": "boringssl",
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_async_unary_qps_unconstrained_insecure_31_channels",
+ "timeout_seconds": 180
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_unary_qps_unconstrained_insecure_100_channels\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 100, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 64, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "cpu_cost": 8,
+ "defaults": "boringssl",
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_async_unary_qps_unconstrained_insecure_100_channels",
+ "timeout_seconds": 180
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_unary_qps_unconstrained_insecure_316_channels\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 316, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 21, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "cpu_cost": 8,
+ "defaults": "boringssl",
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_async_unary_qps_unconstrained_insecure_316_channels",
+ "timeout_seconds": 180
+ },
+ {
+ "args": [
+ "--scenarios_json",
+ "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_unary_qps_unconstrained_insecure_1000_channels\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1000, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 7, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}"
+ ],
+ "boringssl": true,
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "cpu_cost": 8,
+ "defaults": "boringssl",
+ "exclude_configs": [],
+ "flaky": false,
+ "language": "c++",
+ "name": "json_run_localhost",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "shortname": "json_run_localhost:cpp_protobuf_async_unary_qps_unconstrained_insecure_1000_channels",
"timeout_seconds": 180
},
{
@@ -32516,6 +34568,25 @@
},
{
"args": [
+ "test/core/end2end/fuzzers/api_fuzzer_corpus/22967e8ed837f03b76a980cc1d25054fb84b40e9"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 0.1,
+ "exclude_configs": [
+ "tsan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "api_fuzzer_one_entry",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [
"test/core/end2end/fuzzers/api_fuzzer_corpus/22c9ed2979d9963bce6500997f1e0433988e7e37"
],
"ci_platforms": [
@@ -35480,6 +37551,25 @@
},
{
"args": [
+ "test/core/end2end/fuzzers/api_fuzzer_corpus/3f464011f8620f227309f6b2c84df6fffb8ed962"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 0.1,
+ "exclude_configs": [
+ "tsan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "api_fuzzer_one_entry",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [
"test/core/end2end/fuzzers/api_fuzzer_corpus/3f47ad9ab401599f42d3c4f37ab9f702e3ff0fc9"
],
"ci_platforms": [
@@ -49369,6 +51459,25 @@
},
{
"args": [
+ "test/core/end2end/fuzzers/api_fuzzer_corpus/crash-15070b2a2719ed8a6cbbaac25da02b7085993648"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 0.1,
+ "exclude_configs": [
+ "tsan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "api_fuzzer_one_entry",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [
"test/core/end2end/fuzzers/api_fuzzer_corpus/crash-1b9aeaf762bb1a972dda8f3a455df2628efd693b"
],
"ci_platforms": [
@@ -83284,6 +85393,804 @@
},
{
"args": [
+ "test/core/support/percent_decode_corpus/04cb8ccc553f9b2f5e52c421aff6d1c954d3dae6"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 0.1,
+ "exclude_configs": [
+ "tsan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "percent_decode_fuzzer_one_entry",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [
+ "test/core/support/percent_decode_corpus/0dd8f3a63745b3a2d39791559b5c1b311447b537"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 0.1,
+ "exclude_configs": [
+ "tsan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "percent_decode_fuzzer_one_entry",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [
+ "test/core/support/percent_decode_corpus/17eeaca784409adbe43365c32ac87915d736bba3"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 0.1,
+ "exclude_configs": [
+ "tsan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "percent_decode_fuzzer_one_entry",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [
+ "test/core/support/percent_decode_corpus/2040c1ff65f52a7ae668c2c8f324de5dacc9d695"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 0.1,
+ "exclude_configs": [
+ "tsan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "percent_decode_fuzzer_one_entry",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [
+ "test/core/support/percent_decode_corpus/26b0d1da23027ae54db96e125e4a9e98842d77fb"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 0.1,
+ "exclude_configs": [
+ "tsan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "percent_decode_fuzzer_one_entry",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [
+ "test/core/support/percent_decode_corpus/2a089c0db45acdb4c6ed8e7ff81ca7235792c0b9"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 0.1,
+ "exclude_configs": [
+ "tsan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "percent_decode_fuzzer_one_entry",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [
+ "test/core/support/percent_decode_corpus/35b7b3bc3a740d5c3abca0d75b53f0e1e1ee998a"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 0.1,
+ "exclude_configs": [
+ "tsan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "percent_decode_fuzzer_one_entry",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [
+ "test/core/support/percent_decode_corpus/36367ba1adba47a1cbc3a88707fde8cc7abdc248"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 0.1,
+ "exclude_configs": [
+ "tsan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "percent_decode_fuzzer_one_entry",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [
+ "test/core/support/percent_decode_corpus/39c2ba51548a0beaf0d6d1164531f1447dc311b5"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 0.1,
+ "exclude_configs": [
+ "tsan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "percent_decode_fuzzer_one_entry",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [
+ "test/core/support/percent_decode_corpus/56d08fea787c041395c6697ce26cfbc0decbe688"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 0.1,
+ "exclude_configs": [
+ "tsan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "percent_decode_fuzzer_one_entry",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [
+ "test/core/support/percent_decode_corpus/678d981fdabb9f0d6640235cf1719dd1e1e66ae9"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 0.1,
+ "exclude_configs": [
+ "tsan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "percent_decode_fuzzer_one_entry",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [
+ "test/core/support/percent_decode_corpus/68751961609ec010565de0aa87521dcbf0722c5d"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 0.1,
+ "exclude_configs": [
+ "tsan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "percent_decode_fuzzer_one_entry",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [
+ "test/core/support/percent_decode_corpus/7875c06c6f03c9aa2f8e9c59f8d8957c8a32e759"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 0.1,
+ "exclude_configs": [
+ "tsan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "percent_decode_fuzzer_one_entry",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [
+ "test/core/support/percent_decode_corpus/7b302090e090a5829b6d1dd7be30bd4e36a7e60f"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 0.1,
+ "exclude_configs": [
+ "tsan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "percent_decode_fuzzer_one_entry",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [
+ "test/core/support/percent_decode_corpus/875e1022169c9e4c541a9ad894e69e989df22ba1"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 0.1,
+ "exclude_configs": [
+ "tsan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "percent_decode_fuzzer_one_entry",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [
+ "test/core/support/percent_decode_corpus/8c1051ce066f5a26de9a9d133180621d0da957b4"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 0.1,
+ "exclude_configs": [
+ "tsan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "percent_decode_fuzzer_one_entry",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [
+ "test/core/support/percent_decode_corpus/8e084e628ab83a18ac7ca7cb3506525263655c63"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 0.1,
+ "exclude_configs": [
+ "tsan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "percent_decode_fuzzer_one_entry",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [
+ "test/core/support/percent_decode_corpus/9d316c4675f40ddccaf8f1cc7aea94170b1e4223"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 0.1,
+ "exclude_configs": [
+ "tsan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "percent_decode_fuzzer_one_entry",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [
+ "test/core/support/percent_decode_corpus/ad1c7c11d18a7d116e2c2ef4d4c5afb1270836ae"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 0.1,
+ "exclude_configs": [
+ "tsan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "percent_decode_fuzzer_one_entry",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [
+ "test/core/support/percent_decode_corpus/b471f94aa4facf502e622e4a248f1ba4063ae681"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 0.1,
+ "exclude_configs": [
+ "tsan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "percent_decode_fuzzer_one_entry",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [
+ "test/core/support/percent_decode_corpus/bf52ece030f16136d46e0dc97f58d60a0d8a1f0b"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 0.1,
+ "exclude_configs": [
+ "tsan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "percent_decode_fuzzer_one_entry",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [
+ "test/core/support/percent_decode_corpus/d5b2a7177339ba2b7ce2f60e5f4459bef1e72758"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 0.1,
+ "exclude_configs": [
+ "tsan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "percent_decode_fuzzer_one_entry",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [
+ "test/core/support/percent_decode_corpus/de867b64c54a7ed773dc611fc5cd2f17c5433113"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 0.1,
+ "exclude_configs": [
+ "tsan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "percent_decode_fuzzer_one_entry",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [
+ "test/core/support/percent_decode_corpus/e3948dbe004950591630dd5c52f4e0fcbd5e388a"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 0.1,
+ "exclude_configs": [
+ "tsan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "percent_decode_fuzzer_one_entry",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [
+ "test/core/support/percent_decode_corpus/e7064f0b80f61dbc65915311032d27baa569ae2a"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 0.1,
+ "exclude_configs": [
+ "tsan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "percent_decode_fuzzer_one_entry",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [
+ "test/core/support/percent_decode_corpus/xyz"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 0.1,
+ "exclude_configs": [
+ "tsan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "percent_decode_fuzzer_one_entry",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [
+ "test/core/support/percent_encode_corpus/0d3ee7fa54e6c66103965fd4409b044ba7db6c3f"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 0.1,
+ "exclude_configs": [
+ "tsan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "percent_encode_fuzzer_one_entry",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [
+ "test/core/support/percent_encode_corpus/2e7ccf75e27b9501e3b28cf1c50ed0c45ab7c226"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 0.1,
+ "exclude_configs": [
+ "tsan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "percent_encode_fuzzer_one_entry",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [
+ "test/core/support/percent_encode_corpus/55bb859f3942c462b03b7cbcf22ab4a0ac9705cf"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 0.1,
+ "exclude_configs": [
+ "tsan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "percent_encode_fuzzer_one_entry",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [
+ "test/core/support/percent_encode_corpus/56070cecd54c845b6d4334953b17b712eb000d93"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 0.1,
+ "exclude_configs": [
+ "tsan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "percent_encode_fuzzer_one_entry",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [
+ "test/core/support/percent_encode_corpus/61f50e891bf7ff5eb7a7af206f1e25d77f8756e7"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 0.1,
+ "exclude_configs": [
+ "tsan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "percent_encode_fuzzer_one_entry",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [
+ "test/core/support/percent_encode_corpus/6e0c60cefc704c7940e475a87dd9ae423061cb5a"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 0.1,
+ "exclude_configs": [
+ "tsan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "percent_encode_fuzzer_one_entry",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [
+ "test/core/support/percent_encode_corpus/7271ebcc6d22a0f186f7bc3c1973a7ed1bec8d8e"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 0.1,
+ "exclude_configs": [
+ "tsan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "percent_encode_fuzzer_one_entry",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [
+ "test/core/support/percent_encode_corpus/74c83ece3e2920a67593a9be9c82468f16cbb969"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 0.1,
+ "exclude_configs": [
+ "tsan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "percent_encode_fuzzer_one_entry",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [
+ "test/core/support/percent_encode_corpus/98e004fd2a9f141a7a019720820080e12d637c06"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 0.1,
+ "exclude_configs": [
+ "tsan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "percent_encode_fuzzer_one_entry",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [
+ "test/core/support/percent_encode_corpus/ba2c1e98227aa21ea3bb2ca4d0e504119717da8b"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 0.1,
+ "exclude_configs": [
+ "tsan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "percent_encode_fuzzer_one_entry",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [
+ "test/core/support/percent_encode_corpus/c16b9fd45370d4afb5d3ebd307a6e263c25ffd45"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 0.1,
+ "exclude_configs": [
+ "tsan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "percent_encode_fuzzer_one_entry",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [
+ "test/core/support/percent_encode_corpus/d58c3cd4eab9b6d2343abfa1c25c90a383fe0ec3"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 0.1,
+ "exclude_configs": [
+ "tsan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "percent_encode_fuzzer_one_entry",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [
+ "test/core/support/percent_encode_corpus/e2619218ede30d2b7b8ecd601a9f0ae754b728b4"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 0.1,
+ "exclude_configs": [
+ "tsan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "percent_encode_fuzzer_one_entry",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [
+ "test/core/support/percent_encode_corpus/f93b3653e453f0e3eea3198001be6ce46e64bd21"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 0.1,
+ "exclude_configs": [
+ "tsan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "percent_encode_fuzzer_one_entry",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [
+ "test/core/support/percent_encode_corpus/fd41d029c7682ad3d1c40a9fd017a4c85b673a54"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 0.1,
+ "exclude_configs": [
+ "tsan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "percent_encode_fuzzer_one_entry",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [
+ "test/core/support/percent_encode_corpus/xyz"
+ ],
+ "ci_platforms": [
+ "linux"
+ ],
+ "cpu_cost": 0.1,
+ "exclude_configs": [
+ "tsan"
+ ],
+ "flaky": false,
+ "language": "c",
+ "name": "percent_encode_fuzzer_one_entry",
+ "platforms": [
+ "linux"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [
"test/core/end2end/fuzzers/server_fuzzer_corpus/01c008fa.bin"
],
"ci_platforms": [
diff --git a/vsprojects/buildtests_c.sln b/vsprojects/buildtests_c.sln
index c28f3ba39c..8f3546f7be 100644
--- a/vsprojects/buildtests_c.sln
+++ b/vsprojects/buildtests_c.sln
@@ -300,6 +300,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gen_legal_metadata_characte
lib = "False"
EndProjectSection
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gen_percent_encoding_tables", "vcxproj\.\gen_percent_encoding_tables\gen_percent_encoding_tables.vcxproj", "{95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}"
+ ProjectSection(myProperties) = preProject
+ lib = "False"
+ EndProjectSection
+EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gpr", "vcxproj\.\gpr\gpr.vcxproj", "{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}"
ProjectSection(myProperties) = preProject
lib = "True"
@@ -377,6 +382,15 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gpr_log_test", "vcxproj\tes
{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}
EndProjectSection
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gpr_percent_encoding_test", "vcxproj\test\gpr_percent_encoding_test\gpr_percent_encoding_test.vcxproj", "{8313AE17-FCFA-8110-95C7-7AF2F814D188}"
+ ProjectSection(myProperties) = preProject
+ lib = "False"
+ EndProjectSection
+ ProjectSection(ProjectDependencies) = postProject
+ {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037}
+ {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}
+ EndProjectSection
+EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gpr_slice_buffer_test", "vcxproj\test\gpr_slice_buffer_test\gpr_slice_buffer_test.vcxproj", "{E679773D-DE89-AEBB-9787-59019989B825}"
ProjectSection(myProperties) = preProject
lib = "False"
@@ -1898,6 +1912,22 @@ Global
{A635DE99-B131-CA00-2D3B-8691D60B76C2}.Release-DLL|Win32.Build.0 = Release|Win32
{A635DE99-B131-CA00-2D3B-8691D60B76C2}.Release-DLL|x64.ActiveCfg = Release|x64
{A635DE99-B131-CA00-2D3B-8691D60B76C2}.Release-DLL|x64.Build.0 = Release|x64
+ {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Debug|Win32.ActiveCfg = Debug|Win32
+ {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Debug|x64.ActiveCfg = Debug|x64
+ {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Release|Win32.ActiveCfg = Release|Win32
+ {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Release|x64.ActiveCfg = Release|x64
+ {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Debug|Win32.Build.0 = Debug|Win32
+ {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Debug|x64.Build.0 = Debug|x64
+ {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Release|Win32.Build.0 = Release|Win32
+ {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Release|x64.Build.0 = Release|x64
+ {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Debug-DLL|Win32.ActiveCfg = Debug|Win32
+ {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Debug-DLL|Win32.Build.0 = Debug|Win32
+ {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Debug-DLL|x64.ActiveCfg = Debug|x64
+ {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Debug-DLL|x64.Build.0 = Debug|x64
+ {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Release-DLL|Win32.ActiveCfg = Release|Win32
+ {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Release-DLL|Win32.Build.0 = Release|Win32
+ {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Release-DLL|x64.ActiveCfg = Release|x64
+ {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Release-DLL|x64.Build.0 = Release|x64
{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Debug|Win32.ActiveCfg = Debug|Win32
{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Debug|x64.ActiveCfg = Debug|x64
{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Release|Win32.ActiveCfg = Release|Win32
@@ -2042,6 +2072,22 @@ Global
{38797EE3-62CC-3CBF-18D5-009ED6DD0BEC}.Release-DLL|Win32.Build.0 = Release|Win32
{38797EE3-62CC-3CBF-18D5-009ED6DD0BEC}.Release-DLL|x64.ActiveCfg = Release|x64
{38797EE3-62CC-3CBF-18D5-009ED6DD0BEC}.Release-DLL|x64.Build.0 = Release|x64
+ {8313AE17-FCFA-8110-95C7-7AF2F814D188}.Debug|Win32.ActiveCfg = Debug|Win32
+ {8313AE17-FCFA-8110-95C7-7AF2F814D188}.Debug|x64.ActiveCfg = Debug|x64
+ {8313AE17-FCFA-8110-95C7-7AF2F814D188}.Release|Win32.ActiveCfg = Release|Win32
+ {8313AE17-FCFA-8110-95C7-7AF2F814D188}.Release|x64.ActiveCfg = Release|x64
+ {8313AE17-FCFA-8110-95C7-7AF2F814D188}.Debug|Win32.Build.0 = Debug|Win32
+ {8313AE17-FCFA-8110-95C7-7AF2F814D188}.Debug|x64.Build.0 = Debug|x64
+ {8313AE17-FCFA-8110-95C7-7AF2F814D188}.Release|Win32.Build.0 = Release|Win32
+ {8313AE17-FCFA-8110-95C7-7AF2F814D188}.Release|x64.Build.0 = Release|x64
+ {8313AE17-FCFA-8110-95C7-7AF2F814D188}.Debug-DLL|Win32.ActiveCfg = Debug|Win32
+ {8313AE17-FCFA-8110-95C7-7AF2F814D188}.Debug-DLL|Win32.Build.0 = Debug|Win32
+ {8313AE17-FCFA-8110-95C7-7AF2F814D188}.Debug-DLL|x64.ActiveCfg = Debug|x64
+ {8313AE17-FCFA-8110-95C7-7AF2F814D188}.Debug-DLL|x64.Build.0 = Debug|x64
+ {8313AE17-FCFA-8110-95C7-7AF2F814D188}.Release-DLL|Win32.ActiveCfg = Release|Win32
+ {8313AE17-FCFA-8110-95C7-7AF2F814D188}.Release-DLL|Win32.Build.0 = Release|Win32
+ {8313AE17-FCFA-8110-95C7-7AF2F814D188}.Release-DLL|x64.ActiveCfg = Release|x64
+ {8313AE17-FCFA-8110-95C7-7AF2F814D188}.Release-DLL|x64.Build.0 = Release|x64
{E679773D-DE89-AEBB-9787-59019989B825}.Debug|Win32.ActiveCfg = Debug|Win32
{E679773D-DE89-AEBB-9787-59019989B825}.Debug|x64.ActiveCfg = Debug|x64
{E679773D-DE89-AEBB-9787-59019989B825}.Release|Win32.ActiveCfg = Release|Win32
diff --git a/vsprojects/grpc.sln b/vsprojects/grpc.sln
index 8fccc646e5..c75c65f9e1 100644
--- a/vsprojects/grpc.sln
+++ b/vsprojects/grpc.sln
@@ -22,6 +22,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gen_legal_metadata_characte
lib = "False"
EndProjectSection
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gen_percent_encoding_tables", "vcxproj\.\gen_percent_encoding_tables\gen_percent_encoding_tables.vcxproj", "{95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}"
+ ProjectSection(myProperties) = preProject
+ lib = "False"
+ EndProjectSection
+EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gpr", "vcxproj\.\gpr\gpr.vcxproj", "{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}"
ProjectSection(myProperties) = preProject
lib = "True"
@@ -222,6 +227,22 @@ Global
{A635DE99-B131-CA00-2D3B-8691D60B76C2}.Release-DLL|Win32.Build.0 = Release|Win32
{A635DE99-B131-CA00-2D3B-8691D60B76C2}.Release-DLL|x64.ActiveCfg = Release|x64
{A635DE99-B131-CA00-2D3B-8691D60B76C2}.Release-DLL|x64.Build.0 = Release|x64
+ {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Debug|Win32.ActiveCfg = Debug|Win32
+ {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Debug|x64.ActiveCfg = Debug|x64
+ {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Release|Win32.ActiveCfg = Release|Win32
+ {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Release|x64.ActiveCfg = Release|x64
+ {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Debug|Win32.Build.0 = Debug|Win32
+ {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Debug|x64.Build.0 = Debug|x64
+ {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Release|Win32.Build.0 = Release|Win32
+ {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Release|x64.Build.0 = Release|x64
+ {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Debug-DLL|Win32.ActiveCfg = Debug|Win32
+ {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Debug-DLL|Win32.Build.0 = Debug|Win32
+ {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Debug-DLL|x64.ActiveCfg = Debug|x64
+ {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Debug-DLL|x64.Build.0 = Debug|x64
+ {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Release-DLL|Win32.ActiveCfg = Release|Win32
+ {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Release-DLL|Win32.Build.0 = Release|Win32
+ {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Release-DLL|x64.ActiveCfg = Release|x64
+ {95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}.Release-DLL|x64.Build.0 = Release|x64
{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Debug|Win32.ActiveCfg = Debug|Win32
{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Debug|x64.ActiveCfg = Debug|x64
{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Release|Win32.ActiveCfg = Release|Win32
diff --git a/vsprojects/vcxproj/gen_percent_encoding_tables/gen_percent_encoding_tables.vcxproj b/vsprojects/vcxproj/gen_percent_encoding_tables/gen_percent_encoding_tables.vcxproj
new file mode 100644
index 0000000000..446b4129d2
--- /dev/null
+++ b/vsprojects/vcxproj/gen_percent_encoding_tables/gen_percent_encoding_tables.vcxproj
@@ -0,0 +1,162 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{95D6E277-5ED9-EBDB-3DB8-19C610D2C6F5}</ProjectGuid>
+ <IgnoreWarnIntDirInTempDetected>true</IgnoreWarnIntDirInTempDetected>
+ <IntDir>$(SolutionDir)IntDir\$(MSBuildProjectName)\</IntDir>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(VisualStudioVersion)' == '10.0'" Label="Configuration">
+ <PlatformToolset>v100</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(VisualStudioVersion)' == '11.0'" Label="Configuration">
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(VisualStudioVersion)' == '12.0'" Label="Configuration">
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(VisualStudioVersion)' == '14.0'" Label="Configuration">
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(SolutionDir)\..\vsprojects\global.props" />
+ <Import Project="$(SolutionDir)\..\vsprojects\winsock.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)'=='Debug'">
+ <TargetName>gen_percent_encoding_tables</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Release'">
+ <TargetName>gen_percent_encoding_tables</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <SDLCheck>true</SDLCheck>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat>
+ <MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
+ <GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <SDLCheck>true</SDLCheck>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat>
+ <MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
+ <GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>MaxSpeed</Optimization>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <SDLCheck>true</SDLCheck>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat>
+ <MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
+ <GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>MaxSpeed</Optimization>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <SDLCheck>true</SDLCheck>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat>
+ <MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
+ <GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+
+ <ItemGroup>
+ <ClCompile Include="$(SolutionDir)\..\tools\codegen\core\gen_percent_encoding_tables.c">
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+ <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
+ <PropertyGroup>
+ <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
+ </PropertyGroup>
+ </Target>
+</Project>
+
diff --git a/vsprojects/vcxproj/gen_percent_encoding_tables/gen_percent_encoding_tables.vcxproj.filters b/vsprojects/vcxproj/gen_percent_encoding_tables/gen_percent_encoding_tables.vcxproj.filters
new file mode 100644
index 0000000000..a787887c88
--- /dev/null
+++ b/vsprojects/vcxproj/gen_percent_encoding_tables/gen_percent_encoding_tables.vcxproj.filters
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <ClCompile Include="$(SolutionDir)\..\tools\codegen\core\gen_percent_encoding_tables.c">
+ <Filter>tools\codegen\core</Filter>
+ </ClCompile>
+ </ItemGroup>
+
+ <ItemGroup>
+ <Filter Include="tools">
+ <UniqueIdentifier>{e587d5b5-125f-1c73-e004-3c5659aa666b}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="tools\codegen">
+ <UniqueIdentifier>{0e90891e-2dd7-433f-2e97-b8495275cc10}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="tools\codegen\core">
+ <UniqueIdentifier>{194d6b8d-bf65-b581-90a4-13447dbfa951}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+</Project>
+
diff --git a/vsprojects/vcxproj/gpr/gpr.vcxproj b/vsprojects/vcxproj/gpr/gpr.vcxproj
index db8594e745..a77c16da9b 100644
--- a/vsprojects/vcxproj/gpr/gpr.vcxproj
+++ b/vsprojects/vcxproj/gpr/gpr.vcxproj
@@ -175,20 +175,17 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\support\tls_msvc.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\support\tls_pthread.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\support\useful.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\alloc.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_gcc_atomic.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_gcc_sync.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_windows.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\log.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\gpr_types.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\port_platform.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice_buffer.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_generic.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_posix.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_windows.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\time.h" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="$(SolutionDir)\..\src\core\lib\profiling\timers.h" />
@@ -196,6 +193,7 @@
<ClInclude Include="$(SolutionDir)\..\src\core\lib\support\block_annotate.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\support\env.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\support\murmur_hash.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\percent_encoding.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\support\stack_lockfree.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\support\string.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\support\string_windows.h" />
@@ -246,6 +244,8 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\support\murmur_hash.c">
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\support\percent_encoding.c">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\support\slice.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\support\slice_buffer.c">
diff --git a/vsprojects/vcxproj/gpr/gpr.vcxproj.filters b/vsprojects/vcxproj/gpr/gpr.vcxproj.filters
index 9bab373513..f6ba5563ce 100644
--- a/vsprojects/vcxproj/gpr/gpr.vcxproj.filters
+++ b/vsprojects/vcxproj/gpr/gpr.vcxproj.filters
@@ -64,6 +64,9 @@
<ClCompile Include="$(SolutionDir)\..\src\core\lib\support\murmur_hash.c">
<Filter>src\core\lib\support</Filter>
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\support\percent_encoding.c">
+ <Filter>src\core\lib\support</Filter>
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\support\slice.c">
<Filter>src\core\lib\support</Filter>
</ClCompile>
@@ -222,9 +225,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\support\useful.h">
<Filter>include\grpc\support</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\alloc.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
@@ -237,7 +237,7 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_windows.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\log.h">
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\gpr_types.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\port_platform.h">
@@ -246,9 +246,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice_buffer.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
@@ -261,9 +258,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_windows.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\time.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
</ItemGroup>
<ItemGroup>
<ClInclude Include="$(SolutionDir)\..\src\core\lib\profiling\timers.h">
@@ -281,6 +275,9 @@
<ClInclude Include="$(SolutionDir)\..\src\core\lib\support\murmur_hash.h">
<Filter>src\core\lib\support</Filter>
</ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\percent_encoding.h">
+ <Filter>src\core\lib\support</Filter>
+ </ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\core\lib\support\stack_lockfree.h">
<Filter>src\core\lib\support</Filter>
</ClInclude>
diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj b/vsprojects/vcxproj/grpc++/grpc++.vcxproj
index 321a403c49..23501307f7 100644
--- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj
+++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj
@@ -312,27 +312,23 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\grpc_posix.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\grpc_security_constants.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\status.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer_reader.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\compression_types.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\connectivity_state.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\grpc_types.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\propagation_bits.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\status.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\alloc.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_gcc_atomic.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_gcc_sync.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_windows.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\log.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\gpr_types.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\port_platform.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice_buffer.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_generic.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_posix.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_windows.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\time.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\async_stream.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\async_unary_call.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\call.h" />
@@ -356,6 +352,7 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\service_type.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status_code_enum.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status_helper.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\string_ref.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\stub_options.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync.h" />
@@ -455,6 +452,8 @@
<ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\transport_impl.h" />
</ItemGroup>
<ItemGroup>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\client\insecure_credentials.cc">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\client\secure_credentials.cc">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\common\auth_property_iterator.cc">
@@ -465,9 +464,11 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\common\secure_create_auth_context.cc">
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\insecure_server_credentials.cc">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\server\secure_server_credentials.cc">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\cpp\client\channel.cc">
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\client\channel_cc.cc">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\client\client_context.cc">
</ClCompile>
@@ -477,17 +478,15 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\client\create_channel_posix.cc">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\cpp\client\credentials.cc">
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\client\credentials_cc.cc">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\client\generic_stub.cc">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\cpp\client\insecure_credentials.cc">
- </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\common\channel_arguments.cc">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\common\channel_filter.cc">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\cpp\common\completion_queue.cc">
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\common\completion_queue_cc.cc">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\common\core_codegen.cc">
</ClCompile>
@@ -499,27 +498,25 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\server\dynamic_thread_pool.cc">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\cpp\server\insecure_server_credentials.cc">
- </ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\cpp\server\server.cc">
- </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\server\server_builder.cc">
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\server_cc.cc">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\server\server_context.cc">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\server\server_credentials.cc">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\server\server_posix.cc">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\cpp\util\byte_buffer.cc">
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\util\byte_buffer_cc.cc">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\cpp\util\slice.cc">
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\util\slice_cc.cc">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\util\status.cc">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\util\string_ref.cc">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\cpp\util\time.cc">
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\util\time_cc.cc">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\channel\channel_args.c">
</ClCompile>
diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters
index b34ca03a53..f00b63a719 100644
--- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters
+++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters
@@ -1,6 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\client\insecure_credentials.cc">
+ <Filter>src\cpp\client</Filter>
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\client\secure_credentials.cc">
<Filter>src\cpp\client</Filter>
</ClCompile>
@@ -16,10 +19,13 @@
<ClCompile Include="$(SolutionDir)\..\src\cpp\common\secure_create_auth_context.cc">
<Filter>src\cpp\common</Filter>
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\insecure_server_credentials.cc">
+ <Filter>src\cpp\server</Filter>
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\server\secure_server_credentials.cc">
<Filter>src\cpp\server</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\cpp\client\channel.cc">
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\client\channel_cc.cc">
<Filter>src\cpp\client</Filter>
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\client\client_context.cc">
@@ -34,22 +40,19 @@
<ClCompile Include="$(SolutionDir)\..\src\cpp\client\create_channel_posix.cc">
<Filter>src\cpp\client</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\cpp\client\credentials.cc">
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\client\credentials_cc.cc">
<Filter>src\cpp\client</Filter>
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\client\generic_stub.cc">
<Filter>src\cpp\client</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\cpp\client\insecure_credentials.cc">
- <Filter>src\cpp\client</Filter>
- </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\common\channel_arguments.cc">
<Filter>src\cpp\common</Filter>
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\common\channel_filter.cc">
<Filter>src\cpp\common</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\cpp\common\completion_queue.cc">
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\common\completion_queue_cc.cc">
<Filter>src\cpp\common</Filter>
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\common\core_codegen.cc">
@@ -67,13 +70,10 @@
<ClCompile Include="$(SolutionDir)\..\src\cpp\server\dynamic_thread_pool.cc">
<Filter>src\cpp\server</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\cpp\server\insecure_server_credentials.cc">
- <Filter>src\cpp\server</Filter>
- </ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\cpp\server\server.cc">
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\server_builder.cc">
<Filter>src\cpp\server</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\cpp\server\server_builder.cc">
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\server_cc.cc">
<Filter>src\cpp\server</Filter>
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\server\server_context.cc">
@@ -85,10 +85,10 @@
<ClCompile Include="$(SolutionDir)\..\src\cpp\server\server_posix.cc">
<Filter>src\cpp\server</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\cpp\util\byte_buffer.cc">
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\util\byte_buffer_cc.cc">
<Filter>src\cpp\util</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\cpp\util\slice.cc">
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\util\slice_cc.cc">
<Filter>src\cpp\util</Filter>
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\util\status.cc">
@@ -97,7 +97,7 @@
<ClCompile Include="$(SolutionDir)\..\src\cpp\util\string_ref.cc">
<Filter>src\cpp\util</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\cpp\util\time.cc">
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\util\time_cc.cc">
<Filter>src\cpp\util</Filter>
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\channel\channel_args.c">
@@ -534,9 +534,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\status.h">
<Filter>include\grpc</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer_reader.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
@@ -555,9 +552,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\status.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\alloc.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
@@ -570,7 +564,7 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_windows.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\log.h">
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\gpr_types.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\port_platform.h">
@@ -579,9 +573,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice_buffer.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
@@ -594,9 +585,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_windows.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\time.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\async_stream.h">
<Filter>include\grpc++\impl\codegen</Filter>
</ClInclude>
@@ -666,6 +654,9 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status_code_enum.h">
<Filter>include\grpc++\impl\codegen</Filter>
</ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status_helper.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\string_ref.h">
<Filter>include\grpc++\impl\codegen</Filter>
</ClInclude>
diff --git a/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj b/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj
index 7c3e63b208..230128180a 100644
--- a/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj
+++ b/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj
@@ -174,6 +174,7 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\service_type.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status_code_enum.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status_helper.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\string_ref.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\stub_options.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync.h" />
@@ -181,27 +182,23 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_no_cxx11.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_stream.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\time.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer_reader.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\compression_types.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\connectivity_state.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\grpc_types.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\propagation_bits.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\status.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\alloc.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_gcc_atomic.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_gcc_sync.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_windows.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\log.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\gpr_types.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\port_platform.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice_buffer.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_generic.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_posix.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_windows.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\time.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\config_protobuf.h" />
</ItemGroup>
<ItemGroup>
diff --git a/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj.filters b/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj.filters
index d9cd49cc30..540e1c6e36 100644
--- a/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj.filters
+++ b/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj.filters
@@ -96,6 +96,9 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status_code_enum.h">
<Filter>include\grpc++\impl\codegen</Filter>
</ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status_helper.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\string_ref.h">
<Filter>include\grpc++\impl\codegen</Filter>
</ClInclude>
@@ -117,9 +120,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\time.h">
<Filter>include\grpc++\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer_reader.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
@@ -138,9 +138,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\status.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\alloc.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
@@ -153,7 +150,7 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_windows.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\log.h">
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\gpr_types.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\port_platform.h">
@@ -162,9 +159,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice_buffer.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
@@ -177,9 +171,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_windows.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\time.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\config_protobuf.h">
<Filter>include\grpc++\impl\codegen</Filter>
</ClInclude>
diff --git a/vsprojects/vcxproj/grpc++_test_config/grpc++_test_config.vcxproj b/vsprojects/vcxproj/grpc++_test_config/grpc++_test_config.vcxproj
index 5eab788e4c..cf07e21da4 100644
--- a/vsprojects/vcxproj/grpc++_test_config/grpc++_test_config.vcxproj
+++ b/vsprojects/vcxproj/grpc++_test_config/grpc++_test_config.vcxproj
@@ -150,7 +150,7 @@
<ClInclude Include="$(SolutionDir)\..\test\cpp\util\test_config.h" />
</ItemGroup>
<ItemGroup>
- <ClCompile Include="$(SolutionDir)\..\test\cpp\util\test_config.cc">
+ <ClCompile Include="$(SolutionDir)\..\test\cpp\util\test_config_cc.cc">
</ClCompile>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
diff --git a/vsprojects/vcxproj/grpc++_test_config/grpc++_test_config.vcxproj.filters b/vsprojects/vcxproj/grpc++_test_config/grpc++_test_config.vcxproj.filters
index b4d4134b05..73e36148f2 100644
--- a/vsprojects/vcxproj/grpc++_test_config/grpc++_test_config.vcxproj.filters
+++ b/vsprojects/vcxproj/grpc++_test_config/grpc++_test_config.vcxproj.filters
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
- <ClCompile Include="$(SolutionDir)\..\test\cpp\util\test_config.cc">
+ <ClCompile Include="$(SolutionDir)\..\test\cpp\util\test_config_cc.cc">
<Filter>test\cpp\util</Filter>
</ClCompile>
</ItemGroup>
diff --git a/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj b/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj
index c2c7d00a6d..17e9199554 100644
--- a/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj
+++ b/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj
@@ -170,6 +170,7 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\service_type.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status_code_enum.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status_helper.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\string_ref.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\stub_options.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync.h" />
@@ -177,27 +178,23 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_no_cxx11.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_stream.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\time.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer_reader.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\compression_types.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\connectivity_state.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\grpc_types.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\propagation_bits.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\status.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\alloc.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_gcc_atomic.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_gcc_sync.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_windows.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\log.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\gpr_types.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\port_platform.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice_buffer.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_generic.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_posix.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_windows.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\time.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\proto_utils.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\config_protobuf.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\thrift_serializer.h" />
diff --git a/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj.filters
index 9b8c8ddfad..25a1752479 100644
--- a/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj.filters
+++ b/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj.filters
@@ -102,6 +102,9 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status_code_enum.h">
<Filter>include\grpc++\impl\codegen</Filter>
</ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status_helper.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\string_ref.h">
<Filter>include\grpc++\impl\codegen</Filter>
</ClInclude>
@@ -123,9 +126,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\time.h">
<Filter>include\grpc++\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer_reader.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
@@ -144,9 +144,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\status.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\alloc.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
@@ -159,7 +156,7 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_windows.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\log.h">
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\gpr_types.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\port_platform.h">
@@ -168,9 +165,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice_buffer.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
@@ -183,9 +177,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_windows.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\time.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\proto_utils.h">
<Filter>include\grpc++\impl\codegen</Filter>
</ClInclude>
diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj
index a7bb3ef23d..f55d3c0ee4 100644
--- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj
+++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj
@@ -312,27 +312,23 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\grpc_posix.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\grpc_security_constants.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\status.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer_reader.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\compression_types.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\connectivity_state.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\grpc_types.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\propagation_bits.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\status.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\alloc.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_gcc_atomic.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_gcc_sync.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_windows.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\log.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\gpr_types.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\port_platform.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice_buffer.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_generic.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_posix.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_windows.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\time.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\async_stream.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\async_unary_call.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\call.h" />
@@ -356,6 +352,7 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\service_type.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status_code_enum.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status_helper.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\string_ref.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\stub_options.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync.h" />
@@ -451,9 +448,13 @@
<ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\transport_impl.h" />
</ItemGroup>
<ItemGroup>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\client\insecure_credentials.cc">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\common\insecure_create_auth_context.cc">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\cpp\client\channel.cc">
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\insecure_server_credentials.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\client\channel_cc.cc">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\client\client_context.cc">
</ClCompile>
@@ -463,17 +464,15 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\client\create_channel_posix.cc">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\cpp\client\credentials.cc">
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\client\credentials_cc.cc">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\client\generic_stub.cc">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\cpp\client\insecure_credentials.cc">
- </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\common\channel_arguments.cc">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\common\channel_filter.cc">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\cpp\common\completion_queue.cc">
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\common\completion_queue_cc.cc">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\common\core_codegen.cc">
</ClCompile>
@@ -485,27 +484,25 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\server\dynamic_thread_pool.cc">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\cpp\server\insecure_server_credentials.cc">
- </ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\cpp\server\server.cc">
- </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\server\server_builder.cc">
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\server_cc.cc">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\server\server_context.cc">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\server\server_credentials.cc">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\server\server_posix.cc">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\cpp\util\byte_buffer.cc">
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\util\byte_buffer_cc.cc">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\cpp\util\slice.cc">
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\util\slice_cc.cc">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\util\status.cc">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\util\string_ref.cc">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\cpp\util\time.cc">
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\util\time_cc.cc">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\channel\channel_args.c">
</ClCompile>
diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters
index 4ad0ae31d9..0523b91789 100644
--- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters
+++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters
@@ -1,10 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\client\insecure_credentials.cc">
+ <Filter>src\cpp\client</Filter>
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\common\insecure_create_auth_context.cc">
<Filter>src\cpp\common</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\cpp\client\channel.cc">
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\insecure_server_credentials.cc">
+ <Filter>src\cpp\server</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\client\channel_cc.cc">
<Filter>src\cpp\client</Filter>
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\client\client_context.cc">
@@ -19,22 +25,19 @@
<ClCompile Include="$(SolutionDir)\..\src\cpp\client\create_channel_posix.cc">
<Filter>src\cpp\client</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\cpp\client\credentials.cc">
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\client\credentials_cc.cc">
<Filter>src\cpp\client</Filter>
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\client\generic_stub.cc">
<Filter>src\cpp\client</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\cpp\client\insecure_credentials.cc">
- <Filter>src\cpp\client</Filter>
- </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\common\channel_arguments.cc">
<Filter>src\cpp\common</Filter>
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\common\channel_filter.cc">
<Filter>src\cpp\common</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\cpp\common\completion_queue.cc">
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\common\completion_queue_cc.cc">
<Filter>src\cpp\common</Filter>
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\common\core_codegen.cc">
@@ -52,13 +55,10 @@
<ClCompile Include="$(SolutionDir)\..\src\cpp\server\dynamic_thread_pool.cc">
<Filter>src\cpp\server</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\cpp\server\insecure_server_credentials.cc">
- <Filter>src\cpp\server</Filter>
- </ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\cpp\server\server.cc">
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\server_builder.cc">
<Filter>src\cpp\server</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\cpp\server\server_builder.cc">
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\server_cc.cc">
<Filter>src\cpp\server</Filter>
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\server\server_context.cc">
@@ -70,10 +70,10 @@
<ClCompile Include="$(SolutionDir)\..\src\cpp\server\server_posix.cc">
<Filter>src\cpp\server</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\cpp\util\byte_buffer.cc">
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\util\byte_buffer_cc.cc">
<Filter>src\cpp\util</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\cpp\util\slice.cc">
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\util\slice_cc.cc">
<Filter>src\cpp\util</Filter>
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\util\status.cc">
@@ -82,7 +82,7 @@
<ClCompile Include="$(SolutionDir)\..\src\cpp\util\string_ref.cc">
<Filter>src\cpp\util</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\cpp\util\time.cc">
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\util\time_cc.cc">
<Filter>src\cpp\util</Filter>
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\channel\channel_args.c">
@@ -519,9 +519,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\status.h">
<Filter>include\grpc</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer_reader.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
@@ -540,9 +537,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\status.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\alloc.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
@@ -555,7 +549,7 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_windows.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\log.h">
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\gpr_types.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\port_platform.h">
@@ -564,9 +558,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice_buffer.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
@@ -579,9 +570,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_windows.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\time.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\async_stream.h">
<Filter>include\grpc++\impl\codegen</Filter>
</ClInclude>
@@ -651,6 +639,9 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status_code_enum.h">
<Filter>include\grpc++\impl\codegen</Filter>
</ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status_helper.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\string_ref.h">
<Filter>include\grpc++\impl\codegen</Filter>
</ClInclude>
diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj
index 252704756d..badbffdfba 100644
--- a/vsprojects/vcxproj/grpc/grpc.vcxproj
+++ b/vsprojects/vcxproj/grpc/grpc.vcxproj
@@ -274,27 +274,23 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\grpc_posix.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\grpc_security_constants.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\status.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer_reader.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\compression_types.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\connectivity_state.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\grpc_types.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\propagation_bits.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\status.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\alloc.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_gcc_atomic.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_gcc_sync.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_windows.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\log.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\gpr_types.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\port_platform.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice_buffer.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_generic.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_posix.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_windows.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\time.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\grpc_security.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\census.h" />
</ItemGroup>
@@ -426,7 +422,6 @@
<ClInclude Include="$(SolutionDir)\..\src\core\lib\tsi\transport_security_interface.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\client_channel.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\client_channel_factory.h" />
- <ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\client_config.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\connector.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\initial_connect_string.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\lb_policy.h" />
@@ -436,8 +431,8 @@
<ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\resolver.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\resolver_factory.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\resolver_registry.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\resolver_result.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\subchannel.h" />
- <ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\subchannel_call_holder.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\subchannel_index.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\uri_parser.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\lb_policy\grpclb\grpclb.h" />
@@ -454,6 +449,7 @@
<ClInclude Include="$(SolutionDir)\..\src\core\ext\census\census_interface.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\census\census_rpc_stats.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\census\gen\census.pb.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\census\gen\trace_context.pb.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\census\grpc_filter.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\census\mlog.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\census\resource.h" />
@@ -750,8 +746,6 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\client_channel_factory.c">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\client_config.c">
- </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\client_config_plugin.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\connector.c">
@@ -774,9 +768,9 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\resolver_registry.c">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\subchannel.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\resolver_result.c">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\subchannel_call_holder.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\subchannel.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\subchannel_index.c">
</ClCompile>
@@ -820,6 +814,8 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\census\gen\census.pb.c">
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\census\gen\trace_context.pb.c">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\census\grpc_context.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\census\grpc_filter.c">
diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters
index 1fdf0f5eca..19bdda43c5 100644
--- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters
+++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters
@@ -436,9 +436,6 @@
<ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\client_channel_factory.c">
<Filter>src\core\ext\client_config</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\client_config.c">
- <Filter>src\core\ext\client_config</Filter>
- </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\client_config_plugin.c">
<Filter>src\core\ext\client_config</Filter>
</ClCompile>
@@ -472,10 +469,10 @@
<ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\resolver_registry.c">
<Filter>src\core\ext\client_config</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\subchannel.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\resolver_result.c">
<Filter>src\core\ext\client_config</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\subchannel_call_holder.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\subchannel.c">
<Filter>src\core\ext\client_config</Filter>
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\subchannel_index.c">
@@ -541,6 +538,9 @@
<ClCompile Include="$(SolutionDir)\..\src\core\ext\census\gen\census.pb.c">
<Filter>src\core\ext\census\gen</Filter>
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\census\gen\trace_context.pb.c">
+ <Filter>src\core\ext\census\gen</Filter>
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\census\grpc_context.c">
<Filter>src\core\ext\census</Filter>
</ClCompile>
@@ -594,9 +594,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\status.h">
<Filter>include\grpc</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer_reader.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
@@ -615,9 +612,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\status.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\alloc.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
@@ -630,7 +624,7 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_windows.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\log.h">
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\gpr_types.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\port_platform.h">
@@ -639,9 +633,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice_buffer.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
@@ -654,9 +645,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_windows.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\time.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc\grpc_security.h">
<Filter>include\grpc</Filter>
</ClInclude>
@@ -1046,9 +1034,6 @@
<ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\client_channel_factory.h">
<Filter>src\core\ext\client_config</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\client_config.h">
- <Filter>src\core\ext\client_config</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\connector.h">
<Filter>src\core\ext\client_config</Filter>
</ClInclude>
@@ -1076,10 +1061,10 @@
<ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\resolver_registry.h">
<Filter>src\core\ext\client_config</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\subchannel.h">
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\resolver_result.h">
<Filter>src\core\ext\client_config</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\subchannel_call_holder.h">
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\subchannel.h">
<Filter>src\core\ext\client_config</Filter>
</ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\subchannel_index.h">
@@ -1130,6 +1115,9 @@
<ClInclude Include="$(SolutionDir)\..\src\core\ext\census\gen\census.pb.h">
<Filter>src\core\ext\census\gen</Filter>
</ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\census\gen\trace_context.pb.h">
+ <Filter>src\core\ext\census\gen</Filter>
+ </ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\core\ext\census\grpc_filter.h">
<Filter>src\core\ext\census</Filter>
</ClInclude>
diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj
index 80dd6b2dcb..8eaf7f689b 100644
--- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj
+++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj
@@ -154,27 +154,23 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\grpc_posix.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\grpc_security_constants.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\status.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer_reader.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\compression_types.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\connectivity_state.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\grpc_types.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\propagation_bits.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\status.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\alloc.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_gcc_atomic.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_gcc_sync.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_windows.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\log.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\gpr_types.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\port_platform.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice_buffer.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_generic.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_posix.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_windows.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\time.h" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="$(SolutionDir)\..\test\core\end2end\data\ssl_test_data.h" />
diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters
index 8dc28d1cb9..2fc2c6d836 100644
--- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters
+++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters
@@ -342,9 +342,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\status.h">
<Filter>include\grpc</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer_reader.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
@@ -363,9 +360,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\status.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\alloc.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
@@ -378,7 +372,7 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_windows.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\log.h">
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\gpr_types.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\port_platform.h">
@@ -387,9 +381,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice_buffer.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
@@ -402,9 +393,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_windows.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\time.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
</ItemGroup>
<ItemGroup>
<ClInclude Include="$(SolutionDir)\..\test\core\end2end\data\ssl_test_data.h">
diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj
index fffb409781..9d97645309 100644
--- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj
+++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj
@@ -265,27 +265,23 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\grpc_posix.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\grpc_security_constants.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\status.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer_reader.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\compression_types.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\connectivity_state.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\grpc_types.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\propagation_bits.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\status.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\alloc.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_gcc_atomic.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_gcc_sync.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_windows.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\log.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\gpr_types.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\port_platform.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice_buffer.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_generic.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_posix.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_windows.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\time.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\census.h" />
</ItemGroup>
<ItemGroup>
@@ -392,7 +388,6 @@
<ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\alpn\alpn.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\client_channel.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\client_channel_factory.h" />
- <ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\client_config.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\connector.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\initial_connect_string.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\lb_policy.h" />
@@ -402,8 +397,8 @@
<ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\resolver.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\resolver_factory.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\resolver_registry.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\resolver_result.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\subchannel.h" />
- <ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\subchannel_call_holder.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\subchannel_index.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\uri_parser.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\load_reporting\load_reporting.h" />
@@ -420,6 +415,7 @@
<ClInclude Include="$(SolutionDir)\..\src\core\ext\census\census_interface.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\census\census_rpc_stats.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\census\gen\census.pb.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\census\gen\trace_context.pb.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\census\grpc_filter.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\census\mlog.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\ext\census\resource.h" />
@@ -666,8 +662,6 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\client_channel_factory.c">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\client_config.c">
- </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\client_config_plugin.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\connector.c">
@@ -690,9 +684,9 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\resolver_registry.c">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\subchannel.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\resolver_result.c">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\subchannel_call_holder.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\subchannel.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\subchannel_index.c">
</ClCompile>
@@ -728,6 +722,8 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\census\gen\census.pb.c">
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\census\gen\trace_context.pb.c">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\census\grpc_context.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\census\grpc_filter.c">
diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters
index 8c8afb6b86..251a8fafd1 100644
--- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters
+++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters
@@ -361,9 +361,6 @@
<ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\client_channel_factory.c">
<Filter>src\core\ext\client_config</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\client_config.c">
- <Filter>src\core\ext\client_config</Filter>
- </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\client_config_plugin.c">
<Filter>src\core\ext\client_config</Filter>
</ClCompile>
@@ -397,10 +394,10 @@
<ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\resolver_registry.c">
<Filter>src\core\ext\client_config</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\subchannel.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\resolver_result.c">
<Filter>src\core\ext\client_config</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\subchannel_call_holder.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\subchannel.c">
<Filter>src\core\ext\client_config</Filter>
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\subchannel_index.c">
@@ -454,6 +451,9 @@
<ClCompile Include="$(SolutionDir)\..\src\core\ext\census\gen\census.pb.c">
<Filter>src\core\ext\census\gen</Filter>
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\census\gen\trace_context.pb.c">
+ <Filter>src\core\ext\census\gen</Filter>
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\ext\census\grpc_context.c">
<Filter>src\core\ext\census</Filter>
</ClCompile>
@@ -507,9 +507,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\status.h">
<Filter>include\grpc</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer_reader.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
@@ -528,9 +525,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\status.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\alloc.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
@@ -543,7 +537,7 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_windows.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\log.h">
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\gpr_types.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\port_platform.h">
@@ -552,9 +546,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice_buffer.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
@@ -567,9 +558,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_windows.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\time.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc\census.h">
<Filter>include\grpc</Filter>
</ClInclude>
@@ -884,9 +872,6 @@
<ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\client_channel_factory.h">
<Filter>src\core\ext\client_config</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\client_config.h">
- <Filter>src\core\ext\client_config</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\connector.h">
<Filter>src\core\ext\client_config</Filter>
</ClInclude>
@@ -914,10 +899,10 @@
<ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\resolver_registry.h">
<Filter>src\core\ext\client_config</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\subchannel.h">
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\resolver_result.h">
<Filter>src\core\ext\client_config</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\subchannel_call_holder.h">
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\subchannel.h">
<Filter>src\core\ext\client_config</Filter>
</ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\subchannel_index.h">
@@ -968,6 +953,9 @@
<ClInclude Include="$(SolutionDir)\..\src\core\ext\census\gen\census.pb.h">
<Filter>src\core\ext\census\gen</Filter>
</ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\census\gen\trace_context.pb.h">
+ <Filter>src\core\ext\census\gen</Filter>
+ </ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\core\ext\census\grpc_filter.h">
<Filter>src\core\ext\census</Filter>
</ClInclude>
diff --git a/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj b/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj
index e608f7ed3a..2d75735728 100644
--- a/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj
+++ b/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj
@@ -183,6 +183,7 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\service_type.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status_code_enum.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status_helper.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\string_ref.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\stub_options.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync.h" />
@@ -190,27 +191,23 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_no_cxx11.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_stream.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\time.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer_reader.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\compression_types.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\connectivity_state.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\grpc_types.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\propagation_bits.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\status.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\alloc.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_gcc_atomic.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_gcc_sync.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_windows.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\log.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\gpr_types.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\port_platform.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice_buffer.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_generic.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_posix.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_windows.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\time.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="$(SolutionDir)\..\src\proto\grpc\testing\control.pb.cc">
diff --git a/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj.filters b/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj.filters
index 8fc8f3901b..dda79675fb 100644
--- a/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj.filters
+++ b/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj.filters
@@ -90,6 +90,9 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status_code_enum.h">
<Filter>include\grpc++\impl\codegen</Filter>
</ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status_helper.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\string_ref.h">
<Filter>include\grpc++\impl\codegen</Filter>
</ClInclude>
@@ -111,9 +114,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\time.h">
<Filter>include\grpc++\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer_reader.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
@@ -132,9 +132,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\status.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\alloc.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
@@ -147,7 +144,7 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_windows.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\log.h">
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\gpr_types.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\port_platform.h">
@@ -156,9 +153,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice_buffer.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
@@ -171,9 +165,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_windows.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\time.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
</ItemGroup>
<ItemGroup>
diff --git a/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj b/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj
index 3331c61847..270c2a3a06 100644
--- a/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj
+++ b/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj
@@ -183,6 +183,7 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\service_type.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status_code_enum.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status_helper.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\string_ref.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\stub_options.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync.h" />
@@ -190,27 +191,23 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_no_cxx11.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_stream.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\time.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer_reader.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\compression_types.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\connectivity_state.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\grpc_types.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\propagation_bits.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\status.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\alloc.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_gcc_atomic.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_gcc_sync.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_windows.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\log.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\gpr_types.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\port_platform.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice_buffer.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_generic.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_posix.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_windows.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\time.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="$(SolutionDir)\..\src\proto\grpc\testing\control.pb.cc">
diff --git a/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj.filters b/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj.filters
index a8ff115317..dc5e321649 100644
--- a/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj.filters
+++ b/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj.filters
@@ -93,6 +93,9 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status_code_enum.h">
<Filter>include\grpc++\impl\codegen</Filter>
</ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status_helper.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\string_ref.h">
<Filter>include\grpc++\impl\codegen</Filter>
</ClInclude>
@@ -114,9 +117,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\time.h">
<Filter>include\grpc++\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer_reader.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
@@ -135,9 +135,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\status.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\alloc.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
@@ -150,7 +147,7 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_windows.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\log.h">
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\gpr_types.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\port_platform.h">
@@ -159,9 +156,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice_buffer.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
@@ -174,9 +168,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_windows.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\time.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
</ItemGroup>
<ItemGroup>
diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_census_nosec_test/h2_census_nosec_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_census_nosec_test/h2_census_nosec_test.vcxproj
index 3000ec18fb..b43c39ee66 100644
--- a/vsprojects/vcxproj/test/end2end/fixtures/h2_census_nosec_test/h2_census_nosec_test.vcxproj
+++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_census_nosec_test/h2_census_nosec_test.vcxproj
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\1.0.204.1.props')" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -54,7 +53,6 @@
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)\..\vsprojects\global.props" />
- <Import Project="$(SolutionDir)\..\vsprojects\openssl.props" />
<Import Project="$(SolutionDir)\..\vsprojects\winsock.props" />
<Import Project="$(SolutionDir)\..\vsprojects\zlib.props" />
</ImportGroup>
@@ -63,15 +61,11 @@
<TargetName>h2_census_nosec_test</TargetName>
<Linkage-grpc_dependencies_zlib>static</Linkage-grpc_dependencies_zlib>
<Configuration-grpc_dependencies_zlib>Debug</Configuration-grpc_dependencies_zlib>
- <Linkage-grpc_dependencies_openssl>static</Linkage-grpc_dependencies_openssl>
- <Configuration-grpc_dependencies_openssl>Debug</Configuration-grpc_dependencies_openssl>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<TargetName>h2_census_nosec_test</TargetName>
<Linkage-grpc_dependencies_zlib>static</Linkage-grpc_dependencies_zlib>
<Configuration-grpc_dependencies_zlib>Release</Configuration-grpc_dependencies_zlib>
- <Linkage-grpc_dependencies_openssl>static</Linkage-grpc_dependencies_openssl>
- <Configuration-grpc_dependencies_openssl>Release</Configuration-grpc_dependencies_openssl>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
@@ -185,8 +179,6 @@
<ImportGroup Label="ExtensionTargets">
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies\grpc.dependencies.zlib.targets')" />
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies\grpc.dependencies.zlib.targets')" />
- <Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies\grpc.dependencies.openssl.targets')" />
- <Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies\grpc.dependencies.openssl.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
@@ -194,9 +186,6 @@
</PropertyGroup>
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets')" />
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets')" />
- <Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets')" />
- <Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props')" />
- <Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets')" />
</Target>
</Project>
diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_compress_nosec_test/h2_compress_nosec_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_compress_nosec_test/h2_compress_nosec_test.vcxproj
index 0fddf5577a..7da53a3849 100644
--- a/vsprojects/vcxproj/test/end2end/fixtures/h2_compress_nosec_test/h2_compress_nosec_test.vcxproj
+++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_compress_nosec_test/h2_compress_nosec_test.vcxproj
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\1.0.204.1.props')" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -54,7 +53,6 @@
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)\..\vsprojects\global.props" />
- <Import Project="$(SolutionDir)\..\vsprojects\openssl.props" />
<Import Project="$(SolutionDir)\..\vsprojects\winsock.props" />
<Import Project="$(SolutionDir)\..\vsprojects\zlib.props" />
</ImportGroup>
@@ -63,15 +61,11 @@
<TargetName>h2_compress_nosec_test</TargetName>
<Linkage-grpc_dependencies_zlib>static</Linkage-grpc_dependencies_zlib>
<Configuration-grpc_dependencies_zlib>Debug</Configuration-grpc_dependencies_zlib>
- <Linkage-grpc_dependencies_openssl>static</Linkage-grpc_dependencies_openssl>
- <Configuration-grpc_dependencies_openssl>Debug</Configuration-grpc_dependencies_openssl>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<TargetName>h2_compress_nosec_test</TargetName>
<Linkage-grpc_dependencies_zlib>static</Linkage-grpc_dependencies_zlib>
<Configuration-grpc_dependencies_zlib>Release</Configuration-grpc_dependencies_zlib>
- <Linkage-grpc_dependencies_openssl>static</Linkage-grpc_dependencies_openssl>
- <Configuration-grpc_dependencies_openssl>Release</Configuration-grpc_dependencies_openssl>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
@@ -185,8 +179,6 @@
<ImportGroup Label="ExtensionTargets">
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies\grpc.dependencies.zlib.targets')" />
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies\grpc.dependencies.zlib.targets')" />
- <Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies\grpc.dependencies.openssl.targets')" />
- <Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies\grpc.dependencies.openssl.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
@@ -194,9 +186,6 @@
</PropertyGroup>
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets')" />
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets')" />
- <Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets')" />
- <Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props')" />
- <Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets')" />
</Target>
</Project>
diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_full+trace_nosec_test/h2_full+trace_nosec_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_full+trace_nosec_test/h2_full+trace_nosec_test.vcxproj
index a59e08213c..bbd7d38fb9 100644
--- a/vsprojects/vcxproj/test/end2end/fixtures/h2_full+trace_nosec_test/h2_full+trace_nosec_test.vcxproj
+++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_full+trace_nosec_test/h2_full+trace_nosec_test.vcxproj
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\1.0.204.1.props')" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -54,7 +53,6 @@
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)\..\vsprojects\global.props" />
- <Import Project="$(SolutionDir)\..\vsprojects\openssl.props" />
<Import Project="$(SolutionDir)\..\vsprojects\winsock.props" />
<Import Project="$(SolutionDir)\..\vsprojects\zlib.props" />
</ImportGroup>
@@ -63,15 +61,11 @@
<TargetName>h2_full+trace_nosec_test</TargetName>
<Linkage-grpc_dependencies_zlib>static</Linkage-grpc_dependencies_zlib>
<Configuration-grpc_dependencies_zlib>Debug</Configuration-grpc_dependencies_zlib>
- <Linkage-grpc_dependencies_openssl>static</Linkage-grpc_dependencies_openssl>
- <Configuration-grpc_dependencies_openssl>Debug</Configuration-grpc_dependencies_openssl>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<TargetName>h2_full+trace_nosec_test</TargetName>
<Linkage-grpc_dependencies_zlib>static</Linkage-grpc_dependencies_zlib>
<Configuration-grpc_dependencies_zlib>Release</Configuration-grpc_dependencies_zlib>
- <Linkage-grpc_dependencies_openssl>static</Linkage-grpc_dependencies_openssl>
- <Configuration-grpc_dependencies_openssl>Release</Configuration-grpc_dependencies_openssl>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
@@ -185,8 +179,6 @@
<ImportGroup Label="ExtensionTargets">
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies\grpc.dependencies.zlib.targets')" />
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies\grpc.dependencies.zlib.targets')" />
- <Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies\grpc.dependencies.openssl.targets')" />
- <Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies\grpc.dependencies.openssl.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
@@ -194,9 +186,6 @@
</PropertyGroup>
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets')" />
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets')" />
- <Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets')" />
- <Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props')" />
- <Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets')" />
</Target>
</Project>
diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_full_nosec_test/h2_full_nosec_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_full_nosec_test/h2_full_nosec_test.vcxproj
index b76f51e5ab..c55e07e1b3 100644
--- a/vsprojects/vcxproj/test/end2end/fixtures/h2_full_nosec_test/h2_full_nosec_test.vcxproj
+++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_full_nosec_test/h2_full_nosec_test.vcxproj
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\1.0.204.1.props')" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -54,7 +53,6 @@
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)\..\vsprojects\global.props" />
- <Import Project="$(SolutionDir)\..\vsprojects\openssl.props" />
<Import Project="$(SolutionDir)\..\vsprojects\winsock.props" />
<Import Project="$(SolutionDir)\..\vsprojects\zlib.props" />
</ImportGroup>
@@ -63,15 +61,11 @@
<TargetName>h2_full_nosec_test</TargetName>
<Linkage-grpc_dependencies_zlib>static</Linkage-grpc_dependencies_zlib>
<Configuration-grpc_dependencies_zlib>Debug</Configuration-grpc_dependencies_zlib>
- <Linkage-grpc_dependencies_openssl>static</Linkage-grpc_dependencies_openssl>
- <Configuration-grpc_dependencies_openssl>Debug</Configuration-grpc_dependencies_openssl>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<TargetName>h2_full_nosec_test</TargetName>
<Linkage-grpc_dependencies_zlib>static</Linkage-grpc_dependencies_zlib>
<Configuration-grpc_dependencies_zlib>Release</Configuration-grpc_dependencies_zlib>
- <Linkage-grpc_dependencies_openssl>static</Linkage-grpc_dependencies_openssl>
- <Configuration-grpc_dependencies_openssl>Release</Configuration-grpc_dependencies_openssl>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
@@ -185,8 +179,6 @@
<ImportGroup Label="ExtensionTargets">
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies\grpc.dependencies.zlib.targets')" />
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies\grpc.dependencies.zlib.targets')" />
- <Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies\grpc.dependencies.openssl.targets')" />
- <Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies\grpc.dependencies.openssl.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
@@ -194,9 +186,6 @@
</PropertyGroup>
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets')" />
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets')" />
- <Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets')" />
- <Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props')" />
- <Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets')" />
</Target>
</Project>
diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_load_reporting_nosec_test/h2_load_reporting_nosec_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_load_reporting_nosec_test/h2_load_reporting_nosec_test.vcxproj
index 1ccc6bb8dc..7eacfbda76 100644
--- a/vsprojects/vcxproj/test/end2end/fixtures/h2_load_reporting_nosec_test/h2_load_reporting_nosec_test.vcxproj
+++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_load_reporting_nosec_test/h2_load_reporting_nosec_test.vcxproj
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\1.0.204.1.props')" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -54,7 +53,6 @@
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)\..\vsprojects\global.props" />
- <Import Project="$(SolutionDir)\..\vsprojects\openssl.props" />
<Import Project="$(SolutionDir)\..\vsprojects\winsock.props" />
<Import Project="$(SolutionDir)\..\vsprojects\zlib.props" />
</ImportGroup>
@@ -63,15 +61,11 @@
<TargetName>h2_load_reporting_nosec_test</TargetName>
<Linkage-grpc_dependencies_zlib>static</Linkage-grpc_dependencies_zlib>
<Configuration-grpc_dependencies_zlib>Debug</Configuration-grpc_dependencies_zlib>
- <Linkage-grpc_dependencies_openssl>static</Linkage-grpc_dependencies_openssl>
- <Configuration-grpc_dependencies_openssl>Debug</Configuration-grpc_dependencies_openssl>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<TargetName>h2_load_reporting_nosec_test</TargetName>
<Linkage-grpc_dependencies_zlib>static</Linkage-grpc_dependencies_zlib>
<Configuration-grpc_dependencies_zlib>Release</Configuration-grpc_dependencies_zlib>
- <Linkage-grpc_dependencies_openssl>static</Linkage-grpc_dependencies_openssl>
- <Configuration-grpc_dependencies_openssl>Release</Configuration-grpc_dependencies_openssl>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
@@ -185,8 +179,6 @@
<ImportGroup Label="ExtensionTargets">
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies\grpc.dependencies.zlib.targets')" />
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies\grpc.dependencies.zlib.targets')" />
- <Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies\grpc.dependencies.openssl.targets')" />
- <Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies\grpc.dependencies.openssl.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
@@ -194,9 +186,6 @@
</PropertyGroup>
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets')" />
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets')" />
- <Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets')" />
- <Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props')" />
- <Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets')" />
</Target>
</Project>
diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_proxy_nosec_test/h2_proxy_nosec_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_proxy_nosec_test/h2_proxy_nosec_test.vcxproj
index 7eb45e424e..d4bca1a315 100644
--- a/vsprojects/vcxproj/test/end2end/fixtures/h2_proxy_nosec_test/h2_proxy_nosec_test.vcxproj
+++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_proxy_nosec_test/h2_proxy_nosec_test.vcxproj
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\1.0.204.1.props')" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -54,7 +53,6 @@
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)\..\vsprojects\global.props" />
- <Import Project="$(SolutionDir)\..\vsprojects\openssl.props" />
<Import Project="$(SolutionDir)\..\vsprojects\winsock.props" />
<Import Project="$(SolutionDir)\..\vsprojects\zlib.props" />
</ImportGroup>
@@ -63,15 +61,11 @@
<TargetName>h2_proxy_nosec_test</TargetName>
<Linkage-grpc_dependencies_zlib>static</Linkage-grpc_dependencies_zlib>
<Configuration-grpc_dependencies_zlib>Debug</Configuration-grpc_dependencies_zlib>
- <Linkage-grpc_dependencies_openssl>static</Linkage-grpc_dependencies_openssl>
- <Configuration-grpc_dependencies_openssl>Debug</Configuration-grpc_dependencies_openssl>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<TargetName>h2_proxy_nosec_test</TargetName>
<Linkage-grpc_dependencies_zlib>static</Linkage-grpc_dependencies_zlib>
<Configuration-grpc_dependencies_zlib>Release</Configuration-grpc_dependencies_zlib>
- <Linkage-grpc_dependencies_openssl>static</Linkage-grpc_dependencies_openssl>
- <Configuration-grpc_dependencies_openssl>Release</Configuration-grpc_dependencies_openssl>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
@@ -185,8 +179,6 @@
<ImportGroup Label="ExtensionTargets">
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies\grpc.dependencies.zlib.targets')" />
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies\grpc.dependencies.zlib.targets')" />
- <Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies\grpc.dependencies.openssl.targets')" />
- <Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies\grpc.dependencies.openssl.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
@@ -194,9 +186,6 @@
</PropertyGroup>
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets')" />
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets')" />
- <Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets')" />
- <Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props')" />
- <Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets')" />
</Target>
</Project>
diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair+trace_nosec_test/h2_sockpair+trace_nosec_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair+trace_nosec_test/h2_sockpair+trace_nosec_test.vcxproj
index ebcdb21173..7159d07575 100644
--- a/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair+trace_nosec_test/h2_sockpair+trace_nosec_test.vcxproj
+++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair+trace_nosec_test/h2_sockpair+trace_nosec_test.vcxproj
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\1.0.204.1.props')" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -54,7 +53,6 @@
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)\..\vsprojects\global.props" />
- <Import Project="$(SolutionDir)\..\vsprojects\openssl.props" />
<Import Project="$(SolutionDir)\..\vsprojects\winsock.props" />
<Import Project="$(SolutionDir)\..\vsprojects\zlib.props" />
</ImportGroup>
@@ -63,15 +61,11 @@
<TargetName>h2_sockpair+trace_nosec_test</TargetName>
<Linkage-grpc_dependencies_zlib>static</Linkage-grpc_dependencies_zlib>
<Configuration-grpc_dependencies_zlib>Debug</Configuration-grpc_dependencies_zlib>
- <Linkage-grpc_dependencies_openssl>static</Linkage-grpc_dependencies_openssl>
- <Configuration-grpc_dependencies_openssl>Debug</Configuration-grpc_dependencies_openssl>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<TargetName>h2_sockpair+trace_nosec_test</TargetName>
<Linkage-grpc_dependencies_zlib>static</Linkage-grpc_dependencies_zlib>
<Configuration-grpc_dependencies_zlib>Release</Configuration-grpc_dependencies_zlib>
- <Linkage-grpc_dependencies_openssl>static</Linkage-grpc_dependencies_openssl>
- <Configuration-grpc_dependencies_openssl>Release</Configuration-grpc_dependencies_openssl>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
@@ -185,8 +179,6 @@
<ImportGroup Label="ExtensionTargets">
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies\grpc.dependencies.zlib.targets')" />
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies\grpc.dependencies.zlib.targets')" />
- <Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies\grpc.dependencies.openssl.targets')" />
- <Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies\grpc.dependencies.openssl.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
@@ -194,9 +186,6 @@
</PropertyGroup>
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets')" />
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets')" />
- <Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets')" />
- <Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props')" />
- <Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets')" />
</Target>
</Project>
diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_1byte_nosec_test/h2_sockpair_1byte_nosec_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_1byte_nosec_test/h2_sockpair_1byte_nosec_test.vcxproj
index a3529e595c..6d2162e172 100644
--- a/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_1byte_nosec_test/h2_sockpair_1byte_nosec_test.vcxproj
+++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_1byte_nosec_test/h2_sockpair_1byte_nosec_test.vcxproj
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\1.0.204.1.props')" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -54,7 +53,6 @@
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)\..\vsprojects\global.props" />
- <Import Project="$(SolutionDir)\..\vsprojects\openssl.props" />
<Import Project="$(SolutionDir)\..\vsprojects\winsock.props" />
<Import Project="$(SolutionDir)\..\vsprojects\zlib.props" />
</ImportGroup>
@@ -63,15 +61,11 @@
<TargetName>h2_sockpair_1byte_nosec_test</TargetName>
<Linkage-grpc_dependencies_zlib>static</Linkage-grpc_dependencies_zlib>
<Configuration-grpc_dependencies_zlib>Debug</Configuration-grpc_dependencies_zlib>
- <Linkage-grpc_dependencies_openssl>static</Linkage-grpc_dependencies_openssl>
- <Configuration-grpc_dependencies_openssl>Debug</Configuration-grpc_dependencies_openssl>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<TargetName>h2_sockpair_1byte_nosec_test</TargetName>
<Linkage-grpc_dependencies_zlib>static</Linkage-grpc_dependencies_zlib>
<Configuration-grpc_dependencies_zlib>Release</Configuration-grpc_dependencies_zlib>
- <Linkage-grpc_dependencies_openssl>static</Linkage-grpc_dependencies_openssl>
- <Configuration-grpc_dependencies_openssl>Release</Configuration-grpc_dependencies_openssl>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
@@ -185,8 +179,6 @@
<ImportGroup Label="ExtensionTargets">
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies\grpc.dependencies.zlib.targets')" />
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies\grpc.dependencies.zlib.targets')" />
- <Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies\grpc.dependencies.openssl.targets')" />
- <Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies\grpc.dependencies.openssl.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
@@ -194,9 +186,6 @@
</PropertyGroup>
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets')" />
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets')" />
- <Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets')" />
- <Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props')" />
- <Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets')" />
</Target>
</Project>
diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_nosec_test/h2_sockpair_nosec_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_nosec_test/h2_sockpair_nosec_test.vcxproj
index fe01a3df95..d33b8500d3 100644
--- a/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_nosec_test/h2_sockpair_nosec_test.vcxproj
+++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_nosec_test/h2_sockpair_nosec_test.vcxproj
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\1.0.204.1.props')" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -54,7 +53,6 @@
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)\..\vsprojects\global.props" />
- <Import Project="$(SolutionDir)\..\vsprojects\openssl.props" />
<Import Project="$(SolutionDir)\..\vsprojects\winsock.props" />
<Import Project="$(SolutionDir)\..\vsprojects\zlib.props" />
</ImportGroup>
@@ -63,15 +61,11 @@
<TargetName>h2_sockpair_nosec_test</TargetName>
<Linkage-grpc_dependencies_zlib>static</Linkage-grpc_dependencies_zlib>
<Configuration-grpc_dependencies_zlib>Debug</Configuration-grpc_dependencies_zlib>
- <Linkage-grpc_dependencies_openssl>static</Linkage-grpc_dependencies_openssl>
- <Configuration-grpc_dependencies_openssl>Debug</Configuration-grpc_dependencies_openssl>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<TargetName>h2_sockpair_nosec_test</TargetName>
<Linkage-grpc_dependencies_zlib>static</Linkage-grpc_dependencies_zlib>
<Configuration-grpc_dependencies_zlib>Release</Configuration-grpc_dependencies_zlib>
- <Linkage-grpc_dependencies_openssl>static</Linkage-grpc_dependencies_openssl>
- <Configuration-grpc_dependencies_openssl>Release</Configuration-grpc_dependencies_openssl>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
@@ -185,8 +179,6 @@
<ImportGroup Label="ExtensionTargets">
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies\grpc.dependencies.zlib.targets')" />
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies\grpc.dependencies.zlib.targets')" />
- <Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies\grpc.dependencies.openssl.targets')" />
- <Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies\grpc.dependencies.openssl.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
@@ -194,9 +186,6 @@
</PropertyGroup>
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets')" />
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets')" />
- <Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets')" />
- <Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props')" />
- <Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets')" />
</Target>
</Project>
diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj
index a500fe3a39..d6ec36962f 100644
--- a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj
+++ b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj
@@ -205,6 +205,8 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\network_status_change.c">
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\no_logging.c">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\no_op.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\payload.c">
@@ -225,6 +227,8 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\shutdown_finishes_tags.c">
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\simple_cacheable_request.c">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\simple_delayed_request.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\simple_metadata.c">
diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters
index 6f2294c750..a6c24a895a 100644
--- a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters
+++ b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters
@@ -82,6 +82,9 @@
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\network_status_change.c">
<Filter>test\core\end2end\tests</Filter>
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\no_logging.c">
+ <Filter>test\core\end2end\tests</Filter>
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\no_op.c">
<Filter>test\core\end2end\tests</Filter>
</ClCompile>
@@ -112,6 +115,9 @@
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\shutdown_finishes_tags.c">
<Filter>test\core\end2end\tests</Filter>
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\simple_cacheable_request.c">
+ <Filter>test\core\end2end\tests</Filter>
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\simple_delayed_request.c">
<Filter>test\core\end2end\tests</Filter>
</ClCompile>
diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj
index 76140894ca..085b14700c 100644
--- a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj
+++ b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj
@@ -207,6 +207,8 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\network_status_change.c">
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\no_logging.c">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\no_op.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\payload.c">
@@ -227,6 +229,8 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\shutdown_finishes_tags.c">
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\simple_cacheable_request.c">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\simple_delayed_request.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\simple_metadata.c">
diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters
index db336f09a9..d224a9ced9 100644
--- a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters
+++ b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters
@@ -85,6 +85,9 @@
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\network_status_change.c">
<Filter>test\core\end2end\tests</Filter>
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\no_logging.c">
+ <Filter>test\core\end2end\tests</Filter>
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\no_op.c">
<Filter>test\core\end2end\tests</Filter>
</ClCompile>
@@ -115,6 +118,9 @@
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\shutdown_finishes_tags.c">
<Filter>test\core\end2end\tests</Filter>
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\simple_cacheable_request.c">
+ <Filter>test\core\end2end\tests</Filter>
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\simple_delayed_request.c">
<Filter>test\core\end2end\tests</Filter>
</ClCompile>
diff --git a/vsprojects/vcxproj/test/gpr_percent_encoding_test/gpr_percent_encoding_test.vcxproj b/vsprojects/vcxproj/test/gpr_percent_encoding_test/gpr_percent_encoding_test.vcxproj
new file mode 100644
index 0000000000..1a943e4e8e
--- /dev/null
+++ b/vsprojects/vcxproj/test/gpr_percent_encoding_test/gpr_percent_encoding_test.vcxproj
@@ -0,0 +1,193 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\1.0.204.1.props')" />
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{8313AE17-FCFA-8110-95C7-7AF2F814D188}</ProjectGuid>
+ <IgnoreWarnIntDirInTempDetected>true</IgnoreWarnIntDirInTempDetected>
+ <IntDir>$(SolutionDir)IntDir\$(MSBuildProjectName)\</IntDir>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(VisualStudioVersion)' == '10.0'" Label="Configuration">
+ <PlatformToolset>v100</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(VisualStudioVersion)' == '11.0'" Label="Configuration">
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(VisualStudioVersion)' == '12.0'" Label="Configuration">
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(VisualStudioVersion)' == '14.0'" Label="Configuration">
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(SolutionDir)\..\vsprojects\global.props" />
+ <Import Project="$(SolutionDir)\..\vsprojects\openssl.props" />
+ <Import Project="$(SolutionDir)\..\vsprojects\winsock.props" />
+ <Import Project="$(SolutionDir)\..\vsprojects\zlib.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)'=='Debug'">
+ <TargetName>gpr_percent_encoding_test</TargetName>
+ <Linkage-grpc_dependencies_zlib>static</Linkage-grpc_dependencies_zlib>
+ <Configuration-grpc_dependencies_zlib>Debug</Configuration-grpc_dependencies_zlib>
+ <Linkage-grpc_dependencies_openssl>static</Linkage-grpc_dependencies_openssl>
+ <Configuration-grpc_dependencies_openssl>Debug</Configuration-grpc_dependencies_openssl>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Release'">
+ <TargetName>gpr_percent_encoding_test</TargetName>
+ <Linkage-grpc_dependencies_zlib>static</Linkage-grpc_dependencies_zlib>
+ <Configuration-grpc_dependencies_zlib>Release</Configuration-grpc_dependencies_zlib>
+ <Linkage-grpc_dependencies_openssl>static</Linkage-grpc_dependencies_openssl>
+ <Configuration-grpc_dependencies_openssl>Release</Configuration-grpc_dependencies_openssl>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <SDLCheck>true</SDLCheck>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat>
+ <MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
+ <GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <SDLCheck>true</SDLCheck>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat>
+ <MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
+ <GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>MaxSpeed</Optimization>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <SDLCheck>true</SDLCheck>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat>
+ <MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
+ <GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>MaxSpeed</Optimization>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <SDLCheck>true</SDLCheck>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat>
+ <MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
+ <GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+
+ <ItemGroup>
+ <ClCompile Include="$(SolutionDir)\..\test\core\support\percent_encoding_test.c">
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\gpr_test_util\gpr_test_util.vcxproj">
+ <Project>{EAB0A629-17A9-44DB-B5FF-E91A721FE037}</Project>
+ </ProjectReference>
+ <ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\gpr\gpr.vcxproj">
+ <Project>{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="packages.config" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ <Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies\grpc.dependencies.zlib.targets')" />
+ <Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies\grpc.dependencies.zlib.targets')" />
+ <Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies\grpc.dependencies.openssl.targets')" />
+ <Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies\grpc.dependencies.openssl.targets')" />
+ </ImportGroup>
+ <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
+ <PropertyGroup>
+ <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
+ </PropertyGroup>
+ <Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets')" />
+ <Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets')" />
+ <Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets')" />
+ <Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props')" />
+ <Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets')" />
+ </Target>
+</Project>
+
diff --git a/vsprojects/vcxproj/test/gpr_percent_encoding_test/gpr_percent_encoding_test.vcxproj.filters b/vsprojects/vcxproj/test/gpr_percent_encoding_test/gpr_percent_encoding_test.vcxproj.filters
new file mode 100644
index 0000000000..e25b1ad656
--- /dev/null
+++ b/vsprojects/vcxproj/test/gpr_percent_encoding_test/gpr_percent_encoding_test.vcxproj.filters
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <ClCompile Include="$(SolutionDir)\..\test\core\support\percent_encoding_test.c">
+ <Filter>test\core\support</Filter>
+ </ClCompile>
+ </ItemGroup>
+
+ <ItemGroup>
+ <Filter Include="test">
+ <UniqueIdentifier>{c2ea1ce7-c916-11e7-6477-92a18d988d54}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="test\core">
+ <UniqueIdentifier>{14fa1f36-5dea-ee3f-d3fa-a137176b235f}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="test\core\support">
+ <UniqueIdentifier>{e245dffe-593f-f63e-8dc8-3c9de4d00697}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+</Project>
+
diff --git a/vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj b/vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj
index c6f65aa30b..bdf310db1b 100644
--- a/vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj
+++ b/vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj
@@ -184,6 +184,7 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\service_type.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status_code_enum.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status_helper.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\string_ref.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\stub_options.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync.h" />
@@ -191,27 +192,23 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_no_cxx11.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_stream.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\time.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer_reader.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\compression_types.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\connectivity_state.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\grpc_types.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\propagation_bits.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\status.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\alloc.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_gcc_atomic.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_gcc_sync.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_windows.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\log.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\gpr_types.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\port_platform.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice_buffer.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_generic.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_posix.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_windows.h" />
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\time.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\config_protobuf.h" />
</ItemGroup>
<ItemGroup>
diff --git a/vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj.filters b/vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj.filters
index 731eb2e6ff..cd341e9eb1 100644
--- a/vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj.filters
+++ b/vsprojects/vcxproj/test/grpc_tool_test/grpc_tool_test.vcxproj.filters
@@ -87,6 +87,9 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status_code_enum.h">
<Filter>include\grpc++\impl\codegen</Filter>
</ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status_helper.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\string_ref.h">
<Filter>include\grpc++\impl\codegen</Filter>
</ClInclude>
@@ -108,9 +111,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\time.h">
<Filter>include\grpc++\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer_reader.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
@@ -129,9 +129,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\status.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\alloc.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
@@ -144,7 +141,7 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_windows.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\log.h">
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\gpr_types.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\port_platform.h">
@@ -153,9 +150,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice_buffer.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
@@ -168,9 +162,6 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_windows.h">
<Filter>include\grpc\impl\codegen</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\time.h">
- <Filter>include\grpc\impl\codegen</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\config_protobuf.h">
<Filter>include\grpc++\impl\codegen</Filter>
</ClInclude>