aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar David Garcia Quintas <dgq@google.com>2018-03-21 16:35:36 -0700
committerGravatar David Garcia Quintas <dgq@google.com>2018-03-21 16:35:36 -0700
commita10634cadc5562c660724084ebc8c4baa1532fbf (patch)
tree4112a026c3546e608d34c34dfb3833485d1313da
parent31e957632fc59457b061f72e98951e293c8c0851 (diff)
parent92d11e368bdd7859058180da615f0d4af3f83f8d (diff)
Merge branch 'master' of github.com:grpc/grpc into authority_header
-rw-r--r--BUILD41
-rw-r--r--CMakeLists.txt283
-rw-r--r--MANIFEST.md4
-rw-r--r--Makefile329
-rw-r--r--bazel/grpc_build_system.bzl29
-rw-r--r--build.yaml97
-rw-r--r--config.m423
-rw-r--r--config.w3224
-rw-r--r--gRPC-C++.podspec26
-rw-r--r--gRPC-Core.podspec977
-rw-r--r--grpc.def3
-rw-r--r--grpc.gemspec36
-rw-r--r--grpc.gyp80
-rw-r--r--include/grpc/grpc_security.h19
-rw-r--r--include/grpc/grpc_security_constants.h1
-rw-r--r--include/grpc/impl/codegen/grpc_types.h4
-rw-r--r--include/grpc/impl/codegen/slice.h2
-rw-r--r--include/grpc/support/log.h1
-rw-r--r--include/grpcpp/impl/codegen/async_unary_call.h51
-rw-r--r--include/grpcpp/impl/codegen/completion_queue.h9
-rw-r--r--include/grpcpp/impl/codegen/status.h56
-rw-r--r--include/grpcpp/server.h94
-rw-r--r--include/grpcpp/server_builder.h52
-rw-r--r--package.xml36
-rw-r--r--src/core/ext/filters/client_channel/backup_poller.h1
-rw-r--r--src/core/ext/filters/client_channel/client_channel.cc38
-rw-r--r--src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc15
-rw-r--r--src/core/ext/filters/client_channel/lb_policy_factory.cc2
-rw-r--r--src/core/ext/filters/client_channel/lb_policy_factory.h1
-rw-r--r--src/core/ext/filters/client_channel/lb_policy_registry.h1
-rw-r--r--src/core/ext/filters/client_channel/parse_address.cc28
-rw-r--r--src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc16
-rw-r--r--src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h1
-rw-r--r--src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h1
-rw-r--r--src/core/ext/filters/client_channel/uri_parser.h1
-rw-r--r--src/core/ext/filters/deadline/deadline_filter.cc1
-rw-r--r--src/core/ext/filters/http/client/http_client_filter.cc48
-rw-r--r--src/core/ext/filters/http/message_compress/message_compress_filter.cc41
-rw-r--r--src/core/ext/filters/http/server/http_server_filter.cc17
-rw-r--r--src/core/ext/filters/message_size/message_size_filter.cc10
-rw-r--r--src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc4
-rw-r--r--src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc1
-rw-r--r--src/core/ext/transport/chttp2/server/chttp2_server.h2
-rw-r--r--src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc1
-rw-r--r--src/core/ext/transport/chttp2/transport/chttp2_transport.cc293
-rw-r--r--src/core/ext/transport/chttp2/transport/frame_data.cc32
-rw-r--r--src/core/ext/transport/chttp2/transport/frame_data.h10
-rw-r--r--src/core/ext/transport/chttp2/transport/frame_goaway.h1
-rw-r--r--src/core/ext/transport/chttp2/transport/frame_ping.h1
-rw-r--r--src/core/ext/transport/chttp2/transport/frame_rst_stream.h1
-rw-r--r--src/core/ext/transport/chttp2/transport/frame_settings.h1
-rw-r--r--src/core/ext/transport/chttp2/transport/frame_window_update.h1
-rw-r--r--src/core/ext/transport/chttp2/transport/hpack_parser.h1
-rw-r--r--src/core/ext/transport/chttp2/transport/internal.h77
-rw-r--r--src/core/ext/transport/cronet/transport/cronet_transport.cc41
-rw-r--r--src/core/ext/transport/inproc/inproc_transport.cc39
-rw-r--r--src/core/lib/channel/handshaker_factory.h1
-rw-r--r--src/core/lib/channel/handshaker_registry.h1
-rw-r--r--src/core/lib/compression/stream_compression_identity.cc1
-rw-r--r--src/core/lib/gpr/cpu_linux.cc4
-rw-r--r--src/core/lib/gpr/log_linux.cc1
-rw-r--r--src/core/lib/http/httpcli_security_connector.cc7
-rw-r--r--src/core/lib/iomgr/call_combiner.h1
-rw-r--r--src/core/lib/iomgr/endpoint.cc2
-rw-r--r--src/core/lib/iomgr/endpoint_pair_windows.cc9
-rw-r--r--src/core/lib/iomgr/ev_epollex_linux.cc20
-rw-r--r--src/core/lib/iomgr/ev_poll_posix.cc20
-rw-r--r--src/core/lib/iomgr/ev_posix.cc52
-rw-r--r--src/core/lib/iomgr/exec_ctx.h28
-rw-r--r--src/core/lib/iomgr/iocp_windows.h1
-rw-r--r--src/core/lib/iomgr/iomgr.cc1
-rw-r--r--src/core/lib/iomgr/iomgr_custom.cc63
-rw-r--r--src/core/lib/iomgr/iomgr_custom.h (renamed from src/core/lib/iomgr/iomgr_uv.h)24
-rw-r--r--src/core/lib/iomgr/iomgr_internal.cc43
-rw-r--r--src/core/lib/iomgr/iomgr_internal.h12
-rw-r--r--src/core/lib/iomgr/iomgr_posix.cc31
-rw-r--r--src/core/lib/iomgr/iomgr_uv.cc35
-rw-r--r--src/core/lib/iomgr/iomgr_windows.cc30
-rw-r--r--src/core/lib/iomgr/lockfree_event.h2
-rw-r--r--src/core/lib/iomgr/pollset.cc56
-rw-r--r--src/core/lib/iomgr/pollset.h18
-rw-r--r--src/core/lib/iomgr/pollset_custom.cc106
-rw-r--r--src/core/lib/iomgr/pollset_custom.h35
-rw-r--r--src/core/lib/iomgr/pollset_set.cc (renamed from src/core/lib/iomgr/pollset_set_uv.cc)36
-rw-r--r--src/core/lib/iomgr/pollset_set.h11
-rw-r--r--src/core/lib/iomgr/pollset_set_custom.cc48
-rw-r--r--src/core/lib/iomgr/pollset_set_custom.h (renamed from src/core/lib/iomgr/timer_uv.h)18
-rw-r--r--src/core/lib/iomgr/pollset_set_windows.cc25
-rw-r--r--src/core/lib/iomgr/pollset_uv.cc145
-rw-r--r--src/core/lib/iomgr/pollset_uv.h9
-rw-r--r--src/core/lib/iomgr/pollset_windows.cc28
-rw-r--r--src/core/lib/iomgr/port.h27
-rw-r--r--src/core/lib/iomgr/resolve_address.cc50
-rw-r--r--src/core/lib/iomgr/resolve_address.h47
-rw-r--r--src/core/lib/iomgr/resolve_address_custom.cc187
-rw-r--r--src/core/lib/iomgr/resolve_address_custom.h43
-rw-r--r--src/core/lib/iomgr/resolve_address_posix.cc28
-rw-r--r--src/core/lib/iomgr/resolve_address_uv.cc286
-rw-r--r--src/core/lib/iomgr/resolve_address_windows.cc28
-rw-r--r--src/core/lib/iomgr/resource_quota.h6
-rw-r--r--src/core/lib/iomgr/sockaddr.h14
-rw-r--r--src/core/lib/iomgr/sockaddr_custom.h54
-rw-r--r--src/core/lib/iomgr/sockaddr_posix.h24
-rw-r--r--src/core/lib/iomgr/sockaddr_utils.cc157
-rw-r--r--src/core/lib/iomgr/sockaddr_utils.h2
-rw-r--r--src/core/lib/iomgr/sockaddr_windows.h19
-rw-r--r--src/core/lib/iomgr/socket_utils.h9
-rw-r--r--src/core/lib/iomgr/socket_utils_common_posix.cc18
-rw-r--r--src/core/lib/iomgr/socket_utils_linux.cc5
-rw-r--r--src/core/lib/iomgr/socket_utils_posix.cc2
-rw-r--r--src/core/lib/iomgr/socket_utils_uv.cc17
-rw-r--r--src/core/lib/iomgr/socket_utils_windows.cc8
-rw-r--r--src/core/lib/iomgr/socket_windows.h2
-rw-r--r--src/core/lib/iomgr/tcp_client.cc36
-rw-r--r--src/core/lib/iomgr/tcp_client.h11
-rw-r--r--src/core/lib/iomgr/tcp_client_custom.cc151
-rw-r--r--src/core/lib/iomgr/tcp_client_posix.cc33
-rw-r--r--src/core/lib/iomgr/tcp_client_uv.cc177
-rw-r--r--src/core/lib/iomgr/tcp_client_windows.cc31
-rw-r--r--src/core/lib/iomgr/tcp_custom.cc365
-rw-r--r--src/core/lib/iomgr/tcp_custom.h83
-rw-r--r--src/core/lib/iomgr/tcp_posix.cc2
-rw-r--r--src/core/lib/iomgr/tcp_server.cc73
-rw-r--r--src/core/lib/iomgr/tcp_server.h22
-rw-r--r--src/core/lib/iomgr/tcp_server_custom.cc479
-rw-r--r--src/core/lib/iomgr/tcp_server_posix.cc62
-rw-r--r--src/core/lib/iomgr/tcp_server_utils_posix_common.cc11
-rw-r--r--src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc12
-rw-r--r--src/core/lib/iomgr/tcp_server_uv.cc473
-rw-r--r--src/core/lib/iomgr/tcp_server_windows.cc62
-rw-r--r--src/core/lib/iomgr/tcp_uv.cc627
-rw-r--r--src/core/lib/iomgr/tcp_uv.h53
-rw-r--r--src/core/lib/iomgr/tcp_windows.cc2
-rw-r--r--src/core/lib/iomgr/timer.cc45
-rw-r--r--src/core/lib/iomgr/timer.h48
-rw-r--r--src/core/lib/iomgr/timer_custom.cc93
-rw-r--r--src/core/lib/iomgr/timer_custom.h43
-rw-r--r--src/core/lib/iomgr/timer_generic.cc20
-rw-r--r--src/core/lib/iomgr/timer_heap.cc4
-rw-r--r--src/core/lib/iomgr/timer_uv.cc62
-rw-r--r--src/core/lib/iomgr/udp_server.cc24
-rw-r--r--src/core/lib/iomgr/unix_sockets_posix.cc15
-rw-r--r--src/core/lib/profiling/basic_timers.cc19
-rw-r--r--src/core/lib/profiling/timers.h9
-rw-r--r--src/core/lib/security/credentials/ssl/ssl_credentials.cc11
-rw-r--r--src/core/lib/security/security_connector/security_connector.cc76
-rw-r--r--src/core/lib/security/security_connector/security_connector.h4
-rw-r--r--src/core/lib/security/transport/client_auth_filter.cc40
-rw-r--r--src/core/lib/security/transport/security_handshaker.h1
-rw-r--r--src/core/lib/slice/slice_buffer.cc1
-rw-r--r--src/core/lib/slice/slice_internal.h2
-rw-r--r--src/core/lib/surface/byte_buffer.cc1
-rw-r--r--src/core/lib/surface/byte_buffer_reader.cc1
-rw-r--r--src/core/lib/surface/call.cc94
-rw-r--r--src/core/lib/transport/byte_stream.cc208
-rw-r--r--src/core/lib/transport/byte_stream.h187
-rw-r--r--src/core/lib/transport/connectivity_state.h2
-rw-r--r--src/core/lib/transport/metadata.h2
-rw-r--r--src/core/lib/transport/metadata_batch.h1
-rw-r--r--src/core/lib/transport/status_conversion.h1
-rw-r--r--src/core/lib/transport/transport.cc2
-rw-r--r--src/core/lib/transport/transport.h11
-rw-r--r--src/core/lib/transport/transport_op_string.cc13
-rw-r--r--src/core/plugin_registry/grpc_cronet_plugin_registry.cc20
-rw-r--r--src/core/tsi/alts/handshaker/proto/altscontext.proto2
-rw-r--r--src/core/tsi/alts/handshaker/proto/handshaker.proto14
-rw-r--r--src/core/tsi/alts/handshaker/proto/transport_security_common.proto2
-rw-r--r--src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_common.cc1
-rw-r--r--src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.cc1
-rw-r--r--src/core/tsi/ssl/session_cache/ssl_session.h73
-rw-r--r--src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc58
-rw-r--r--src/core/tsi/ssl/session_cache/ssl_session_cache.cc211
-rw-r--r--src/core/tsi/ssl/session_cache/ssl_session_cache.h93
-rw-r--r--src/core/tsi/ssl/session_cache/ssl_session_openssl.cc76
-rw-r--r--src/core/tsi/ssl_transport_security.cc240
-rw-r--r--src/core/tsi/ssl_transport_security.h98
-rw-r--r--src/cpp/common/channel_filter.h14
-rw-r--r--src/cpp/server/server_cc.cc13
-rwxr-xr-xsrc/csharp/build_packages_dotnetcli.bat8
-rwxr-xr-xsrc/csharp/build_packages_dotnetcli.sh6
-rw-r--r--src/objective-c/tests/Podfile5
-rwxr-xr-xsrc/objective-c/tests/analyze_link_map.py78
-rw-r--r--src/php/ext/grpc/call_credentials.c3
-rw-r--r--src/python/grpcio/grpc_core_dependencies.py22
-rw-r--r--src/python/grpcio_reflection/README.rst10
-rw-r--r--src/python/grpcio_tests/tests/tests.json168
-rw-r--r--src/python/grpcio_tests/tests/unit/_auth_context_test.py3
-rw-r--r--src/python/grpcio_tests/tests/unit/_compression_test.py6
-rw-r--r--src/python/grpcio_tests/tests/unit/_early_ok_test.py206
-rw-r--r--src/python/grpcio_tests/tests/unit/_metadata_code_details_test.py6
-rw-r--r--src/python/grpcio_tests/tests/unit/_metadata_test.py9
-rw-r--r--src/python/grpcio_tests/tests/unit/_resource_exhausted_test.py9
-rw-r--r--src/python/grpcio_tests/tests/unit/beta/_face_interface_test.py132
-rw-r--r--src/python/grpcio_tests/tests/unit/framework/interfaces/__init__.py13
-rw-r--r--src/python/grpcio_tests/tests/unit/framework/interfaces/face/__init__.py13
-rw-r--r--src/python/grpcio_tests/tests/unit/framework/interfaces/face/_blocking_invocation_inline_service.py287
-rw-r--r--src/python/grpcio_tests/tests/unit/framework/interfaces/face/_digest.py432
-rw-r--r--src/python/grpcio_tests/tests/unit/framework/interfaces/face/_future_invocation_asynchronous_event_service.py508
-rw-r--r--src/python/grpcio_tests/tests/unit/framework/interfaces/face/_invocation.py198
-rw-r--r--src/python/grpcio_tests/tests/unit/framework/interfaces/face/_service.py304
-rw-r--r--src/python/grpcio_tests/tests/unit/framework/interfaces/face/_stock_service.py390
-rw-r--r--src/python/grpcio_tests/tests/unit/framework/interfaces/face/test_cases.py53
-rw-r--r--src/python/grpcio_tests/tests/unit/framework/interfaces/face/test_interfaces.py212
-rw-r--r--src/ruby/ext/grpc/rb_grpc_imports.generated.c6
-rw-r--r--src/ruby/ext/grpc/rb_grpc_imports.generated.h9
-rw-r--r--src/ruby/lib/grpc/core/time_consts.rb2
-rw-r--r--src/ruby/lib/grpc/generic/bidi_call.rb2
-rw-r--r--src/ruby/lib/grpc/generic/client_stub.rb16
-rw-r--r--src/ruby/lib/grpc/generic/interceptors.rb2
-rw-r--r--src/ruby/lib/grpc/generic/rpc_server.rb4
-rw-r--r--summerofcode/ideas.md4
-rw-r--r--templates/gRPC-Core.podspec.template39
-rwxr-xr-xtemplates/src/csharp/build_packages_dotnetcli.bat.template8
-rwxr-xr-xtemplates/src/csharp/build_packages_dotnetcli.sh.template6
-rw-r--r--templates/test/cpp/naming/resolver_component_tests_defs.include12
-rw-r--r--templates/tools/dockerfile/interoptest/grpc_interop_nodepurejs/Dockerfile.template23
-rw-r--r--templates/tools/dockerfile/node_deps.include3
-rw-r--r--test/core/client_channel/parse_address_test.cc27
-rw-r--r--test/core/client_channel/resolvers/dns_resolver_connectivity_test.cc5
-rw-r--r--test/core/client_channel/resolvers/dns_resolver_cooldown_test.cc33
-rw-r--r--test/core/compression/algorithm_test.cc1
-rw-r--r--test/core/debug/stats_test.cc12
-rw-r--r--test/core/end2end/BUILD17
-rw-r--r--test/core/end2end/connection_refused_test.cc1
-rw-r--r--test/core/end2end/cq_verifier.cc1
-rw-r--r--test/core/end2end/fixtures/http_proxy_fixture.cc6
-rw-r--r--test/core/end2end/fuzzers/api_fuzzer.cc15
-rw-r--r--test/core/end2end/goaway_server_test.cc48
-rw-r--r--test/core/end2end/h2_ssl_session_reuse_test.cc280
-rw-r--r--test/core/end2end/tests/cancel_after_accept.cc1
-rw-r--r--test/core/end2end/tests/cancel_after_invoke.cc1
-rw-r--r--test/core/end2end/tests/cancel_after_round_trip.cc1
-rw-r--r--test/core/end2end/tests/cancel_before_invoke.cc1
-rw-r--r--test/core/end2end/tests/cancel_with_status.cc1
-rw-r--r--test/core/end2end/tests/max_message_length.cc1
-rw-r--r--test/core/end2end/tests/negative_deadline.cc1
-rw-r--r--test/core/end2end/tests/request_with_flags.cc8
-rw-r--r--test/core/gpr/mpscq_test.cc1
-rw-r--r--test/core/gpr/time_test.cc1
-rw-r--r--test/core/http/httpcli_test.cc1
-rw-r--r--test/core/http/httpscli_test.cc1
-rw-r--r--test/core/iomgr/resource_quota_test.cc1
-rw-r--r--test/core/iomgr/sockaddr_utils_test.cc46
-rw-r--r--test/core/iomgr/tcp_client_posix_test.cc6
-rw-r--r--test/core/iomgr/tcp_server_posix_test.cc14
-rw-r--r--test/core/iomgr/timer_heap_test.cc9
-rw-r--r--test/core/iomgr/timer_list_test.cc11
-rw-r--r--test/core/iomgr/udp_server_test.cc8
-rw-r--r--test/core/iomgr/wakeup_fd_cv_test.cc2
-rw-r--r--test/core/slice/slice_hash_table_test.cc1
-rw-r--r--test/core/slice/slice_test.cc3
-rw-r--r--test/core/slice/slice_weak_hash_table_test.cc1
-rw-r--r--test/core/surface/concurrent_connectivity_test.cc5
-rw-r--r--test/core/surface/public_headers_must_be_c89.c3
-rw-r--r--test/core/transport/BUILD3
-rw-r--r--test/core/transport/byte_stream_test.cc195
-rw-r--r--test/core/transport/chttp2/bin_decoder_test.cc1
-rw-r--r--test/core/transport/chttp2/hpack_parser_fuzzer_test.cc1
-rw-r--r--test/core/transport/chttp2/hpack_parser_test.cc2
-rw-r--r--test/core/transport/chttp2/hpack_table_test.cc1
-rw-r--r--test/core/transport/connectivity_state_test.cc1
-rw-r--r--test/core/transport/metadata_test.cc1
-rw-r--r--test/core/tsi/BUILD14
-rw-r--r--test/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_test.cc1
-rw-r--r--test/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector_test.cc1
-rw-r--r--test/core/tsi/ssl_session_cache_test.cc154
-rw-r--r--test/core/tsi/ssl_transport_security_test.cc159
-rw-r--r--test/core/util/test_config.cc1
-rw-r--r--test/core/util/test_tcp_server.cc9
-rw-r--r--test/cpp/end2end/async_end2end_test.cc33
-rw-r--r--test/cpp/end2end/client_lb_end2end_test.cc19
-rw-r--r--test/cpp/end2end/grpclb_end2end_test.cc26
-rw-r--r--test/cpp/end2end/nonblocking_test.cc2
-rw-r--r--test/cpp/microbenchmarks/BUILD7
-rw-r--r--test/cpp/microbenchmarks/bm_chttp2_hpack.cc28
-rw-r--r--test/cpp/microbenchmarks/bm_chttp2_transport.cc39
-rw-r--r--test/cpp/microbenchmarks/bm_fullstack_trickle.cc2
-rw-r--r--test/cpp/microbenchmarks/fullstack_unary_ping_pong.h2
-rw-r--r--test/cpp/naming/resolver_component_test.cc32
-rwxr-xr-xtest/cpp/naming/resolver_component_tests_runner.sh12
-rw-r--r--test/cpp/performance/writes_per_rpc_test.cc2
-rw-r--r--test/cpp/thread_manager/thread_manager_test.cc1
-rw-r--r--test/cpp/util/BUILD104
-rw-r--r--test/cpp/util/status_test.cc62
-rwxr-xr-xtest/distrib/csharp/run_distrib_test.sh5
-rwxr-xr-xtest/distrib/php/run_distrib_test.sh2
-rw-r--r--tools/bazel.rc1
-rwxr-xr-xtools/buildgen/plugins/expand_version.py1
-rw-r--r--tools/dockerfile/distribtest/csharp_ubuntu1504_x64/Dockerfile28
-rw-r--r--tools/dockerfile/distribtest/csharp_ubuntu1510_x64/Dockerfile28
-rw-r--r--tools/dockerfile/distribtest/python_arch_x64/Dockerfile2
-rw-r--r--tools/dockerfile/distribtest/python_ubuntu1204_x64/Dockerfile4
-rw-r--r--tools/dockerfile/distribtest/python_wheezy_x64/Dockerfile4
-rw-r--r--tools/dockerfile/distribtest/ruby_ubuntu1504_x64/Dockerfile19
-rw-r--r--tools/dockerfile/distribtest/ruby_ubuntu1510_x64/Dockerfile19
-rw-r--r--tools/dockerfile/interoptest/grpc_interop_node/Dockerfile3
-rw-r--r--tools/dockerfile/interoptest/grpc_interop_nodepurejs/Dockerfile77
-rwxr-xr-xtools/dockerfile/interoptest/grpc_interop_nodepurejs/build_interop.sh36
-rwxr-xr-xtools/dockerfile/push_testing_images.sh2
-rw-r--r--tools/dockerfile/test/multilang_jessie_x64/Dockerfile3
-rw-r--r--tools/dockerfile/test/node_jessie_x64/Dockerfile3
-rw-r--r--tools/doxygen/Doxyfile.c++.internal12
-rw-r--r--tools/doxygen/Doxyfile.core.internal36
-rwxr-xr-xtools/internal_ci/linux/grpc_bazel_on_foundry_base.sh2
-rw-r--r--tools/internal_ci/linux/grpc_build_artifacts_extra.cfg26
-rwxr-xr-x[-rw-r--r--]tools/internal_ci/linux/grpc_build_artifacts_extra.sh (renamed from tools/dockerfile/distribtest/python_ubuntu1510_x64/Dockerfile)18
-rw-r--r--tools/internal_ci/linux/grpc_build_packages.cfg (renamed from tools/dockerfile/distribtest/node_ubuntu1504_x64/Dockerfile)19
-rw-r--r--tools/internal_ci/linux/grpc_build_packages.sh35
-rw-r--r--tools/internal_ci/linux/grpc_distribtests.cfg (renamed from src/python/grpcio_tests/tests/unit/framework/interfaces/face/_3069_test_constant.py)19
-rw-r--r--tools/internal_ci/linux/grpc_distribtests.sh35
-rw-r--r--tools/internal_ci/linux/grpc_msan_on_foundry.sh2
-rw-r--r--tools/internal_ci/linux/grpc_ubsan_on_foundry.sh2
-rw-r--r--tools/internal_ci/macos/grpc_distribtests.cfg27
-rw-r--r--tools/internal_ci/macos/grpc_distribtests.sh27
-rw-r--r--tools/internal_ci/windows/grpc_build_packages.bat35
-rw-r--r--tools/internal_ci/windows/grpc_build_packages.cfg (renamed from tools/dockerfile/distribtest/python_ubuntu1504_x64/Dockerfile)17
-rw-r--r--tools/internal_ci/windows/grpc_distribtests.bat35
-rw-r--r--tools/internal_ci/windows/grpc_distribtests.cfg (renamed from tools/dockerfile/distribtest/node_ubuntu1510_x64/Dockerfile)19
-rw-r--r--tools/interop_matrix/client_matrix.py29
-rwxr-xr-xtools/interop_matrix/run_interop_matrix_tests.py37
-rw-r--r--tools/interop_matrix/testcases/csharp__master36
-rw-r--r--tools/interop_matrix/testcases/csharp__v1.1.436
-rw-r--r--tools/interop_matrix/testcases/csharp__v1.2.520
-rw-r--r--tools/interop_matrix/testcases/csharpcoreclr__master36
-rwxr-xr-xtools/interop_matrix/testcases/cxx__master36
-rwxr-xr-xtools/interop_matrix/testcases/go__master36
-rwxr-xr-xtools/interop_matrix/testcases/java__master36
-rwxr-xr-xtools/interop_matrix/testcases/node__master36
-rw-r--r--tools/interop_matrix/testcases/node__v1.0.136
-rw-r--r--tools/interop_matrix/testcases/node__v1.1.420
-rwxr-xr-xtools/interop_matrix/testcases/php__master36
-rwxr-xr-xtools/interop_matrix/testcases/python__master36
-rwxr-xr-xtools/interop_matrix/testcases/ruby__master36
-rwxr-xr-xtools/interop_matrix/testcases/ruby__v1.0.136
-rw-r--r--tools/run_tests/artifacts/artifact_targets.py1
-rwxr-xr-xtools/run_tests/artifacts/build_package_php.sh7
-rwxr-xr-xtools/run_tests/artifacts/build_package_python.sh5
-rwxr-xr-xtools/run_tests/artifacts/build_package_ruby.sh12
-rw-r--r--tools/run_tests/artifacts/distribtest_targets.py6
-rwxr-xr-xtools/run_tests/dockerize/build_and_run_docker.sh4
-rw-r--r--tools/run_tests/generated/sources_and_headers.json128
-rw-r--r--tools/run_tests/generated/tests.json96
-rwxr-xr-xtools/run_tests/run_interop_tests.py33
-rwxr-xr-xtools/run_tests/run_tests.py2
-rw-r--r--vsprojects/vcxproj/grpc++/grpc++.vcxproj646
-rw-r--r--vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters1096
-rw-r--r--vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj630
-rw-r--r--vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters1063
-rw-r--r--vsprojects/vcxproj/grpc/grpc.vcxproj46
-rw-r--r--vsprojects/vcxproj/grpc/grpc.vcxproj.filters79
-rw-r--r--vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj38
-rw-r--r--vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters50
-rw-r--r--vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj649
-rw-r--r--vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj.filters946
-rw-r--r--vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj44
-rw-r--r--vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters64
356 files changed, 14348 insertions, 6828 deletions
diff --git a/BUILD b/BUILD
index 8a4349eb81..0eb6b98993 100644
--- a/BUILD
+++ b/BUILD
@@ -307,8 +307,12 @@ grpc_cc_library(
language = "c++",
deps = [
"grpc_base",
+ "grpc_deadline_filter",
"grpc_http_filters",
+ "grpc_message_size_filter",
+ "grpc_server_load_reporting",
"grpc_transport_chttp2_client_secure",
+ "grpc_transport_chttp2_server_secure",
"grpc_transport_cronet_client_secure",
],
)
@@ -713,20 +717,25 @@ grpc_cc_library(
"src/core/lib/iomgr/gethostname_sysconf.cc",
"src/core/lib/iomgr/iocp_windows.cc",
"src/core/lib/iomgr/iomgr.cc",
+ "src/core/lib/iomgr/iomgr_custom.cc",
+ "src/core/lib/iomgr/iomgr_internal.cc",
"src/core/lib/iomgr/iomgr_posix.cc",
- "src/core/lib/iomgr/iomgr_uv.cc",
"src/core/lib/iomgr/iomgr_windows.cc",
"src/core/lib/iomgr/is_epollexclusive_available.cc",
"src/core/lib/iomgr/load_file.cc",
"src/core/lib/iomgr/lockfree_event.cc",
"src/core/lib/iomgr/network_status_tracker.cc",
"src/core/lib/iomgr/polling_entity.cc",
- "src/core/lib/iomgr/pollset_set_uv.cc",
+ "src/core/lib/iomgr/pollset.cc",
+ "src/core/lib/iomgr/pollset_custom.cc",
+ "src/core/lib/iomgr/pollset_set.cc",
+ "src/core/lib/iomgr/pollset_set_custom.cc",
"src/core/lib/iomgr/pollset_set_windows.cc",
"src/core/lib/iomgr/pollset_uv.cc",
"src/core/lib/iomgr/pollset_windows.cc",
+ "src/core/lib/iomgr/resolve_address.cc",
+ "src/core/lib/iomgr/resolve_address_custom.cc",
"src/core/lib/iomgr/resolve_address_posix.cc",
- "src/core/lib/iomgr/resolve_address_uv.cc",
"src/core/lib/iomgr/resolve_address_windows.cc",
"src/core/lib/iomgr/resource_quota.cc",
"src/core/lib/iomgr/sockaddr_utils.cc",
@@ -735,22 +744,26 @@ grpc_cc_library(
"src/core/lib/iomgr/socket_utils_common_posix.cc",
"src/core/lib/iomgr/socket_utils_linux.cc",
"src/core/lib/iomgr/socket_utils_posix.cc",
- "src/core/lib/iomgr/socket_utils_uv.cc",
"src/core/lib/iomgr/socket_utils_windows.cc",
"src/core/lib/iomgr/socket_windows.cc",
+ "src/core/lib/iomgr/tcp_client.cc",
+ "src/core/lib/iomgr/tcp_client_custom.cc",
"src/core/lib/iomgr/tcp_client_posix.cc",
- "src/core/lib/iomgr/tcp_client_uv.cc",
"src/core/lib/iomgr/tcp_client_windows.cc",
+ "src/core/lib/iomgr/tcp_custom.cc",
"src/core/lib/iomgr/tcp_posix.cc",
+ "src/core/lib/iomgr/tcp_server.cc",
+ "src/core/lib/iomgr/tcp_server_custom.cc",
"src/core/lib/iomgr/tcp_server_posix.cc",
"src/core/lib/iomgr/tcp_server_utils_posix_common.cc",
"src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc",
"src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc",
- "src/core/lib/iomgr/tcp_server_uv.cc",
"src/core/lib/iomgr/tcp_server_windows.cc",
"src/core/lib/iomgr/tcp_uv.cc",
"src/core/lib/iomgr/tcp_windows.cc",
"src/core/lib/iomgr/time_averaged_stats.cc",
+ "src/core/lib/iomgr/timer.cc",
+ "src/core/lib/iomgr/timer_custom.cc",
"src/core/lib/iomgr/timer_generic.cc",
"src/core/lib/iomgr/timer_heap.cc",
"src/core/lib/iomgr/timer_manager.cc",
@@ -845,9 +858,9 @@ grpc_cc_library(
"src/core/lib/iomgr/gethostname.h",
"src/core/lib/iomgr/iocp_windows.h",
"src/core/lib/iomgr/iomgr.h",
+ "src/core/lib/iomgr/iomgr_custom.h",
"src/core/lib/iomgr/iomgr_internal.h",
"src/core/lib/iomgr/iomgr_posix.h",
- "src/core/lib/iomgr/iomgr_uv.h",
"src/core/lib/iomgr/is_epollexclusive_available.h",
"src/core/lib/iomgr/load_file.h",
"src/core/lib/iomgr/lockfree_event.h",
@@ -855,14 +868,18 @@ grpc_cc_library(
"src/core/lib/iomgr/network_status_tracker.h",
"src/core/lib/iomgr/polling_entity.h",
"src/core/lib/iomgr/pollset.h",
+ "src/core/lib/iomgr/pollset_custom.h",
"src/core/lib/iomgr/pollset_set.h",
+ "src/core/lib/iomgr/pollset_set_custom.h",
"src/core/lib/iomgr/pollset_set_windows.h",
"src/core/lib/iomgr/pollset_uv.h",
"src/core/lib/iomgr/pollset_windows.h",
"src/core/lib/iomgr/port.h",
"src/core/lib/iomgr/resolve_address.h",
+ "src/core/lib/iomgr/resolve_address_custom.h",
"src/core/lib/iomgr/resource_quota.h",
"src/core/lib/iomgr/sockaddr.h",
+ "src/core/lib/iomgr/sockaddr_custom.h",
"src/core/lib/iomgr/sockaddr_posix.h",
"src/core/lib/iomgr/sockaddr_utils.h",
"src/core/lib/iomgr/sockaddr_windows.h",
@@ -874,17 +891,17 @@ grpc_cc_library(
"src/core/lib/iomgr/sys_epoll_wrapper.h",
"src/core/lib/iomgr/tcp_client.h",
"src/core/lib/iomgr/tcp_client_posix.h",
+ "src/core/lib/iomgr/tcp_custom.h",
"src/core/lib/iomgr/tcp_posix.h",
"src/core/lib/iomgr/tcp_server.h",
"src/core/lib/iomgr/tcp_server_utils_posix.h",
- "src/core/lib/iomgr/tcp_uv.h",
"src/core/lib/iomgr/tcp_windows.h",
"src/core/lib/iomgr/time_averaged_stats.h",
"src/core/lib/iomgr/timer.h",
+ "src/core/lib/iomgr/timer_custom.h",
"src/core/lib/iomgr/timer_generic.h",
"src/core/lib/iomgr/timer_heap.h",
"src/core/lib/iomgr/timer_manager.h",
- "src/core/lib/iomgr/timer_uv.h",
"src/core/lib/iomgr/udp_server.h",
"src/core/lib/iomgr/unix_sockets_posix.h",
"src/core/lib/iomgr/wakeup_fd_cv.h",
@@ -939,6 +956,7 @@ grpc_cc_library(
"grpc_codegen",
"grpc_trace",
"inlined_vector",
+ "orphanable",
"ref_counted",
"ref_counted_ptr",
],
@@ -1706,6 +1724,9 @@ grpc_cc_library(
"src/core/tsi/alts/handshaker/alts_tsi_utils.cc",
"src/core/tsi/alts_transport_security.cc",
"src/core/tsi/fake_transport_security.cc",
+ "src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc",
+ "src/core/tsi/ssl/session_cache/ssl_session_cache.cc",
+ "src/core/tsi/ssl/session_cache/ssl_session_openssl.cc",
"src/core/tsi/ssl_transport_security.cc",
"src/core/tsi/transport_security_grpc.cc",
],
@@ -1717,6 +1738,8 @@ grpc_cc_library(
"src/core/tsi/alts/handshaker/alts_tsi_utils.h",
"src/core/tsi/alts_transport_security.h",
"src/core/tsi/fake_transport_security.h",
+ "src/core/tsi/ssl/session_cache/ssl_session.h",
+ "src/core/tsi/ssl/session_cache/ssl_session_cache.h",
"src/core/tsi/ssl_transport_security.h",
"src/core/tsi/ssl_types.h",
"src/core/tsi/transport_security_grpc.h",
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 836b36a7eb..a77fac255e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -224,7 +224,6 @@ add_dependencies(buildtests_c avl_test)
add_dependencies(buildtests_c bad_server_response_test)
add_dependencies(buildtests_c bin_decoder_test)
add_dependencies(buildtests_c bin_encoder_test)
-add_dependencies(buildtests_c byte_stream_test)
add_dependencies(buildtests_c channel_create_test)
add_dependencies(buildtests_c chttp2_hpack_encoder_test)
add_dependencies(buildtests_c chttp2_stream_map_test)
@@ -529,6 +528,7 @@ endif()
if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX)
add_dependencies(buildtests_cxx bm_pollset)
endif()
+add_dependencies(buildtests_cxx byte_stream_test)
add_dependencies(buildtests_cxx channel_arguments_test)
add_dependencies(buildtests_cxx channel_filter_test)
add_dependencies(buildtests_cxx check_gcp_environment_linux_test)
@@ -560,6 +560,7 @@ add_dependencies(buildtests_cxx grpc_tool_test)
add_dependencies(buildtests_cxx grpclb_api_test)
add_dependencies(buildtests_cxx grpclb_end2end_test)
add_dependencies(buildtests_cxx h2_ssl_cert_test)
+add_dependencies(buildtests_cxx h2_ssl_session_reuse_test)
add_dependencies(buildtests_cxx health_service_end2end_test)
if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX)
add_dependencies(buildtests_cxx http2_client)
@@ -619,7 +620,6 @@ add_dependencies(buildtests_cxx slice_hash_table_test)
add_dependencies(buildtests_cxx slice_weak_hash_table_test)
add_dependencies(buildtests_cxx stats_test)
add_dependencies(buildtests_cxx status_metadata_test)
-add_dependencies(buildtests_cxx status_test)
add_dependencies(buildtests_cxx status_util_test)
if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX)
add_dependencies(buildtests_cxx streaming_throughput_test)
@@ -892,6 +892,8 @@ add_library(grpc
src/core/lib/iomgr/gethostname_sysconf.cc
src/core/lib/iomgr/iocp_windows.cc
src/core/lib/iomgr/iomgr.cc
+ src/core/lib/iomgr/iomgr_custom.cc
+ src/core/lib/iomgr/iomgr_internal.cc
src/core/lib/iomgr/iomgr_posix.cc
src/core/lib/iomgr/iomgr_uv.cc
src/core/lib/iomgr/iomgr_windows.cc
@@ -900,12 +902,16 @@ add_library(grpc
src/core/lib/iomgr/lockfree_event.cc
src/core/lib/iomgr/network_status_tracker.cc
src/core/lib/iomgr/polling_entity.cc
- src/core/lib/iomgr/pollset_set_uv.cc
+ src/core/lib/iomgr/pollset.cc
+ src/core/lib/iomgr/pollset_custom.cc
+ src/core/lib/iomgr/pollset_set.cc
+ src/core/lib/iomgr/pollset_set_custom.cc
src/core/lib/iomgr/pollset_set_windows.cc
src/core/lib/iomgr/pollset_uv.cc
src/core/lib/iomgr/pollset_windows.cc
+ src/core/lib/iomgr/resolve_address.cc
+ src/core/lib/iomgr/resolve_address_custom.cc
src/core/lib/iomgr/resolve_address_posix.cc
- src/core/lib/iomgr/resolve_address_uv.cc
src/core/lib/iomgr/resolve_address_windows.cc
src/core/lib/iomgr/resource_quota.cc
src/core/lib/iomgr/sockaddr_utils.cc
@@ -917,19 +923,24 @@ add_library(grpc
src/core/lib/iomgr/socket_utils_uv.cc
src/core/lib/iomgr/socket_utils_windows.cc
src/core/lib/iomgr/socket_windows.cc
+ src/core/lib/iomgr/tcp_client.cc
+ src/core/lib/iomgr/tcp_client_custom.cc
src/core/lib/iomgr/tcp_client_posix.cc
- src/core/lib/iomgr/tcp_client_uv.cc
src/core/lib/iomgr/tcp_client_windows.cc
+ src/core/lib/iomgr/tcp_custom.cc
src/core/lib/iomgr/tcp_posix.cc
+ src/core/lib/iomgr/tcp_server.cc
+ src/core/lib/iomgr/tcp_server_custom.cc
src/core/lib/iomgr/tcp_server_posix.cc
src/core/lib/iomgr/tcp_server_utils_posix_common.cc
src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc
src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc
- src/core/lib/iomgr/tcp_server_uv.cc
src/core/lib/iomgr/tcp_server_windows.cc
src/core/lib/iomgr/tcp_uv.cc
src/core/lib/iomgr/tcp_windows.cc
src/core/lib/iomgr/time_averaged_stats.cc
+ src/core/lib/iomgr/timer.cc
+ src/core/lib/iomgr/timer_custom.cc
src/core/lib/iomgr/timer_generic.cc
src/core/lib/iomgr/timer_heap.cc
src/core/lib/iomgr/timer_manager.cc
@@ -1103,6 +1114,9 @@ add_library(grpc
src/core/ext/filters/deadline/deadline_filter.cc
src/core/tsi/alts_transport_security.cc
src/core/tsi/fake_transport_security.cc
+ src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc
+ src/core/tsi/ssl/session_cache/ssl_session_cache.cc
+ src/core/tsi/ssl/session_cache/ssl_session_openssl.cc
src/core/tsi/ssl_transport_security.cc
src/core/tsi/transport_security_grpc.cc
src/core/ext/transport/chttp2/server/chttp2_server.cc
@@ -1268,6 +1282,8 @@ add_library(grpc_cronet
src/core/lib/iomgr/gethostname_sysconf.cc
src/core/lib/iomgr/iocp_windows.cc
src/core/lib/iomgr/iomgr.cc
+ src/core/lib/iomgr/iomgr_custom.cc
+ src/core/lib/iomgr/iomgr_internal.cc
src/core/lib/iomgr/iomgr_posix.cc
src/core/lib/iomgr/iomgr_uv.cc
src/core/lib/iomgr/iomgr_windows.cc
@@ -1276,12 +1292,16 @@ add_library(grpc_cronet
src/core/lib/iomgr/lockfree_event.cc
src/core/lib/iomgr/network_status_tracker.cc
src/core/lib/iomgr/polling_entity.cc
- src/core/lib/iomgr/pollset_set_uv.cc
+ src/core/lib/iomgr/pollset.cc
+ src/core/lib/iomgr/pollset_custom.cc
+ src/core/lib/iomgr/pollset_set.cc
+ src/core/lib/iomgr/pollset_set_custom.cc
src/core/lib/iomgr/pollset_set_windows.cc
src/core/lib/iomgr/pollset_uv.cc
src/core/lib/iomgr/pollset_windows.cc
+ src/core/lib/iomgr/resolve_address.cc
+ src/core/lib/iomgr/resolve_address_custom.cc
src/core/lib/iomgr/resolve_address_posix.cc
- src/core/lib/iomgr/resolve_address_uv.cc
src/core/lib/iomgr/resolve_address_windows.cc
src/core/lib/iomgr/resource_quota.cc
src/core/lib/iomgr/sockaddr_utils.cc
@@ -1293,19 +1313,24 @@ add_library(grpc_cronet
src/core/lib/iomgr/socket_utils_uv.cc
src/core/lib/iomgr/socket_utils_windows.cc
src/core/lib/iomgr/socket_windows.cc
+ src/core/lib/iomgr/tcp_client.cc
+ src/core/lib/iomgr/tcp_client_custom.cc
src/core/lib/iomgr/tcp_client_posix.cc
- src/core/lib/iomgr/tcp_client_uv.cc
src/core/lib/iomgr/tcp_client_windows.cc
+ src/core/lib/iomgr/tcp_custom.cc
src/core/lib/iomgr/tcp_posix.cc
+ src/core/lib/iomgr/tcp_server.cc
+ src/core/lib/iomgr/tcp_server_custom.cc
src/core/lib/iomgr/tcp_server_posix.cc
src/core/lib/iomgr/tcp_server_utils_posix_common.cc
src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc
src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc
- src/core/lib/iomgr/tcp_server_uv.cc
src/core/lib/iomgr/tcp_server_windows.cc
src/core/lib/iomgr/tcp_uv.cc
src/core/lib/iomgr/tcp_windows.cc
src/core/lib/iomgr/time_averaged_stats.cc
+ src/core/lib/iomgr/timer.cc
+ src/core/lib/iomgr/timer_custom.cc
src/core/lib/iomgr/timer_generic.cc
src/core/lib/iomgr/timer_heap.cc
src/core/lib/iomgr/timer_manager.cc
@@ -1361,6 +1386,10 @@ add_library(grpc_cronet
src/core/lib/transport/transport.cc
src/core/lib/transport/transport_op_string.cc
src/core/lib/debug/trace.cc
+ src/core/ext/filters/deadline/deadline_filter.cc
+ src/core/ext/filters/message_size/message_size_filter.cc
+ src/core/ext/filters/load_reporting/server_load_reporting_filter.cc
+ src/core/ext/filters/load_reporting/server_load_reporting_plugin.cc
src/core/ext/transport/cronet/client/secure/cronet_channel_create.cc
src/core/ext/transport/cronet/transport/cronet_api_dummy.cc
src/core/ext/transport/cronet/transport/cronet_transport.cc
@@ -1414,7 +1443,6 @@ add_library(grpc_cronet
src/core/ext/filters/client_channel/subchannel.cc
src/core/ext/filters/client_channel/subchannel_index.cc
src/core/ext/filters/client_channel/uri_parser.cc
- src/core/ext/filters/deadline/deadline_filter.cc
src/core/lib/http/httpcli_security_connector.cc
src/core/lib/security/context/security_context.cc
src/core/lib/security/credentials/alts/alts_credentials.cc
@@ -1482,10 +1510,13 @@ add_library(grpc_cronet
src/core/ext/transport/chttp2/client/chttp2_connector.cc
src/core/tsi/alts_transport_security.cc
src/core/tsi/fake_transport_security.cc
+ src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc
+ src/core/tsi/ssl/session_cache/ssl_session_cache.cc
+ src/core/tsi/ssl/session_cache/ssl_session_openssl.cc
src/core/tsi/ssl_transport_security.cc
src/core/tsi/transport_security_grpc.cc
- src/core/ext/filters/load_reporting/server_load_reporting_filter.cc
- src/core/ext/filters/load_reporting/server_load_reporting_plugin.cc
+ src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc
+ src/core/ext/transport/chttp2/server/chttp2_server.cc
src/core/plugin_registry/grpc_cronet_plugin_registry.cc
)
@@ -1543,9 +1574,20 @@ foreach(_hdr
include/grpc/impl/codegen/sync_generic.h
include/grpc/impl/codegen/sync_posix.h
include/grpc/impl/codegen/sync_windows.h
+ include/grpc/byte_buffer.h
+ include/grpc/byte_buffer_reader.h
+ include/grpc/compression.h
+ include/grpc/fork.h
+ include/grpc/grpc.h
+ include/grpc/grpc_posix.h
+ include/grpc/grpc_security_constants.h
+ include/grpc/load_reporting.h
+ include/grpc/slice.h
+ include/grpc/slice_buffer.h
+ include/grpc/status.h
+ include/grpc/support/workaround_list.h
include/grpc/grpc_cronet.h
include/grpc/grpc_security.h
- include/grpc/grpc_security_constants.h
)
string(REPLACE "include/" "" _path ${_hdr})
get_filename_component(_path ${_path} PATH)
@@ -1634,6 +1676,8 @@ add_library(grpc_test_util
src/core/lib/iomgr/gethostname_sysconf.cc
src/core/lib/iomgr/iocp_windows.cc
src/core/lib/iomgr/iomgr.cc
+ src/core/lib/iomgr/iomgr_custom.cc
+ src/core/lib/iomgr/iomgr_internal.cc
src/core/lib/iomgr/iomgr_posix.cc
src/core/lib/iomgr/iomgr_uv.cc
src/core/lib/iomgr/iomgr_windows.cc
@@ -1642,12 +1686,16 @@ add_library(grpc_test_util
src/core/lib/iomgr/lockfree_event.cc
src/core/lib/iomgr/network_status_tracker.cc
src/core/lib/iomgr/polling_entity.cc
- src/core/lib/iomgr/pollset_set_uv.cc
+ src/core/lib/iomgr/pollset.cc
+ src/core/lib/iomgr/pollset_custom.cc
+ src/core/lib/iomgr/pollset_set.cc
+ src/core/lib/iomgr/pollset_set_custom.cc
src/core/lib/iomgr/pollset_set_windows.cc
src/core/lib/iomgr/pollset_uv.cc
src/core/lib/iomgr/pollset_windows.cc
+ src/core/lib/iomgr/resolve_address.cc
+ src/core/lib/iomgr/resolve_address_custom.cc
src/core/lib/iomgr/resolve_address_posix.cc
- src/core/lib/iomgr/resolve_address_uv.cc
src/core/lib/iomgr/resolve_address_windows.cc
src/core/lib/iomgr/resource_quota.cc
src/core/lib/iomgr/sockaddr_utils.cc
@@ -1659,19 +1707,24 @@ add_library(grpc_test_util
src/core/lib/iomgr/socket_utils_uv.cc
src/core/lib/iomgr/socket_utils_windows.cc
src/core/lib/iomgr/socket_windows.cc
+ src/core/lib/iomgr/tcp_client.cc
+ src/core/lib/iomgr/tcp_client_custom.cc
src/core/lib/iomgr/tcp_client_posix.cc
- src/core/lib/iomgr/tcp_client_uv.cc
src/core/lib/iomgr/tcp_client_windows.cc
+ src/core/lib/iomgr/tcp_custom.cc
src/core/lib/iomgr/tcp_posix.cc
+ src/core/lib/iomgr/tcp_server.cc
+ src/core/lib/iomgr/tcp_server_custom.cc
src/core/lib/iomgr/tcp_server_posix.cc
src/core/lib/iomgr/tcp_server_utils_posix_common.cc
src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc
src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc
- src/core/lib/iomgr/tcp_server_uv.cc
src/core/lib/iomgr/tcp_server_windows.cc
src/core/lib/iomgr/tcp_uv.cc
src/core/lib/iomgr/tcp_windows.cc
src/core/lib/iomgr/time_averaged_stats.cc
+ src/core/lib/iomgr/timer.cc
+ src/core/lib/iomgr/timer_custom.cc
src/core/lib/iomgr/timer_generic.cc
src/core/lib/iomgr/timer_heap.cc
src/core/lib/iomgr/timer_manager.cc
@@ -1923,6 +1976,8 @@ add_library(grpc_test_util_unsecure
src/core/lib/iomgr/gethostname_sysconf.cc
src/core/lib/iomgr/iocp_windows.cc
src/core/lib/iomgr/iomgr.cc
+ src/core/lib/iomgr/iomgr_custom.cc
+ src/core/lib/iomgr/iomgr_internal.cc
src/core/lib/iomgr/iomgr_posix.cc
src/core/lib/iomgr/iomgr_uv.cc
src/core/lib/iomgr/iomgr_windows.cc
@@ -1931,12 +1986,16 @@ add_library(grpc_test_util_unsecure
src/core/lib/iomgr/lockfree_event.cc
src/core/lib/iomgr/network_status_tracker.cc
src/core/lib/iomgr/polling_entity.cc
- src/core/lib/iomgr/pollset_set_uv.cc
+ src/core/lib/iomgr/pollset.cc
+ src/core/lib/iomgr/pollset_custom.cc
+ src/core/lib/iomgr/pollset_set.cc
+ src/core/lib/iomgr/pollset_set_custom.cc
src/core/lib/iomgr/pollset_set_windows.cc
src/core/lib/iomgr/pollset_uv.cc
src/core/lib/iomgr/pollset_windows.cc
+ src/core/lib/iomgr/resolve_address.cc
+ src/core/lib/iomgr/resolve_address_custom.cc
src/core/lib/iomgr/resolve_address_posix.cc
- src/core/lib/iomgr/resolve_address_uv.cc
src/core/lib/iomgr/resolve_address_windows.cc
src/core/lib/iomgr/resource_quota.cc
src/core/lib/iomgr/sockaddr_utils.cc
@@ -1948,19 +2007,24 @@ add_library(grpc_test_util_unsecure
src/core/lib/iomgr/socket_utils_uv.cc
src/core/lib/iomgr/socket_utils_windows.cc
src/core/lib/iomgr/socket_windows.cc
+ src/core/lib/iomgr/tcp_client.cc
+ src/core/lib/iomgr/tcp_client_custom.cc
src/core/lib/iomgr/tcp_client_posix.cc
- src/core/lib/iomgr/tcp_client_uv.cc
src/core/lib/iomgr/tcp_client_windows.cc
+ src/core/lib/iomgr/tcp_custom.cc
src/core/lib/iomgr/tcp_posix.cc
+ src/core/lib/iomgr/tcp_server.cc
+ src/core/lib/iomgr/tcp_server_custom.cc
src/core/lib/iomgr/tcp_server_posix.cc
src/core/lib/iomgr/tcp_server_utils_posix_common.cc
src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc
src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc
- src/core/lib/iomgr/tcp_server_uv.cc
src/core/lib/iomgr/tcp_server_windows.cc
src/core/lib/iomgr/tcp_uv.cc
src/core/lib/iomgr/tcp_windows.cc
src/core/lib/iomgr/time_averaged_stats.cc
+ src/core/lib/iomgr/timer.cc
+ src/core/lib/iomgr/timer_custom.cc
src/core/lib/iomgr/timer_generic.cc
src/core/lib/iomgr/timer_heap.cc
src/core/lib/iomgr/timer_manager.cc
@@ -2192,6 +2256,8 @@ add_library(grpc_unsecure
src/core/lib/iomgr/gethostname_sysconf.cc
src/core/lib/iomgr/iocp_windows.cc
src/core/lib/iomgr/iomgr.cc
+ src/core/lib/iomgr/iomgr_custom.cc
+ src/core/lib/iomgr/iomgr_internal.cc
src/core/lib/iomgr/iomgr_posix.cc
src/core/lib/iomgr/iomgr_uv.cc
src/core/lib/iomgr/iomgr_windows.cc
@@ -2200,12 +2266,16 @@ add_library(grpc_unsecure
src/core/lib/iomgr/lockfree_event.cc
src/core/lib/iomgr/network_status_tracker.cc
src/core/lib/iomgr/polling_entity.cc
- src/core/lib/iomgr/pollset_set_uv.cc
+ src/core/lib/iomgr/pollset.cc
+ src/core/lib/iomgr/pollset_custom.cc
+ src/core/lib/iomgr/pollset_set.cc
+ src/core/lib/iomgr/pollset_set_custom.cc
src/core/lib/iomgr/pollset_set_windows.cc
src/core/lib/iomgr/pollset_uv.cc
src/core/lib/iomgr/pollset_windows.cc
+ src/core/lib/iomgr/resolve_address.cc
+ src/core/lib/iomgr/resolve_address_custom.cc
src/core/lib/iomgr/resolve_address_posix.cc
- src/core/lib/iomgr/resolve_address_uv.cc
src/core/lib/iomgr/resolve_address_windows.cc
src/core/lib/iomgr/resource_quota.cc
src/core/lib/iomgr/sockaddr_utils.cc
@@ -2217,19 +2287,24 @@ add_library(grpc_unsecure
src/core/lib/iomgr/socket_utils_uv.cc
src/core/lib/iomgr/socket_utils_windows.cc
src/core/lib/iomgr/socket_windows.cc
+ src/core/lib/iomgr/tcp_client.cc
+ src/core/lib/iomgr/tcp_client_custom.cc
src/core/lib/iomgr/tcp_client_posix.cc
- src/core/lib/iomgr/tcp_client_uv.cc
src/core/lib/iomgr/tcp_client_windows.cc
+ src/core/lib/iomgr/tcp_custom.cc
src/core/lib/iomgr/tcp_posix.cc
+ src/core/lib/iomgr/tcp_server.cc
+ src/core/lib/iomgr/tcp_server_custom.cc
src/core/lib/iomgr/tcp_server_posix.cc
src/core/lib/iomgr/tcp_server_utils_posix_common.cc
src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc
src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc
- src/core/lib/iomgr/tcp_server_uv.cc
src/core/lib/iomgr/tcp_server_windows.cc
src/core/lib/iomgr/tcp_uv.cc
src/core/lib/iomgr/tcp_windows.cc
src/core/lib/iomgr/time_averaged_stats.cc
+ src/core/lib/iomgr/timer.cc
+ src/core/lib/iomgr/timer_custom.cc
src/core/lib/iomgr/timer_generic.cc
src/core/lib/iomgr/timer_heap.cc
src/core/lib/iomgr/timer_manager.cc
@@ -2996,6 +3071,8 @@ add_library(grpc++_cronet
src/core/lib/iomgr/gethostname_sysconf.cc
src/core/lib/iomgr/iocp_windows.cc
src/core/lib/iomgr/iomgr.cc
+ src/core/lib/iomgr/iomgr_custom.cc
+ src/core/lib/iomgr/iomgr_internal.cc
src/core/lib/iomgr/iomgr_posix.cc
src/core/lib/iomgr/iomgr_uv.cc
src/core/lib/iomgr/iomgr_windows.cc
@@ -3004,12 +3081,16 @@ add_library(grpc++_cronet
src/core/lib/iomgr/lockfree_event.cc
src/core/lib/iomgr/network_status_tracker.cc
src/core/lib/iomgr/polling_entity.cc
- src/core/lib/iomgr/pollset_set_uv.cc
+ src/core/lib/iomgr/pollset.cc
+ src/core/lib/iomgr/pollset_custom.cc
+ src/core/lib/iomgr/pollset_set.cc
+ src/core/lib/iomgr/pollset_set_custom.cc
src/core/lib/iomgr/pollset_set_windows.cc
src/core/lib/iomgr/pollset_uv.cc
src/core/lib/iomgr/pollset_windows.cc
+ src/core/lib/iomgr/resolve_address.cc
+ src/core/lib/iomgr/resolve_address_custom.cc
src/core/lib/iomgr/resolve_address_posix.cc
- src/core/lib/iomgr/resolve_address_uv.cc
src/core/lib/iomgr/resolve_address_windows.cc
src/core/lib/iomgr/resource_quota.cc
src/core/lib/iomgr/sockaddr_utils.cc
@@ -3021,19 +3102,24 @@ add_library(grpc++_cronet
src/core/lib/iomgr/socket_utils_uv.cc
src/core/lib/iomgr/socket_utils_windows.cc
src/core/lib/iomgr/socket_windows.cc
+ src/core/lib/iomgr/tcp_client.cc
+ src/core/lib/iomgr/tcp_client_custom.cc
src/core/lib/iomgr/tcp_client_posix.cc
- src/core/lib/iomgr/tcp_client_uv.cc
src/core/lib/iomgr/tcp_client_windows.cc
+ src/core/lib/iomgr/tcp_custom.cc
src/core/lib/iomgr/tcp_posix.cc
+ src/core/lib/iomgr/tcp_server.cc
+ src/core/lib/iomgr/tcp_server_custom.cc
src/core/lib/iomgr/tcp_server_posix.cc
src/core/lib/iomgr/tcp_server_utils_posix_common.cc
src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc
src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc
- src/core/lib/iomgr/tcp_server_uv.cc
src/core/lib/iomgr/tcp_server_windows.cc
src/core/lib/iomgr/tcp_uv.cc
src/core/lib/iomgr/tcp_windows.cc
src/core/lib/iomgr/time_averaged_stats.cc
+ src/core/lib/iomgr/timer.cc
+ src/core/lib/iomgr/timer_custom.cc
src/core/lib/iomgr/timer_generic.cc
src/core/lib/iomgr/timer_heap.cc
src/core/lib/iomgr/timer_manager.cc
@@ -5437,33 +5523,6 @@ target_link_libraries(bin_encoder_test
endif (gRPC_BUILD_TESTS)
if (gRPC_BUILD_TESTS)
-add_executable(byte_stream_test
- test/core/transport/byte_stream_test.cc
-)
-
-
-target_include_directories(byte_stream_test
- PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
- PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
- PRIVATE ${_gRPC_SSL_INCLUDE_DIR}
- PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR}
- PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR}
- PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR}
- PRIVATE ${_gRPC_CARES_INCLUDE_DIR}
- PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR}
-)
-
-target_link_libraries(byte_stream_test
- ${_gRPC_ALLTARGETS_LIBRARIES}
- grpc_test_util
- grpc
- gpr_test_util
- gpr
-)
-
-endif (gRPC_BUILD_TESTS)
-if (gRPC_BUILD_TESTS)
-
add_executable(channel_create_test
test/core/surface/channel_create_test.cc
)
@@ -9958,6 +10017,42 @@ endif()
endif (gRPC_BUILD_TESTS)
if (gRPC_BUILD_TESTS)
+add_executable(byte_stream_test
+ test/core/transport/byte_stream_test.cc
+ third_party/googletest/googletest/src/gtest-all.cc
+ third_party/googletest/googlemock/src/gmock-all.cc
+)
+
+
+target_include_directories(byte_stream_test
+ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
+ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
+ PRIVATE ${_gRPC_SSL_INCLUDE_DIR}
+ PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR}
+ PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR}
+ PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR}
+ PRIVATE ${_gRPC_CARES_INCLUDE_DIR}
+ PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR}
+ PRIVATE third_party/googletest/googletest/include
+ PRIVATE third_party/googletest/googletest
+ PRIVATE third_party/googletest/googlemock/include
+ PRIVATE third_party/googletest/googlemock
+ PRIVATE ${_gRPC_PROTO_GENS_DIR}
+)
+
+target_link_libraries(byte_stream_test
+ ${_gRPC_PROTOBUF_LIBRARIES}
+ ${_gRPC_ALLTARGETS_LIBRARIES}
+ grpc_test_util
+ grpc
+ gpr_test_util
+ gpr
+ ${_gRPC_GFLAGS_LIBRARIES}
+)
+
+endif (gRPC_BUILD_TESTS)
+if (gRPC_BUILD_TESTS)
+
add_executable(channel_arguments_test
test/cpp/common/channel_arguments_test.cc
third_party/googletest/googletest/src/gtest-all.cc
@@ -11393,6 +11488,43 @@ target_link_libraries(h2_ssl_cert_test
endif (gRPC_BUILD_TESTS)
if (gRPC_BUILD_TESTS)
+add_executable(h2_ssl_session_reuse_test
+ test/core/end2end/h2_ssl_session_reuse_test.cc
+ third_party/googletest/googletest/src/gtest-all.cc
+ third_party/googletest/googlemock/src/gmock-all.cc
+)
+
+
+target_include_directories(h2_ssl_session_reuse_test
+ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
+ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
+ PRIVATE ${_gRPC_SSL_INCLUDE_DIR}
+ PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR}
+ PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR}
+ PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR}
+ PRIVATE ${_gRPC_CARES_INCLUDE_DIR}
+ PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR}
+ PRIVATE third_party/googletest/googletest/include
+ PRIVATE third_party/googletest/googletest
+ PRIVATE third_party/googletest/googlemock/include
+ PRIVATE third_party/googletest/googlemock
+ PRIVATE ${_gRPC_PROTO_GENS_DIR}
+)
+
+target_link_libraries(h2_ssl_session_reuse_test
+ ${_gRPC_PROTOBUF_LIBRARIES}
+ ${_gRPC_ALLTARGETS_LIBRARIES}
+ grpc_test_util
+ grpc++
+ grpc
+ gpr_test_util
+ gpr
+ ${_gRPC_GFLAGS_LIBRARIES}
+)
+
+endif (gRPC_BUILD_TESTS)
+if (gRPC_BUILD_TESTS)
+
add_executable(health_service_end2end_test
test/cpp/end2end/health_service_end2end_test.cc
third_party/googletest/googletest/src/gtest-all.cc
@@ -12972,43 +13104,6 @@ target_link_libraries(status_metadata_test
endif (gRPC_BUILD_TESTS)
if (gRPC_BUILD_TESTS)
-add_executable(status_test
- test/cpp/util/status_test.cc
- third_party/googletest/googletest/src/gtest-all.cc
- third_party/googletest/googlemock/src/gmock-all.cc
-)
-
-
-target_include_directories(status_test
- PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
- PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
- PRIVATE ${_gRPC_SSL_INCLUDE_DIR}
- PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR}
- PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR}
- PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR}
- PRIVATE ${_gRPC_CARES_INCLUDE_DIR}
- PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR}
- PRIVATE third_party/googletest/googletest/include
- PRIVATE third_party/googletest/googletest
- PRIVATE third_party/googletest/googlemock/include
- PRIVATE third_party/googletest/googlemock
- PRIVATE ${_gRPC_PROTO_GENS_DIR}
-)
-
-target_link_libraries(status_test
- ${_gRPC_PROTOBUF_LIBRARIES}
- ${_gRPC_ALLTARGETS_LIBRARIES}
- grpc_test_util
- grpc++
- grpc
- gpr_test_util
- gpr
- ${_gRPC_GFLAGS_LIBRARIES}
-)
-
-endif (gRPC_BUILD_TESTS)
-if (gRPC_BUILD_TESTS)
-
add_executable(status_util_test
test/core/client_channel/status_util_test.cc
third_party/googletest/googletest/src/gtest-all.cc
diff --git a/MANIFEST.md b/MANIFEST.md
index a0e79e8532..9581e1c993 100644
--- a/MANIFEST.md
+++ b/MANIFEST.md
@@ -3,10 +3,6 @@
## Bazel
* [grpc.bzl](grpc.bzl)
-## Node
-* [binding.gyp](binding.gyp)
-* [package.json](package.json)
-
## Objective-C
* [gRPC.podspec](gRPC.podspec)
diff --git a/Makefile b/Makefile
index df30405d8b..1537dc1731 100644
--- a/Makefile
+++ b/Makefile
@@ -77,7 +77,7 @@ CC_opt = $(DEFAULT_CC)
CXX_opt = $(DEFAULT_CXX)
LD_opt = $(DEFAULT_CC)
LDXX_opt = $(DEFAULT_CXX)
-CPPFLAGS_opt = -O2
+CPPFLAGS_opt = -O2 -Wframe-larger-than=16384
DEFINES_opt = NDEBUG
VALID_CONFIG_asan-trace-cmp = 1
@@ -148,7 +148,7 @@ CXX_noexcept = $(DEFAULT_CXX)
LD_noexcept = $(DEFAULT_CC)
LDXX_noexcept = $(DEFAULT_CXX)
CXXFLAGS_noexcept = -fno-exceptions
-CPPFLAGS_noexcept = -O2
+CPPFLAGS_noexcept = -O2 -Wframe-larger-than=16384
DEFINES_noexcept = NDEBUG
VALID_CONFIG_ubsan = 1
@@ -961,7 +961,6 @@ avl_test: $(BINDIR)/$(CONFIG)/avl_test
bad_server_response_test: $(BINDIR)/$(CONFIG)/bad_server_response_test
bin_decoder_test: $(BINDIR)/$(CONFIG)/bin_decoder_test
bin_encoder_test: $(BINDIR)/$(CONFIG)/bin_encoder_test
-byte_stream_test: $(BINDIR)/$(CONFIG)/byte_stream_test
channel_create_test: $(BINDIR)/$(CONFIG)/channel_create_test
check_epollexclusive: $(BINDIR)/$(CONFIG)/check_epollexclusive
chttp2_hpack_encoder_test: $(BINDIR)/$(CONFIG)/chttp2_hpack_encoder_test
@@ -1126,6 +1125,7 @@ bm_fullstack_trickle: $(BINDIR)/$(CONFIG)/bm_fullstack_trickle
bm_fullstack_unary_ping_pong: $(BINDIR)/$(CONFIG)/bm_fullstack_unary_ping_pong
bm_metadata: $(BINDIR)/$(CONFIG)/bm_metadata
bm_pollset: $(BINDIR)/$(CONFIG)/bm_pollset
+byte_stream_test: $(BINDIR)/$(CONFIG)/byte_stream_test
channel_arguments_test: $(BINDIR)/$(CONFIG)/channel_arguments_test
channel_filter_test: $(BINDIR)/$(CONFIG)/channel_filter_test
check_gcp_environment_linux_test: $(BINDIR)/$(CONFIG)/check_gcp_environment_linux_test
@@ -1162,6 +1162,7 @@ grpc_tool_test: $(BINDIR)/$(CONFIG)/grpc_tool_test
grpclb_api_test: $(BINDIR)/$(CONFIG)/grpclb_api_test
grpclb_end2end_test: $(BINDIR)/$(CONFIG)/grpclb_end2end_test
h2_ssl_cert_test: $(BINDIR)/$(CONFIG)/h2_ssl_cert_test
+h2_ssl_session_reuse_test: $(BINDIR)/$(CONFIG)/h2_ssl_session_reuse_test
health_service_end2end_test: $(BINDIR)/$(CONFIG)/health_service_end2end_test
http2_client: $(BINDIR)/$(CONFIG)/http2_client
hybrid_end2end_test: $(BINDIR)/$(CONFIG)/hybrid_end2end_test
@@ -1201,7 +1202,6 @@ slice_hash_table_test: $(BINDIR)/$(CONFIG)/slice_hash_table_test
slice_weak_hash_table_test: $(BINDIR)/$(CONFIG)/slice_weak_hash_table_test
stats_test: $(BINDIR)/$(CONFIG)/stats_test
status_metadata_test: $(BINDIR)/$(CONFIG)/status_metadata_test
-status_test: $(BINDIR)/$(CONFIG)/status_test
status_util_test: $(BINDIR)/$(CONFIG)/status_util_test
streaming_throughput_test: $(BINDIR)/$(CONFIG)/streaming_throughput_test
stress_test: $(BINDIR)/$(CONFIG)/stress_test
@@ -1398,7 +1398,6 @@ buildtests_c: privatelibs_c \
$(BINDIR)/$(CONFIG)/bad_server_response_test \
$(BINDIR)/$(CONFIG)/bin_decoder_test \
$(BINDIR)/$(CONFIG)/bin_encoder_test \
- $(BINDIR)/$(CONFIG)/byte_stream_test \
$(BINDIR)/$(CONFIG)/channel_create_test \
$(BINDIR)/$(CONFIG)/chttp2_hpack_encoder_test \
$(BINDIR)/$(CONFIG)/chttp2_stream_map_test \
@@ -1611,6 +1610,7 @@ buildtests_cxx: privatelibs_cxx \
$(BINDIR)/$(CONFIG)/bm_fullstack_unary_ping_pong \
$(BINDIR)/$(CONFIG)/bm_metadata \
$(BINDIR)/$(CONFIG)/bm_pollset \
+ $(BINDIR)/$(CONFIG)/byte_stream_test \
$(BINDIR)/$(CONFIG)/channel_arguments_test \
$(BINDIR)/$(CONFIG)/channel_filter_test \
$(BINDIR)/$(CONFIG)/check_gcp_environment_linux_test \
@@ -1640,6 +1640,7 @@ buildtests_cxx: privatelibs_cxx \
$(BINDIR)/$(CONFIG)/grpclb_api_test \
$(BINDIR)/$(CONFIG)/grpclb_end2end_test \
$(BINDIR)/$(CONFIG)/h2_ssl_cert_test \
+ $(BINDIR)/$(CONFIG)/h2_ssl_session_reuse_test \
$(BINDIR)/$(CONFIG)/health_service_end2end_test \
$(BINDIR)/$(CONFIG)/http2_client \
$(BINDIR)/$(CONFIG)/hybrid_end2end_test \
@@ -1679,7 +1680,6 @@ buildtests_cxx: privatelibs_cxx \
$(BINDIR)/$(CONFIG)/slice_weak_hash_table_test \
$(BINDIR)/$(CONFIG)/stats_test \
$(BINDIR)/$(CONFIG)/status_metadata_test \
- $(BINDIR)/$(CONFIG)/status_test \
$(BINDIR)/$(CONFIG)/status_util_test \
$(BINDIR)/$(CONFIG)/streaming_throughput_test \
$(BINDIR)/$(CONFIG)/stress_test \
@@ -1777,6 +1777,7 @@ buildtests_cxx: privatelibs_cxx \
$(BINDIR)/$(CONFIG)/bm_fullstack_unary_ping_pong \
$(BINDIR)/$(CONFIG)/bm_metadata \
$(BINDIR)/$(CONFIG)/bm_pollset \
+ $(BINDIR)/$(CONFIG)/byte_stream_test \
$(BINDIR)/$(CONFIG)/channel_arguments_test \
$(BINDIR)/$(CONFIG)/channel_filter_test \
$(BINDIR)/$(CONFIG)/check_gcp_environment_linux_test \
@@ -1806,6 +1807,7 @@ buildtests_cxx: privatelibs_cxx \
$(BINDIR)/$(CONFIG)/grpclb_api_test \
$(BINDIR)/$(CONFIG)/grpclb_end2end_test \
$(BINDIR)/$(CONFIG)/h2_ssl_cert_test \
+ $(BINDIR)/$(CONFIG)/h2_ssl_session_reuse_test \
$(BINDIR)/$(CONFIG)/health_service_end2end_test \
$(BINDIR)/$(CONFIG)/http2_client \
$(BINDIR)/$(CONFIG)/hybrid_end2end_test \
@@ -1845,7 +1847,6 @@ buildtests_cxx: privatelibs_cxx \
$(BINDIR)/$(CONFIG)/slice_weak_hash_table_test \
$(BINDIR)/$(CONFIG)/stats_test \
$(BINDIR)/$(CONFIG)/status_metadata_test \
- $(BINDIR)/$(CONFIG)/status_test \
$(BINDIR)/$(CONFIG)/status_util_test \
$(BINDIR)/$(CONFIG)/streaming_throughput_test \
$(BINDIR)/$(CONFIG)/stress_test \
@@ -1883,8 +1884,6 @@ test_c: buildtests_c
$(Q) $(BINDIR)/$(CONFIG)/bin_decoder_test || ( echo test bin_decoder_test failed ; exit 1 )
$(E) "[RUN] Testing bin_encoder_test"
$(Q) $(BINDIR)/$(CONFIG)/bin_encoder_test || ( echo test bin_encoder_test failed ; exit 1 )
- $(E) "[RUN] Testing byte_stream_test"
- $(Q) $(BINDIR)/$(CONFIG)/byte_stream_test || ( echo test byte_stream_test failed ; exit 1 )
$(E) "[RUN] Testing channel_create_test"
$(Q) $(BINDIR)/$(CONFIG)/channel_create_test || ( echo test channel_create_test failed ; exit 1 )
$(E) "[RUN] Testing chttp2_hpack_encoder_test"
@@ -2199,6 +2198,8 @@ test_cxx: buildtests_cxx
$(Q) $(BINDIR)/$(CONFIG)/bm_metadata || ( echo test bm_metadata failed ; exit 1 )
$(E) "[RUN] Testing bm_pollset"
$(Q) $(BINDIR)/$(CONFIG)/bm_pollset || ( echo test bm_pollset failed ; exit 1 )
+ $(E) "[RUN] Testing byte_stream_test"
+ $(Q) $(BINDIR)/$(CONFIG)/byte_stream_test || ( echo test byte_stream_test failed ; exit 1 )
$(E) "[RUN] Testing channel_arguments_test"
$(Q) $(BINDIR)/$(CONFIG)/channel_arguments_test || ( echo test channel_arguments_test failed ; exit 1 )
$(E) "[RUN] Testing channel_filter_test"
@@ -2253,6 +2254,8 @@ test_cxx: buildtests_cxx
$(Q) $(BINDIR)/$(CONFIG)/grpclb_end2end_test || ( echo test grpclb_end2end_test failed ; exit 1 )
$(E) "[RUN] Testing h2_ssl_cert_test"
$(Q) $(BINDIR)/$(CONFIG)/h2_ssl_cert_test || ( echo test h2_ssl_cert_test failed ; exit 1 )
+ $(E) "[RUN] Testing h2_ssl_session_reuse_test"
+ $(Q) $(BINDIR)/$(CONFIG)/h2_ssl_session_reuse_test || ( echo test h2_ssl_session_reuse_test failed ; exit 1 )
$(E) "[RUN] Testing health_service_end2end_test"
$(Q) $(BINDIR)/$(CONFIG)/health_service_end2end_test || ( echo test health_service_end2end_test failed ; exit 1 )
$(E) "[RUN] Testing inlined_vector_test"
@@ -2307,8 +2310,6 @@ test_cxx: buildtests_cxx
$(Q) $(BINDIR)/$(CONFIG)/stats_test || ( echo test stats_test failed ; exit 1 )
$(E) "[RUN] Testing status_metadata_test"
$(Q) $(BINDIR)/$(CONFIG)/status_metadata_test || ( echo test status_metadata_test failed ; exit 1 )
- $(E) "[RUN] Testing status_test"
- $(Q) $(BINDIR)/$(CONFIG)/status_test || ( echo test status_test failed ; exit 1 )
$(E) "[RUN] Testing status_util_test"
$(Q) $(BINDIR)/$(CONFIG)/status_util_test || ( echo test status_util_test failed ; exit 1 )
$(E) "[RUN] Testing streaming_throughput_test"
@@ -3197,6 +3198,8 @@ LIBGRPC_SRC = \
src/core/lib/iomgr/gethostname_sysconf.cc \
src/core/lib/iomgr/iocp_windows.cc \
src/core/lib/iomgr/iomgr.cc \
+ src/core/lib/iomgr/iomgr_custom.cc \
+ src/core/lib/iomgr/iomgr_internal.cc \
src/core/lib/iomgr/iomgr_posix.cc \
src/core/lib/iomgr/iomgr_uv.cc \
src/core/lib/iomgr/iomgr_windows.cc \
@@ -3205,12 +3208,16 @@ LIBGRPC_SRC = \
src/core/lib/iomgr/lockfree_event.cc \
src/core/lib/iomgr/network_status_tracker.cc \
src/core/lib/iomgr/polling_entity.cc \
- src/core/lib/iomgr/pollset_set_uv.cc \
+ src/core/lib/iomgr/pollset.cc \
+ src/core/lib/iomgr/pollset_custom.cc \
+ src/core/lib/iomgr/pollset_set.cc \
+ src/core/lib/iomgr/pollset_set_custom.cc \
src/core/lib/iomgr/pollset_set_windows.cc \
src/core/lib/iomgr/pollset_uv.cc \
src/core/lib/iomgr/pollset_windows.cc \
+ src/core/lib/iomgr/resolve_address.cc \
+ src/core/lib/iomgr/resolve_address_custom.cc \
src/core/lib/iomgr/resolve_address_posix.cc \
- src/core/lib/iomgr/resolve_address_uv.cc \
src/core/lib/iomgr/resolve_address_windows.cc \
src/core/lib/iomgr/resource_quota.cc \
src/core/lib/iomgr/sockaddr_utils.cc \
@@ -3222,19 +3229,24 @@ LIBGRPC_SRC = \
src/core/lib/iomgr/socket_utils_uv.cc \
src/core/lib/iomgr/socket_utils_windows.cc \
src/core/lib/iomgr/socket_windows.cc \
+ src/core/lib/iomgr/tcp_client.cc \
+ src/core/lib/iomgr/tcp_client_custom.cc \
src/core/lib/iomgr/tcp_client_posix.cc \
- src/core/lib/iomgr/tcp_client_uv.cc \
src/core/lib/iomgr/tcp_client_windows.cc \
+ src/core/lib/iomgr/tcp_custom.cc \
src/core/lib/iomgr/tcp_posix.cc \
+ src/core/lib/iomgr/tcp_server.cc \
+ src/core/lib/iomgr/tcp_server_custom.cc \
src/core/lib/iomgr/tcp_server_posix.cc \
src/core/lib/iomgr/tcp_server_utils_posix_common.cc \
src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc \
src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc \
- src/core/lib/iomgr/tcp_server_uv.cc \
src/core/lib/iomgr/tcp_server_windows.cc \
src/core/lib/iomgr/tcp_uv.cc \
src/core/lib/iomgr/tcp_windows.cc \
src/core/lib/iomgr/time_averaged_stats.cc \
+ src/core/lib/iomgr/timer.cc \
+ src/core/lib/iomgr/timer_custom.cc \
src/core/lib/iomgr/timer_generic.cc \
src/core/lib/iomgr/timer_heap.cc \
src/core/lib/iomgr/timer_manager.cc \
@@ -3408,6 +3420,9 @@ LIBGRPC_SRC = \
src/core/ext/filters/deadline/deadline_filter.cc \
src/core/tsi/alts_transport_security.cc \
src/core/tsi/fake_transport_security.cc \
+ src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc \
+ src/core/tsi/ssl/session_cache/ssl_session_cache.cc \
+ src/core/tsi/ssl/session_cache/ssl_session_openssl.cc \
src/core/tsi/ssl_transport_security.cc \
src/core/tsi/transport_security_grpc.cc \
src/core/ext/transport/chttp2/server/chttp2_server.cc \
@@ -3575,6 +3590,8 @@ LIBGRPC_CRONET_SRC = \
src/core/lib/iomgr/gethostname_sysconf.cc \
src/core/lib/iomgr/iocp_windows.cc \
src/core/lib/iomgr/iomgr.cc \
+ src/core/lib/iomgr/iomgr_custom.cc \
+ src/core/lib/iomgr/iomgr_internal.cc \
src/core/lib/iomgr/iomgr_posix.cc \
src/core/lib/iomgr/iomgr_uv.cc \
src/core/lib/iomgr/iomgr_windows.cc \
@@ -3583,12 +3600,16 @@ LIBGRPC_CRONET_SRC = \
src/core/lib/iomgr/lockfree_event.cc \
src/core/lib/iomgr/network_status_tracker.cc \
src/core/lib/iomgr/polling_entity.cc \
- src/core/lib/iomgr/pollset_set_uv.cc \
+ src/core/lib/iomgr/pollset.cc \
+ src/core/lib/iomgr/pollset_custom.cc \
+ src/core/lib/iomgr/pollset_set.cc \
+ src/core/lib/iomgr/pollset_set_custom.cc \
src/core/lib/iomgr/pollset_set_windows.cc \
src/core/lib/iomgr/pollset_uv.cc \
src/core/lib/iomgr/pollset_windows.cc \
+ src/core/lib/iomgr/resolve_address.cc \
+ src/core/lib/iomgr/resolve_address_custom.cc \
src/core/lib/iomgr/resolve_address_posix.cc \
- src/core/lib/iomgr/resolve_address_uv.cc \
src/core/lib/iomgr/resolve_address_windows.cc \
src/core/lib/iomgr/resource_quota.cc \
src/core/lib/iomgr/sockaddr_utils.cc \
@@ -3600,19 +3621,24 @@ LIBGRPC_CRONET_SRC = \
src/core/lib/iomgr/socket_utils_uv.cc \
src/core/lib/iomgr/socket_utils_windows.cc \
src/core/lib/iomgr/socket_windows.cc \
+ src/core/lib/iomgr/tcp_client.cc \
+ src/core/lib/iomgr/tcp_client_custom.cc \
src/core/lib/iomgr/tcp_client_posix.cc \
- src/core/lib/iomgr/tcp_client_uv.cc \
src/core/lib/iomgr/tcp_client_windows.cc \
+ src/core/lib/iomgr/tcp_custom.cc \
src/core/lib/iomgr/tcp_posix.cc \
+ src/core/lib/iomgr/tcp_server.cc \
+ src/core/lib/iomgr/tcp_server_custom.cc \
src/core/lib/iomgr/tcp_server_posix.cc \
src/core/lib/iomgr/tcp_server_utils_posix_common.cc \
src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc \
src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc \
- src/core/lib/iomgr/tcp_server_uv.cc \
src/core/lib/iomgr/tcp_server_windows.cc \
src/core/lib/iomgr/tcp_uv.cc \
src/core/lib/iomgr/tcp_windows.cc \
src/core/lib/iomgr/time_averaged_stats.cc \
+ src/core/lib/iomgr/timer.cc \
+ src/core/lib/iomgr/timer_custom.cc \
src/core/lib/iomgr/timer_generic.cc \
src/core/lib/iomgr/timer_heap.cc \
src/core/lib/iomgr/timer_manager.cc \
@@ -3668,6 +3694,10 @@ LIBGRPC_CRONET_SRC = \
src/core/lib/transport/transport.cc \
src/core/lib/transport/transport_op_string.cc \
src/core/lib/debug/trace.cc \
+ src/core/ext/filters/deadline/deadline_filter.cc \
+ src/core/ext/filters/message_size/message_size_filter.cc \
+ src/core/ext/filters/load_reporting/server_load_reporting_filter.cc \
+ src/core/ext/filters/load_reporting/server_load_reporting_plugin.cc \
src/core/ext/transport/cronet/client/secure/cronet_channel_create.cc \
src/core/ext/transport/cronet/transport/cronet_api_dummy.cc \
src/core/ext/transport/cronet/transport/cronet_transport.cc \
@@ -3721,7 +3751,6 @@ LIBGRPC_CRONET_SRC = \
src/core/ext/filters/client_channel/subchannel.cc \
src/core/ext/filters/client_channel/subchannel_index.cc \
src/core/ext/filters/client_channel/uri_parser.cc \
- src/core/ext/filters/deadline/deadline_filter.cc \
src/core/lib/http/httpcli_security_connector.cc \
src/core/lib/security/context/security_context.cc \
src/core/lib/security/credentials/alts/alts_credentials.cc \
@@ -3789,10 +3818,13 @@ LIBGRPC_CRONET_SRC = \
src/core/ext/transport/chttp2/client/chttp2_connector.cc \
src/core/tsi/alts_transport_security.cc \
src/core/tsi/fake_transport_security.cc \
+ src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc \
+ src/core/tsi/ssl/session_cache/ssl_session_cache.cc \
+ src/core/tsi/ssl/session_cache/ssl_session_openssl.cc \
src/core/tsi/ssl_transport_security.cc \
src/core/tsi/transport_security_grpc.cc \
- src/core/ext/filters/load_reporting/server_load_reporting_filter.cc \
- src/core/ext/filters/load_reporting/server_load_reporting_plugin.cc \
+ src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc \
+ src/core/ext/transport/chttp2/server/chttp2_server.cc \
src/core/plugin_registry/grpc_cronet_plugin_registry.cc \
PUBLIC_HEADERS_C += \
@@ -3817,9 +3849,20 @@ PUBLIC_HEADERS_C += \
include/grpc/impl/codegen/sync_generic.h \
include/grpc/impl/codegen/sync_posix.h \
include/grpc/impl/codegen/sync_windows.h \
+ include/grpc/byte_buffer.h \
+ include/grpc/byte_buffer_reader.h \
+ include/grpc/compression.h \
+ include/grpc/fork.h \
+ include/grpc/grpc.h \
+ include/grpc/grpc_posix.h \
+ include/grpc/grpc_security_constants.h \
+ include/grpc/load_reporting.h \
+ include/grpc/slice.h \
+ include/grpc/slice_buffer.h \
+ include/grpc/status.h \
+ include/grpc/support/workaround_list.h \
include/grpc/grpc_cronet.h \
include/grpc/grpc_security.h \
- include/grpc/grpc_security_constants.h \
LIBGRPC_CRONET_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC_CRONET_SRC))))
@@ -3942,6 +3985,8 @@ LIBGRPC_TEST_UTIL_SRC = \
src/core/lib/iomgr/gethostname_sysconf.cc \
src/core/lib/iomgr/iocp_windows.cc \
src/core/lib/iomgr/iomgr.cc \
+ src/core/lib/iomgr/iomgr_custom.cc \
+ src/core/lib/iomgr/iomgr_internal.cc \
src/core/lib/iomgr/iomgr_posix.cc \
src/core/lib/iomgr/iomgr_uv.cc \
src/core/lib/iomgr/iomgr_windows.cc \
@@ -3950,12 +3995,16 @@ LIBGRPC_TEST_UTIL_SRC = \
src/core/lib/iomgr/lockfree_event.cc \
src/core/lib/iomgr/network_status_tracker.cc \
src/core/lib/iomgr/polling_entity.cc \
- src/core/lib/iomgr/pollset_set_uv.cc \
+ src/core/lib/iomgr/pollset.cc \
+ src/core/lib/iomgr/pollset_custom.cc \
+ src/core/lib/iomgr/pollset_set.cc \
+ src/core/lib/iomgr/pollset_set_custom.cc \
src/core/lib/iomgr/pollset_set_windows.cc \
src/core/lib/iomgr/pollset_uv.cc \
src/core/lib/iomgr/pollset_windows.cc \
+ src/core/lib/iomgr/resolve_address.cc \
+ src/core/lib/iomgr/resolve_address_custom.cc \
src/core/lib/iomgr/resolve_address_posix.cc \
- src/core/lib/iomgr/resolve_address_uv.cc \
src/core/lib/iomgr/resolve_address_windows.cc \
src/core/lib/iomgr/resource_quota.cc \
src/core/lib/iomgr/sockaddr_utils.cc \
@@ -3967,19 +4016,24 @@ LIBGRPC_TEST_UTIL_SRC = \
src/core/lib/iomgr/socket_utils_uv.cc \
src/core/lib/iomgr/socket_utils_windows.cc \
src/core/lib/iomgr/socket_windows.cc \
+ src/core/lib/iomgr/tcp_client.cc \
+ src/core/lib/iomgr/tcp_client_custom.cc \
src/core/lib/iomgr/tcp_client_posix.cc \
- src/core/lib/iomgr/tcp_client_uv.cc \
src/core/lib/iomgr/tcp_client_windows.cc \
+ src/core/lib/iomgr/tcp_custom.cc \
src/core/lib/iomgr/tcp_posix.cc \
+ src/core/lib/iomgr/tcp_server.cc \
+ src/core/lib/iomgr/tcp_server_custom.cc \
src/core/lib/iomgr/tcp_server_posix.cc \
src/core/lib/iomgr/tcp_server_utils_posix_common.cc \
src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc \
src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc \
- src/core/lib/iomgr/tcp_server_uv.cc \
src/core/lib/iomgr/tcp_server_windows.cc \
src/core/lib/iomgr/tcp_uv.cc \
src/core/lib/iomgr/tcp_windows.cc \
src/core/lib/iomgr/time_averaged_stats.cc \
+ src/core/lib/iomgr/timer.cc \
+ src/core/lib/iomgr/timer_custom.cc \
src/core/lib/iomgr/timer_generic.cc \
src/core/lib/iomgr/timer_heap.cc \
src/core/lib/iomgr/timer_manager.cc \
@@ -4224,6 +4278,8 @@ LIBGRPC_TEST_UTIL_UNSECURE_SRC = \
src/core/lib/iomgr/gethostname_sysconf.cc \
src/core/lib/iomgr/iocp_windows.cc \
src/core/lib/iomgr/iomgr.cc \
+ src/core/lib/iomgr/iomgr_custom.cc \
+ src/core/lib/iomgr/iomgr_internal.cc \
src/core/lib/iomgr/iomgr_posix.cc \
src/core/lib/iomgr/iomgr_uv.cc \
src/core/lib/iomgr/iomgr_windows.cc \
@@ -4232,12 +4288,16 @@ LIBGRPC_TEST_UTIL_UNSECURE_SRC = \
src/core/lib/iomgr/lockfree_event.cc \
src/core/lib/iomgr/network_status_tracker.cc \
src/core/lib/iomgr/polling_entity.cc \
- src/core/lib/iomgr/pollset_set_uv.cc \
+ src/core/lib/iomgr/pollset.cc \
+ src/core/lib/iomgr/pollset_custom.cc \
+ src/core/lib/iomgr/pollset_set.cc \
+ src/core/lib/iomgr/pollset_set_custom.cc \
src/core/lib/iomgr/pollset_set_windows.cc \
src/core/lib/iomgr/pollset_uv.cc \
src/core/lib/iomgr/pollset_windows.cc \
+ src/core/lib/iomgr/resolve_address.cc \
+ src/core/lib/iomgr/resolve_address_custom.cc \
src/core/lib/iomgr/resolve_address_posix.cc \
- src/core/lib/iomgr/resolve_address_uv.cc \
src/core/lib/iomgr/resolve_address_windows.cc \
src/core/lib/iomgr/resource_quota.cc \
src/core/lib/iomgr/sockaddr_utils.cc \
@@ -4249,19 +4309,24 @@ LIBGRPC_TEST_UTIL_UNSECURE_SRC = \
src/core/lib/iomgr/socket_utils_uv.cc \
src/core/lib/iomgr/socket_utils_windows.cc \
src/core/lib/iomgr/socket_windows.cc \
+ src/core/lib/iomgr/tcp_client.cc \
+ src/core/lib/iomgr/tcp_client_custom.cc \
src/core/lib/iomgr/tcp_client_posix.cc \
- src/core/lib/iomgr/tcp_client_uv.cc \
src/core/lib/iomgr/tcp_client_windows.cc \
+ src/core/lib/iomgr/tcp_custom.cc \
src/core/lib/iomgr/tcp_posix.cc \
+ src/core/lib/iomgr/tcp_server.cc \
+ src/core/lib/iomgr/tcp_server_custom.cc \
src/core/lib/iomgr/tcp_server_posix.cc \
src/core/lib/iomgr/tcp_server_utils_posix_common.cc \
src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc \
src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc \
- src/core/lib/iomgr/tcp_server_uv.cc \
src/core/lib/iomgr/tcp_server_windows.cc \
src/core/lib/iomgr/tcp_uv.cc \
src/core/lib/iomgr/tcp_windows.cc \
src/core/lib/iomgr/time_averaged_stats.cc \
+ src/core/lib/iomgr/timer.cc \
+ src/core/lib/iomgr/timer_custom.cc \
src/core/lib/iomgr/timer_generic.cc \
src/core/lib/iomgr/timer_heap.cc \
src/core/lib/iomgr/timer_manager.cc \
@@ -4473,6 +4538,8 @@ LIBGRPC_UNSECURE_SRC = \
src/core/lib/iomgr/gethostname_sysconf.cc \
src/core/lib/iomgr/iocp_windows.cc \
src/core/lib/iomgr/iomgr.cc \
+ src/core/lib/iomgr/iomgr_custom.cc \
+ src/core/lib/iomgr/iomgr_internal.cc \
src/core/lib/iomgr/iomgr_posix.cc \
src/core/lib/iomgr/iomgr_uv.cc \
src/core/lib/iomgr/iomgr_windows.cc \
@@ -4481,12 +4548,16 @@ LIBGRPC_UNSECURE_SRC = \
src/core/lib/iomgr/lockfree_event.cc \
src/core/lib/iomgr/network_status_tracker.cc \
src/core/lib/iomgr/polling_entity.cc \
- src/core/lib/iomgr/pollset_set_uv.cc \
+ src/core/lib/iomgr/pollset.cc \
+ src/core/lib/iomgr/pollset_custom.cc \
+ src/core/lib/iomgr/pollset_set.cc \
+ src/core/lib/iomgr/pollset_set_custom.cc \
src/core/lib/iomgr/pollset_set_windows.cc \
src/core/lib/iomgr/pollset_uv.cc \
src/core/lib/iomgr/pollset_windows.cc \
+ src/core/lib/iomgr/resolve_address.cc \
+ src/core/lib/iomgr/resolve_address_custom.cc \
src/core/lib/iomgr/resolve_address_posix.cc \
- src/core/lib/iomgr/resolve_address_uv.cc \
src/core/lib/iomgr/resolve_address_windows.cc \
src/core/lib/iomgr/resource_quota.cc \
src/core/lib/iomgr/sockaddr_utils.cc \
@@ -4498,19 +4569,24 @@ LIBGRPC_UNSECURE_SRC = \
src/core/lib/iomgr/socket_utils_uv.cc \
src/core/lib/iomgr/socket_utils_windows.cc \
src/core/lib/iomgr/socket_windows.cc \
+ src/core/lib/iomgr/tcp_client.cc \
+ src/core/lib/iomgr/tcp_client_custom.cc \
src/core/lib/iomgr/tcp_client_posix.cc \
- src/core/lib/iomgr/tcp_client_uv.cc \
src/core/lib/iomgr/tcp_client_windows.cc \
+ src/core/lib/iomgr/tcp_custom.cc \
src/core/lib/iomgr/tcp_posix.cc \
+ src/core/lib/iomgr/tcp_server.cc \
+ src/core/lib/iomgr/tcp_server_custom.cc \
src/core/lib/iomgr/tcp_server_posix.cc \
src/core/lib/iomgr/tcp_server_utils_posix_common.cc \
src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc \
src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc \
- src/core/lib/iomgr/tcp_server_uv.cc \
src/core/lib/iomgr/tcp_server_windows.cc \
src/core/lib/iomgr/tcp_uv.cc \
src/core/lib/iomgr/tcp_windows.cc \
src/core/lib/iomgr/time_averaged_stats.cc \
+ src/core/lib/iomgr/timer.cc \
+ src/core/lib/iomgr/timer_custom.cc \
src/core/lib/iomgr/timer_generic.cc \
src/core/lib/iomgr/timer_heap.cc \
src/core/lib/iomgr/timer_manager.cc \
@@ -5276,6 +5352,8 @@ LIBGRPC++_CRONET_SRC = \
src/core/lib/iomgr/gethostname_sysconf.cc \
src/core/lib/iomgr/iocp_windows.cc \
src/core/lib/iomgr/iomgr.cc \
+ src/core/lib/iomgr/iomgr_custom.cc \
+ src/core/lib/iomgr/iomgr_internal.cc \
src/core/lib/iomgr/iomgr_posix.cc \
src/core/lib/iomgr/iomgr_uv.cc \
src/core/lib/iomgr/iomgr_windows.cc \
@@ -5284,12 +5362,16 @@ LIBGRPC++_CRONET_SRC = \
src/core/lib/iomgr/lockfree_event.cc \
src/core/lib/iomgr/network_status_tracker.cc \
src/core/lib/iomgr/polling_entity.cc \
- src/core/lib/iomgr/pollset_set_uv.cc \
+ src/core/lib/iomgr/pollset.cc \
+ src/core/lib/iomgr/pollset_custom.cc \
+ src/core/lib/iomgr/pollset_set.cc \
+ src/core/lib/iomgr/pollset_set_custom.cc \
src/core/lib/iomgr/pollset_set_windows.cc \
src/core/lib/iomgr/pollset_uv.cc \
src/core/lib/iomgr/pollset_windows.cc \
+ src/core/lib/iomgr/resolve_address.cc \
+ src/core/lib/iomgr/resolve_address_custom.cc \
src/core/lib/iomgr/resolve_address_posix.cc \
- src/core/lib/iomgr/resolve_address_uv.cc \
src/core/lib/iomgr/resolve_address_windows.cc \
src/core/lib/iomgr/resource_quota.cc \
src/core/lib/iomgr/sockaddr_utils.cc \
@@ -5301,19 +5383,24 @@ LIBGRPC++_CRONET_SRC = \
src/core/lib/iomgr/socket_utils_uv.cc \
src/core/lib/iomgr/socket_utils_windows.cc \
src/core/lib/iomgr/socket_windows.cc \
+ src/core/lib/iomgr/tcp_client.cc \
+ src/core/lib/iomgr/tcp_client_custom.cc \
src/core/lib/iomgr/tcp_client_posix.cc \
- src/core/lib/iomgr/tcp_client_uv.cc \
src/core/lib/iomgr/tcp_client_windows.cc \
+ src/core/lib/iomgr/tcp_custom.cc \
src/core/lib/iomgr/tcp_posix.cc \
+ src/core/lib/iomgr/tcp_server.cc \
+ src/core/lib/iomgr/tcp_server_custom.cc \
src/core/lib/iomgr/tcp_server_posix.cc \
src/core/lib/iomgr/tcp_server_utils_posix_common.cc \
src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc \
src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc \
- src/core/lib/iomgr/tcp_server_uv.cc \
src/core/lib/iomgr/tcp_server_windows.cc \
src/core/lib/iomgr/tcp_uv.cc \
src/core/lib/iomgr/tcp_windows.cc \
src/core/lib/iomgr/time_averaged_stats.cc \
+ src/core/lib/iomgr/timer.cc \
+ src/core/lib/iomgr/timer_custom.cc \
src/core/lib/iomgr/timer_generic.cc \
src/core/lib/iomgr/timer_heap.cc \
src/core/lib/iomgr/timer_manager.cc \
@@ -10126,38 +10213,6 @@ endif
endif
-BYTE_STREAM_TEST_SRC = \
- test/core/transport/byte_stream_test.cc \
-
-BYTE_STREAM_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(BYTE_STREAM_TEST_SRC))))
-ifeq ($(NO_SECURE),true)
-
-# You can't build secure targets if you don't have OpenSSL.
-
-$(BINDIR)/$(CONFIG)/byte_stream_test: openssl_dep_error
-
-else
-
-
-
-$(BINDIR)/$(CONFIG)/byte_stream_test: $(BYTE_STREAM_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) $(BYTE_STREAM_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)/byte_stream_test
-
-endif
-
-$(OBJDIR)/$(CONFIG)/test/core/transport/byte_stream_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
-
-deps_byte_stream_test: $(BYTE_STREAM_TEST_OBJS:.o=.dep)
-
-ifneq ($(NO_SECURE),true)
-ifneq ($(NO_DEPS),true)
--include $(BYTE_STREAM_TEST_OBJS:.o=.dep)
-endif
-endif
-
-
CHANNEL_CREATE_TEST_SRC = \
test/core/surface/channel_create_test.cc \
@@ -15796,6 +15851,49 @@ endif
endif
+BYTE_STREAM_TEST_SRC = \
+ test/core/transport/byte_stream_test.cc \
+
+BYTE_STREAM_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(BYTE_STREAM_TEST_SRC))))
+ifeq ($(NO_SECURE),true)
+
+# You can't build secure targets if you don't have OpenSSL.
+
+$(BINDIR)/$(CONFIG)/byte_stream_test: openssl_dep_error
+
+else
+
+
+
+
+ifeq ($(NO_PROTOBUF),true)
+
+# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.0.0+.
+
+$(BINDIR)/$(CONFIG)/byte_stream_test: protobuf_dep_error
+
+else
+
+$(BINDIR)/$(CONFIG)/byte_stream_test: $(PROTOBUF_DEP) $(BYTE_STREAM_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) $(LDXX) $(LDFLAGS) $(BYTE_STREAM_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/byte_stream_test
+
+endif
+
+endif
+
+$(OBJDIR)/$(CONFIG)/test/core/transport/byte_stream_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
+
+deps_byte_stream_test: $(BYTE_STREAM_TEST_OBJS:.o=.dep)
+
+ifneq ($(NO_SECURE),true)
+ifneq ($(NO_DEPS),true)
+-include $(BYTE_STREAM_TEST_OBJS:.o=.dep)
+endif
+endif
+
+
CHANNEL_ARGUMENTS_TEST_SRC = \
test/cpp/common/channel_arguments_test.cc \
@@ -17323,6 +17421,49 @@ endif
endif
+H2_SSL_SESSION_REUSE_TEST_SRC = \
+ test/core/end2end/h2_ssl_session_reuse_test.cc \
+
+H2_SSL_SESSION_REUSE_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(H2_SSL_SESSION_REUSE_TEST_SRC))))
+ifeq ($(NO_SECURE),true)
+
+# You can't build secure targets if you don't have OpenSSL.
+
+$(BINDIR)/$(CONFIG)/h2_ssl_session_reuse_test: openssl_dep_error
+
+else
+
+
+
+
+ifeq ($(NO_PROTOBUF),true)
+
+# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.0.0+.
+
+$(BINDIR)/$(CONFIG)/h2_ssl_session_reuse_test: protobuf_dep_error
+
+else
+
+$(BINDIR)/$(CONFIG)/h2_ssl_session_reuse_test: $(PROTOBUF_DEP) $(H2_SSL_SESSION_REUSE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.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) $(H2_SSL_SESSION_REUSE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/h2_ssl_session_reuse_test
+
+endif
+
+endif
+
+$(OBJDIR)/$(CONFIG)/test/core/end2end/h2_ssl_session_reuse_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
+
+deps_h2_ssl_session_reuse_test: $(H2_SSL_SESSION_REUSE_TEST_OBJS:.o=.dep)
+
+ifneq ($(NO_SECURE),true)
+ifneq ($(NO_DEPS),true)
+-include $(H2_SSL_SESSION_REUSE_TEST_OBJS:.o=.dep)
+endif
+endif
+
+
HEALTH_SERVICE_END2END_TEST_SRC = \
test/cpp/end2end/health_service_end2end_test.cc \
@@ -19003,49 +19144,6 @@ endif
endif
-STATUS_TEST_SRC = \
- test/cpp/util/status_test.cc \
-
-STATUS_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(STATUS_TEST_SRC))))
-ifeq ($(NO_SECURE),true)
-
-# You can't build secure targets if you don't have OpenSSL.
-
-$(BINDIR)/$(CONFIG)/status_test: openssl_dep_error
-
-else
-
-
-
-
-ifeq ($(NO_PROTOBUF),true)
-
-# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.0.0+.
-
-$(BINDIR)/$(CONFIG)/status_test: protobuf_dep_error
-
-else
-
-$(BINDIR)/$(CONFIG)/status_test: $(PROTOBUF_DEP) $(STATUS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.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) $(STATUS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/status_test
-
-endif
-
-endif
-
-$(OBJDIR)/$(CONFIG)/test/cpp/util/status_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
-
-deps_status_test: $(STATUS_TEST_OBJS:.o=.dep)
-
-ifneq ($(NO_SECURE),true)
-ifneq ($(NO_DEPS),true)
--include $(STATUS_TEST_OBJS:.o=.dep)
-endif
-endif
-
-
STATUS_UTIL_TEST_SRC = \
test/core/client_channel/status_util_test.cc \
@@ -23441,6 +23539,9 @@ src/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol.cc: $(OPE
src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.cc: $(OPENSSL_DEP)
src/core/tsi/alts_transport_security.cc: $(OPENSSL_DEP)
src/core/tsi/fake_transport_security.cc: $(OPENSSL_DEP)
+src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc: $(OPENSSL_DEP)
+src/core/tsi/ssl/session_cache/ssl_session_cache.cc: $(OPENSSL_DEP)
+src/core/tsi/ssl/session_cache/ssl_session_openssl.cc: $(OPENSSL_DEP)
src/core/tsi/ssl_transport_security.cc: $(OPENSSL_DEP)
src/core/tsi/transport_security.cc: $(OPENSSL_DEP)
src/core/tsi/transport_security_adapter.cc: $(OPENSSL_DEP)
diff --git a/bazel/grpc_build_system.bzl b/bazel/grpc_build_system.bzl
index 9194f37a17..571b29cc09 100644
--- a/bazel/grpc_build_system.bzl
+++ b/bazel/grpc_build_system.bzl
@@ -37,7 +37,7 @@ def _get_external_deps(external_deps):
ret = []
for dep in external_deps:
if dep == "nanopb":
- ret += ["//third_party/nanopb"]
+ ret += ["grpc_nanopb"]
elif dep == "cares":
ret += select({"//:grpc_no_ares": [],
"//conditions:default": ["//external:cares"],})
@@ -57,12 +57,6 @@ def _maybe_update_cc_library_hdrs(hdrs):
ret.append(h)
return ret
-def _maybe_update_cc_library_defines(name):
- ret = []
- if name == "alts_proto":
- ret += ["PB_FIELD_16BIT=1"]
- return ret
-
def grpc_cc_library(name, srcs = [], public_hdrs = [], hdrs = [],
external_deps = [], deps = [], standalone = False,
language = "C++", testonly = False, visibility = None,
@@ -70,11 +64,10 @@ def grpc_cc_library(name, srcs = [], public_hdrs = [], hdrs = [],
copts = []
if language.upper() == "C":
copts = if_not_windows(["-std=c99"])
- defines = _maybe_update_cc_library_defines(name)
native.cc_library(
name = name,
srcs = srcs,
- defines = defines + select({"//:grpc_no_ares": ["GRPC_ARES=0"],
+ defines = select({"//:grpc_no_ares": ["GRPC_ARES=0"],
"//conditions:default": [],}) +
select({"//:remote_execution": ["GRPC_PORT_ISOLATED_RUNTIME=1"],
"//conditions:default": [],}) +
@@ -162,7 +155,23 @@ def grpc_cc_binary(name, srcs = [], deps = [], external_deps = [], args = [], da
)
def grpc_generate_one_off_targets():
- pass
+ native.cc_library(
+ name = "grpc_nanopb",
+ hdrs = [
+ "//third_party/nanopb:pb.h",
+ "//third_party/nanopb:pb_common.h",
+ "//third_party/nanopb:pb_decode.h",
+ "//third_party/nanopb:pb_encode.h",
+ ],
+ srcs = [
+ "//third_party/nanopb:pb_common.c",
+ "//third_party/nanopb:pb_decode.c",
+ "//third_party/nanopb:pb_encode.c",
+ ],
+ defines = [
+ "PB_FIELD_16BIT=1",
+ ],
+ )
def grpc_sh_test(name, srcs, args = [], data = []):
native.sh_test(
diff --git a/build.yaml b/build.yaml
index 7a2d5cf884..8a58353a8d 100644
--- a/build.yaml
+++ b/build.yaml
@@ -269,6 +269,8 @@ filegroups:
- src/core/lib/iomgr/gethostname_sysconf.cc
- src/core/lib/iomgr/iocp_windows.cc
- src/core/lib/iomgr/iomgr.cc
+ - src/core/lib/iomgr/iomgr_custom.cc
+ - src/core/lib/iomgr/iomgr_internal.cc
- src/core/lib/iomgr/iomgr_posix.cc
- src/core/lib/iomgr/iomgr_uv.cc
- src/core/lib/iomgr/iomgr_windows.cc
@@ -277,12 +279,16 @@ filegroups:
- src/core/lib/iomgr/lockfree_event.cc
- src/core/lib/iomgr/network_status_tracker.cc
- src/core/lib/iomgr/polling_entity.cc
- - src/core/lib/iomgr/pollset_set_uv.cc
+ - src/core/lib/iomgr/pollset.cc
+ - src/core/lib/iomgr/pollset_custom.cc
+ - src/core/lib/iomgr/pollset_set.cc
+ - src/core/lib/iomgr/pollset_set_custom.cc
- src/core/lib/iomgr/pollset_set_windows.cc
- src/core/lib/iomgr/pollset_uv.cc
- src/core/lib/iomgr/pollset_windows.cc
+ - src/core/lib/iomgr/resolve_address.cc
+ - src/core/lib/iomgr/resolve_address_custom.cc
- src/core/lib/iomgr/resolve_address_posix.cc
- - src/core/lib/iomgr/resolve_address_uv.cc
- src/core/lib/iomgr/resolve_address_windows.cc
- src/core/lib/iomgr/resource_quota.cc
- src/core/lib/iomgr/sockaddr_utils.cc
@@ -294,19 +300,24 @@ filegroups:
- src/core/lib/iomgr/socket_utils_uv.cc
- src/core/lib/iomgr/socket_utils_windows.cc
- src/core/lib/iomgr/socket_windows.cc
+ - src/core/lib/iomgr/tcp_client.cc
+ - src/core/lib/iomgr/tcp_client_custom.cc
- src/core/lib/iomgr/tcp_client_posix.cc
- - src/core/lib/iomgr/tcp_client_uv.cc
- src/core/lib/iomgr/tcp_client_windows.cc
+ - src/core/lib/iomgr/tcp_custom.cc
- src/core/lib/iomgr/tcp_posix.cc
+ - src/core/lib/iomgr/tcp_server.cc
+ - src/core/lib/iomgr/tcp_server_custom.cc
- src/core/lib/iomgr/tcp_server_posix.cc
- src/core/lib/iomgr/tcp_server_utils_posix_common.cc
- src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc
- src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc
- - src/core/lib/iomgr/tcp_server_uv.cc
- src/core/lib/iomgr/tcp_server_windows.cc
- src/core/lib/iomgr/tcp_uv.cc
- src/core/lib/iomgr/tcp_windows.cc
- src/core/lib/iomgr/time_averaged_stats.cc
+ - src/core/lib/iomgr/timer.cc
+ - src/core/lib/iomgr/timer_custom.cc
- src/core/lib/iomgr/timer_generic.cc
- src/core/lib/iomgr/timer_heap.cc
- src/core/lib/iomgr/timer_manager.cc
@@ -427,9 +438,9 @@ filegroups:
- src/core/lib/iomgr/gethostname.h
- src/core/lib/iomgr/iocp_windows.h
- src/core/lib/iomgr/iomgr.h
+ - src/core/lib/iomgr/iomgr_custom.h
- src/core/lib/iomgr/iomgr_internal.h
- src/core/lib/iomgr/iomgr_posix.h
- - src/core/lib/iomgr/iomgr_uv.h
- src/core/lib/iomgr/is_epollexclusive_available.h
- src/core/lib/iomgr/load_file.h
- src/core/lib/iomgr/lockfree_event.h
@@ -437,14 +448,17 @@ filegroups:
- src/core/lib/iomgr/network_status_tracker.h
- src/core/lib/iomgr/polling_entity.h
- src/core/lib/iomgr/pollset.h
+ - src/core/lib/iomgr/pollset_custom.h
- src/core/lib/iomgr/pollset_set.h
+ - src/core/lib/iomgr/pollset_set_custom.h
- src/core/lib/iomgr/pollset_set_windows.h
- - src/core/lib/iomgr/pollset_uv.h
- src/core/lib/iomgr/pollset_windows.h
- src/core/lib/iomgr/port.h
- src/core/lib/iomgr/resolve_address.h
+ - src/core/lib/iomgr/resolve_address_custom.h
- src/core/lib/iomgr/resource_quota.h
- src/core/lib/iomgr/sockaddr.h
+ - src/core/lib/iomgr/sockaddr_custom.h
- src/core/lib/iomgr/sockaddr_posix.h
- src/core/lib/iomgr/sockaddr_utils.h
- src/core/lib/iomgr/sockaddr_windows.h
@@ -456,17 +470,16 @@ filegroups:
- src/core/lib/iomgr/sys_epoll_wrapper.h
- src/core/lib/iomgr/tcp_client.h
- src/core/lib/iomgr/tcp_client_posix.h
+ - src/core/lib/iomgr/tcp_custom.h
- src/core/lib/iomgr/tcp_posix.h
- src/core/lib/iomgr/tcp_server.h
- src/core/lib/iomgr/tcp_server_utils_posix.h
- - src/core/lib/iomgr/tcp_uv.h
- src/core/lib/iomgr/tcp_windows.h
- src/core/lib/iomgr/time_averaged_stats.h
- src/core/lib/iomgr/timer.h
- - src/core/lib/iomgr/timer_generic.h
+ - src/core/lib/iomgr/timer_custom.h
- src/core/lib/iomgr/timer_heap.h
- src/core/lib/iomgr/timer_manager.h
- - src/core/lib/iomgr/timer_uv.h
- src/core/lib/iomgr/udp_server.h
- src/core/lib/iomgr/unix_sockets_posix.h
- src/core/lib/iomgr/wakeup_fd_cv.h
@@ -1032,12 +1045,17 @@ filegroups:
headers:
- src/core/tsi/alts_transport_security.h
- src/core/tsi/fake_transport_security.h
+ - src/core/tsi/ssl/session_cache/ssl_session.h
+ - src/core/tsi/ssl/session_cache/ssl_session_cache.h
- src/core/tsi/ssl_transport_security.h
- src/core/tsi/ssl_types.h
- src/core/tsi/transport_security_grpc.h
src:
- src/core/tsi/alts_transport_security.cc
- src/core/tsi/fake_transport_security.cc
+ - src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc
+ - src/core/tsi/ssl/session_cache/ssl_session_cache.cc
+ - src/core/tsi/ssl/session_cache/ssl_session_openssl.cc
- src/core/tsi/ssl_transport_security.cc
- src/core/tsi/transport_security_grpc.cc
deps:
@@ -1379,9 +1397,13 @@ libs:
dll: true
filegroups:
- grpc_base
+ - grpc_base_headers
+ - grpc_deadline_filter
+ - grpc_message_size_filter
+ - grpc_server_load_reporting
- grpc_transport_cronet_client_secure
- grpc_transport_chttp2_client_secure
- - grpc_server_load_reporting
+ - grpc_transport_chttp2_server_secure
generate_plugin_registry: true
platforms:
- linux
@@ -1996,17 +2018,6 @@ targets:
- grpc_test_util
- grpc
uses_polling: false
-- name: byte_stream_test
- build: test
- language: c
- src:
- - test/core/transport/byte_stream_test.cc
- deps:
- - grpc_test_util
- - grpc
- - gpr_test_util
- - gpr
- uses_polling: false
- name: channel_create_test
build: test
language: c
@@ -4070,6 +4081,18 @@ targets:
- mac
- linux
- posix
+- name: byte_stream_test
+ gtest: true
+ build: test
+ language: c++
+ src:
+ - test/core/transport/byte_stream_test.cc
+ deps:
+ - grpc_test_util
+ - grpc
+ - gpr_test_util
+ - gpr
+ uses_polling: false
- name: channel_arguments_test
gtest: true
build: test
@@ -4517,6 +4540,22 @@ targets:
- gpr
uses:
- grpc++_test
+- name: h2_ssl_session_reuse_test
+ gtest: true
+ build: test
+ language: c++
+ headers:
+ - test/core/end2end/end2end_tests.h
+ src:
+ - test/core/end2end/h2_ssl_session_reuse_test.cc
+ deps:
+ - grpc_test_util
+ - grpc++
+ - grpc
+ - gpr_test_util
+ - gpr
+ uses:
+ - grpc++_test
- name: health_service_end2end_test
gtest: true
build: test
@@ -5107,18 +5146,6 @@ targets:
deps:
- grpc
uses_polling: false
-- name: status_test
- build: test
- language: c++
- src:
- - test/cpp/util/status_test.cc
- deps:
- - grpc_test_util
- - grpc++
- - grpc
- - gpr_test_util
- - gpr
- uses_polling: false
- name: status_util_test
gtest: true
cpu_cost: 0.1
@@ -5374,11 +5401,11 @@ configs:
DEFINES: NDEBUG
LDFLAGS: -rdynamic
noexcept:
- CPPFLAGS: -O2
+ CPPFLAGS: -O2 -Wframe-larger-than=16384
CXXFLAGS: -fno-exceptions
DEFINES: NDEBUG
opt:
- CPPFLAGS: -O2
+ CPPFLAGS: -O2 -Wframe-larger-than=16384
DEFINES: NDEBUG
stapprof:
CPPFLAGS: -O2 -DGRPC_STAP_PROFILER
diff --git a/config.m4 b/config.m4
index 756108ba3a..d72c019ec2 100644
--- a/config.m4
+++ b/config.m4
@@ -121,6 +121,8 @@ if test "$PHP_GRPC" != "no"; then
src/core/lib/iomgr/gethostname_sysconf.cc \
src/core/lib/iomgr/iocp_windows.cc \
src/core/lib/iomgr/iomgr.cc \
+ src/core/lib/iomgr/iomgr_custom.cc \
+ src/core/lib/iomgr/iomgr_internal.cc \
src/core/lib/iomgr/iomgr_posix.cc \
src/core/lib/iomgr/iomgr_uv.cc \
src/core/lib/iomgr/iomgr_windows.cc \
@@ -129,12 +131,16 @@ if test "$PHP_GRPC" != "no"; then
src/core/lib/iomgr/lockfree_event.cc \
src/core/lib/iomgr/network_status_tracker.cc \
src/core/lib/iomgr/polling_entity.cc \
- src/core/lib/iomgr/pollset_set_uv.cc \
+ src/core/lib/iomgr/pollset.cc \
+ src/core/lib/iomgr/pollset_custom.cc \
+ src/core/lib/iomgr/pollset_set.cc \
+ src/core/lib/iomgr/pollset_set_custom.cc \
src/core/lib/iomgr/pollset_set_windows.cc \
src/core/lib/iomgr/pollset_uv.cc \
src/core/lib/iomgr/pollset_windows.cc \
+ src/core/lib/iomgr/resolve_address.cc \
+ src/core/lib/iomgr/resolve_address_custom.cc \
src/core/lib/iomgr/resolve_address_posix.cc \
- src/core/lib/iomgr/resolve_address_uv.cc \
src/core/lib/iomgr/resolve_address_windows.cc \
src/core/lib/iomgr/resource_quota.cc \
src/core/lib/iomgr/sockaddr_utils.cc \
@@ -146,19 +152,24 @@ if test "$PHP_GRPC" != "no"; then
src/core/lib/iomgr/socket_utils_uv.cc \
src/core/lib/iomgr/socket_utils_windows.cc \
src/core/lib/iomgr/socket_windows.cc \
+ src/core/lib/iomgr/tcp_client.cc \
+ src/core/lib/iomgr/tcp_client_custom.cc \
src/core/lib/iomgr/tcp_client_posix.cc \
- src/core/lib/iomgr/tcp_client_uv.cc \
src/core/lib/iomgr/tcp_client_windows.cc \
+ src/core/lib/iomgr/tcp_custom.cc \
src/core/lib/iomgr/tcp_posix.cc \
+ src/core/lib/iomgr/tcp_server.cc \
+ src/core/lib/iomgr/tcp_server_custom.cc \
src/core/lib/iomgr/tcp_server_posix.cc \
src/core/lib/iomgr/tcp_server_utils_posix_common.cc \
src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc \
src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc \
- src/core/lib/iomgr/tcp_server_uv.cc \
src/core/lib/iomgr/tcp_server_windows.cc \
src/core/lib/iomgr/tcp_uv.cc \
src/core/lib/iomgr/tcp_windows.cc \
src/core/lib/iomgr/time_averaged_stats.cc \
+ src/core/lib/iomgr/timer.cc \
+ src/core/lib/iomgr/timer_custom.cc \
src/core/lib/iomgr/timer_generic.cc \
src/core/lib/iomgr/timer_heap.cc \
src/core/lib/iomgr/timer_manager.cc \
@@ -332,6 +343,9 @@ if test "$PHP_GRPC" != "no"; then
src/core/ext/filters/deadline/deadline_filter.cc \
src/core/tsi/alts_transport_security.cc \
src/core/tsi/fake_transport_security.cc \
+ src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc \
+ src/core/tsi/ssl/session_cache/ssl_session_cache.cc \
+ src/core/tsi/ssl/session_cache/ssl_session_openssl.cc \
src/core/tsi/ssl_transport_security.cc \
src/core/tsi/transport_security_grpc.cc \
src/core/ext/transport/chttp2/server/chttp2_server.cc \
@@ -690,6 +704,7 @@ if test "$PHP_GRPC" != "no"; then
PHP_ADD_BUILD_DIR($ext_builddir/src/core/tsi/alts/frame_protector)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/tsi/alts/handshaker)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/tsi/alts/zero_copy_frame_protector)
+ PHP_ADD_BUILD_DIR($ext_builddir/src/core/tsi/ssl/session_cache)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/asn1)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/base64)
diff --git a/config.w32 b/config.w32
index 755dd08007..527057f2c1 100644
--- a/config.w32
+++ b/config.w32
@@ -98,6 +98,8 @@ if (PHP_GRPC != "no") {
"src\\core\\lib\\iomgr\\gethostname_sysconf.cc " +
"src\\core\\lib\\iomgr\\iocp_windows.cc " +
"src\\core\\lib\\iomgr\\iomgr.cc " +
+ "src\\core\\lib\\iomgr\\iomgr_custom.cc " +
+ "src\\core\\lib\\iomgr\\iomgr_internal.cc " +
"src\\core\\lib\\iomgr\\iomgr_posix.cc " +
"src\\core\\lib\\iomgr\\iomgr_uv.cc " +
"src\\core\\lib\\iomgr\\iomgr_windows.cc " +
@@ -106,12 +108,16 @@ if (PHP_GRPC != "no") {
"src\\core\\lib\\iomgr\\lockfree_event.cc " +
"src\\core\\lib\\iomgr\\network_status_tracker.cc " +
"src\\core\\lib\\iomgr\\polling_entity.cc " +
- "src\\core\\lib\\iomgr\\pollset_set_uv.cc " +
+ "src\\core\\lib\\iomgr\\pollset.cc " +
+ "src\\core\\lib\\iomgr\\pollset_custom.cc " +
+ "src\\core\\lib\\iomgr\\pollset_set.cc " +
+ "src\\core\\lib\\iomgr\\pollset_set_custom.cc " +
"src\\core\\lib\\iomgr\\pollset_set_windows.cc " +
"src\\core\\lib\\iomgr\\pollset_uv.cc " +
"src\\core\\lib\\iomgr\\pollset_windows.cc " +
+ "src\\core\\lib\\iomgr\\resolve_address.cc " +
+ "src\\core\\lib\\iomgr\\resolve_address_custom.cc " +
"src\\core\\lib\\iomgr\\resolve_address_posix.cc " +
- "src\\core\\lib\\iomgr\\resolve_address_uv.cc " +
"src\\core\\lib\\iomgr\\resolve_address_windows.cc " +
"src\\core\\lib\\iomgr\\resource_quota.cc " +
"src\\core\\lib\\iomgr\\sockaddr_utils.cc " +
@@ -123,19 +129,24 @@ if (PHP_GRPC != "no") {
"src\\core\\lib\\iomgr\\socket_utils_uv.cc " +
"src\\core\\lib\\iomgr\\socket_utils_windows.cc " +
"src\\core\\lib\\iomgr\\socket_windows.cc " +
+ "src\\core\\lib\\iomgr\\tcp_client.cc " +
+ "src\\core\\lib\\iomgr\\tcp_client_custom.cc " +
"src\\core\\lib\\iomgr\\tcp_client_posix.cc " +
- "src\\core\\lib\\iomgr\\tcp_client_uv.cc " +
"src\\core\\lib\\iomgr\\tcp_client_windows.cc " +
+ "src\\core\\lib\\iomgr\\tcp_custom.cc " +
"src\\core\\lib\\iomgr\\tcp_posix.cc " +
+ "src\\core\\lib\\iomgr\\tcp_server.cc " +
+ "src\\core\\lib\\iomgr\\tcp_server_custom.cc " +
"src\\core\\lib\\iomgr\\tcp_server_posix.cc " +
"src\\core\\lib\\iomgr\\tcp_server_utils_posix_common.cc " +
"src\\core\\lib\\iomgr\\tcp_server_utils_posix_ifaddrs.cc " +
"src\\core\\lib\\iomgr\\tcp_server_utils_posix_noifaddrs.cc " +
- "src\\core\\lib\\iomgr\\tcp_server_uv.cc " +
"src\\core\\lib\\iomgr\\tcp_server_windows.cc " +
"src\\core\\lib\\iomgr\\tcp_uv.cc " +
"src\\core\\lib\\iomgr\\tcp_windows.cc " +
"src\\core\\lib\\iomgr\\time_averaged_stats.cc " +
+ "src\\core\\lib\\iomgr\\timer.cc " +
+ "src\\core\\lib\\iomgr\\timer_custom.cc " +
"src\\core\\lib\\iomgr\\timer_generic.cc " +
"src\\core\\lib\\iomgr\\timer_heap.cc " +
"src\\core\\lib\\iomgr\\timer_manager.cc " +
@@ -309,6 +320,9 @@ if (PHP_GRPC != "no") {
"src\\core\\ext\\filters\\deadline\\deadline_filter.cc " +
"src\\core\\tsi\\alts_transport_security.cc " +
"src\\core\\tsi\\fake_transport_security.cc " +
+ "src\\core\\tsi\\ssl\\session_cache\\ssl_session_boringssl.cc " +
+ "src\\core\\tsi\\ssl\\session_cache\\ssl_session_cache.cc " +
+ "src\\core\\tsi\\ssl\\session_cache\\ssl_session_openssl.cc " +
"src\\core\\tsi\\ssl_transport_security.cc " +
"src\\core\\tsi\\transport_security_grpc.cc " +
"src\\core\\ext\\transport\\chttp2\\server\\chttp2_server.cc " +
@@ -704,6 +718,8 @@ if (PHP_GRPC != "no") {
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\tsi\\alts\\frame_protector");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\tsi\\alts\\handshaker");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\tsi\\alts\\zero_copy_frame_protector");
+ FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\tsi\\ssl");
+ FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\tsi\\ssl\\session_cache");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\php");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\php\\ext");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\php\\ext\\grpc");
diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec
index ae68984e65..afc26f55cc 100644
--- a/gRPC-C++.podspec
+++ b/gRPC-C++.podspec
@@ -333,6 +333,8 @@ Pod::Spec.new do |s|
'src/core/ext/filters/deadline/deadline_filter.h',
'src/core/tsi/alts_transport_security.h',
'src/core/tsi/fake_transport_security.h',
+ 'src/core/tsi/ssl/session_cache/ssl_session.h',
+ 'src/core/tsi/ssl/session_cache/ssl_session_cache.h',
'src/core/tsi/ssl_transport_security.h',
'src/core/tsi/ssl_types.h',
'src/core/tsi/transport_security_grpc.h',
@@ -382,9 +384,9 @@ Pod::Spec.new do |s|
'src/core/lib/iomgr/gethostname.h',
'src/core/lib/iomgr/iocp_windows.h',
'src/core/lib/iomgr/iomgr.h',
+ 'src/core/lib/iomgr/iomgr_custom.h',
'src/core/lib/iomgr/iomgr_internal.h',
'src/core/lib/iomgr/iomgr_posix.h',
- 'src/core/lib/iomgr/iomgr_uv.h',
'src/core/lib/iomgr/is_epollexclusive_available.h',
'src/core/lib/iomgr/load_file.h',
'src/core/lib/iomgr/lockfree_event.h',
@@ -392,14 +394,17 @@ Pod::Spec.new do |s|
'src/core/lib/iomgr/network_status_tracker.h',
'src/core/lib/iomgr/polling_entity.h',
'src/core/lib/iomgr/pollset.h',
+ 'src/core/lib/iomgr/pollset_custom.h',
'src/core/lib/iomgr/pollset_set.h',
+ 'src/core/lib/iomgr/pollset_set_custom.h',
'src/core/lib/iomgr/pollset_set_windows.h',
- 'src/core/lib/iomgr/pollset_uv.h',
'src/core/lib/iomgr/pollset_windows.h',
'src/core/lib/iomgr/port.h',
'src/core/lib/iomgr/resolve_address.h',
+ 'src/core/lib/iomgr/resolve_address_custom.h',
'src/core/lib/iomgr/resource_quota.h',
'src/core/lib/iomgr/sockaddr.h',
+ 'src/core/lib/iomgr/sockaddr_custom.h',
'src/core/lib/iomgr/sockaddr_posix.h',
'src/core/lib/iomgr/sockaddr_utils.h',
'src/core/lib/iomgr/sockaddr_windows.h',
@@ -411,17 +416,16 @@ Pod::Spec.new do |s|
'src/core/lib/iomgr/sys_epoll_wrapper.h',
'src/core/lib/iomgr/tcp_client.h',
'src/core/lib/iomgr/tcp_client_posix.h',
+ 'src/core/lib/iomgr/tcp_custom.h',
'src/core/lib/iomgr/tcp_posix.h',
'src/core/lib/iomgr/tcp_server.h',
'src/core/lib/iomgr/tcp_server_utils_posix.h',
- 'src/core/lib/iomgr/tcp_uv.h',
'src/core/lib/iomgr/tcp_windows.h',
'src/core/lib/iomgr/time_averaged_stats.h',
'src/core/lib/iomgr/timer.h',
- 'src/core/lib/iomgr/timer_generic.h',
+ 'src/core/lib/iomgr/timer_custom.h',
'src/core/lib/iomgr/timer_heap.h',
'src/core/lib/iomgr/timer_manager.h',
- 'src/core/lib/iomgr/timer_uv.h',
'src/core/lib/iomgr/udp_server.h',
'src/core/lib/iomgr/unix_sockets_posix.h',
'src/core/lib/iomgr/wakeup_fd_cv.h',
@@ -562,9 +566,9 @@ Pod::Spec.new do |s|
'src/core/lib/iomgr/gethostname.h',
'src/core/lib/iomgr/iocp_windows.h',
'src/core/lib/iomgr/iomgr.h',
+ 'src/core/lib/iomgr/iomgr_custom.h',
'src/core/lib/iomgr/iomgr_internal.h',
'src/core/lib/iomgr/iomgr_posix.h',
- 'src/core/lib/iomgr/iomgr_uv.h',
'src/core/lib/iomgr/is_epollexclusive_available.h',
'src/core/lib/iomgr/load_file.h',
'src/core/lib/iomgr/lockfree_event.h',
@@ -572,14 +576,17 @@ Pod::Spec.new do |s|
'src/core/lib/iomgr/network_status_tracker.h',
'src/core/lib/iomgr/polling_entity.h',
'src/core/lib/iomgr/pollset.h',
+ 'src/core/lib/iomgr/pollset_custom.h',
'src/core/lib/iomgr/pollset_set.h',
+ 'src/core/lib/iomgr/pollset_set_custom.h',
'src/core/lib/iomgr/pollset_set_windows.h',
- 'src/core/lib/iomgr/pollset_uv.h',
'src/core/lib/iomgr/pollset_windows.h',
'src/core/lib/iomgr/port.h',
'src/core/lib/iomgr/resolve_address.h',
+ 'src/core/lib/iomgr/resolve_address_custom.h',
'src/core/lib/iomgr/resource_quota.h',
'src/core/lib/iomgr/sockaddr.h',
+ 'src/core/lib/iomgr/sockaddr_custom.h',
'src/core/lib/iomgr/sockaddr_posix.h',
'src/core/lib/iomgr/sockaddr_utils.h',
'src/core/lib/iomgr/sockaddr_windows.h',
@@ -591,17 +598,16 @@ Pod::Spec.new do |s|
'src/core/lib/iomgr/sys_epoll_wrapper.h',
'src/core/lib/iomgr/tcp_client.h',
'src/core/lib/iomgr/tcp_client_posix.h',
+ 'src/core/lib/iomgr/tcp_custom.h',
'src/core/lib/iomgr/tcp_posix.h',
'src/core/lib/iomgr/tcp_server.h',
'src/core/lib/iomgr/tcp_server_utils_posix.h',
- 'src/core/lib/iomgr/tcp_uv.h',
'src/core/lib/iomgr/tcp_windows.h',
'src/core/lib/iomgr/time_averaged_stats.h',
'src/core/lib/iomgr/timer.h',
- 'src/core/lib/iomgr/timer_generic.h',
+ 'src/core/lib/iomgr/timer_custom.h',
'src/core/lib/iomgr/timer_heap.h',
'src/core/lib/iomgr/timer_manager.h',
- 'src/core/lib/iomgr/timer_uv.h',
'src/core/lib/iomgr/udp_server.h',
'src/core/lib/iomgr/unix_sockets_posix.h',
'src/core/lib/iomgr/wakeup_fd_cv.h',
diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec
index e469a99b67..f7fffd2f9b 100644
--- a/gRPC-Core.podspec
+++ b/gRPC-Core.podspec
@@ -182,7 +182,6 @@ Pod::Spec.new do |s|
ss.dependency 'BoringSSL', '~> 10.0'
ss.dependency 'nanopb', '~> 0.3'
- # To save you from scrolling, this is the last part of the podspec.
ss.source_files = 'src/core/lib/gpr/arena.h',
'src/core/lib/gpr/env.h',
'src/core/lib/gpr/fork.h',
@@ -344,6 +343,8 @@ Pod::Spec.new do |s|
'src/core/ext/filters/deadline/deadline_filter.h',
'src/core/tsi/alts_transport_security.h',
'src/core/tsi/fake_transport_security.h',
+ 'src/core/tsi/ssl/session_cache/ssl_session.h',
+ 'src/core/tsi/ssl/session_cache/ssl_session_cache.h',
'src/core/tsi/ssl_transport_security.h',
'src/core/tsi/ssl_types.h',
'src/core/tsi/transport_security_grpc.h',
@@ -393,9 +394,9 @@ Pod::Spec.new do |s|
'src/core/lib/iomgr/gethostname.h',
'src/core/lib/iomgr/iocp_windows.h',
'src/core/lib/iomgr/iomgr.h',
+ 'src/core/lib/iomgr/iomgr_custom.h',
'src/core/lib/iomgr/iomgr_internal.h',
'src/core/lib/iomgr/iomgr_posix.h',
- 'src/core/lib/iomgr/iomgr_uv.h',
'src/core/lib/iomgr/is_epollexclusive_available.h',
'src/core/lib/iomgr/load_file.h',
'src/core/lib/iomgr/lockfree_event.h',
@@ -403,14 +404,17 @@ Pod::Spec.new do |s|
'src/core/lib/iomgr/network_status_tracker.h',
'src/core/lib/iomgr/polling_entity.h',
'src/core/lib/iomgr/pollset.h',
+ 'src/core/lib/iomgr/pollset_custom.h',
'src/core/lib/iomgr/pollset_set.h',
+ 'src/core/lib/iomgr/pollset_set_custom.h',
'src/core/lib/iomgr/pollset_set_windows.h',
- 'src/core/lib/iomgr/pollset_uv.h',
'src/core/lib/iomgr/pollset_windows.h',
'src/core/lib/iomgr/port.h',
'src/core/lib/iomgr/resolve_address.h',
+ 'src/core/lib/iomgr/resolve_address_custom.h',
'src/core/lib/iomgr/resource_quota.h',
'src/core/lib/iomgr/sockaddr.h',
+ 'src/core/lib/iomgr/sockaddr_custom.h',
'src/core/lib/iomgr/sockaddr_posix.h',
'src/core/lib/iomgr/sockaddr_utils.h',
'src/core/lib/iomgr/sockaddr_windows.h',
@@ -422,17 +426,16 @@ Pod::Spec.new do |s|
'src/core/lib/iomgr/sys_epoll_wrapper.h',
'src/core/lib/iomgr/tcp_client.h',
'src/core/lib/iomgr/tcp_client_posix.h',
+ 'src/core/lib/iomgr/tcp_custom.h',
'src/core/lib/iomgr/tcp_posix.h',
'src/core/lib/iomgr/tcp_server.h',
'src/core/lib/iomgr/tcp_server_utils_posix.h',
- 'src/core/lib/iomgr/tcp_uv.h',
'src/core/lib/iomgr/tcp_windows.h',
'src/core/lib/iomgr/time_averaged_stats.h',
'src/core/lib/iomgr/timer.h',
- 'src/core/lib/iomgr/timer_generic.h',
+ 'src/core/lib/iomgr/timer_custom.h',
'src/core/lib/iomgr/timer_heap.h',
'src/core/lib/iomgr/timer_manager.h',
- 'src/core/lib/iomgr/timer_uv.h',
'src/core/lib/iomgr/udp_server.h',
'src/core/lib/iomgr/unix_sockets_posix.h',
'src/core/lib/iomgr/wakeup_fd_cv.h',
@@ -536,6 +539,8 @@ Pod::Spec.new do |s|
'src/core/lib/iomgr/gethostname_sysconf.cc',
'src/core/lib/iomgr/iocp_windows.cc',
'src/core/lib/iomgr/iomgr.cc',
+ 'src/core/lib/iomgr/iomgr_custom.cc',
+ 'src/core/lib/iomgr/iomgr_internal.cc',
'src/core/lib/iomgr/iomgr_posix.cc',
'src/core/lib/iomgr/iomgr_uv.cc',
'src/core/lib/iomgr/iomgr_windows.cc',
@@ -544,12 +549,16 @@ Pod::Spec.new do |s|
'src/core/lib/iomgr/lockfree_event.cc',
'src/core/lib/iomgr/network_status_tracker.cc',
'src/core/lib/iomgr/polling_entity.cc',
- 'src/core/lib/iomgr/pollset_set_uv.cc',
+ 'src/core/lib/iomgr/pollset.cc',
+ 'src/core/lib/iomgr/pollset_custom.cc',
+ 'src/core/lib/iomgr/pollset_set.cc',
+ 'src/core/lib/iomgr/pollset_set_custom.cc',
'src/core/lib/iomgr/pollset_set_windows.cc',
'src/core/lib/iomgr/pollset_uv.cc',
'src/core/lib/iomgr/pollset_windows.cc',
+ 'src/core/lib/iomgr/resolve_address.cc',
+ 'src/core/lib/iomgr/resolve_address_custom.cc',
'src/core/lib/iomgr/resolve_address_posix.cc',
- 'src/core/lib/iomgr/resolve_address_uv.cc',
'src/core/lib/iomgr/resolve_address_windows.cc',
'src/core/lib/iomgr/resource_quota.cc',
'src/core/lib/iomgr/sockaddr_utils.cc',
@@ -561,19 +570,24 @@ Pod::Spec.new do |s|
'src/core/lib/iomgr/socket_utils_uv.cc',
'src/core/lib/iomgr/socket_utils_windows.cc',
'src/core/lib/iomgr/socket_windows.cc',
+ 'src/core/lib/iomgr/tcp_client.cc',
+ 'src/core/lib/iomgr/tcp_client_custom.cc',
'src/core/lib/iomgr/tcp_client_posix.cc',
- 'src/core/lib/iomgr/tcp_client_uv.cc',
'src/core/lib/iomgr/tcp_client_windows.cc',
+ 'src/core/lib/iomgr/tcp_custom.cc',
'src/core/lib/iomgr/tcp_posix.cc',
+ 'src/core/lib/iomgr/tcp_server.cc',
+ 'src/core/lib/iomgr/tcp_server_custom.cc',
'src/core/lib/iomgr/tcp_server_posix.cc',
'src/core/lib/iomgr/tcp_server_utils_posix_common.cc',
'src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc',
'src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc',
- 'src/core/lib/iomgr/tcp_server_uv.cc',
'src/core/lib/iomgr/tcp_server_windows.cc',
'src/core/lib/iomgr/tcp_uv.cc',
'src/core/lib/iomgr/tcp_windows.cc',
'src/core/lib/iomgr/time_averaged_stats.cc',
+ 'src/core/lib/iomgr/timer.cc',
+ 'src/core/lib/iomgr/timer_custom.cc',
'src/core/lib/iomgr/timer_generic.cc',
'src/core/lib/iomgr/timer_heap.cc',
'src/core/lib/iomgr/timer_manager.cc',
@@ -744,6 +758,9 @@ Pod::Spec.new do |s|
'src/core/ext/filters/deadline/deadline_filter.cc',
'src/core/tsi/alts_transport_security.cc',
'src/core/tsi/fake_transport_security.cc',
+ 'src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc',
+ 'src/core/tsi/ssl/session_cache/ssl_session_cache.cc',
+ 'src/core/tsi/ssl/session_cache/ssl_session_openssl.cc',
'src/core/tsi/ssl_transport_security.cc',
'src/core/tsi/transport_security_grpc.cc',
'src/core/ext/transport/chttp2/server/chttp2_server.cc',
@@ -900,6 +917,8 @@ Pod::Spec.new do |s|
'src/core/ext/filters/deadline/deadline_filter.h',
'src/core/tsi/alts_transport_security.h',
'src/core/tsi/fake_transport_security.h',
+ 'src/core/tsi/ssl/session_cache/ssl_session.h',
+ 'src/core/tsi/ssl/session_cache/ssl_session_cache.h',
'src/core/tsi/ssl_transport_security.h',
'src/core/tsi/ssl_types.h',
'src/core/tsi/transport_security_grpc.h',
@@ -949,9 +968,9 @@ Pod::Spec.new do |s|
'src/core/lib/iomgr/gethostname.h',
'src/core/lib/iomgr/iocp_windows.h',
'src/core/lib/iomgr/iomgr.h',
+ 'src/core/lib/iomgr/iomgr_custom.h',
'src/core/lib/iomgr/iomgr_internal.h',
'src/core/lib/iomgr/iomgr_posix.h',
- 'src/core/lib/iomgr/iomgr_uv.h',
'src/core/lib/iomgr/is_epollexclusive_available.h',
'src/core/lib/iomgr/load_file.h',
'src/core/lib/iomgr/lockfree_event.h',
@@ -959,14 +978,17 @@ Pod::Spec.new do |s|
'src/core/lib/iomgr/network_status_tracker.h',
'src/core/lib/iomgr/polling_entity.h',
'src/core/lib/iomgr/pollset.h',
+ 'src/core/lib/iomgr/pollset_custom.h',
'src/core/lib/iomgr/pollset_set.h',
+ 'src/core/lib/iomgr/pollset_set_custom.h',
'src/core/lib/iomgr/pollset_set_windows.h',
- 'src/core/lib/iomgr/pollset_uv.h',
'src/core/lib/iomgr/pollset_windows.h',
'src/core/lib/iomgr/port.h',
'src/core/lib/iomgr/resolve_address.h',
+ 'src/core/lib/iomgr/resolve_address_custom.h',
'src/core/lib/iomgr/resource_quota.h',
'src/core/lib/iomgr/sockaddr.h',
+ 'src/core/lib/iomgr/sockaddr_custom.h',
'src/core/lib/iomgr/sockaddr_posix.h',
'src/core/lib/iomgr/sockaddr_utils.h',
'src/core/lib/iomgr/sockaddr_windows.h',
@@ -978,17 +1000,16 @@ Pod::Spec.new do |s|
'src/core/lib/iomgr/sys_epoll_wrapper.h',
'src/core/lib/iomgr/tcp_client.h',
'src/core/lib/iomgr/tcp_client_posix.h',
+ 'src/core/lib/iomgr/tcp_custom.h',
'src/core/lib/iomgr/tcp_posix.h',
'src/core/lib/iomgr/tcp_server.h',
'src/core/lib/iomgr/tcp_server_utils_posix.h',
- 'src/core/lib/iomgr/tcp_uv.h',
'src/core/lib/iomgr/tcp_windows.h',
'src/core/lib/iomgr/time_averaged_stats.h',
'src/core/lib/iomgr/timer.h',
- 'src/core/lib/iomgr/timer_generic.h',
+ 'src/core/lib/iomgr/timer_custom.h',
'src/core/lib/iomgr/timer_heap.h',
'src/core/lib/iomgr/timer_manager.h',
- 'src/core/lib/iomgr/timer_uv.h',
'src/core/lib/iomgr/udp_server.h',
'src/core/lib/iomgr/unix_sockets_posix.h',
'src/core/lib/iomgr/wakeup_fd_cv.h',
@@ -1053,34 +1074,932 @@ Pod::Spec.new do |s|
s.subspec 'Cronet-Interface' do |ss|
ss.header_mappings_dir = 'include/grpc'
- ss.source_files = 'include/grpc/grpc_cronet.h'
+ ss.source_files = 'include/grpc/support/alloc.h',
+ 'include/grpc/support/atm.h',
+ 'include/grpc/support/atm_gcc_atomic.h',
+ 'include/grpc/support/atm_gcc_sync.h',
+ 'include/grpc/support/atm_windows.h',
+ 'include/grpc/support/cpu.h',
+ 'include/grpc/support/log.h',
+ 'include/grpc/support/log_windows.h',
+ 'include/grpc/support/port_platform.h',
+ 'include/grpc/support/string_util.h',
+ 'include/grpc/support/sync.h',
+ 'include/grpc/support/sync_custom.h',
+ 'include/grpc/support/sync_generic.h',
+ 'include/grpc/support/sync_posix.h',
+ 'include/grpc/support/sync_windows.h',
+ 'include/grpc/support/thd_id.h',
+ 'include/grpc/support/time.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/fork.h',
+ 'include/grpc/impl/codegen/gpr_slice.h',
+ 'include/grpc/impl/codegen/gpr_types.h',
+ 'include/grpc/impl/codegen/port_platform.h',
+ 'include/grpc/impl/codegen/sync.h',
+ 'include/grpc/impl/codegen/sync_custom.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/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/slice.h',
+ 'include/grpc/impl/codegen/status.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/fork.h',
+ 'include/grpc/impl/codegen/gpr_slice.h',
+ 'include/grpc/impl/codegen/gpr_types.h',
+ 'include/grpc/impl/codegen/port_platform.h',
+ 'include/grpc/impl/codegen/sync.h',
+ 'include/grpc/impl/codegen/sync_custom.h',
+ 'include/grpc/impl/codegen/sync_generic.h',
+ 'include/grpc/impl/codegen/sync_posix.h',
+ 'include/grpc/impl/codegen/sync_windows.h',
+ 'include/grpc/byte_buffer.h',
+ 'include/grpc/byte_buffer_reader.h',
+ 'include/grpc/compression.h',
+ 'include/grpc/fork.h',
+ 'include/grpc/grpc.h',
+ 'include/grpc/grpc_posix.h',
+ 'include/grpc/grpc_security_constants.h',
+ 'include/grpc/load_reporting.h',
+ 'include/grpc/slice.h',
+ 'include/grpc/slice_buffer.h',
+ 'include/grpc/status.h',
+ 'include/grpc/support/workaround_list.h',
+ 'include/grpc/grpc_cronet.h',
+ 'include/grpc/grpc_security.h'
end
s.subspec 'Cronet-Implementation' do |ss|
ss.header_mappings_dir = '.'
-
- ss.dependency "#{s.name}/Interface", version
- ss.dependency "#{s.name}/Implementation", version
+ ss.libraries = 'z'
ss.dependency "#{s.name}/Cronet-Interface", version
+ ss.dependency 'BoringSSL', '~> 10.0'
+ ss.dependency 'nanopb', '~> 0.3'
- ss.source_files = 'src/core/ext/transport/cronet/client/secure/cronet_channel_create.cc',
- 'src/core/ext/transport/cronet/transport/cronet_transport.cc',
- 'third_party/nanopb/pb_common.c',
- 'third_party/nanopb/pb_decode.c',
- 'third_party/nanopb/pb_encode.c',
+ ss.source_files = 'src/core/lib/gpr/arena.h',
+ 'src/core/lib/gpr/env.h',
+ 'src/core/lib/gpr/fork.h',
+ 'src/core/lib/gpr/host_port.h',
+ 'src/core/lib/gpr/mpscq.h',
+ 'src/core/lib/gpr/murmur_hash.h',
+ 'src/core/lib/gpr/spinlock.h',
+ 'src/core/lib/gpr/string.h',
+ 'src/core/lib/gpr/string_windows.h',
+ 'src/core/lib/gpr/time_precise.h',
+ 'src/core/lib/gpr/tls.h',
+ 'src/core/lib/gpr/tls_gcc.h',
+ 'src/core/lib/gpr/tls_msvc.h',
+ 'src/core/lib/gpr/tls_pthread.h',
+ 'src/core/lib/gpr/tmpfile.h',
+ 'src/core/lib/gpr/useful.h',
+ 'src/core/lib/gprpp/abstract.h',
+ 'src/core/lib/gprpp/atomic.h',
+ 'src/core/lib/gprpp/atomic_with_atm.h',
+ 'src/core/lib/gprpp/atomic_with_std.h',
+ 'src/core/lib/gprpp/manual_constructor.h',
+ 'src/core/lib/gprpp/memory.h',
+ 'src/core/lib/gprpp/thd.h',
+ 'src/core/lib/profiling/timers.h',
+ 'src/core/lib/gpr/alloc.cc',
+ 'src/core/lib/gpr/arena.cc',
+ 'src/core/lib/gpr/atm.cc',
+ 'src/core/lib/gpr/cpu_iphone.cc',
+ 'src/core/lib/gpr/cpu_linux.cc',
+ 'src/core/lib/gpr/cpu_posix.cc',
+ 'src/core/lib/gpr/cpu_windows.cc',
+ 'src/core/lib/gpr/env_linux.cc',
+ 'src/core/lib/gpr/env_posix.cc',
+ 'src/core/lib/gpr/env_windows.cc',
+ 'src/core/lib/gpr/fork.cc',
+ 'src/core/lib/gpr/host_port.cc',
+ 'src/core/lib/gpr/log.cc',
+ 'src/core/lib/gpr/log_android.cc',
+ 'src/core/lib/gpr/log_linux.cc',
+ 'src/core/lib/gpr/log_posix.cc',
+ 'src/core/lib/gpr/log_windows.cc',
+ 'src/core/lib/gpr/mpscq.cc',
+ 'src/core/lib/gpr/murmur_hash.cc',
+ 'src/core/lib/gpr/string.cc',
+ 'src/core/lib/gpr/string_posix.cc',
+ 'src/core/lib/gpr/string_util_windows.cc',
+ 'src/core/lib/gpr/string_windows.cc',
+ 'src/core/lib/gpr/sync.cc',
+ 'src/core/lib/gpr/sync_posix.cc',
+ 'src/core/lib/gpr/sync_windows.cc',
+ 'src/core/lib/gpr/time.cc',
+ 'src/core/lib/gpr/time_posix.cc',
+ 'src/core/lib/gpr/time_precise.cc',
+ 'src/core/lib/gpr/time_windows.cc',
+ 'src/core/lib/gpr/tls_pthread.cc',
+ 'src/core/lib/gpr/tmpfile_msys.cc',
+ 'src/core/lib/gpr/tmpfile_posix.cc',
+ 'src/core/lib/gpr/tmpfile_windows.cc',
+ 'src/core/lib/gpr/wrap_memcpy.cc',
+ 'src/core/lib/gprpp/thd_posix.cc',
+ 'src/core/lib/gprpp/thd_windows.cc',
+ 'src/core/lib/profiling/basic_timers.cc',
+ 'src/core/lib/profiling/stap_timers.cc',
+ 'src/core/lib/avl/avl.h',
+ 'src/core/lib/backoff/backoff.h',
+ 'src/core/lib/channel/channel_args.h',
+ 'src/core/lib/channel/channel_stack.h',
+ 'src/core/lib/channel/channel_stack_builder.h',
+ 'src/core/lib/channel/connected_channel.h',
+ 'src/core/lib/channel/context.h',
+ 'src/core/lib/channel/handshaker.h',
+ 'src/core/lib/channel/handshaker_factory.h',
+ 'src/core/lib/channel/handshaker_registry.h',
+ 'src/core/lib/compression/algorithm_metadata.h',
+ 'src/core/lib/compression/compression_internal.h',
+ 'src/core/lib/compression/message_compress.h',
+ 'src/core/lib/compression/stream_compression.h',
+ 'src/core/lib/compression/stream_compression_gzip.h',
+ 'src/core/lib/compression/stream_compression_identity.h',
+ 'src/core/lib/debug/stats.h',
+ 'src/core/lib/debug/stats_data.h',
+ 'src/core/lib/gprpp/debug_location.h',
+ 'src/core/lib/gprpp/inlined_vector.h',
+ 'src/core/lib/gprpp/orphanable.h',
+ 'src/core/lib/gprpp/ref_counted.h',
+ 'src/core/lib/gprpp/ref_counted_ptr.h',
+ 'src/core/lib/http/format_request.h',
+ 'src/core/lib/http/httpcli.h',
+ 'src/core/lib/http/parser.h',
+ 'src/core/lib/iomgr/block_annotate.h',
+ 'src/core/lib/iomgr/call_combiner.h',
+ 'src/core/lib/iomgr/closure.h',
+ 'src/core/lib/iomgr/combiner.h',
+ 'src/core/lib/iomgr/endpoint.h',
+ 'src/core/lib/iomgr/endpoint_pair.h',
+ 'src/core/lib/iomgr/error.h',
+ 'src/core/lib/iomgr/error_internal.h',
+ 'src/core/lib/iomgr/ev_epoll1_linux.h',
+ 'src/core/lib/iomgr/ev_epollex_linux.h',
+ 'src/core/lib/iomgr/ev_epollsig_linux.h',
+ 'src/core/lib/iomgr/ev_poll_posix.h',
+ 'src/core/lib/iomgr/ev_posix.h',
+ 'src/core/lib/iomgr/exec_ctx.h',
+ 'src/core/lib/iomgr/executor.h',
+ 'src/core/lib/iomgr/gethostname.h',
+ 'src/core/lib/iomgr/iocp_windows.h',
+ 'src/core/lib/iomgr/iomgr.h',
+ 'src/core/lib/iomgr/iomgr_custom.h',
+ 'src/core/lib/iomgr/iomgr_internal.h',
+ 'src/core/lib/iomgr/iomgr_posix.h',
+ 'src/core/lib/iomgr/is_epollexclusive_available.h',
+ 'src/core/lib/iomgr/load_file.h',
+ 'src/core/lib/iomgr/lockfree_event.h',
+ 'src/core/lib/iomgr/nameser.h',
+ 'src/core/lib/iomgr/network_status_tracker.h',
+ 'src/core/lib/iomgr/polling_entity.h',
+ 'src/core/lib/iomgr/pollset.h',
+ 'src/core/lib/iomgr/pollset_custom.h',
+ 'src/core/lib/iomgr/pollset_set.h',
+ 'src/core/lib/iomgr/pollset_set_custom.h',
+ 'src/core/lib/iomgr/pollset_set_windows.h',
+ 'src/core/lib/iomgr/pollset_windows.h',
+ 'src/core/lib/iomgr/port.h',
+ 'src/core/lib/iomgr/resolve_address.h',
+ 'src/core/lib/iomgr/resolve_address_custom.h',
+ 'src/core/lib/iomgr/resource_quota.h',
+ 'src/core/lib/iomgr/sockaddr.h',
+ 'src/core/lib/iomgr/sockaddr_custom.h',
+ 'src/core/lib/iomgr/sockaddr_posix.h',
+ 'src/core/lib/iomgr/sockaddr_utils.h',
+ 'src/core/lib/iomgr/sockaddr_windows.h',
+ 'src/core/lib/iomgr/socket_factory_posix.h',
+ 'src/core/lib/iomgr/socket_mutator.h',
+ 'src/core/lib/iomgr/socket_utils.h',
+ 'src/core/lib/iomgr/socket_utils_posix.h',
+ 'src/core/lib/iomgr/socket_windows.h',
+ 'src/core/lib/iomgr/sys_epoll_wrapper.h',
+ 'src/core/lib/iomgr/tcp_client.h',
+ 'src/core/lib/iomgr/tcp_client_posix.h',
+ 'src/core/lib/iomgr/tcp_custom.h',
+ 'src/core/lib/iomgr/tcp_posix.h',
+ 'src/core/lib/iomgr/tcp_server.h',
+ 'src/core/lib/iomgr/tcp_server_utils_posix.h',
+ 'src/core/lib/iomgr/tcp_windows.h',
+ 'src/core/lib/iomgr/time_averaged_stats.h',
+ 'src/core/lib/iomgr/timer.h',
+ 'src/core/lib/iomgr/timer_custom.h',
+ 'src/core/lib/iomgr/timer_heap.h',
+ 'src/core/lib/iomgr/timer_manager.h',
+ 'src/core/lib/iomgr/udp_server.h',
+ 'src/core/lib/iomgr/unix_sockets_posix.h',
+ 'src/core/lib/iomgr/wakeup_fd_cv.h',
+ 'src/core/lib/iomgr/wakeup_fd_pipe.h',
+ 'src/core/lib/iomgr/wakeup_fd_posix.h',
+ 'src/core/lib/json/json.h',
+ 'src/core/lib/json/json_common.h',
+ 'src/core/lib/json/json_reader.h',
+ 'src/core/lib/json/json_writer.h',
+ 'src/core/lib/slice/b64.h',
+ 'src/core/lib/slice/percent_encoding.h',
+ 'src/core/lib/slice/slice_hash_table.h',
+ 'src/core/lib/slice/slice_internal.h',
+ 'src/core/lib/slice/slice_string_helpers.h',
+ 'src/core/lib/slice/slice_weak_hash_table.h',
+ 'src/core/lib/surface/api_trace.h',
+ 'src/core/lib/surface/call.h',
+ 'src/core/lib/surface/call_test_only.h',
+ 'src/core/lib/surface/channel.h',
+ 'src/core/lib/surface/channel_init.h',
+ 'src/core/lib/surface/channel_stack_type.h',
+ 'src/core/lib/surface/completion_queue.h',
+ 'src/core/lib/surface/completion_queue_factory.h',
+ 'src/core/lib/surface/event_string.h',
+ 'src/core/lib/surface/init.h',
+ 'src/core/lib/surface/lame_client.h',
+ 'src/core/lib/surface/server.h',
+ 'src/core/lib/surface/validate_metadata.h',
+ 'src/core/lib/transport/bdp_estimator.h',
+ 'src/core/lib/transport/byte_stream.h',
+ 'src/core/lib/transport/connectivity_state.h',
+ 'src/core/lib/transport/error_utils.h',
+ 'src/core/lib/transport/http2_errors.h',
+ 'src/core/lib/transport/metadata.h',
+ 'src/core/lib/transport/metadata_batch.h',
+ 'src/core/lib/transport/pid_controller.h',
+ 'src/core/lib/transport/service_config.h',
+ 'src/core/lib/transport/static_metadata.h',
+ 'src/core/lib/transport/status_conversion.h',
+ 'src/core/lib/transport/status_metadata.h',
+ 'src/core/lib/transport/timeout_encoding.h',
+ 'src/core/lib/transport/transport.h',
+ 'src/core/lib/transport/transport_impl.h',
+ 'src/core/lib/debug/trace.h',
+ 'src/core/ext/filters/deadline/deadline_filter.h',
+ 'src/core/ext/filters/message_size/message_size_filter.h',
+ 'src/core/ext/filters/load_reporting/server_load_reporting_filter.h',
+ 'src/core/ext/filters/load_reporting/server_load_reporting_plugin.h',
'src/core/ext/transport/cronet/transport/cronet_transport.h',
'third_party/objective_c/Cronet/bidirectional_stream_c.h',
+ 'src/core/ext/transport/chttp2/transport/bin_decoder.h',
+ 'src/core/ext/transport/chttp2/transport/bin_encoder.h',
+ 'src/core/ext/transport/chttp2/transport/chttp2_transport.h',
+ 'src/core/ext/transport/chttp2/transport/flow_control.h',
+ 'src/core/ext/transport/chttp2/transport/frame.h',
+ 'src/core/ext/transport/chttp2/transport/frame_data.h',
+ 'src/core/ext/transport/chttp2/transport/frame_goaway.h',
+ 'src/core/ext/transport/chttp2/transport/frame_ping.h',
+ 'src/core/ext/transport/chttp2/transport/frame_rst_stream.h',
+ 'src/core/ext/transport/chttp2/transport/frame_settings.h',
+ 'src/core/ext/transport/chttp2/transport/frame_window_update.h',
+ 'src/core/ext/transport/chttp2/transport/hpack_encoder.h',
+ 'src/core/ext/transport/chttp2/transport/hpack_parser.h',
+ 'src/core/ext/transport/chttp2/transport/hpack_table.h',
+ 'src/core/ext/transport/chttp2/transport/http2_settings.h',
+ 'src/core/ext/transport/chttp2/transport/huffsyms.h',
+ 'src/core/ext/transport/chttp2/transport/incoming_metadata.h',
+ 'src/core/ext/transport/chttp2/transport/internal.h',
+ 'src/core/ext/transport/chttp2/transport/stream_map.h',
+ 'src/core/ext/transport/chttp2/transport/varint.h',
+ 'src/core/ext/transport/chttp2/alpn/alpn.h',
+ 'src/core/ext/filters/http/client/http_client_filter.h',
+ 'src/core/ext/filters/http/message_compress/message_compress_filter.h',
+ 'src/core/ext/filters/http/server/http_server_filter.h',
+ 'src/core/ext/filters/client_channel/backup_poller.h',
+ 'src/core/ext/filters/client_channel/client_channel.h',
+ 'src/core/ext/filters/client_channel/client_channel_factory.h',
+ 'src/core/ext/filters/client_channel/connector.h',
+ 'src/core/ext/filters/client_channel/http_connect_handshaker.h',
+ 'src/core/ext/filters/client_channel/http_proxy.h',
+ 'src/core/ext/filters/client_channel/lb_policy.h',
+ 'src/core/ext/filters/client_channel/lb_policy_factory.h',
+ 'src/core/ext/filters/client_channel/lb_policy_registry.h',
+ 'src/core/ext/filters/client_channel/method_params.h',
+ 'src/core/ext/filters/client_channel/parse_address.h',
+ 'src/core/ext/filters/client_channel/proxy_mapper.h',
+ 'src/core/ext/filters/client_channel/proxy_mapper_registry.h',
+ 'src/core/ext/filters/client_channel/resolver.h',
+ 'src/core/ext/filters/client_channel/resolver_factory.h',
+ 'src/core/ext/filters/client_channel/resolver_registry.h',
+ 'src/core/ext/filters/client_channel/retry_throttle.h',
+ 'src/core/ext/filters/client_channel/status_util.h',
+ 'src/core/ext/filters/client_channel/subchannel.h',
+ 'src/core/ext/filters/client_channel/subchannel_index.h',
+ 'src/core/ext/filters/client_channel/uri_parser.h',
+ 'src/core/lib/security/context/security_context.h',
+ 'src/core/lib/security/credentials/alts/alts_credentials.h',
+ 'src/core/lib/security/credentials/composite/composite_credentials.h',
+ 'src/core/lib/security/credentials/credentials.h',
+ 'src/core/lib/security/credentials/fake/fake_credentials.h',
+ 'src/core/lib/security/credentials/google_default/google_default_credentials.h',
+ 'src/core/lib/security/credentials/iam/iam_credentials.h',
+ 'src/core/lib/security/credentials/jwt/json_token.h',
+ 'src/core/lib/security/credentials/jwt/jwt_credentials.h',
+ 'src/core/lib/security/credentials/jwt/jwt_verifier.h',
+ 'src/core/lib/security/credentials/oauth2/oauth2_credentials.h',
+ 'src/core/lib/security/credentials/plugin/plugin_credentials.h',
+ 'src/core/lib/security/credentials/ssl/ssl_credentials.h',
+ 'src/core/lib/security/security_connector/alts_security_connector.h',
+ 'src/core/lib/security/security_connector/security_connector.h',
+ 'src/core/lib/security/transport/auth_filters.h',
+ 'src/core/lib/security/transport/secure_endpoint.h',
+ 'src/core/lib/security/transport/security_handshaker.h',
+ 'src/core/lib/security/transport/target_authority_table.h',
+ 'src/core/lib/security/transport/tsi_error.h',
+ 'src/core/lib/security/util/json_util.h',
+ 'src/core/tsi/alts/crypt/gsec.h',
+ 'src/core/tsi/alts/frame_protector/alts_counter.h',
+ 'src/core/tsi/alts/frame_protector/alts_crypter.h',
+ 'src/core/tsi/alts/frame_protector/alts_frame_protector.h',
+ 'src/core/tsi/alts/frame_protector/alts_record_protocol_crypter_common.h',
+ 'src/core/tsi/alts/frame_protector/frame_handler.h',
+ 'src/core/tsi/alts/handshaker/alts_handshaker_client.h',
+ 'src/core/tsi/alts/handshaker/alts_tsi_event.h',
+ 'src/core/tsi/alts/handshaker/alts_tsi_handshaker.h',
+ 'src/core/tsi/alts/handshaker/alts_tsi_handshaker_private.h',
+ 'src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_integrity_only_record_protocol.h',
+ 'src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_privacy_integrity_record_protocol.h',
+ 'src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol.h',
+ 'src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_common.h',
+ 'src/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol.h',
+ 'src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.h',
+ 'src/core/lib/security/credentials/alts/check_gcp_environment.h',
+ 'src/core/lib/security/credentials/alts/grpc_alts_credentials_options.h',
+ 'src/core/tsi/alts/handshaker/alts_handshaker_service_api.h',
+ 'src/core/tsi/alts/handshaker/alts_handshaker_service_api_util.h',
+ 'src/core/tsi/alts/handshaker/alts_tsi_utils.h',
+ 'src/core/tsi/alts/handshaker/transport_security_common_api.h',
+ 'src/core/tsi/alts/handshaker/altscontext.pb.h',
+ 'src/core/tsi/alts/handshaker/handshaker.pb.h',
+ 'src/core/tsi/alts/handshaker/transport_security_common.pb.h',
'third_party/nanopb/pb.h',
'third_party/nanopb/pb_common.h',
'third_party/nanopb/pb_decode.h',
- 'third_party/nanopb/pb_encode.h'
+ 'third_party/nanopb/pb_encode.h',
+ 'src/core/tsi/transport_security.h',
+ 'src/core/tsi/transport_security_adapter.h',
+ 'src/core/tsi/transport_security_interface.h',
+ 'src/core/ext/transport/chttp2/client/chttp2_connector.h',
+ 'src/core/tsi/alts_transport_security.h',
+ 'src/core/tsi/fake_transport_security.h',
+ 'src/core/tsi/ssl_transport_security.h',
+ 'src/core/tsi/ssl_types.h',
+ 'src/core/tsi/transport_security_grpc.h',
+ 'src/core/ext/transport/chttp2/server/chttp2_server.h',
+ 'src/core/lib/surface/init.cc',
+ 'src/core/lib/avl/avl.cc',
+ 'src/core/lib/backoff/backoff.cc',
+ 'src/core/lib/channel/channel_args.cc',
+ 'src/core/lib/channel/channel_stack.cc',
+ 'src/core/lib/channel/channel_stack_builder.cc',
+ 'src/core/lib/channel/connected_channel.cc',
+ 'src/core/lib/channel/handshaker.cc',
+ 'src/core/lib/channel/handshaker_factory.cc',
+ 'src/core/lib/channel/handshaker_registry.cc',
+ 'src/core/lib/compression/compression.cc',
+ 'src/core/lib/compression/compression_internal.cc',
+ 'src/core/lib/compression/message_compress.cc',
+ 'src/core/lib/compression/stream_compression.cc',
+ 'src/core/lib/compression/stream_compression_gzip.cc',
+ 'src/core/lib/compression/stream_compression_identity.cc',
+ 'src/core/lib/debug/stats.cc',
+ 'src/core/lib/debug/stats_data.cc',
+ 'src/core/lib/http/format_request.cc',
+ 'src/core/lib/http/httpcli.cc',
+ 'src/core/lib/http/parser.cc',
+ 'src/core/lib/iomgr/call_combiner.cc',
+ 'src/core/lib/iomgr/combiner.cc',
+ 'src/core/lib/iomgr/endpoint.cc',
+ 'src/core/lib/iomgr/endpoint_pair_posix.cc',
+ 'src/core/lib/iomgr/endpoint_pair_uv.cc',
+ 'src/core/lib/iomgr/endpoint_pair_windows.cc',
+ 'src/core/lib/iomgr/error.cc',
+ 'src/core/lib/iomgr/ev_epoll1_linux.cc',
+ 'src/core/lib/iomgr/ev_epollex_linux.cc',
+ 'src/core/lib/iomgr/ev_epollsig_linux.cc',
+ 'src/core/lib/iomgr/ev_poll_posix.cc',
+ 'src/core/lib/iomgr/ev_posix.cc',
+ 'src/core/lib/iomgr/ev_windows.cc',
+ 'src/core/lib/iomgr/exec_ctx.cc',
+ 'src/core/lib/iomgr/executor.cc',
+ 'src/core/lib/iomgr/fork_posix.cc',
+ 'src/core/lib/iomgr/fork_windows.cc',
+ 'src/core/lib/iomgr/gethostname_fallback.cc',
+ 'src/core/lib/iomgr/gethostname_host_name_max.cc',
+ 'src/core/lib/iomgr/gethostname_sysconf.cc',
+ 'src/core/lib/iomgr/iocp_windows.cc',
+ 'src/core/lib/iomgr/iomgr.cc',
+ 'src/core/lib/iomgr/iomgr_custom.cc',
+ 'src/core/lib/iomgr/iomgr_internal.cc',
+ 'src/core/lib/iomgr/iomgr_posix.cc',
+ 'src/core/lib/iomgr/iomgr_uv.cc',
+ 'src/core/lib/iomgr/iomgr_windows.cc',
+ 'src/core/lib/iomgr/is_epollexclusive_available.cc',
+ 'src/core/lib/iomgr/load_file.cc',
+ 'src/core/lib/iomgr/lockfree_event.cc',
+ 'src/core/lib/iomgr/network_status_tracker.cc',
+ 'src/core/lib/iomgr/polling_entity.cc',
+ 'src/core/lib/iomgr/pollset.cc',
+ 'src/core/lib/iomgr/pollset_custom.cc',
+ 'src/core/lib/iomgr/pollset_set.cc',
+ 'src/core/lib/iomgr/pollset_set_custom.cc',
+ 'src/core/lib/iomgr/pollset_set_windows.cc',
+ 'src/core/lib/iomgr/pollset_uv.cc',
+ 'src/core/lib/iomgr/pollset_windows.cc',
+ 'src/core/lib/iomgr/resolve_address.cc',
+ 'src/core/lib/iomgr/resolve_address_custom.cc',
+ 'src/core/lib/iomgr/resolve_address_posix.cc',
+ 'src/core/lib/iomgr/resolve_address_windows.cc',
+ 'src/core/lib/iomgr/resource_quota.cc',
+ 'src/core/lib/iomgr/sockaddr_utils.cc',
+ 'src/core/lib/iomgr/socket_factory_posix.cc',
+ 'src/core/lib/iomgr/socket_mutator.cc',
+ 'src/core/lib/iomgr/socket_utils_common_posix.cc',
+ 'src/core/lib/iomgr/socket_utils_linux.cc',
+ 'src/core/lib/iomgr/socket_utils_posix.cc',
+ 'src/core/lib/iomgr/socket_utils_uv.cc',
+ 'src/core/lib/iomgr/socket_utils_windows.cc',
+ 'src/core/lib/iomgr/socket_windows.cc',
+ 'src/core/lib/iomgr/tcp_client.cc',
+ 'src/core/lib/iomgr/tcp_client_custom.cc',
+ 'src/core/lib/iomgr/tcp_client_posix.cc',
+ 'src/core/lib/iomgr/tcp_client_windows.cc',
+ 'src/core/lib/iomgr/tcp_custom.cc',
+ 'src/core/lib/iomgr/tcp_posix.cc',
+ 'src/core/lib/iomgr/tcp_server.cc',
+ 'src/core/lib/iomgr/tcp_server_custom.cc',
+ 'src/core/lib/iomgr/tcp_server_posix.cc',
+ 'src/core/lib/iomgr/tcp_server_utils_posix_common.cc',
+ 'src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc',
+ 'src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc',
+ 'src/core/lib/iomgr/tcp_server_windows.cc',
+ 'src/core/lib/iomgr/tcp_uv.cc',
+ 'src/core/lib/iomgr/tcp_windows.cc',
+ 'src/core/lib/iomgr/time_averaged_stats.cc',
+ 'src/core/lib/iomgr/timer.cc',
+ 'src/core/lib/iomgr/timer_custom.cc',
+ 'src/core/lib/iomgr/timer_generic.cc',
+ 'src/core/lib/iomgr/timer_heap.cc',
+ 'src/core/lib/iomgr/timer_manager.cc',
+ 'src/core/lib/iomgr/timer_uv.cc',
+ 'src/core/lib/iomgr/udp_server.cc',
+ 'src/core/lib/iomgr/unix_sockets_posix.cc',
+ 'src/core/lib/iomgr/unix_sockets_posix_noop.cc',
+ 'src/core/lib/iomgr/wakeup_fd_cv.cc',
+ 'src/core/lib/iomgr/wakeup_fd_eventfd.cc',
+ 'src/core/lib/iomgr/wakeup_fd_nospecial.cc',
+ 'src/core/lib/iomgr/wakeup_fd_pipe.cc',
+ 'src/core/lib/iomgr/wakeup_fd_posix.cc',
+ 'src/core/lib/json/json.cc',
+ 'src/core/lib/json/json_reader.cc',
+ 'src/core/lib/json/json_string.cc',
+ 'src/core/lib/json/json_writer.cc',
+ 'src/core/lib/slice/b64.cc',
+ 'src/core/lib/slice/percent_encoding.cc',
+ 'src/core/lib/slice/slice.cc',
+ 'src/core/lib/slice/slice_buffer.cc',
+ 'src/core/lib/slice/slice_intern.cc',
+ 'src/core/lib/slice/slice_string_helpers.cc',
+ 'src/core/lib/surface/api_trace.cc',
+ 'src/core/lib/surface/byte_buffer.cc',
+ 'src/core/lib/surface/byte_buffer_reader.cc',
+ 'src/core/lib/surface/call.cc',
+ 'src/core/lib/surface/call_details.cc',
+ 'src/core/lib/surface/call_log_batch.cc',
+ 'src/core/lib/surface/channel.cc',
+ 'src/core/lib/surface/channel_init.cc',
+ 'src/core/lib/surface/channel_ping.cc',
+ 'src/core/lib/surface/channel_stack_type.cc',
+ 'src/core/lib/surface/completion_queue.cc',
+ 'src/core/lib/surface/completion_queue_factory.cc',
+ 'src/core/lib/surface/event_string.cc',
+ 'src/core/lib/surface/lame_client.cc',
+ 'src/core/lib/surface/metadata_array.cc',
+ 'src/core/lib/surface/server.cc',
+ 'src/core/lib/surface/validate_metadata.cc',
+ 'src/core/lib/surface/version.cc',
+ 'src/core/lib/transport/bdp_estimator.cc',
+ 'src/core/lib/transport/byte_stream.cc',
+ 'src/core/lib/transport/connectivity_state.cc',
+ 'src/core/lib/transport/error_utils.cc',
+ 'src/core/lib/transport/metadata.cc',
+ 'src/core/lib/transport/metadata_batch.cc',
+ 'src/core/lib/transport/pid_controller.cc',
+ 'src/core/lib/transport/service_config.cc',
+ 'src/core/lib/transport/static_metadata.cc',
+ 'src/core/lib/transport/status_conversion.cc',
+ 'src/core/lib/transport/status_metadata.cc',
+ 'src/core/lib/transport/timeout_encoding.cc',
+ 'src/core/lib/transport/transport.cc',
+ 'src/core/lib/transport/transport_op_string.cc',
+ 'src/core/lib/debug/trace.cc',
+ 'src/core/ext/filters/deadline/deadline_filter.cc',
+ 'src/core/ext/filters/message_size/message_size_filter.cc',
+ 'src/core/ext/filters/load_reporting/server_load_reporting_filter.cc',
+ 'src/core/ext/filters/load_reporting/server_load_reporting_plugin.cc',
+ 'src/core/ext/transport/cronet/client/secure/cronet_channel_create.cc',
+ 'src/core/ext/transport/cronet/transport/cronet_transport.cc',
+ 'src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc',
+ 'src/core/ext/transport/chttp2/transport/bin_decoder.cc',
+ 'src/core/ext/transport/chttp2/transport/bin_encoder.cc',
+ 'src/core/ext/transport/chttp2/transport/chttp2_plugin.cc',
+ 'src/core/ext/transport/chttp2/transport/chttp2_transport.cc',
+ 'src/core/ext/transport/chttp2/transport/flow_control.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_data.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_goaway.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_ping.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_rst_stream.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_settings.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_window_update.cc',
+ 'src/core/ext/transport/chttp2/transport/hpack_encoder.cc',
+ 'src/core/ext/transport/chttp2/transport/hpack_parser.cc',
+ 'src/core/ext/transport/chttp2/transport/hpack_table.cc',
+ 'src/core/ext/transport/chttp2/transport/http2_settings.cc',
+ 'src/core/ext/transport/chttp2/transport/huffsyms.cc',
+ 'src/core/ext/transport/chttp2/transport/incoming_metadata.cc',
+ 'src/core/ext/transport/chttp2/transport/parsing.cc',
+ 'src/core/ext/transport/chttp2/transport/stream_lists.cc',
+ 'src/core/ext/transport/chttp2/transport/stream_map.cc',
+ 'src/core/ext/transport/chttp2/transport/varint.cc',
+ 'src/core/ext/transport/chttp2/transport/writing.cc',
+ 'src/core/ext/transport/chttp2/alpn/alpn.cc',
+ 'src/core/ext/filters/http/client/http_client_filter.cc',
+ 'src/core/ext/filters/http/http_filters_plugin.cc',
+ 'src/core/ext/filters/http/message_compress/message_compress_filter.cc',
+ 'src/core/ext/filters/http/server/http_server_filter.cc',
+ 'src/core/ext/filters/client_channel/backup_poller.cc',
+ 'src/core/ext/filters/client_channel/channel_connectivity.cc',
+ 'src/core/ext/filters/client_channel/client_channel.cc',
+ 'src/core/ext/filters/client_channel/client_channel_factory.cc',
+ 'src/core/ext/filters/client_channel/client_channel_plugin.cc',
+ 'src/core/ext/filters/client_channel/connector.cc',
+ 'src/core/ext/filters/client_channel/http_connect_handshaker.cc',
+ 'src/core/ext/filters/client_channel/http_proxy.cc',
+ 'src/core/ext/filters/client_channel/lb_policy.cc',
+ 'src/core/ext/filters/client_channel/lb_policy_factory.cc',
+ 'src/core/ext/filters/client_channel/lb_policy_registry.cc',
+ 'src/core/ext/filters/client_channel/method_params.cc',
+ 'src/core/ext/filters/client_channel/parse_address.cc',
+ 'src/core/ext/filters/client_channel/proxy_mapper.cc',
+ 'src/core/ext/filters/client_channel/proxy_mapper_registry.cc',
+ 'src/core/ext/filters/client_channel/resolver.cc',
+ 'src/core/ext/filters/client_channel/resolver_registry.cc',
+ 'src/core/ext/filters/client_channel/retry_throttle.cc',
+ 'src/core/ext/filters/client_channel/status_util.cc',
+ 'src/core/ext/filters/client_channel/subchannel.cc',
+ 'src/core/ext/filters/client_channel/subchannel_index.cc',
+ 'src/core/ext/filters/client_channel/uri_parser.cc',
+ 'src/core/lib/http/httpcli_security_connector.cc',
+ 'src/core/lib/security/context/security_context.cc',
+ 'src/core/lib/security/credentials/alts/alts_credentials.cc',
+ 'src/core/lib/security/credentials/composite/composite_credentials.cc',
+ 'src/core/lib/security/credentials/credentials.cc',
+ 'src/core/lib/security/credentials/credentials_metadata.cc',
+ 'src/core/lib/security/credentials/fake/fake_credentials.cc',
+ 'src/core/lib/security/credentials/google_default/credentials_generic.cc',
+ 'src/core/lib/security/credentials/google_default/google_default_credentials.cc',
+ 'src/core/lib/security/credentials/iam/iam_credentials.cc',
+ 'src/core/lib/security/credentials/jwt/json_token.cc',
+ 'src/core/lib/security/credentials/jwt/jwt_credentials.cc',
+ 'src/core/lib/security/credentials/jwt/jwt_verifier.cc',
+ 'src/core/lib/security/credentials/oauth2/oauth2_credentials.cc',
+ 'src/core/lib/security/credentials/plugin/plugin_credentials.cc',
+ 'src/core/lib/security/credentials/ssl/ssl_credentials.cc',
+ 'src/core/lib/security/security_connector/alts_security_connector.cc',
+ 'src/core/lib/security/security_connector/security_connector.cc',
+ 'src/core/lib/security/transport/client_auth_filter.cc',
+ 'src/core/lib/security/transport/secure_endpoint.cc',
+ 'src/core/lib/security/transport/security_handshaker.cc',
+ 'src/core/lib/security/transport/server_auth_filter.cc',
+ 'src/core/lib/security/transport/target_authority_table.cc',
+ 'src/core/lib/security/transport/tsi_error.cc',
+ 'src/core/lib/security/util/json_util.cc',
+ 'src/core/lib/surface/init_secure.cc',
+ 'src/core/tsi/alts/crypt/aes_gcm.cc',
+ 'src/core/tsi/alts/crypt/gsec.cc',
+ 'src/core/tsi/alts/frame_protector/alts_counter.cc',
+ 'src/core/tsi/alts/frame_protector/alts_crypter.cc',
+ 'src/core/tsi/alts/frame_protector/alts_frame_protector.cc',
+ 'src/core/tsi/alts/frame_protector/alts_record_protocol_crypter_common.cc',
+ 'src/core/tsi/alts/frame_protector/alts_seal_privacy_integrity_crypter.cc',
+ 'src/core/tsi/alts/frame_protector/alts_unseal_privacy_integrity_crypter.cc',
+ 'src/core/tsi/alts/frame_protector/frame_handler.cc',
+ 'src/core/tsi/alts/handshaker/alts_handshaker_client.cc',
+ 'src/core/tsi/alts/handshaker/alts_tsi_event.cc',
+ 'src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc',
+ 'src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_integrity_only_record_protocol.cc',
+ 'src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_privacy_integrity_record_protocol.cc',
+ 'src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_common.cc',
+ 'src/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol.cc',
+ 'src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.cc',
+ 'src/core/lib/security/credentials/alts/check_gcp_environment.cc',
+ 'src/core/lib/security/credentials/alts/check_gcp_environment_linux.cc',
+ 'src/core/lib/security/credentials/alts/check_gcp_environment_no_op.cc',
+ 'src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc',
+ 'src/core/lib/security/credentials/alts/grpc_alts_credentials_client_options.cc',
+ 'src/core/lib/security/credentials/alts/grpc_alts_credentials_options.cc',
+ 'src/core/lib/security/credentials/alts/grpc_alts_credentials_server_options.cc',
+ 'src/core/tsi/alts/handshaker/alts_handshaker_service_api.cc',
+ 'src/core/tsi/alts/handshaker/alts_handshaker_service_api_util.cc',
+ 'src/core/tsi/alts/handshaker/alts_tsi_utils.cc',
+ 'src/core/tsi/alts/handshaker/transport_security_common_api.cc',
+ 'src/core/tsi/alts/handshaker/altscontext.pb.c',
+ 'src/core/tsi/alts/handshaker/handshaker.pb.c',
+ 'src/core/tsi/alts/handshaker/transport_security_common.pb.c',
+ 'third_party/nanopb/pb_common.c',
+ 'third_party/nanopb/pb_decode.c',
+ 'third_party/nanopb/pb_encode.c',
+ 'src/core/tsi/transport_security.cc',
+ 'src/core/tsi/transport_security_adapter.cc',
+ 'src/core/ext/transport/chttp2/client/insecure/channel_create.cc',
+ 'src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc',
+ 'src/core/ext/transport/chttp2/client/chttp2_connector.cc',
+ 'src/core/tsi/alts_transport_security.cc',
+ 'src/core/tsi/fake_transport_security.cc',
+ 'src/core/tsi/ssl_transport_security.cc',
+ 'src/core/tsi/transport_security_grpc.cc',
+ 'src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc',
+ 'src/core/ext/transport/chttp2/server/chttp2_server.cc',
+ 'src/core/plugin_registry/grpc_cronet_plugin_registry.cc'
+
+ ss.private_header_files = 'src/core/lib/gpr/arena.h',
+ 'src/core/lib/gpr/env.h',
+ 'src/core/lib/gpr/fork.h',
+ 'src/core/lib/gpr/host_port.h',
+ 'src/core/lib/gpr/mpscq.h',
+ 'src/core/lib/gpr/murmur_hash.h',
+ 'src/core/lib/gpr/spinlock.h',
+ 'src/core/lib/gpr/string.h',
+ 'src/core/lib/gpr/string_windows.h',
+ 'src/core/lib/gpr/time_precise.h',
+ 'src/core/lib/gpr/tls.h',
+ 'src/core/lib/gpr/tls_gcc.h',
+ 'src/core/lib/gpr/tls_msvc.h',
+ 'src/core/lib/gpr/tls_pthread.h',
+ 'src/core/lib/gpr/tmpfile.h',
+ 'src/core/lib/gpr/useful.h',
+ 'src/core/lib/gprpp/abstract.h',
+ 'src/core/lib/gprpp/atomic.h',
+ 'src/core/lib/gprpp/atomic_with_atm.h',
+ 'src/core/lib/gprpp/atomic_with_std.h',
+ 'src/core/lib/gprpp/manual_constructor.h',
+ 'src/core/lib/gprpp/memory.h',
+ 'src/core/lib/gprpp/thd.h',
+ 'src/core/lib/profiling/timers.h',
+ 'src/core/lib/avl/avl.h',
+ 'src/core/lib/backoff/backoff.h',
+ 'src/core/lib/channel/channel_args.h',
+ 'src/core/lib/channel/channel_stack.h',
+ 'src/core/lib/channel/channel_stack_builder.h',
+ 'src/core/lib/channel/connected_channel.h',
+ 'src/core/lib/channel/context.h',
+ 'src/core/lib/channel/handshaker.h',
+ 'src/core/lib/channel/handshaker_factory.h',
+ 'src/core/lib/channel/handshaker_registry.h',
+ 'src/core/lib/compression/algorithm_metadata.h',
+ 'src/core/lib/compression/compression_internal.h',
+ 'src/core/lib/compression/message_compress.h',
+ 'src/core/lib/compression/stream_compression.h',
+ 'src/core/lib/compression/stream_compression_gzip.h',
+ 'src/core/lib/compression/stream_compression_identity.h',
+ 'src/core/lib/debug/stats.h',
+ 'src/core/lib/debug/stats_data.h',
+ 'src/core/lib/gprpp/debug_location.h',
+ 'src/core/lib/gprpp/inlined_vector.h',
+ 'src/core/lib/gprpp/orphanable.h',
+ 'src/core/lib/gprpp/ref_counted.h',
+ 'src/core/lib/gprpp/ref_counted_ptr.h',
+ 'src/core/lib/http/format_request.h',
+ 'src/core/lib/http/httpcli.h',
+ 'src/core/lib/http/parser.h',
+ 'src/core/lib/iomgr/block_annotate.h',
+ 'src/core/lib/iomgr/call_combiner.h',
+ 'src/core/lib/iomgr/closure.h',
+ 'src/core/lib/iomgr/combiner.h',
+ 'src/core/lib/iomgr/endpoint.h',
+ 'src/core/lib/iomgr/endpoint_pair.h',
+ 'src/core/lib/iomgr/error.h',
+ 'src/core/lib/iomgr/error_internal.h',
+ 'src/core/lib/iomgr/ev_epoll1_linux.h',
+ 'src/core/lib/iomgr/ev_epollex_linux.h',
+ 'src/core/lib/iomgr/ev_epollsig_linux.h',
+ 'src/core/lib/iomgr/ev_poll_posix.h',
+ 'src/core/lib/iomgr/ev_posix.h',
+ 'src/core/lib/iomgr/exec_ctx.h',
+ 'src/core/lib/iomgr/executor.h',
+ 'src/core/lib/iomgr/gethostname.h',
+ 'src/core/lib/iomgr/iocp_windows.h',
+ 'src/core/lib/iomgr/iomgr.h',
+ 'src/core/lib/iomgr/iomgr_custom.h',
+ 'src/core/lib/iomgr/iomgr_internal.h',
+ 'src/core/lib/iomgr/iomgr_posix.h',
+ 'src/core/lib/iomgr/is_epollexclusive_available.h',
+ 'src/core/lib/iomgr/load_file.h',
+ 'src/core/lib/iomgr/lockfree_event.h',
+ 'src/core/lib/iomgr/nameser.h',
+ 'src/core/lib/iomgr/network_status_tracker.h',
+ 'src/core/lib/iomgr/polling_entity.h',
+ 'src/core/lib/iomgr/pollset.h',
+ 'src/core/lib/iomgr/pollset_custom.h',
+ 'src/core/lib/iomgr/pollset_set.h',
+ 'src/core/lib/iomgr/pollset_set_custom.h',
+ 'src/core/lib/iomgr/pollset_set_windows.h',
+ 'src/core/lib/iomgr/pollset_windows.h',
+ 'src/core/lib/iomgr/port.h',
+ 'src/core/lib/iomgr/resolve_address.h',
+ 'src/core/lib/iomgr/resolve_address_custom.h',
+ 'src/core/lib/iomgr/resource_quota.h',
+ 'src/core/lib/iomgr/sockaddr.h',
+ 'src/core/lib/iomgr/sockaddr_custom.h',
+ 'src/core/lib/iomgr/sockaddr_posix.h',
+ 'src/core/lib/iomgr/sockaddr_utils.h',
+ 'src/core/lib/iomgr/sockaddr_windows.h',
+ 'src/core/lib/iomgr/socket_factory_posix.h',
+ 'src/core/lib/iomgr/socket_mutator.h',
+ 'src/core/lib/iomgr/socket_utils.h',
+ 'src/core/lib/iomgr/socket_utils_posix.h',
+ 'src/core/lib/iomgr/socket_windows.h',
+ 'src/core/lib/iomgr/sys_epoll_wrapper.h',
+ 'src/core/lib/iomgr/tcp_client.h',
+ 'src/core/lib/iomgr/tcp_client_posix.h',
+ 'src/core/lib/iomgr/tcp_custom.h',
+ 'src/core/lib/iomgr/tcp_posix.h',
+ 'src/core/lib/iomgr/tcp_server.h',
+ 'src/core/lib/iomgr/tcp_server_utils_posix.h',
+ 'src/core/lib/iomgr/tcp_windows.h',
+ 'src/core/lib/iomgr/time_averaged_stats.h',
+ 'src/core/lib/iomgr/timer.h',
+ 'src/core/lib/iomgr/timer_custom.h',
+ 'src/core/lib/iomgr/timer_heap.h',
+ 'src/core/lib/iomgr/timer_manager.h',
+ 'src/core/lib/iomgr/udp_server.h',
+ 'src/core/lib/iomgr/unix_sockets_posix.h',
+ 'src/core/lib/iomgr/wakeup_fd_cv.h',
+ 'src/core/lib/iomgr/wakeup_fd_pipe.h',
+ 'src/core/lib/iomgr/wakeup_fd_posix.h',
+ 'src/core/lib/json/json.h',
+ 'src/core/lib/json/json_common.h',
+ 'src/core/lib/json/json_reader.h',
+ 'src/core/lib/json/json_writer.h',
+ 'src/core/lib/slice/b64.h',
+ 'src/core/lib/slice/percent_encoding.h',
+ 'src/core/lib/slice/slice_hash_table.h',
+ 'src/core/lib/slice/slice_internal.h',
+ 'src/core/lib/slice/slice_string_helpers.h',
+ 'src/core/lib/slice/slice_weak_hash_table.h',
+ 'src/core/lib/surface/api_trace.h',
+ 'src/core/lib/surface/call.h',
+ 'src/core/lib/surface/call_test_only.h',
+ 'src/core/lib/surface/channel.h',
+ 'src/core/lib/surface/channel_init.h',
+ 'src/core/lib/surface/channel_stack_type.h',
+ 'src/core/lib/surface/completion_queue.h',
+ 'src/core/lib/surface/completion_queue_factory.h',
+ 'src/core/lib/surface/event_string.h',
+ 'src/core/lib/surface/init.h',
+ 'src/core/lib/surface/lame_client.h',
+ 'src/core/lib/surface/server.h',
+ 'src/core/lib/surface/validate_metadata.h',
+ 'src/core/lib/transport/bdp_estimator.h',
+ 'src/core/lib/transport/byte_stream.h',
+ 'src/core/lib/transport/connectivity_state.h',
+ 'src/core/lib/transport/error_utils.h',
+ 'src/core/lib/transport/http2_errors.h',
+ 'src/core/lib/transport/metadata.h',
+ 'src/core/lib/transport/metadata_batch.h',
+ 'src/core/lib/transport/pid_controller.h',
+ 'src/core/lib/transport/service_config.h',
+ 'src/core/lib/transport/static_metadata.h',
+ 'src/core/lib/transport/status_conversion.h',
+ 'src/core/lib/transport/status_metadata.h',
+ 'src/core/lib/transport/timeout_encoding.h',
+ 'src/core/lib/transport/transport.h',
+ 'src/core/lib/transport/transport_impl.h',
+ 'src/core/lib/debug/trace.h',
+ 'src/core/ext/filters/deadline/deadline_filter.h',
+ 'src/core/ext/filters/message_size/message_size_filter.h',
+ 'src/core/ext/filters/load_reporting/server_load_reporting_filter.h',
+ 'src/core/ext/filters/load_reporting/server_load_reporting_plugin.h',
+ 'src/core/ext/transport/cronet/transport/cronet_transport.h',
+ 'third_party/objective_c/Cronet/bidirectional_stream_c.h',
+ 'src/core/ext/transport/chttp2/transport/bin_decoder.h',
+ 'src/core/ext/transport/chttp2/transport/bin_encoder.h',
+ 'src/core/ext/transport/chttp2/transport/chttp2_transport.h',
+ 'src/core/ext/transport/chttp2/transport/flow_control.h',
+ 'src/core/ext/transport/chttp2/transport/frame.h',
+ 'src/core/ext/transport/chttp2/transport/frame_data.h',
+ 'src/core/ext/transport/chttp2/transport/frame_goaway.h',
+ 'src/core/ext/transport/chttp2/transport/frame_ping.h',
+ 'src/core/ext/transport/chttp2/transport/frame_rst_stream.h',
+ 'src/core/ext/transport/chttp2/transport/frame_settings.h',
+ 'src/core/ext/transport/chttp2/transport/frame_window_update.h',
+ 'src/core/ext/transport/chttp2/transport/hpack_encoder.h',
+ 'src/core/ext/transport/chttp2/transport/hpack_parser.h',
+ 'src/core/ext/transport/chttp2/transport/hpack_table.h',
+ 'src/core/ext/transport/chttp2/transport/http2_settings.h',
+ 'src/core/ext/transport/chttp2/transport/huffsyms.h',
+ 'src/core/ext/transport/chttp2/transport/incoming_metadata.h',
+ 'src/core/ext/transport/chttp2/transport/internal.h',
+ 'src/core/ext/transport/chttp2/transport/stream_map.h',
+ 'src/core/ext/transport/chttp2/transport/varint.h',
+ 'src/core/ext/transport/chttp2/alpn/alpn.h',
+ 'src/core/ext/filters/http/client/http_client_filter.h',
+ 'src/core/ext/filters/http/message_compress/message_compress_filter.h',
+ 'src/core/ext/filters/http/server/http_server_filter.h',
+ 'src/core/ext/filters/client_channel/backup_poller.h',
+ 'src/core/ext/filters/client_channel/client_channel.h',
+ 'src/core/ext/filters/client_channel/client_channel_factory.h',
+ 'src/core/ext/filters/client_channel/connector.h',
+ 'src/core/ext/filters/client_channel/http_connect_handshaker.h',
+ 'src/core/ext/filters/client_channel/http_proxy.h',
+ 'src/core/ext/filters/client_channel/lb_policy.h',
+ 'src/core/ext/filters/client_channel/lb_policy_factory.h',
+ 'src/core/ext/filters/client_channel/lb_policy_registry.h',
+ 'src/core/ext/filters/client_channel/method_params.h',
+ 'src/core/ext/filters/client_channel/parse_address.h',
+ 'src/core/ext/filters/client_channel/proxy_mapper.h',
+ 'src/core/ext/filters/client_channel/proxy_mapper_registry.h',
+ 'src/core/ext/filters/client_channel/resolver.h',
+ 'src/core/ext/filters/client_channel/resolver_factory.h',
+ 'src/core/ext/filters/client_channel/resolver_registry.h',
+ 'src/core/ext/filters/client_channel/retry_throttle.h',
+ 'src/core/ext/filters/client_channel/status_util.h',
+ 'src/core/ext/filters/client_channel/subchannel.h',
+ 'src/core/ext/filters/client_channel/subchannel_index.h',
+ 'src/core/ext/filters/client_channel/uri_parser.h',
+ 'src/core/lib/security/context/security_context.h',
+ 'src/core/lib/security/credentials/alts/alts_credentials.h',
+ 'src/core/lib/security/credentials/composite/composite_credentials.h',
+ 'src/core/lib/security/credentials/credentials.h',
+ 'src/core/lib/security/credentials/fake/fake_credentials.h',
+ 'src/core/lib/security/credentials/google_default/google_default_credentials.h',
+ 'src/core/lib/security/credentials/iam/iam_credentials.h',
+ 'src/core/lib/security/credentials/jwt/json_token.h',
+ 'src/core/lib/security/credentials/jwt/jwt_credentials.h',
+ 'src/core/lib/security/credentials/jwt/jwt_verifier.h',
+ 'src/core/lib/security/credentials/oauth2/oauth2_credentials.h',
+ 'src/core/lib/security/credentials/plugin/plugin_credentials.h',
+ 'src/core/lib/security/credentials/ssl/ssl_credentials.h',
+ 'src/core/lib/security/security_connector/alts_security_connector.h',
+ 'src/core/lib/security/security_connector/security_connector.h',
+ 'src/core/lib/security/transport/auth_filters.h',
+ 'src/core/lib/security/transport/secure_endpoint.h',
+ 'src/core/lib/security/transport/security_handshaker.h',
+ 'src/core/lib/security/transport/target_authority_table.h',
+ 'src/core/lib/security/transport/tsi_error.h',
+ 'src/core/lib/security/util/json_util.h',
+ 'src/core/tsi/alts/crypt/gsec.h',
+ 'src/core/tsi/alts/frame_protector/alts_counter.h',
+ 'src/core/tsi/alts/frame_protector/alts_crypter.h',
+ 'src/core/tsi/alts/frame_protector/alts_frame_protector.h',
+ 'src/core/tsi/alts/frame_protector/alts_record_protocol_crypter_common.h',
+ 'src/core/tsi/alts/frame_protector/frame_handler.h',
+ 'src/core/tsi/alts/handshaker/alts_handshaker_client.h',
+ 'src/core/tsi/alts/handshaker/alts_tsi_event.h',
+ 'src/core/tsi/alts/handshaker/alts_tsi_handshaker.h',
+ 'src/core/tsi/alts/handshaker/alts_tsi_handshaker_private.h',
+ 'src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_integrity_only_record_protocol.h',
+ 'src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_privacy_integrity_record_protocol.h',
+ 'src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol.h',
+ 'src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_common.h',
+ 'src/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol.h',
+ 'src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.h',
+ 'src/core/lib/security/credentials/alts/check_gcp_environment.h',
+ 'src/core/lib/security/credentials/alts/grpc_alts_credentials_options.h',
+ 'src/core/tsi/alts/handshaker/alts_handshaker_service_api.h',
+ 'src/core/tsi/alts/handshaker/alts_handshaker_service_api_util.h',
+ 'src/core/tsi/alts/handshaker/alts_tsi_utils.h',
+ 'src/core/tsi/alts/handshaker/transport_security_common_api.h',
+ 'src/core/tsi/alts/handshaker/altscontext.pb.h',
+ 'src/core/tsi/alts/handshaker/handshaker.pb.h',
+ 'src/core/tsi/alts/handshaker/transport_security_common.pb.h',
+ 'third_party/nanopb/pb.h',
+ 'third_party/nanopb/pb_common.h',
+ 'third_party/nanopb/pb_decode.h',
+ 'third_party/nanopb/pb_encode.h',
+ 'src/core/tsi/transport_security.h',
+ 'src/core/tsi/transport_security_adapter.h',
+ 'src/core/tsi/transport_security_interface.h',
+ 'src/core/ext/transport/chttp2/client/chttp2_connector.h',
+ 'src/core/tsi/alts_transport_security.h',
+ 'src/core/tsi/fake_transport_security.h',
+ 'src/core/tsi/ssl_transport_security.h',
+ 'src/core/tsi/ssl_types.h',
+ 'src/core/tsi/transport_security_grpc.h',
+ 'src/core/ext/transport/chttp2/server/chttp2_server.h'
end
- s.subspec 'Tests' do |ss|
+ s.subspec 'Cronet-Tests' do |ss|
ss.header_mappings_dir = '.'
- ss.dependency "#{s.name}/Interface", version
- ss.dependency "#{s.name}/Implementation", version
+ ss.dependency "#{s.name}/Cronet-Interface", version
+ ss.dependency "#{s.name}/Cronet-Implementation", version
ss.source_files = 'test/core/util/test_config.cc',
'test/core/util/test_config.h',
@@ -1212,6 +2131,6 @@ Pod::Spec.new do |s|
# TODO (mxyan): Instead of this hack, add include path "third_party" to C core's include path?
s.prepare_command = <<-END_OF_COMMAND
- find src/core/ -type f -exec sed -E -i'.back' 's;#include "third_party/nanopb/(.*)";#include <nanopb/\\1>;g' {} \\\;
+ find src/core/ -type f ! -path '*.back*' -exec sed -E -i'.back' 's;#include "third_party/nanopb/(.*)";#include <nanopb/\\1>;g' {} \\\;
END_OF_COMMAND
end
diff --git a/grpc.def b/grpc.def
index 2bafebbbd4..cc19005e68 100644
--- a/grpc.def
+++ b/grpc.def
@@ -83,6 +83,9 @@ EXPORTS
grpc_auth_context_add_property
grpc_auth_context_add_cstring_property
grpc_auth_context_set_peer_identity_property_name
+ grpc_ssl_session_cache_create_lru
+ grpc_ssl_session_cache_destroy
+ grpc_ssl_session_cache_create_channel_arg
grpc_channel_credentials_release
grpc_google_default_credentials_create
grpc_set_ssl_roots_override_callback
diff --git a/grpc.gemspec b/grpc.gemspec
index c797b28d54..a07d683edf 100644
--- a/grpc.gemspec
+++ b/grpc.gemspec
@@ -274,6 +274,8 @@ Gem::Specification.new do |s|
s.files += %w( src/core/ext/filters/deadline/deadline_filter.h )
s.files += %w( src/core/tsi/alts_transport_security.h )
s.files += %w( src/core/tsi/fake_transport_security.h )
+ s.files += %w( src/core/tsi/ssl/session_cache/ssl_session.h )
+ s.files += %w( src/core/tsi/ssl/session_cache/ssl_session_cache.h )
s.files += %w( src/core/tsi/ssl_transport_security.h )
s.files += %w( src/core/tsi/ssl_types.h )
s.files += %w( src/core/tsi/transport_security_grpc.h )
@@ -323,9 +325,9 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/iomgr/gethostname.h )
s.files += %w( src/core/lib/iomgr/iocp_windows.h )
s.files += %w( src/core/lib/iomgr/iomgr.h )
+ s.files += %w( src/core/lib/iomgr/iomgr_custom.h )
s.files += %w( src/core/lib/iomgr/iomgr_internal.h )
s.files += %w( src/core/lib/iomgr/iomgr_posix.h )
- s.files += %w( src/core/lib/iomgr/iomgr_uv.h )
s.files += %w( src/core/lib/iomgr/is_epollexclusive_available.h )
s.files += %w( src/core/lib/iomgr/load_file.h )
s.files += %w( src/core/lib/iomgr/lockfree_event.h )
@@ -333,14 +335,17 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/iomgr/network_status_tracker.h )
s.files += %w( src/core/lib/iomgr/polling_entity.h )
s.files += %w( src/core/lib/iomgr/pollset.h )
+ s.files += %w( src/core/lib/iomgr/pollset_custom.h )
s.files += %w( src/core/lib/iomgr/pollset_set.h )
+ s.files += %w( src/core/lib/iomgr/pollset_set_custom.h )
s.files += %w( src/core/lib/iomgr/pollset_set_windows.h )
- s.files += %w( src/core/lib/iomgr/pollset_uv.h )
s.files += %w( src/core/lib/iomgr/pollset_windows.h )
s.files += %w( src/core/lib/iomgr/port.h )
s.files += %w( src/core/lib/iomgr/resolve_address.h )
+ s.files += %w( src/core/lib/iomgr/resolve_address_custom.h )
s.files += %w( src/core/lib/iomgr/resource_quota.h )
s.files += %w( src/core/lib/iomgr/sockaddr.h )
+ s.files += %w( src/core/lib/iomgr/sockaddr_custom.h )
s.files += %w( src/core/lib/iomgr/sockaddr_posix.h )
s.files += %w( src/core/lib/iomgr/sockaddr_utils.h )
s.files += %w( src/core/lib/iomgr/sockaddr_windows.h )
@@ -352,17 +357,16 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/iomgr/sys_epoll_wrapper.h )
s.files += %w( src/core/lib/iomgr/tcp_client.h )
s.files += %w( src/core/lib/iomgr/tcp_client_posix.h )
+ s.files += %w( src/core/lib/iomgr/tcp_custom.h )
s.files += %w( src/core/lib/iomgr/tcp_posix.h )
s.files += %w( src/core/lib/iomgr/tcp_server.h )
s.files += %w( src/core/lib/iomgr/tcp_server_utils_posix.h )
- s.files += %w( src/core/lib/iomgr/tcp_uv.h )
s.files += %w( src/core/lib/iomgr/tcp_windows.h )
s.files += %w( src/core/lib/iomgr/time_averaged_stats.h )
s.files += %w( src/core/lib/iomgr/timer.h )
- s.files += %w( src/core/lib/iomgr/timer_generic.h )
+ s.files += %w( src/core/lib/iomgr/timer_custom.h )
s.files += %w( src/core/lib/iomgr/timer_heap.h )
s.files += %w( src/core/lib/iomgr/timer_manager.h )
- s.files += %w( src/core/lib/iomgr/timer_uv.h )
s.files += %w( src/core/lib/iomgr/udp_server.h )
s.files += %w( src/core/lib/iomgr/unix_sockets_posix.h )
s.files += %w( src/core/lib/iomgr/wakeup_fd_cv.h )
@@ -466,6 +470,8 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/iomgr/gethostname_sysconf.cc )
s.files += %w( src/core/lib/iomgr/iocp_windows.cc )
s.files += %w( src/core/lib/iomgr/iomgr.cc )
+ s.files += %w( src/core/lib/iomgr/iomgr_custom.cc )
+ s.files += %w( src/core/lib/iomgr/iomgr_internal.cc )
s.files += %w( src/core/lib/iomgr/iomgr_posix.cc )
s.files += %w( src/core/lib/iomgr/iomgr_uv.cc )
s.files += %w( src/core/lib/iomgr/iomgr_windows.cc )
@@ -474,12 +480,16 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/iomgr/lockfree_event.cc )
s.files += %w( src/core/lib/iomgr/network_status_tracker.cc )
s.files += %w( src/core/lib/iomgr/polling_entity.cc )
- s.files += %w( src/core/lib/iomgr/pollset_set_uv.cc )
+ s.files += %w( src/core/lib/iomgr/pollset.cc )
+ s.files += %w( src/core/lib/iomgr/pollset_custom.cc )
+ s.files += %w( src/core/lib/iomgr/pollset_set.cc )
+ s.files += %w( src/core/lib/iomgr/pollset_set_custom.cc )
s.files += %w( src/core/lib/iomgr/pollset_set_windows.cc )
s.files += %w( src/core/lib/iomgr/pollset_uv.cc )
s.files += %w( src/core/lib/iomgr/pollset_windows.cc )
+ s.files += %w( src/core/lib/iomgr/resolve_address.cc )
+ s.files += %w( src/core/lib/iomgr/resolve_address_custom.cc )
s.files += %w( src/core/lib/iomgr/resolve_address_posix.cc )
- s.files += %w( src/core/lib/iomgr/resolve_address_uv.cc )
s.files += %w( src/core/lib/iomgr/resolve_address_windows.cc )
s.files += %w( src/core/lib/iomgr/resource_quota.cc )
s.files += %w( src/core/lib/iomgr/sockaddr_utils.cc )
@@ -491,19 +501,24 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/iomgr/socket_utils_uv.cc )
s.files += %w( src/core/lib/iomgr/socket_utils_windows.cc )
s.files += %w( src/core/lib/iomgr/socket_windows.cc )
+ s.files += %w( src/core/lib/iomgr/tcp_client.cc )
+ s.files += %w( src/core/lib/iomgr/tcp_client_custom.cc )
s.files += %w( src/core/lib/iomgr/tcp_client_posix.cc )
- s.files += %w( src/core/lib/iomgr/tcp_client_uv.cc )
s.files += %w( src/core/lib/iomgr/tcp_client_windows.cc )
+ s.files += %w( src/core/lib/iomgr/tcp_custom.cc )
s.files += %w( src/core/lib/iomgr/tcp_posix.cc )
+ s.files += %w( src/core/lib/iomgr/tcp_server.cc )
+ s.files += %w( src/core/lib/iomgr/tcp_server_custom.cc )
s.files += %w( src/core/lib/iomgr/tcp_server_posix.cc )
s.files += %w( src/core/lib/iomgr/tcp_server_utils_posix_common.cc )
s.files += %w( src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc )
s.files += %w( src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc )
- s.files += %w( src/core/lib/iomgr/tcp_server_uv.cc )
s.files += %w( src/core/lib/iomgr/tcp_server_windows.cc )
s.files += %w( src/core/lib/iomgr/tcp_uv.cc )
s.files += %w( src/core/lib/iomgr/tcp_windows.cc )
s.files += %w( src/core/lib/iomgr/time_averaged_stats.cc )
+ s.files += %w( src/core/lib/iomgr/timer.cc )
+ s.files += %w( src/core/lib/iomgr/timer_custom.cc )
s.files += %w( src/core/lib/iomgr/timer_generic.cc )
s.files += %w( src/core/lib/iomgr/timer_heap.cc )
s.files += %w( src/core/lib/iomgr/timer_manager.cc )
@@ -677,6 +692,9 @@ Gem::Specification.new do |s|
s.files += %w( src/core/ext/filters/deadline/deadline_filter.cc )
s.files += %w( src/core/tsi/alts_transport_security.cc )
s.files += %w( src/core/tsi/fake_transport_security.cc )
+ s.files += %w( src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc )
+ s.files += %w( src/core/tsi/ssl/session_cache/ssl_session_cache.cc )
+ s.files += %w( src/core/tsi/ssl/session_cache/ssl_session_openssl.cc )
s.files += %w( src/core/tsi/ssl_transport_security.cc )
s.files += %w( src/core/tsi/transport_security_grpc.cc )
s.files += %w( src/core/ext/transport/chttp2/server/chttp2_server.cc )
diff --git a/grpc.gyp b/grpc.gyp
index 9448183e69..9c218371dd 100644
--- a/grpc.gyp
+++ b/grpc.gyp
@@ -34,6 +34,7 @@
'Release': {
'cflags': [
'-O2',
+ '-Wframe-larger-than=16384',
],
'defines': [
'NDEBUG',
@@ -273,6 +274,8 @@
'src/core/lib/iomgr/gethostname_sysconf.cc',
'src/core/lib/iomgr/iocp_windows.cc',
'src/core/lib/iomgr/iomgr.cc',
+ 'src/core/lib/iomgr/iomgr_custom.cc',
+ 'src/core/lib/iomgr/iomgr_internal.cc',
'src/core/lib/iomgr/iomgr_posix.cc',
'src/core/lib/iomgr/iomgr_uv.cc',
'src/core/lib/iomgr/iomgr_windows.cc',
@@ -281,12 +284,16 @@
'src/core/lib/iomgr/lockfree_event.cc',
'src/core/lib/iomgr/network_status_tracker.cc',
'src/core/lib/iomgr/polling_entity.cc',
- 'src/core/lib/iomgr/pollset_set_uv.cc',
+ 'src/core/lib/iomgr/pollset.cc',
+ 'src/core/lib/iomgr/pollset_custom.cc',
+ 'src/core/lib/iomgr/pollset_set.cc',
+ 'src/core/lib/iomgr/pollset_set_custom.cc',
'src/core/lib/iomgr/pollset_set_windows.cc',
'src/core/lib/iomgr/pollset_uv.cc',
'src/core/lib/iomgr/pollset_windows.cc',
+ 'src/core/lib/iomgr/resolve_address.cc',
+ 'src/core/lib/iomgr/resolve_address_custom.cc',
'src/core/lib/iomgr/resolve_address_posix.cc',
- 'src/core/lib/iomgr/resolve_address_uv.cc',
'src/core/lib/iomgr/resolve_address_windows.cc',
'src/core/lib/iomgr/resource_quota.cc',
'src/core/lib/iomgr/sockaddr_utils.cc',
@@ -298,19 +305,24 @@
'src/core/lib/iomgr/socket_utils_uv.cc',
'src/core/lib/iomgr/socket_utils_windows.cc',
'src/core/lib/iomgr/socket_windows.cc',
+ 'src/core/lib/iomgr/tcp_client.cc',
+ 'src/core/lib/iomgr/tcp_client_custom.cc',
'src/core/lib/iomgr/tcp_client_posix.cc',
- 'src/core/lib/iomgr/tcp_client_uv.cc',
'src/core/lib/iomgr/tcp_client_windows.cc',
+ 'src/core/lib/iomgr/tcp_custom.cc',
'src/core/lib/iomgr/tcp_posix.cc',
+ 'src/core/lib/iomgr/tcp_server.cc',
+ 'src/core/lib/iomgr/tcp_server_custom.cc',
'src/core/lib/iomgr/tcp_server_posix.cc',
'src/core/lib/iomgr/tcp_server_utils_posix_common.cc',
'src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc',
'src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc',
- 'src/core/lib/iomgr/tcp_server_uv.cc',
'src/core/lib/iomgr/tcp_server_windows.cc',
'src/core/lib/iomgr/tcp_uv.cc',
'src/core/lib/iomgr/tcp_windows.cc',
'src/core/lib/iomgr/time_averaged_stats.cc',
+ 'src/core/lib/iomgr/timer.cc',
+ 'src/core/lib/iomgr/timer_custom.cc',
'src/core/lib/iomgr/timer_generic.cc',
'src/core/lib/iomgr/timer_heap.cc',
'src/core/lib/iomgr/timer_manager.cc',
@@ -484,6 +496,9 @@
'src/core/ext/filters/deadline/deadline_filter.cc',
'src/core/tsi/alts_transport_security.cc',
'src/core/tsi/fake_transport_security.cc',
+ 'src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc',
+ 'src/core/tsi/ssl/session_cache/ssl_session_cache.cc',
+ 'src/core/tsi/ssl/session_cache/ssl_session_openssl.cc',
'src/core/tsi/ssl_transport_security.cc',
'src/core/tsi/transport_security_grpc.cc',
'src/core/ext/transport/chttp2/server/chttp2_server.cc',
@@ -606,6 +621,8 @@
'src/core/lib/iomgr/gethostname_sysconf.cc',
'src/core/lib/iomgr/iocp_windows.cc',
'src/core/lib/iomgr/iomgr.cc',
+ 'src/core/lib/iomgr/iomgr_custom.cc',
+ 'src/core/lib/iomgr/iomgr_internal.cc',
'src/core/lib/iomgr/iomgr_posix.cc',
'src/core/lib/iomgr/iomgr_uv.cc',
'src/core/lib/iomgr/iomgr_windows.cc',
@@ -614,12 +631,16 @@
'src/core/lib/iomgr/lockfree_event.cc',
'src/core/lib/iomgr/network_status_tracker.cc',
'src/core/lib/iomgr/polling_entity.cc',
- 'src/core/lib/iomgr/pollset_set_uv.cc',
+ 'src/core/lib/iomgr/pollset.cc',
+ 'src/core/lib/iomgr/pollset_custom.cc',
+ 'src/core/lib/iomgr/pollset_set.cc',
+ 'src/core/lib/iomgr/pollset_set_custom.cc',
'src/core/lib/iomgr/pollset_set_windows.cc',
'src/core/lib/iomgr/pollset_uv.cc',
'src/core/lib/iomgr/pollset_windows.cc',
+ 'src/core/lib/iomgr/resolve_address.cc',
+ 'src/core/lib/iomgr/resolve_address_custom.cc',
'src/core/lib/iomgr/resolve_address_posix.cc',
- 'src/core/lib/iomgr/resolve_address_uv.cc',
'src/core/lib/iomgr/resolve_address_windows.cc',
'src/core/lib/iomgr/resource_quota.cc',
'src/core/lib/iomgr/sockaddr_utils.cc',
@@ -631,19 +652,24 @@
'src/core/lib/iomgr/socket_utils_uv.cc',
'src/core/lib/iomgr/socket_utils_windows.cc',
'src/core/lib/iomgr/socket_windows.cc',
+ 'src/core/lib/iomgr/tcp_client.cc',
+ 'src/core/lib/iomgr/tcp_client_custom.cc',
'src/core/lib/iomgr/tcp_client_posix.cc',
- 'src/core/lib/iomgr/tcp_client_uv.cc',
'src/core/lib/iomgr/tcp_client_windows.cc',
+ 'src/core/lib/iomgr/tcp_custom.cc',
'src/core/lib/iomgr/tcp_posix.cc',
+ 'src/core/lib/iomgr/tcp_server.cc',
+ 'src/core/lib/iomgr/tcp_server_custom.cc',
'src/core/lib/iomgr/tcp_server_posix.cc',
'src/core/lib/iomgr/tcp_server_utils_posix_common.cc',
'src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc',
'src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc',
- 'src/core/lib/iomgr/tcp_server_uv.cc',
'src/core/lib/iomgr/tcp_server_windows.cc',
'src/core/lib/iomgr/tcp_uv.cc',
'src/core/lib/iomgr/tcp_windows.cc',
'src/core/lib/iomgr/time_averaged_stats.cc',
+ 'src/core/lib/iomgr/timer.cc',
+ 'src/core/lib/iomgr/timer_custom.cc',
'src/core/lib/iomgr/timer_generic.cc',
'src/core/lib/iomgr/timer_heap.cc',
'src/core/lib/iomgr/timer_manager.cc',
@@ -823,6 +849,8 @@
'src/core/lib/iomgr/gethostname_sysconf.cc',
'src/core/lib/iomgr/iocp_windows.cc',
'src/core/lib/iomgr/iomgr.cc',
+ 'src/core/lib/iomgr/iomgr_custom.cc',
+ 'src/core/lib/iomgr/iomgr_internal.cc',
'src/core/lib/iomgr/iomgr_posix.cc',
'src/core/lib/iomgr/iomgr_uv.cc',
'src/core/lib/iomgr/iomgr_windows.cc',
@@ -831,12 +859,16 @@
'src/core/lib/iomgr/lockfree_event.cc',
'src/core/lib/iomgr/network_status_tracker.cc',
'src/core/lib/iomgr/polling_entity.cc',
- 'src/core/lib/iomgr/pollset_set_uv.cc',
+ 'src/core/lib/iomgr/pollset.cc',
+ 'src/core/lib/iomgr/pollset_custom.cc',
+ 'src/core/lib/iomgr/pollset_set.cc',
+ 'src/core/lib/iomgr/pollset_set_custom.cc',
'src/core/lib/iomgr/pollset_set_windows.cc',
'src/core/lib/iomgr/pollset_uv.cc',
'src/core/lib/iomgr/pollset_windows.cc',
+ 'src/core/lib/iomgr/resolve_address.cc',
+ 'src/core/lib/iomgr/resolve_address_custom.cc',
'src/core/lib/iomgr/resolve_address_posix.cc',
- 'src/core/lib/iomgr/resolve_address_uv.cc',
'src/core/lib/iomgr/resolve_address_windows.cc',
'src/core/lib/iomgr/resource_quota.cc',
'src/core/lib/iomgr/sockaddr_utils.cc',
@@ -848,19 +880,24 @@
'src/core/lib/iomgr/socket_utils_uv.cc',
'src/core/lib/iomgr/socket_utils_windows.cc',
'src/core/lib/iomgr/socket_windows.cc',
+ 'src/core/lib/iomgr/tcp_client.cc',
+ 'src/core/lib/iomgr/tcp_client_custom.cc',
'src/core/lib/iomgr/tcp_client_posix.cc',
- 'src/core/lib/iomgr/tcp_client_uv.cc',
'src/core/lib/iomgr/tcp_client_windows.cc',
+ 'src/core/lib/iomgr/tcp_custom.cc',
'src/core/lib/iomgr/tcp_posix.cc',
+ 'src/core/lib/iomgr/tcp_server.cc',
+ 'src/core/lib/iomgr/tcp_server_custom.cc',
'src/core/lib/iomgr/tcp_server_posix.cc',
'src/core/lib/iomgr/tcp_server_utils_posix_common.cc',
'src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc',
'src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc',
- 'src/core/lib/iomgr/tcp_server_uv.cc',
'src/core/lib/iomgr/tcp_server_windows.cc',
'src/core/lib/iomgr/tcp_uv.cc',
'src/core/lib/iomgr/tcp_windows.cc',
'src/core/lib/iomgr/time_averaged_stats.cc',
+ 'src/core/lib/iomgr/timer.cc',
+ 'src/core/lib/iomgr/timer_custom.cc',
'src/core/lib/iomgr/timer_generic.cc',
'src/core/lib/iomgr/timer_heap.cc',
'src/core/lib/iomgr/timer_manager.cc',
@@ -1019,6 +1056,8 @@
'src/core/lib/iomgr/gethostname_sysconf.cc',
'src/core/lib/iomgr/iocp_windows.cc',
'src/core/lib/iomgr/iomgr.cc',
+ 'src/core/lib/iomgr/iomgr_custom.cc',
+ 'src/core/lib/iomgr/iomgr_internal.cc',
'src/core/lib/iomgr/iomgr_posix.cc',
'src/core/lib/iomgr/iomgr_uv.cc',
'src/core/lib/iomgr/iomgr_windows.cc',
@@ -1027,12 +1066,16 @@
'src/core/lib/iomgr/lockfree_event.cc',
'src/core/lib/iomgr/network_status_tracker.cc',
'src/core/lib/iomgr/polling_entity.cc',
- 'src/core/lib/iomgr/pollset_set_uv.cc',
+ 'src/core/lib/iomgr/pollset.cc',
+ 'src/core/lib/iomgr/pollset_custom.cc',
+ 'src/core/lib/iomgr/pollset_set.cc',
+ 'src/core/lib/iomgr/pollset_set_custom.cc',
'src/core/lib/iomgr/pollset_set_windows.cc',
'src/core/lib/iomgr/pollset_uv.cc',
'src/core/lib/iomgr/pollset_windows.cc',
+ 'src/core/lib/iomgr/resolve_address.cc',
+ 'src/core/lib/iomgr/resolve_address_custom.cc',
'src/core/lib/iomgr/resolve_address_posix.cc',
- 'src/core/lib/iomgr/resolve_address_uv.cc',
'src/core/lib/iomgr/resolve_address_windows.cc',
'src/core/lib/iomgr/resource_quota.cc',
'src/core/lib/iomgr/sockaddr_utils.cc',
@@ -1044,19 +1087,24 @@
'src/core/lib/iomgr/socket_utils_uv.cc',
'src/core/lib/iomgr/socket_utils_windows.cc',
'src/core/lib/iomgr/socket_windows.cc',
+ 'src/core/lib/iomgr/tcp_client.cc',
+ 'src/core/lib/iomgr/tcp_client_custom.cc',
'src/core/lib/iomgr/tcp_client_posix.cc',
- 'src/core/lib/iomgr/tcp_client_uv.cc',
'src/core/lib/iomgr/tcp_client_windows.cc',
+ 'src/core/lib/iomgr/tcp_custom.cc',
'src/core/lib/iomgr/tcp_posix.cc',
+ 'src/core/lib/iomgr/tcp_server.cc',
+ 'src/core/lib/iomgr/tcp_server_custom.cc',
'src/core/lib/iomgr/tcp_server_posix.cc',
'src/core/lib/iomgr/tcp_server_utils_posix_common.cc',
'src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc',
'src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc',
- 'src/core/lib/iomgr/tcp_server_uv.cc',
'src/core/lib/iomgr/tcp_server_windows.cc',
'src/core/lib/iomgr/tcp_uv.cc',
'src/core/lib/iomgr/tcp_windows.cc',
'src/core/lib/iomgr/time_averaged_stats.cc',
+ 'src/core/lib/iomgr/timer.cc',
+ 'src/core/lib/iomgr/timer_custom.cc',
'src/core/lib/iomgr/timer_generic.cc',
'src/core/lib/iomgr/timer_heap.cc',
'src/core/lib/iomgr/timer_manager.cc',
diff --git a/include/grpc/grpc_security.h b/include/grpc/grpc_security.h
index abc591fd75..7c069b39d5 100644
--- a/include/grpc/grpc_security.h
+++ b/include/grpc/grpc_security.h
@@ -100,6 +100,25 @@ GRPCAPI void grpc_auth_context_add_cstring_property(grpc_auth_context* ctx,
GRPCAPI int grpc_auth_context_set_peer_identity_property_name(
grpc_auth_context* ctx, const char* name);
+/** --- SSL Session Cache. ---
+
+ A SSL session cache object represents a way to cache client sessions
+ between connections. Only ticket-based resumption is supported. */
+
+typedef struct grpc_ssl_session_cache grpc_ssl_session_cache;
+
+/** Create LRU cache for client-side SSL sessions with the given capacity.
+ If capacity is < 1, a default capacity is used instead. */
+GRPCAPI grpc_ssl_session_cache* grpc_ssl_session_cache_create_lru(
+ size_t capacity);
+
+/** Destroy SSL session cache. */
+GRPCAPI void grpc_ssl_session_cache_destroy(grpc_ssl_session_cache* cache);
+
+/** Create a channel arg with the given cache object. */
+GRPCAPI grpc_arg
+grpc_ssl_session_cache_create_channel_arg(grpc_ssl_session_cache* cache);
+
/** --- grpc_channel_credentials object. ---
A channel credentials object represents a way to authenticate a client on a
diff --git a/include/grpc/grpc_security_constants.h b/include/grpc/grpc_security_constants.h
index 60e167eb88..92580ea35e 100644
--- a/include/grpc/grpc_security_constants.h
+++ b/include/grpc/grpc_security_constants.h
@@ -29,6 +29,7 @@ extern "C" {
#define GRPC_X509_CN_PROPERTY_NAME "x509_common_name"
#define GRPC_X509_SAN_PROPERTY_NAME "x509_subject_alternative_name"
#define GRPC_X509_PEM_CERT_PROPERTY_NAME "x509_pem_cert"
+#define GRPC_SSL_SESSION_REUSED_PROPERTY "ssl_session_reused"
/** Environment variable that points to the default SSL roots file. This file
must be a PEM encoded file with all the roots such as the one that can be
diff --git a/include/grpc/impl/codegen/grpc_types.h b/include/grpc/impl/codegen/grpc_types.h
index dcce2e7f9a..e1a3f0dcf1 100644
--- a/include/grpc/impl/codegen/grpc_types.h
+++ b/include/grpc/impl/codegen/grpc_types.h
@@ -258,6 +258,10 @@ typedef struct {
secure channel is an SSL channel). If this parameter is specified and the
underlying is not an SSL channel, it will just be ignored. */
#define GRPC_SSL_TARGET_NAME_OVERRIDE_ARG "grpc.ssl_target_name_override"
+/** If non-zero, a pointer to a session cache (a pointer of type
+ grpc_ssl_session_cache*). (use grpc_ssl_session_cache_arg_vtable() to fetch
+ an appropriate pointer arg vtable) */
+#define GRPC_SSL_SESSION_CACHE_ARG "grpc.ssl_session_cache"
/** Maximum metadata size, in bytes. Note this limit applies to the max sum of
all metadata key-value entries in a batch of headers. */
#define GRPC_ARG_MAX_METADATA_SIZE "grpc.max_metadata_size"
diff --git a/include/grpc/impl/codegen/slice.h b/include/grpc/impl/codegen/slice.h
index a3cd1f1bbe..90dbfd3b1f 100644
--- a/include/grpc/impl/codegen/slice.h
+++ b/include/grpc/impl/codegen/slice.h
@@ -95,7 +95,7 @@ struct grpc_slice {
/** Represents an expandable array of slices, to be interpreted as a
single item. */
-typedef struct {
+typedef struct grpc_slice_buffer {
/** This is for internal use only. External users (i.e any code outside grpc
* core) MUST NOT use this field */
grpc_slice* base_slices;
diff --git a/include/grpc/support/log.h b/include/grpc/support/log.h
index ccb4b304cc..2236703db3 100644
--- a/include/grpc/support/log.h
+++ b/include/grpc/support/log.h
@@ -21,7 +21,6 @@
#include <grpc/impl/codegen/port_platform.h>
-#include <inttypes.h>
#include <stdarg.h>
#include <stdlib.h> /* for abort() */
diff --git a/include/grpcpp/impl/codegen/async_unary_call.h b/include/grpcpp/impl/codegen/async_unary_call.h
index 255f874e26..60ff8e2f05 100644
--- a/include/grpcpp/impl/codegen/async_unary_call.h
+++ b/include/grpcpp/impl/codegen/async_unary_call.h
@@ -126,9 +126,10 @@ class ClientAsyncResponseReader final
assert(started_);
GPR_CODEGEN_ASSERT(!context_->initial_metadata_received_);
- meta_buf.set_output_tag(tag);
- meta_buf.RecvInitialMetadata(context_);
- call_.PerformOps(&meta_buf);
+ single_buf.set_output_tag(tag);
+ single_buf.RecvInitialMetadata(context_);
+ call_.PerformOps(&single_buf);
+ initial_metadata_read_ = true;
}
/// See \a ClientAysncResponseReaderInterface::Finish for semantics.
@@ -138,14 +139,20 @@ class ClientAsyncResponseReader final
/// possible initial and trailing metadata sent from the server.
void Finish(R* msg, Status* status, void* tag) override {
assert(started_);
- finish_buf.set_output_tag(tag);
- if (!context_->initial_metadata_received_) {
- finish_buf.RecvInitialMetadata(context_);
+ if (initial_metadata_read_) {
+ finish_buf.set_output_tag(tag);
+ finish_buf.RecvMessage(msg);
+ finish_buf.AllowNoMessage();
+ finish_buf.ClientRecvStatus(context_, status);
+ call_.PerformOps(&finish_buf);
+ } else {
+ single_buf.set_output_tag(tag);
+ single_buf.RecvInitialMetadata(context_);
+ single_buf.RecvMessage(msg);
+ single_buf.AllowNoMessage();
+ single_buf.ClientRecvStatus(context_, status);
+ call_.PerformOps(&single_buf);
}
- finish_buf.RecvMessage(msg);
- finish_buf.AllowNoMessage();
- finish_buf.ClientRecvStatus(context_, status);
- call_.PerformOps(&finish_buf);
}
private:
@@ -153,6 +160,7 @@ class ClientAsyncResponseReader final
ClientContext* const context_;
::grpc::internal::Call call_;
bool started_;
+ bool initial_metadata_read_ = false;
template <class W>
ClientAsyncResponseReader(::grpc::internal::Call call, ClientContext* context,
@@ -160,30 +168,29 @@ class ClientAsyncResponseReader final
: context_(context), call_(call), started_(start) {
// Bind the metadata at time of StartCallInternal but set up the rest here
// TODO(ctiller): don't assert
- GPR_CODEGEN_ASSERT(init_buf.SendMessage(request).ok());
- init_buf.ClientSendClose();
+ GPR_CODEGEN_ASSERT(single_buf.SendMessage(request).ok());
+ single_buf.ClientSendClose();
if (start) StartCallInternal();
}
void StartCallInternal() {
- init_buf.SendInitialMetadata(context_->send_initial_metadata_,
- context_->initial_metadata_flags());
- call_.PerformOps(&init_buf);
+ single_buf.SendInitialMetadata(context_->send_initial_metadata_,
+ context_->initial_metadata_flags());
}
// disable operator new
static void* operator new(std::size_t size);
static void* operator new(std::size_t size, void* p) { return p; }
- ::grpc::internal::SneakyCallOpSet<::grpc::internal::CallOpSendInitialMetadata,
- ::grpc::internal::CallOpSendMessage,
- ::grpc::internal::CallOpClientSendClose>
- init_buf;
- ::grpc::internal::CallOpSet<::grpc::internal::CallOpRecvInitialMetadata>
- meta_buf;
- ::grpc::internal::CallOpSet<::grpc::internal::CallOpRecvInitialMetadata,
+ ::grpc::internal::CallOpSet<::grpc::internal::CallOpSendInitialMetadata,
+ ::grpc::internal::CallOpSendMessage,
+ ::grpc::internal::CallOpClientSendClose,
+ ::grpc::internal::CallOpRecvInitialMetadata,
::grpc::internal::CallOpRecvMessage<R>,
::grpc::internal::CallOpClientRecvStatus>
+ single_buf;
+ ::grpc::internal::CallOpSet<::grpc::internal::CallOpRecvMessage<R>,
+ ::grpc::internal::CallOpClientRecvStatus>
finish_buf;
};
diff --git a/include/grpcpp/impl/codegen/completion_queue.h b/include/grpcpp/impl/codegen/completion_queue.h
index 80c7c41982..9713333cf5 100644
--- a/include/grpcpp/impl/codegen/completion_queue.h
+++ b/include/grpcpp/impl/codegen/completion_queue.h
@@ -365,9 +365,11 @@ class ServerCompletionQueue : public CompletionQueue {
public:
bool IsFrequentlyPolled() { return polling_type_ != GRPC_CQ_NON_LISTENING; }
+ protected:
+ /// Default constructor
+ ServerCompletionQueue() {}
+
private:
- grpc_cq_polling_type polling_type_;
- friend class ServerBuilder;
/// \param is_frequently_polled Informs the GRPC library about whether the
/// server completion queue would be actively polled (by calling Next() or
/// AsyncNext()). By default all server completion queues are assumed to be
@@ -376,6 +378,9 @@ class ServerCompletionQueue : public CompletionQueue {
: CompletionQueue(grpc_completion_queue_attributes{
GRPC_CQ_CURRENT_VERSION, GRPC_CQ_NEXT, polling_type}),
polling_type_(polling_type) {}
+
+ grpc_cq_polling_type polling_type_;
+ friend class ServerBuilder;
};
} // namespace grpc
diff --git a/include/grpcpp/impl/codegen/status.h b/include/grpcpp/impl/codegen/status.h
index 9f409eb9bd..e625a76b15 100644
--- a/include/grpcpp/impl/codegen/status.h
+++ b/include/grpcpp/impl/codegen/status.h
@@ -19,6 +19,7 @@
#ifndef GRPCPP_IMPL_CODEGEN_STATUS_H
#define GRPCPP_IMPL_CODEGEN_STATUS_H
+#include <grpc/impl/codegen/status.h>
#include <grpcpp/impl/codegen/config.h>
#include <grpcpp/impl/codegen/status_code_enum.h>
@@ -30,7 +31,60 @@ namespace grpc {
class Status {
public:
/// Construct an OK instance.
- Status() : code_(StatusCode::OK) {}
+ Status() : code_(StatusCode::OK) {
+ // Static assertions to make sure that the C++ API value correctly
+ // maps to the core surface API value
+ static_assert(StatusCode::OK == static_cast<StatusCode>(GRPC_STATUS_OK),
+ "Mismatched status code");
+ static_assert(
+ StatusCode::CANCELLED == static_cast<StatusCode>(GRPC_STATUS_CANCELLED),
+ "Mismatched status code");
+ static_assert(
+ StatusCode::UNKNOWN == static_cast<StatusCode>(GRPC_STATUS_UNKNOWN),
+ "Mismatched status code");
+ static_assert(StatusCode::INVALID_ARGUMENT ==
+ static_cast<StatusCode>(GRPC_STATUS_INVALID_ARGUMENT),
+ "Mismatched status code");
+ static_assert(StatusCode::DEADLINE_EXCEEDED ==
+ static_cast<StatusCode>(GRPC_STATUS_DEADLINE_EXCEEDED),
+ "Mismatched status code");
+ static_assert(
+ StatusCode::NOT_FOUND == static_cast<StatusCode>(GRPC_STATUS_NOT_FOUND),
+ "Mismatched status code");
+ static_assert(StatusCode::ALREADY_EXISTS ==
+ static_cast<StatusCode>(GRPC_STATUS_ALREADY_EXISTS),
+ "Mismatched status code");
+ static_assert(StatusCode::PERMISSION_DENIED ==
+ static_cast<StatusCode>(GRPC_STATUS_PERMISSION_DENIED),
+ "Mismatched status code");
+ static_assert(StatusCode::UNAUTHENTICATED ==
+ static_cast<StatusCode>(GRPC_STATUS_UNAUTHENTICATED),
+ "Mismatched status code");
+ static_assert(StatusCode::RESOURCE_EXHAUSTED ==
+ static_cast<StatusCode>(GRPC_STATUS_RESOURCE_EXHAUSTED),
+ "Mismatched status code");
+ static_assert(StatusCode::FAILED_PRECONDITION ==
+ static_cast<StatusCode>(GRPC_STATUS_FAILED_PRECONDITION),
+ "Mismatched status code");
+ static_assert(
+ StatusCode::ABORTED == static_cast<StatusCode>(GRPC_STATUS_ABORTED),
+ "Mismatched status code");
+ static_assert(StatusCode::OUT_OF_RANGE ==
+ static_cast<StatusCode>(GRPC_STATUS_OUT_OF_RANGE),
+ "Mismatched status code");
+ static_assert(StatusCode::UNIMPLEMENTED ==
+ static_cast<StatusCode>(GRPC_STATUS_UNIMPLEMENTED),
+ "Mismatched status code");
+ static_assert(
+ StatusCode::INTERNAL == static_cast<StatusCode>(GRPC_STATUS_INTERNAL),
+ "Mismatched status code");
+ static_assert(StatusCode::UNAVAILABLE ==
+ static_cast<StatusCode>(GRPC_STATUS_UNAVAILABLE),
+ "Mismatched status code");
+ static_assert(
+ StatusCode::DATA_LOSS == static_cast<StatusCode>(GRPC_STATUS_DATA_LOSS),
+ "Mismatched status code");
+ }
/// Construct an instance with associated \a code and \a error_message.
/// It is an error to construct an OK status with non-empty \a error_message.
diff --git a/include/grpcpp/server.h b/include/grpcpp/server.h
index f99a6c26b4..e88e7966dc 100644
--- a/include/grpcpp/server.h
+++ b/include/grpcpp/server.h
@@ -49,7 +49,7 @@ class ServerInitializer;
///
/// Use a \a grpc::ServerBuilder to create, configure, and start
/// \a Server instances.
-class Server final : public ServerInterface, private GrpcLibraryCodegen {
+class Server : public ServerInterface, private GrpcLibraryCodegen {
public:
~Server();
@@ -87,7 +87,8 @@ class Server final : public ServerInterface, private GrpcLibraryCodegen {
/// application and is shared among all \a Server objects.
static void SetGlobalCallbacks(GlobalCallbacks* callbacks);
- // Returns a \em raw pointer to the underlying \a grpc_server instance.
+ /// Returns a \em raw pointer to the underlying \a grpc_server instance.
+ /// EXPERIMENTAL: for internal/test use only
grpc_server* c_server();
/// Returns the health check service.
@@ -98,24 +99,26 @@ class Server final : public ServerInterface, private GrpcLibraryCodegen {
/// Establish a channel for in-process communication
std::shared_ptr<Channel> InProcessChannel(const ChannelArguments& args);
- private:
- friend class AsyncGenericService;
- friend class ServerBuilder;
- friend class ServerInitializer;
-
- class SyncRequest;
- class AsyncRequest;
- class ShutdownRequest;
-
- /// SyncRequestThreadManager is an implementation of ThreadManager. This class
- /// is responsible for polling for incoming RPCs and calling the RPC handlers.
- /// This is only used in case of a Sync server (i.e a server exposing a sync
- /// interface)
- class SyncRequestThreadManager;
+ protected:
+ /// Register a service. This call does not take ownership of the service.
+ /// The service must exist for the lifetime of the Server instance.
+ bool RegisterService(const grpc::string* host, Service* service) override;
- class UnimplementedAsyncRequestContext;
- class UnimplementedAsyncRequest;
- class UnimplementedAsyncResponse;
+ /// Try binding the server to the given \a addr endpoint
+ /// (port, and optionally including IP address to bind to).
+ ///
+ /// It can be invoked multiple times. Should be used before
+ /// starting the server.
+ ///
+ /// \param addr The address to try to bind to the server (eg, localhost:1234,
+ /// 192.168.1.1:31416, [::1]:27182, etc.).
+ /// \param creds The credentials associated with the server.
+ ///
+ /// \return bound port number on success, 0 on failure.
+ ///
+ /// \warning It is an error to call this method on an already started server.
+ int AddListeningPort(const grpc::string& addr,
+ ServerCredentials* creds) override;
/// Server constructors. To be used by \a ServerBuilder only.
///
@@ -143,30 +146,6 @@ class Server final : public ServerInterface, private GrpcLibraryCodegen {
sync_server_cqs,
int min_pollers, int max_pollers, int sync_cq_timeout_msec);
- /// Register a service. This call does not take ownership of the service.
- /// The service must exist for the lifetime of the Server instance.
- bool RegisterService(const grpc::string* host, Service* service) override;
-
- /// Register a generic service. This call does not take ownership of the
- /// service. The service must exist for the lifetime of the Server instance.
- void RegisterAsyncGenericService(AsyncGenericService* service) override;
-
- /// Try binding the server to the given \a addr endpoint
- /// (port, and optionally including IP address to bind to).
- ///
- /// It can be invoked multiple times. Should be used before
- /// starting the server.
- ///
- /// \param addr The address to try to bind to the server (eg, localhost:1234,
- /// 192.168.1.1:31416, [::1]:27182, etc.).
- /// \param creds The credentials associated with the server.
- ///
- /// \return bound port number on success, 0 on failure.
- ///
- /// \warning It is an error to call this method on an already started server.
- int AddListeningPort(const grpc::string& addr,
- ServerCredentials* creds) override;
-
/// Start the server.
///
/// \param cqs Completion queues for handling asynchronous services. The
@@ -175,6 +154,31 @@ class Server final : public ServerInterface, private GrpcLibraryCodegen {
/// \param num_cqs How many completion queues does \a cqs hold.
void Start(ServerCompletionQueue** cqs, size_t num_cqs) override;
+ grpc_server* server() override { return server_; };
+
+ private:
+ friend class AsyncGenericService;
+ friend class ServerBuilder;
+ friend class ServerInitializer;
+
+ class SyncRequest;
+ class AsyncRequest;
+ class ShutdownRequest;
+
+ /// SyncRequestThreadManager is an implementation of ThreadManager. This class
+ /// is responsible for polling for incoming RPCs and calling the RPC handlers.
+ /// This is only used in case of a Sync server (i.e a server exposing a sync
+ /// interface)
+ class SyncRequestThreadManager;
+
+ class UnimplementedAsyncRequestContext;
+ class UnimplementedAsyncRequest;
+ class UnimplementedAsyncResponse;
+
+ /// Register a generic service. This call does not take ownership of the
+ /// service. The service must exist for the lifetime of the Server instance.
+ void RegisterAsyncGenericService(AsyncGenericService* service) override;
+
void PerformOpsOnCall(internal::CallOpSetInterface* ops,
internal::Call* call) override;
@@ -184,8 +188,6 @@ class Server final : public ServerInterface, private GrpcLibraryCodegen {
return max_receive_message_size_;
};
- grpc_server* server() override { return server_; };
-
ServerInitializer* initializer();
const int max_receive_message_size_;
@@ -200,7 +202,7 @@ class Server final : public ServerInterface, private GrpcLibraryCodegen {
/// the \a sync_server_cqs)
std::vector<std::unique_ptr<SyncRequestThreadManager>> sync_req_mgrs_;
- // Sever status
+ // Server status
std::mutex mu_;
bool started_;
bool shutdown_;
diff --git a/include/grpcpp/server_builder.h b/include/grpcpp/server_builder.h
index c35a6cf98a..4c8dcf4916 100644
--- a/include/grpcpp/server_builder.h
+++ b/include/grpcpp/server_builder.h
@@ -52,7 +52,7 @@ class ServerBuilderPluginTest;
class ServerBuilder {
public:
ServerBuilder();
- ~ServerBuilder();
+ virtual ~ServerBuilder();
//////////////////////////////////////////////////////////////////////////////
// Primary API's
@@ -65,7 +65,7 @@ class ServerBuilder {
/// traffic (via AddListeningPort)
/// 3. [for async api only] completion queues have been added via
/// AddCompletionQueue
- std::unique_ptr<Server> BuildAndStart();
+ virtual std::unique_ptr<Server> BuildAndStart();
/// Register a service. This call does not take ownership of the service.
/// The service must exist for the lifetime of the \a Server instance returned
@@ -210,15 +210,48 @@ class ServerBuilder {
/// doc/workarounds.md.
ServerBuilder& EnableWorkaround(grpc_workaround_list id);
- private:
- friend class ::grpc::testing::ServerBuilderPluginTest;
-
+ protected:
+ /// Experimental, to be deprecated
struct Port {
grpc::string addr;
std::shared_ptr<ServerCredentials> creds;
int* selected_port;
};
+ /// Experimental, to be deprecated
+ typedef std::unique_ptr<grpc::string> HostString;
+ struct NamedService {
+ explicit NamedService(Service* s) : service(s) {}
+ NamedService(const grpc::string& h, Service* s)
+ : host(new grpc::string(h)), service(s) {}
+ HostString host;
+ Service* service;
+ };
+
+ /// Experimental, to be deprecated
+ std::vector<Port> ports() { return ports_; }
+
+ /// Experimental, to be deprecated
+ std::vector<NamedService*> services() {
+ std::vector<NamedService*> service_refs;
+ for (auto& ptr : services_) {
+ service_refs.push_back(ptr.get());
+ }
+ return service_refs;
+ }
+
+ /// Experimental, to be deprecated
+ std::vector<ServerBuilderOption*> options() {
+ std::vector<ServerBuilderOption*> option_refs;
+ for (auto& ptr : options_) {
+ option_refs.push_back(ptr.get());
+ }
+ return option_refs;
+ }
+
+ private:
+ friend class ::grpc::testing::ServerBuilderPluginTest;
+
struct SyncServerSettings {
SyncServerSettings()
: num_cqs(1), min_pollers(1), max_pollers(2), cq_timeout_msec(10000) {}
@@ -238,15 +271,6 @@ class ServerBuilder {
int cq_timeout_msec;
};
- typedef std::unique_ptr<grpc::string> HostString;
- struct NamedService {
- explicit NamedService(Service* s) : service(s) {}
- NamedService(const grpc::string& h, Service* s)
- : host(new grpc::string(h)), service(s) {}
- HostString host;
- Service* service;
- };
-
int max_receive_message_size_;
int max_send_message_size_;
std::vector<std::unique_ptr<ServerBuilderOption>> options_;
diff --git a/package.xml b/package.xml
index 79eeffbb0c..0b0bc8f4f6 100644
--- a/package.xml
+++ b/package.xml
@@ -281,6 +281,8 @@
<file baseinstalldir="/" name="src/core/ext/filters/deadline/deadline_filter.h" role="src" />
<file baseinstalldir="/" name="src/core/tsi/alts_transport_security.h" role="src" />
<file baseinstalldir="/" name="src/core/tsi/fake_transport_security.h" role="src" />
+ <file baseinstalldir="/" name="src/core/tsi/ssl/session_cache/ssl_session.h" role="src" />
+ <file baseinstalldir="/" name="src/core/tsi/ssl/session_cache/ssl_session_cache.h" role="src" />
<file baseinstalldir="/" name="src/core/tsi/ssl_transport_security.h" role="src" />
<file baseinstalldir="/" name="src/core/tsi/ssl_types.h" role="src" />
<file baseinstalldir="/" name="src/core/tsi/transport_security_grpc.h" role="src" />
@@ -330,9 +332,9 @@
<file baseinstalldir="/" name="src/core/lib/iomgr/gethostname.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/iocp_windows.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/iomgr.h" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/iomgr_custom.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/iomgr_internal.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/iomgr_posix.h" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/iomgr_uv.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/is_epollexclusive_available.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/load_file.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/lockfree_event.h" role="src" />
@@ -340,14 +342,17 @@
<file baseinstalldir="/" name="src/core/lib/iomgr/network_status_tracker.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/polling_entity.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/pollset.h" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/pollset_custom.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/pollset_set.h" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/pollset_set_custom.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/pollset_set_windows.h" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/pollset_uv.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/pollset_windows.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/port.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/resolve_address.h" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/resolve_address_custom.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/resource_quota.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/sockaddr.h" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/sockaddr_custom.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/sockaddr_posix.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/sockaddr_utils.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/sockaddr_windows.h" role="src" />
@@ -359,17 +364,16 @@
<file baseinstalldir="/" name="src/core/lib/iomgr/sys_epoll_wrapper.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_client.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_client_posix.h" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/tcp_custom.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_posix.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_server.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_server_utils_posix.h" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/tcp_uv.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_windows.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/time_averaged_stats.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/timer.h" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/timer_generic.h" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/timer_custom.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/timer_heap.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/timer_manager.h" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/timer_uv.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/udp_server.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/unix_sockets_posix.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/wakeup_fd_cv.h" role="src" />
@@ -473,6 +477,8 @@
<file baseinstalldir="/" name="src/core/lib/iomgr/gethostname_sysconf.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/iocp_windows.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/iomgr.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/iomgr_custom.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/iomgr_internal.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/iomgr_posix.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/iomgr_uv.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/iomgr_windows.cc" role="src" />
@@ -481,12 +487,16 @@
<file baseinstalldir="/" name="src/core/lib/iomgr/lockfree_event.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/network_status_tracker.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/polling_entity.cc" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/pollset_set_uv.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/pollset.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/pollset_custom.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/pollset_set.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/pollset_set_custom.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/pollset_set_windows.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/pollset_uv.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/pollset_windows.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/resolve_address.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/resolve_address_custom.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/resolve_address_posix.cc" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/resolve_address_uv.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/resolve_address_windows.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/resource_quota.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/sockaddr_utils.cc" role="src" />
@@ -498,19 +508,24 @@
<file baseinstalldir="/" name="src/core/lib/iomgr/socket_utils_uv.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/socket_utils_windows.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/socket_windows.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/tcp_client.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/tcp_client_custom.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_client_posix.cc" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/tcp_client_uv.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_client_windows.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/tcp_custom.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_posix.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/tcp_server.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/tcp_server_custom.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_server_posix.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_server_utils_posix_common.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/tcp_server_uv.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_server_windows.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_uv.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/tcp_windows.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/time_averaged_stats.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/timer.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/timer_custom.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/timer_generic.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/timer_heap.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/timer_manager.cc" role="src" />
@@ -684,6 +699,9 @@
<file baseinstalldir="/" name="src/core/ext/filters/deadline/deadline_filter.cc" role="src" />
<file baseinstalldir="/" name="src/core/tsi/alts_transport_security.cc" role="src" />
<file baseinstalldir="/" name="src/core/tsi/fake_transport_security.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/tsi/ssl/session_cache/ssl_session_cache.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/tsi/ssl/session_cache/ssl_session_openssl.cc" role="src" />
<file baseinstalldir="/" name="src/core/tsi/ssl_transport_security.cc" role="src" />
<file baseinstalldir="/" name="src/core/tsi/transport_security_grpc.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/server/chttp2_server.cc" role="src" />
diff --git a/src/core/ext/filters/client_channel/backup_poller.h b/src/core/ext/filters/client_channel/backup_poller.h
index 7285b9b93e..8f132f968c 100644
--- a/src/core/ext/filters/client_channel/backup_poller.h
+++ b/src/core/ext/filters/client_channel/backup_poller.h
@@ -23,7 +23,6 @@
#include <grpc/grpc.h>
#include "src/core/lib/channel/channel_stack.h"
-#include "src/core/lib/iomgr/exec_ctx.h"
/* Start polling \a interested_parties periodically in the timer thread */
void grpc_client_channel_start_backup_polling(
diff --git a/src/core/ext/filters/client_channel/client_channel.cc b/src/core/ext/filters/client_channel/client_channel.cc
index 90b93fbe23..bbc5160bec 100644
--- a/src/core/ext/filters/client_channel/client_channel.cc
+++ b/src/core/ext/filters/client_channel/client_channel.cc
@@ -798,7 +798,8 @@ typedef struct {
grpc_linked_mdelem* send_initial_metadata_storage;
grpc_metadata_batch send_initial_metadata;
// For send_message.
- grpc_caching_byte_stream send_message;
+ grpc_core::ManualConstructor<grpc_core::ByteStreamCache::CachingByteStream>
+ send_message;
// For send_trailing_metadata.
grpc_linked_mdelem* send_trailing_metadata_storage;
grpc_metadata_batch send_trailing_metadata;
@@ -808,7 +809,7 @@ typedef struct {
bool trailing_metadata_available;
// For intercepting recv_message.
grpc_closure recv_message_ready;
- grpc_byte_stream* recv_message;
+ grpc_core::OrphanablePtr<grpc_core::ByteStream> recv_message;
// For intercepting recv_trailing_metadata.
grpc_metadata_batch recv_trailing_metadata;
grpc_transport_stream_stats collect_stats;
@@ -914,12 +915,12 @@ typedef struct client_channel_call_data {
gpr_atm* peer_string;
// send_message
// When we get a send_message op, we replace the original byte stream
- // with a grpc_caching_byte_stream that caches the slices to a
- // local buffer for use in retries.
+ // with a CachingByteStream that caches the slices to a local buffer for
+ // use in retries.
// Note: We inline the cache for the first 3 send_message ops and use
// dynamic allocation after that. This number was essentially picked
// at random; it could be changed in the future to tune performance.
- grpc_core::InlinedVector<grpc_byte_stream_cache*, 3> send_messages;
+ grpc_core::InlinedVector<grpc_core::ByteStreamCache*, 3> send_messages;
// send_trailing_metadata
bool seen_send_trailing_metadata;
grpc_linked_mdelem* send_trailing_metadata_storage;
@@ -964,10 +965,11 @@ static void maybe_cache_send_ops_for_batch(call_data* calld,
}
// Set up cache for send_message ops.
if (batch->send_message) {
- grpc_byte_stream_cache* cache = (grpc_byte_stream_cache*)gpr_arena_alloc(
- calld->arena, sizeof(grpc_byte_stream_cache));
- grpc_byte_stream_cache_init(cache,
- batch->payload->send_message.send_message);
+ grpc_core::ByteStreamCache* cache =
+ static_cast<grpc_core::ByteStreamCache*>(
+ gpr_arena_alloc(calld->arena, sizeof(grpc_core::ByteStreamCache)));
+ new (cache) grpc_core::ByteStreamCache(
+ std::move(batch->payload->send_message.send_message));
calld->send_messages.push_back(cache);
}
// Save metadata batch for send_trailing_metadata ops.
@@ -1002,7 +1004,7 @@ static void free_cached_send_op_data_after_commit(
"]",
chand, calld, i);
}
- grpc_byte_stream_cache_destroy(calld->send_messages[i]);
+ calld->send_messages[i]->Destroy();
}
if (retry_state->completed_send_trailing_metadata) {
grpc_metadata_batch_destroy(&calld->send_trailing_metadata);
@@ -1026,8 +1028,8 @@ static void free_cached_send_op_data_for_completed_batch(
"]",
chand, calld, retry_state->completed_send_message_count - 1);
}
- grpc_byte_stream_cache_destroy(
- calld->send_messages[retry_state->completed_send_message_count - 1]);
+ calld->send_messages[retry_state->completed_send_message_count - 1]
+ ->Destroy();
}
if (batch_data->batch.send_trailing_metadata) {
grpc_metadata_batch_destroy(&calld->send_trailing_metadata);
@@ -1079,7 +1081,7 @@ static void pending_batches_add(grpc_call_element* elem,
if (batch->send_message) {
calld->pending_send_message = true;
calld->bytes_buffered_for_retry +=
- batch->payload->send_message.send_message->length;
+ batch->payload->send_message.send_message->length();
}
if (batch->send_trailing_metadata) {
calld->pending_send_trailing_metadata = true;
@@ -1680,7 +1682,7 @@ static void invoke_recv_message_callback(void* arg, grpc_error* error) {
GPR_ASSERT(pending != nullptr);
// Return payload.
*pending->batch->payload->recv_message.recv_message =
- batch_data->recv_message;
+ std::move(batch_data->recv_message);
// Update bookkeeping.
// Note: Need to do this before invoking the callback, since invoking
// the callback will result in yielding the call combiner.
@@ -2124,13 +2126,13 @@ static void add_retriable_send_message_op(
"chand=%p calld=%p: starting calld->send_messages[%" PRIuPTR "]",
chand, calld, retry_state->started_send_message_count);
}
- grpc_byte_stream_cache* cache =
+ grpc_core::ByteStreamCache* cache =
calld->send_messages[retry_state->started_send_message_count];
++retry_state->started_send_message_count;
- grpc_caching_byte_stream_init(&batch_data->send_message, cache);
+ batch_data->send_message.Init(cache);
batch_data->batch.send_message = true;
- batch_data->batch.payload->send_message.send_message =
- &batch_data->send_message.base;
+ batch_data->batch.payload->send_message.send_message.reset(
+ batch_data->send_message.get());
}
// Adds retriable send_trailing_metadata op to batch_data.
diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc
index 17ab0febb7..0b2a30818e 100644
--- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc
+++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc
@@ -61,6 +61,7 @@
#include <grpc/support/port_platform.h>
#include "src/core/lib/iomgr/sockaddr.h"
+#include "src/core/lib/iomgr/socket_utils.h"
#include <inttypes.h>
#include <limits.h>
@@ -417,20 +418,20 @@ void ParseServer(const grpc_grpclb_server* server,
grpc_resolved_address* addr) {
memset(addr, 0, sizeof(*addr));
if (server->drop) return;
- const uint16_t netorder_port = htons((uint16_t)server->port);
+ const uint16_t netorder_port = grpc_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;
if (ip->size == 4) {
- addr->len = sizeof(struct sockaddr_in);
- struct sockaddr_in* addr4 = (struct sockaddr_in*)&addr->addr;
- addr4->sin_family = AF_INET;
+ addr->len = static_cast<socklen_t>(sizeof(grpc_sockaddr_in));
+ grpc_sockaddr_in* addr4 = reinterpret_cast<grpc_sockaddr_in*>(&addr->addr);
+ addr4->sin_family = GRPC_AF_INET;
memcpy(&addr4->sin_addr, ip->bytes, ip->size);
addr4->sin_port = netorder_port;
} else if (ip->size == 16) {
- addr->len = sizeof(struct sockaddr_in6);
- struct sockaddr_in6* addr6 = (struct sockaddr_in6*)&addr->addr;
- addr6->sin6_family = AF_INET6;
+ addr->len = static_cast<socklen_t>(sizeof(grpc_sockaddr_in6));
+ grpc_sockaddr_in6* addr6 = (grpc_sockaddr_in6*)&addr->addr;
+ addr6->sin6_family = GRPC_AF_INET6;
memcpy(&addr6->sin6_addr, ip->bytes, ip->size);
addr6->sin6_port = netorder_port;
}
diff --git a/src/core/ext/filters/client_channel/lb_policy_factory.cc b/src/core/ext/filters/client_channel/lb_policy_factory.cc
index 80646a10cc..7c8cba55b7 100644
--- a/src/core/ext/filters/client_channel/lb_policy_factory.cc
+++ b/src/core/ext/filters/client_channel/lb_policy_factory.cc
@@ -66,7 +66,7 @@ void grpc_lb_addresses_set_address(grpc_lb_addresses* addresses, size_t index,
if (user_data != nullptr) GPR_ASSERT(addresses->user_data_vtable != nullptr);
grpc_lb_address* target = &addresses->addresses[index];
memcpy(target->address.addr, address, address_len);
- target->address.len = address_len;
+ target->address.len = static_cast<socklen_t>(address_len);
target->is_balancer = is_balancer;
target->balancer_name = gpr_strdup(balancer_name);
target->user_data = user_data;
diff --git a/src/core/ext/filters/client_channel/lb_policy_factory.h b/src/core/ext/filters/client_channel/lb_policy_factory.h
index b8bbd32072..6440258158 100644
--- a/src/core/ext/filters/client_channel/lb_policy_factory.h
+++ b/src/core/ext/filters/client_channel/lb_policy_factory.h
@@ -21,7 +21,6 @@
#include <grpc/support/port_platform.h>
-#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/iomgr/resolve_address.h"
#include "src/core/ext/filters/client_channel/client_channel_factory.h"
diff --git a/src/core/ext/filters/client_channel/lb_policy_registry.h b/src/core/ext/filters/client_channel/lb_policy_registry.h
index 2283d848bd..2e9bb061ed 100644
--- a/src/core/ext/filters/client_channel/lb_policy_registry.h
+++ b/src/core/ext/filters/client_channel/lb_policy_registry.h
@@ -24,7 +24,6 @@
#include "src/core/ext/filters/client_channel/lb_policy_factory.h"
#include "src/core/lib/gprpp/memory.h"
#include "src/core/lib/gprpp/orphanable.h"
-#include "src/core/lib/iomgr/exec_ctx.h"
namespace grpc_core {
diff --git a/src/core/ext/filters/client_channel/parse_address.cc b/src/core/ext/filters/client_channel/parse_address.cc
index e78dc99e0b..b3900114ad 100644
--- a/src/core/ext/filters/client_channel/parse_address.cc
+++ b/src/core/ext/filters/client_channel/parse_address.cc
@@ -20,6 +20,7 @@
#include "src/core/ext/filters/client_channel/parse_address.h"
#include "src/core/lib/iomgr/sockaddr.h"
+#include "src/core/lib/iomgr/socket_utils.h"
#include <stdio.h>
#include <string.h>
@@ -49,7 +50,7 @@ bool grpc_parse_unix(const grpc_uri* uri,
if (path_len == maxlen) return false;
un->sun_family = AF_UNIX;
strcpy(un->sun_path, uri->path);
- resolved_addr->len = sizeof(*un);
+ resolved_addr->len = static_cast<socklen_t>(sizeof(*un));
return true;
}
@@ -71,10 +72,10 @@ bool grpc_parse_ipv4_hostport(const char* hostport, grpc_resolved_address* addr,
if (!gpr_split_host_port(hostport, &host, &port)) return false;
// Parse IP address.
memset(addr, 0, sizeof(*addr));
- addr->len = sizeof(struct sockaddr_in);
- struct sockaddr_in* in = reinterpret_cast<struct sockaddr_in*>(addr->addr);
- in->sin_family = AF_INET;
- if (inet_pton(AF_INET, host, &in->sin_addr) == 0) {
+ addr->len = static_cast<socklen_t>(sizeof(grpc_sockaddr_in));
+ grpc_sockaddr_in* in = reinterpret_cast<grpc_sockaddr_in*>(addr->addr);
+ in->sin_family = GRPC_AF_INET;
+ if (grpc_inet_pton(GRPC_AF_INET, host, &in->sin_addr) == 0) {
if (log_errors) gpr_log(GPR_ERROR, "invalid ipv4 address: '%s'", host);
goto done;
}
@@ -88,7 +89,7 @@ bool grpc_parse_ipv4_hostport(const char* hostport, grpc_resolved_address* addr,
if (log_errors) gpr_log(GPR_ERROR, "invalid ipv4 port: '%s'", port);
goto done;
}
- in->sin_port = htons(static_cast<uint16_t>(port_num));
+ in->sin_port = grpc_htons(static_cast<uint16_t>(port_num));
success = true;
done:
gpr_free(host);
@@ -117,19 +118,20 @@ bool grpc_parse_ipv6_hostport(const char* hostport, grpc_resolved_address* addr,
if (!gpr_split_host_port(hostport, &host, &port)) return false;
// Parse IP address.
memset(addr, 0, sizeof(*addr));
- addr->len = sizeof(struct sockaddr_in6);
- struct sockaddr_in6* in6 = reinterpret_cast<struct sockaddr_in6*>(addr->addr);
- in6->sin6_family = AF_INET6;
+ addr->len = static_cast<socklen_t>(sizeof(grpc_sockaddr_in6));
+ grpc_sockaddr_in6* in6 = reinterpret_cast<grpc_sockaddr_in6*>(addr->addr);
+ in6->sin6_family = GRPC_AF_INET6;
// Handle the RFC6874 syntax for IPv6 zone identifiers.
char* host_end = static_cast<char*>(gpr_memrchr(host, '%', strlen(host)));
if (host_end != nullptr) {
GPR_ASSERT(host_end >= host);
- char host_without_scope[INET6_ADDRSTRLEN];
+ char host_without_scope[GRPC_INET6_ADDRSTRLEN];
size_t host_without_scope_len = static_cast<size_t>(host_end - host);
uint32_t sin6_scope_id = 0;
strncpy(host_without_scope, host, host_without_scope_len);
host_without_scope[host_without_scope_len] = '\0';
- if (inet_pton(AF_INET6, host_without_scope, &in6->sin6_addr) == 0) {
+ if (grpc_inet_pton(GRPC_AF_INET6, host_without_scope, &in6->sin6_addr) ==
+ 0) {
gpr_log(GPR_ERROR, "invalid ipv6 address: '%s'", host_without_scope);
goto done;
}
@@ -142,7 +144,7 @@ bool grpc_parse_ipv6_hostport(const char* hostport, grpc_resolved_address* addr,
// Handle "sin6_scope_id" being type "u_long". See grpc issue #10027.
in6->sin6_scope_id = sin6_scope_id;
} else {
- if (inet_pton(AF_INET6, host, &in6->sin6_addr) == 0) {
+ if (grpc_inet_pton(GRPC_AF_INET6, host, &in6->sin6_addr) == 0) {
gpr_log(GPR_ERROR, "invalid ipv6 address: '%s'", host);
goto done;
}
@@ -157,7 +159,7 @@ bool grpc_parse_ipv6_hostport(const char* hostport, grpc_resolved_address* addr,
if (log_errors) gpr_log(GPR_ERROR, "invalid ipv6 port: '%s'", port);
goto done;
}
- in6->sin6_port = htons(static_cast<uint16_t>(port_num));
+ in6->sin6_port = grpc_htons(static_cast<uint16_t>(port_num));
success = true;
done:
gpr_free(host);
diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc b/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
index aa93e5d8de..c63de3c509 100644
--- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
+++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
@@ -440,6 +440,19 @@ class AresDnsResolverFactory : public ResolverFactory {
} // namespace grpc_core
+extern grpc_address_resolver_vtable* grpc_resolve_address_impl;
+static grpc_address_resolver_vtable* default_resolver;
+
+static grpc_error* blocking_resolve_address_ares(
+ const char* name, const char* default_port,
+ grpc_resolved_addresses** addresses) {
+ return default_resolver->blocking_resolve_address(name, default_port,
+ addresses);
+}
+
+static grpc_address_resolver_vtable ares_resolver = {
+ grpc_resolve_address_ares, blocking_resolve_address_ares};
+
void grpc_resolver_dns_ares_init() {
char* resolver_env = gpr_getenv("GRPC_DNS_RESOLVER");
/* TODO(zyc): Turn on c-ares based resolver by default after the address
@@ -450,7 +463,8 @@ void grpc_resolver_dns_ares_init() {
GRPC_LOG_IF_ERROR("ares_library_init() failed", error);
return;
}
- grpc_resolve_address = grpc_resolve_address_ares;
+ default_resolver = grpc_resolve_address_impl;
+ grpc_set_resolver_impl(&ares_resolver);
grpc_core::ResolverRegistry::Builder::RegisterResolverFactory(
grpc_core::UniquePtr<grpc_core::ResolverFactory>(
grpc_core::New<grpc_core::AresDnsResolverFactory>()));
diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h
index 0bc13e35f4..6239549534 100644
--- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h
+++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h
@@ -22,7 +22,6 @@
#include <grpc/support/port_platform.h>
#include <ares.h>
-#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/iomgr/pollset_set.h"
typedef struct grpc_ares_ev_driver grpc_ares_ev_driver;
diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h
index bda9cd1729..3e8ea01e12 100644
--- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h
+++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h
@@ -22,7 +22,6 @@
#include <grpc/support/port_platform.h>
#include "src/core/ext/filters/client_channel/lb_policy_factory.h"
-#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/iomgr/iomgr.h"
#include "src/core/lib/iomgr/polling_entity.h"
#include "src/core/lib/iomgr/resolve_address.h"
diff --git a/src/core/ext/filters/client_channel/uri_parser.h b/src/core/ext/filters/client_channel/uri_parser.h
index 1966da932b..d749f23308 100644
--- a/src/core/ext/filters/client_channel/uri_parser.h
+++ b/src/core/ext/filters/client_channel/uri_parser.h
@@ -22,7 +22,6 @@
#include <grpc/support/port_platform.h>
#include <stddef.h>
-#include "src/core/lib/iomgr/exec_ctx.h"
typedef struct {
char* scheme;
diff --git a/src/core/ext/filters/deadline/deadline_filter.cc b/src/core/ext/filters/deadline/deadline_filter.cc
index dda3b61108..27d3eac8d6 100644
--- a/src/core/ext/filters/deadline/deadline_filter.cc
+++ b/src/core/ext/filters/deadline/deadline_filter.cc
@@ -27,7 +27,6 @@
#include <grpc/support/time.h>
#include "src/core/lib/channel/channel_stack_builder.h"
-#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/iomgr/timer.h"
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/lib/surface/channel_init.h"
diff --git a/src/core/ext/filters/http/client/http_client_filter.cc b/src/core/ext/filters/http/client/http_client_filter.cc
index 58aefd17c7..ae94ce47b9 100644
--- a/src/core/ext/filters/http/client/http_client_filter.cc
+++ b/src/core/ext/filters/http/client/http_client_filter.cc
@@ -20,9 +20,11 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
+#include <stdint.h>
#include <string.h>
#include "src/core/ext/filters/http/client/http_client_filter.h"
#include "src/core/lib/gpr/string.h"
+#include "src/core/lib/gprpp/manual_constructor.h"
#include "src/core/lib/profiling/timers.h"
#include "src/core/lib/slice/b64.h"
#include "src/core/lib/slice/percent_encoding.h"
@@ -58,8 +60,9 @@ struct call_data {
// State for handling send_message ops.
grpc_transport_stream_op_batch* send_message_batch;
size_t send_message_bytes_read;
- grpc_byte_stream_cache send_message_cache;
- grpc_caching_byte_stream send_message_caching_stream;
+ grpc_core::ManualConstructor<grpc_core::ByteStreamCache> send_message_cache;
+ grpc_core::ManualConstructor<grpc_core::ByteStreamCache::CachingByteStream>
+ send_message_caching_stream;
grpc_closure on_send_message_next_done;
grpc_closure* original_send_message_on_complete;
grpc_closure send_message_on_complete;
@@ -166,7 +169,7 @@ static void recv_trailing_metadata_on_complete(void* user_data,
static void send_message_on_complete(void* arg, grpc_error* error) {
grpc_call_element* elem = static_cast<grpc_call_element*>(arg);
call_data* calld = static_cast<call_data*>(elem->call_data);
- grpc_byte_stream_cache_destroy(&calld->send_message_cache);
+ calld->send_message_cache.Destroy();
GRPC_CLOSURE_RUN(calld->original_send_message_on_complete,
GRPC_ERROR_REF(error));
}
@@ -175,8 +178,7 @@ static void send_message_on_complete(void* arg, grpc_error* error) {
// calld->send_message_bytes_read.
static grpc_error* pull_slice_from_send_message(call_data* calld) {
grpc_slice incoming_slice;
- grpc_error* error = grpc_byte_stream_pull(
- &calld->send_message_caching_stream.base, &incoming_slice);
+ grpc_error* error = calld->send_message_caching_stream->Pull(&incoming_slice);
if (error == GRPC_ERROR_NONE) {
calld->send_message_bytes_read += GRPC_SLICE_LENGTH(incoming_slice);
grpc_slice_unref_internal(incoming_slice);
@@ -186,24 +188,23 @@ static grpc_error* pull_slice_from_send_message(call_data* calld) {
// Reads as many slices as possible from the send_message byte stream.
// Upon successful return, if calld->send_message_bytes_read ==
-// calld->send_message_caching_stream.base.length, then we have completed
+// calld->send_message_caching_stream->length(), then we have completed
// reading from the byte stream; otherwise, an async read has been dispatched
// and on_send_message_next_done() will be invoked when it is complete.
static grpc_error* read_all_available_send_message_data(call_data* calld) {
- while (grpc_byte_stream_next(&calld->send_message_caching_stream.base,
- ~static_cast<size_t>(0),
- &calld->on_send_message_next_done)) {
+ while (calld->send_message_caching_stream->Next(
+ SIZE_MAX, &calld->on_send_message_next_done)) {
grpc_error* error = pull_slice_from_send_message(calld);
if (error != GRPC_ERROR_NONE) return error;
if (calld->send_message_bytes_read ==
- calld->send_message_caching_stream.base.length) {
+ calld->send_message_caching_stream->length()) {
break;
}
}
return GRPC_ERROR_NONE;
}
-// Async callback for grpc_byte_stream_next().
+// Async callback for ByteStream::Next().
static void on_send_message_next_done(void* arg, grpc_error* error) {
grpc_call_element* elem = static_cast<grpc_call_element*>(arg);
call_data* calld = static_cast<call_data*>(elem->call_data);
@@ -222,7 +223,7 @@ static void on_send_message_next_done(void* arg, grpc_error* error) {
// here, then we know that all of the data was not available
// synchronously, so we were not able to do a cached call. Instead,
// we just reset the byte stream and then send down the batch as-is.
- grpc_caching_byte_stream_reset(&calld->send_message_caching_stream);
+ calld->send_message_caching_stream->Reset();
grpc_call_next_op(elem, calld->send_message_batch);
}
@@ -253,7 +254,7 @@ static grpc_error* update_path_for_get(grpc_call_element* elem,
size_t estimated_len = GRPC_SLICE_LENGTH(path_slice);
estimated_len++; /* for the '?' */
estimated_len += grpc_base64_estimate_encoded_size(
- batch->payload->send_message.send_message->length, true /* url_safe */,
+ batch->payload->send_message.send_message->length(), true /* url_safe */,
false /* multi_line */);
grpc_slice path_with_query_slice = GRPC_SLICE_MALLOC(estimated_len);
/* memcopy individual pieces into this slice */
@@ -265,9 +266,9 @@ static grpc_error* update_path_for_get(grpc_call_element* elem,
write_ptr += GRPC_SLICE_LENGTH(path_slice);
*write_ptr++ = '?';
char* payload_bytes =
- slice_buffer_to_string(&calld->send_message_cache.cache_buffer);
+ slice_buffer_to_string(calld->send_message_cache->cache_buffer());
grpc_base64_encode_core(write_ptr, payload_bytes,
- batch->payload->send_message.send_message->length,
+ batch->payload->send_message.send_message->length(),
true /* url_safe */, false /* multi_line */);
gpr_free(payload_bytes);
/* remove trailing unused memory and add trailing 0 to terminate string */
@@ -326,15 +327,14 @@ static void hc_start_transport_stream_op_batch(
if (batch->send_message &&
(batch->payload->send_initial_metadata.send_initial_metadata_flags &
GRPC_INITIAL_METADATA_CACHEABLE_REQUEST) &&
- batch->payload->send_message.send_message->length <
+ batch->payload->send_message.send_message->length() <
channeld->max_payload_size_for_get) {
calld->send_message_bytes_read = 0;
- grpc_byte_stream_cache_init(&calld->send_message_cache,
- batch->payload->send_message.send_message);
- grpc_caching_byte_stream_init(&calld->send_message_caching_stream,
- &calld->send_message_cache);
- batch->payload->send_message.send_message =
- &calld->send_message_caching_stream.base;
+ calld->send_message_cache.Init(
+ std::move(batch->payload->send_message.send_message));
+ calld->send_message_caching_stream.Init(calld->send_message_cache.get());
+ batch->payload->send_message.send_message.reset(
+ calld->send_message_caching_stream.get());
calld->original_send_message_on_complete = batch->on_complete;
batch->on_complete = &calld->send_message_on_complete;
calld->send_message_batch = batch;
@@ -342,12 +342,12 @@ static void hc_start_transport_stream_op_batch(
if (error != GRPC_ERROR_NONE) goto done;
// If all the data has been read, then we can use GET.
if (calld->send_message_bytes_read ==
- calld->send_message_caching_stream.base.length) {
+ calld->send_message_caching_stream->length()) {
method = GRPC_MDELEM_METHOD_GET;
error = update_path_for_get(elem, batch);
if (error != GRPC_ERROR_NONE) goto done;
batch->send_message = false;
- grpc_byte_stream_destroy(&calld->send_message_caching_stream.base);
+ calld->send_message_caching_stream->Orphan();
} else {
// Not all data is available. The batch will be sent down
// asynchronously in on_send_message_next_done().
diff --git a/src/core/ext/filters/http/message_compress/message_compress_filter.cc b/src/core/ext/filters/http/message_compress/message_compress_filter.cc
index efe0085c5b..e7d9949386 100644
--- a/src/core/ext/filters/http/message_compress/message_compress_filter.cc
+++ b/src/core/ext/filters/http/message_compress/message_compress_filter.cc
@@ -32,6 +32,7 @@
#include "src/core/lib/compression/compression_internal.h"
#include "src/core/lib/compression/message_compress.h"
#include "src/core/lib/gpr/string.h"
+#include "src/core/lib/gprpp/manual_constructor.h"
#include "src/core/lib/profiling/timers.h"
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/lib/slice/slice_string_helpers.h"
@@ -62,7 +63,8 @@ struct call_data {
grpc_closure start_send_message_batch_in_call_combiner;
grpc_transport_stream_op_batch* send_message_batch;
grpc_slice_buffer slices; /**< Buffers up input slices to be compressed */
- grpc_slice_buffer_stream replacement_stream;
+ grpc_core::ManualConstructor<grpc_core::SliceBufferByteStream>
+ replacement_stream;
grpc_closure* original_send_message_on_complete;
grpc_closure send_message_on_complete;
grpc_closure on_send_message_next_done;
@@ -220,7 +222,7 @@ static void finish_send_message(grpc_call_element* elem) {
grpc_slice_buffer tmp;
grpc_slice_buffer_init(&tmp);
uint32_t send_flags =
- calld->send_message_batch->payload->send_message.send_message->flags;
+ calld->send_message_batch->payload->send_message.send_message->flags();
bool did_compress = grpc_msg_compress(calld->message_compression_algorithm,
&calld->slices, &tmp);
if (did_compress) {
@@ -253,12 +255,9 @@ static void finish_send_message(grpc_call_element* elem) {
grpc_slice_buffer_destroy_internal(&tmp);
// Swap out the original byte stream with our new one and send the
// batch down.
- grpc_byte_stream_destroy(
- calld->send_message_batch->payload->send_message.send_message);
- grpc_slice_buffer_stream_init(&calld->replacement_stream, &calld->slices,
- send_flags);
- calld->send_message_batch->payload->send_message.send_message =
- &calld->replacement_stream.base;
+ calld->replacement_stream.Init(&calld->slices, send_flags);
+ calld->send_message_batch->payload->send_message.send_message.reset(
+ calld->replacement_stream.get());
calld->original_send_message_on_complete =
calld->send_message_batch->on_complete;
calld->send_message_batch->on_complete = &calld->send_message_on_complete;
@@ -278,9 +277,9 @@ static void fail_send_message_batch_in_call_combiner(void* arg,
// Pulls a slice from the send_message byte stream and adds it to calld->slices.
static grpc_error* pull_slice_from_send_message(call_data* calld) {
grpc_slice incoming_slice;
- grpc_error* error = grpc_byte_stream_pull(
- calld->send_message_batch->payload->send_message.send_message,
- &incoming_slice);
+ grpc_error* error =
+ calld->send_message_batch->payload->send_message.send_message->Pull(
+ &incoming_slice);
if (error == GRPC_ERROR_NONE) {
grpc_slice_buffer_add(&calld->slices, incoming_slice);
}
@@ -289,12 +288,11 @@ static grpc_error* pull_slice_from_send_message(call_data* calld) {
// Reads as many slices as possible from the send_message byte stream.
// If all data has been read, invokes finish_send_message(). Otherwise,
-// an async call to grpc_byte_stream_next() has been started, which will
+// an async call to ByteStream::Next() has been started, which will
// eventually result in calling on_send_message_next_done().
static void continue_reading_send_message(grpc_call_element* elem) {
call_data* calld = static_cast<call_data*>(elem->call_data);
- while (grpc_byte_stream_next(
- calld->send_message_batch->payload->send_message.send_message,
+ while (calld->send_message_batch->payload->send_message.send_message->Next(
~static_cast<size_t>(0), &calld->on_send_message_next_done)) {
grpc_error* error = pull_slice_from_send_message(calld);
if (error != GRPC_ERROR_NONE) {
@@ -303,15 +301,15 @@ static void continue_reading_send_message(grpc_call_element* elem) {
GRPC_ERROR_UNREF(error);
return;
}
- if (calld->slices.length ==
- calld->send_message_batch->payload->send_message.send_message->length) {
+ if (calld->slices.length == calld->send_message_batch->payload->send_message
+ .send_message->length()) {
finish_send_message(elem);
break;
}
}
}
-// Async callback for grpc_byte_stream_next().
+// Async callback for ByteStream::Next().
static void on_send_message_next_done(void* arg, grpc_error* error) {
grpc_call_element* elem = static_cast<grpc_call_element*>(arg);
call_data* calld = static_cast<call_data*>(elem->call_data);
@@ -328,7 +326,7 @@ static void on_send_message_next_done(void* arg, grpc_error* error) {
return;
}
if (calld->slices.length ==
- calld->send_message_batch->payload->send_message.send_message->length) {
+ calld->send_message_batch->payload->send_message.send_message->length()) {
finish_send_message(elem);
} else {
continue_reading_send_message(elem);
@@ -340,7 +338,8 @@ static void start_send_message_batch(void* arg, grpc_error* unused) {
call_data* calld = static_cast<call_data*>(elem->call_data);
if (skip_compression(
elem,
- calld->send_message_batch->payload->send_message.send_message->flags,
+ calld->send_message_batch->payload->send_message.send_message
+ ->flags(),
calld->send_initial_metadata_state == HAS_COMPRESSION_ALGORITHM)) {
send_message_batch_continue(elem);
} else {
@@ -365,9 +364,7 @@ static void compress_start_transport_stream_op_batch(
grpc_schedule_on_exec_ctx),
GRPC_ERROR_REF(calld->cancel_error), "failing send_message op");
} else {
- grpc_byte_stream_shutdown(
-
- calld->send_message_batch->payload->send_message.send_message,
+ calld->send_message_batch->payload->send_message.send_message->Shutdown(
GRPC_ERROR_REF(calld->cancel_error));
}
}
diff --git a/src/core/ext/filters/http/server/http_server_filter.cc b/src/core/ext/filters/http/server/http_server_filter.cc
index 57ec8dce34..c202015875 100644
--- a/src/core/ext/filters/http/server/http_server_filter.cc
+++ b/src/core/ext/filters/http/server/http_server_filter.cc
@@ -23,6 +23,7 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <string.h>
+#include "src/core/lib/gprpp/manual_constructor.h"
#include "src/core/lib/profiling/timers.h"
#include "src/core/lib/slice/b64.h"
#include "src/core/lib/slice/percent_encoding.h"
@@ -53,8 +54,8 @@ struct call_data {
*/
grpc_closure* recv_message_ready;
grpc_closure* on_complete;
- grpc_byte_stream** pp_recv_message;
- grpc_slice_buffer_stream read_stream;
+ grpc_core::OrphanablePtr<grpc_core::ByteStream>* pp_recv_message;
+ grpc_core::ManualConstructor<grpc_core::SliceBufferByteStream> 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
@@ -232,7 +233,7 @@ static grpc_error* server_filter_incoming_metadata(grpc_call_element* elem,
grpc_base64_decode_with_len(
reinterpret_cast<const char*> GRPC_SLICE_START_PTR(query_slice),
GRPC_SLICE_LENGTH(query_slice), k_url_safe));
- grpc_slice_buffer_stream_init(&calld->read_stream, &read_slice_buffer, 0);
+ calld->read_stream.Init(&read_slice_buffer, 0);
grpc_slice_buffer_destroy_internal(&read_slice_buffer);
calld->seen_path_with_query = true;
grpc_slice_unref_internal(query_slice);
@@ -281,10 +282,10 @@ static void hs_on_complete(void* user_data, grpc_error* err) {
call_data* calld = static_cast<call_data*>(elem->call_data);
/* Call recv_message_ready if we got the payload via the path field */
if (calld->seen_path_with_query && calld->recv_message_ready != nullptr) {
- *calld->pp_recv_message =
- calld->payload_bin_delivered
- ? nullptr
- : reinterpret_cast<grpc_byte_stream*>(&calld->read_stream);
+ calld->pp_recv_message->reset(
+ calld->payload_bin_delivered ? nullptr
+ : reinterpret_cast<grpc_core::ByteStream*>(
+ calld->read_stream.get()));
// Re-enter call combiner for recv_message_ready, since the surface
// code will release the call combiner for each callback it receives.
GRPC_CALL_COMBINER_START(calld->call_combiner, calld->recv_message_ready,
@@ -405,7 +406,7 @@ static void destroy_call_elem(grpc_call_element* elem,
grpc_closure* ignored) {
call_data* calld = static_cast<call_data*>(elem->call_data);
if (calld->seen_path_with_query && !calld->payload_bin_delivered) {
- grpc_byte_stream_destroy(&calld->read_stream.base);
+ calld->read_stream->Orphan();
}
}
diff --git a/src/core/ext/filters/message_size/message_size_filter.cc b/src/core/ext/filters/message_size/message_size_filter.cc
index b1b14dde02..c7fc3f2e62 100644
--- a/src/core/ext/filters/message_size/message_size_filter.cc
+++ b/src/core/ext/filters/message_size/message_size_filter.cc
@@ -100,7 +100,7 @@ struct call_data {
// call our next_recv_message_ready member after handling it.
grpc_closure recv_message_ready;
// Used by recv_message_ready.
- grpc_byte_stream** recv_message;
+ grpc_core::OrphanablePtr<grpc_core::ByteStream>* recv_message;
// Original recv_message_ready callback, invoked after our own.
grpc_closure* next_recv_message_ready;
};
@@ -121,12 +121,12 @@ static void recv_message_ready(void* user_data, grpc_error* error) {
grpc_call_element* elem = static_cast<grpc_call_element*>(user_data);
call_data* calld = static_cast<call_data*>(elem->call_data);
if (*calld->recv_message != nullptr && calld->limits.max_recv_size >= 0 &&
- (*calld->recv_message)->length >
+ (*calld->recv_message)->length() >
static_cast<size_t>(calld->limits.max_recv_size)) {
char* message_string;
gpr_asprintf(&message_string,
"Received message larger than max (%u vs. %d)",
- (*calld->recv_message)->length, calld->limits.max_recv_size);
+ (*calld->recv_message)->length(), calld->limits.max_recv_size);
grpc_error* new_error = grpc_error_set_int(
GRPC_ERROR_CREATE_FROM_COPIED_STRING(message_string),
GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_RESOURCE_EXHAUSTED);
@@ -150,11 +150,11 @@ static void start_transport_stream_op_batch(
call_data* calld = static_cast<call_data*>(elem->call_data);
// Check max send message size.
if (op->send_message && calld->limits.max_send_size >= 0 &&
- op->payload->send_message.send_message->length >
+ op->payload->send_message.send_message->length() >
static_cast<size_t>(calld->limits.max_send_size)) {
char* message_string;
gpr_asprintf(&message_string, "Sent message larger than max (%u vs. %d)",
- op->payload->send_message.send_message->length,
+ op->payload->send_message.send_message->length(),
calld->limits.max_send_size);
grpc_transport_stream_op_batch_finish_with_failure(
op,
diff --git a/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc b/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc
index bed1004c57..c7070d4d9b 100644
--- a/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc
+++ b/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc
@@ -93,7 +93,9 @@ static void start_transport_stream_op_batch(
/* Send message happens after client's user-agent (initial metadata) is
* received, so workaround_active must be set already */
if (calld->workaround_active) {
- op->payload->send_message.send_message->flags |= GRPC_WRITE_NO_COMPRESS;
+ op->payload->send_message.send_message->set_flags(
+ op->payload->send_message.send_message->flags() |
+ GRPC_WRITE_NO_COMPRESS);
}
}
diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc b/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc
index 479f0da572..b95c9dae53 100644
--- a/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc
+++ b/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc
@@ -29,7 +29,6 @@
#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/iomgr/endpoint.h"
-#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/iomgr/tcp_client_posix.h"
#include "src/core/lib/iomgr/tcp_posix.h"
#include "src/core/lib/surface/api_trace.h"
diff --git a/src/core/ext/transport/chttp2/server/chttp2_server.h b/src/core/ext/transport/chttp2/server/chttp2_server.h
index 7b41972160..6e51001b53 100644
--- a/src/core/ext/transport/chttp2/server/chttp2_server.h
+++ b/src/core/ext/transport/chttp2/server/chttp2_server.h
@@ -23,7 +23,7 @@
#include <grpc/impl/codegen/grpc_types.h>
-#include "src/core/lib/iomgr/exec_ctx.h"
+#include "src/core/lib/iomgr/error.h"
/// Adds a port to \a server. Sets \a port_num to the port number.
/// Takes ownership of \a args.
diff --git a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc
index 822236dd2d..99f18cdf39 100644
--- a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc
+++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc
@@ -41,6 +41,5 @@ int grpc_server_add_insecure_http2_port(grpc_server* server, const char* addr) {
GRPC_ERROR_UNREF(err);
}
-
return port_num;
}
diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc
index 56aaada912..a4d616d778 100644
--- a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc
+++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc
@@ -39,6 +39,7 @@
#include "src/core/lib/debug/stats.h"
#include "src/core/lib/gpr/env.h"
#include "src/core/lib/gpr/string.h"
+#include "src/core/lib/gprpp/memory.h"
#include "src/core/lib/http/parser.h"
#include "src/core/lib/iomgr/executor.h"
#include "src/core/lib/iomgr/timer.h"
@@ -117,12 +118,6 @@ static void connectivity_state_set(grpc_chttp2_transport* t,
grpc_connectivity_state state,
grpc_error* error, const char* reason);
-static void incoming_byte_stream_destroy_locked(void* byte_stream,
- grpc_error* error_ignored);
-static void incoming_byte_stream_publish_error(
- grpc_chttp2_incoming_byte_stream* bs, grpc_error* error);
-static void incoming_byte_stream_unref(grpc_chttp2_incoming_byte_stream* bs);
-
static void benign_reclaimer_locked(void* t, grpc_error* error);
static void destructive_reclaimer_locked(void* t, grpc_error* error);
@@ -662,8 +657,8 @@ static int init_stream(grpc_transport* gt, grpc_stream* gs,
s->t = t;
s->refcount = refcount;
/* We reserve one 'active stream' that's dropped when the stream is
- read-closed. The others are for incoming_byte_streams that are actively
- reading */
+ read-closed. The others are for Chttp2IncomingByteStreams that are
+ actively reading */
GRPC_CHTTP2_STREAM_REF(s, "chttp2");
grpc_chttp2_incoming_metadata_buffer_init(&s->metadata_buffer[0], arena);
@@ -1256,8 +1251,7 @@ static void continue_fetching_send_locked(grpc_chttp2_transport* t,
abort(); /* TODO(ctiller): what cleanup here? */
return; /* early out */
}
- if (s->fetched_send_message_length == s->fetching_send_message->length) {
- grpc_byte_stream_destroy(s->fetching_send_message);
+ if (s->fetched_send_message_length == s->fetching_send_message->length()) {
int64_t notify_offset = s->next_message_end_offset;
if (notify_offset <= s->flow_controlled_bytes_written) {
grpc_chttp2_complete_closure_step(
@@ -1274,20 +1268,19 @@ static void continue_fetching_send_locked(grpc_chttp2_transport* t,
cb->closure = s->fetching_send_message_finished;
s->fetching_send_message_finished = nullptr;
grpc_chttp2_write_cb** list =
- s->fetching_send_message->flags & GRPC_WRITE_THROUGH
+ s->fetching_send_message->flags() & GRPC_WRITE_THROUGH
? &s->on_write_finished_cbs
: &s->on_flow_controlled_cbs;
cb->next = *list;
*list = cb;
}
- s->fetching_send_message = nullptr;
+ s->fetching_send_message.reset();
return; /* early out */
- } else if (grpc_byte_stream_next(s->fetching_send_message, UINT32_MAX,
- &s->complete_fetch_locked)) {
- grpc_error* error =
- grpc_byte_stream_pull(s->fetching_send_message, &s->fetching_slice);
+ } else if (s->fetching_send_message->Next(UINT32_MAX,
+ &s->complete_fetch_locked)) {
+ grpc_error* error = s->fetching_send_message->Pull(&s->fetching_slice);
if (error != GRPC_ERROR_NONE) {
- grpc_byte_stream_destroy(s->fetching_send_message);
+ s->fetching_send_message.reset();
grpc_chttp2_cancel_stream(t, s, error);
} else {
add_fetched_slice_locked(t, s);
@@ -1300,14 +1293,14 @@ static void complete_fetch_locked(void* gs, grpc_error* error) {
grpc_chttp2_stream* s = static_cast<grpc_chttp2_stream*>(gs);
grpc_chttp2_transport* t = s->t;
if (error == GRPC_ERROR_NONE) {
- error = grpc_byte_stream_pull(s->fetching_send_message, &s->fetching_slice);
+ error = s->fetching_send_message->Pull(&s->fetching_slice);
if (error == GRPC_ERROR_NONE) {
add_fetched_slice_locked(t, s);
continue_fetching_send_locked(t, s);
}
}
if (error != GRPC_ERROR_NONE) {
- grpc_byte_stream_destroy(s->fetching_send_message);
+ s->fetching_send_message.reset();
grpc_chttp2_cancel_stream(t, s, error);
}
}
@@ -1439,7 +1432,7 @@ static void perform_stream_op_locked(void* stream_op,
GPR_ASSERT(s->id != 0);
grpc_chttp2_mark_stream_writable(t, s);
if (!(op->send_message &&
- (op->payload->send_message.send_message->flags &
+ (op->payload->send_message.send_message->flags() &
GRPC_WRITE_BUFFER_HINT))) {
grpc_chttp2_initiate_write(
t, GRPC_CHTTP2_INITIATE_WRITE_SEND_INITIAL_METADATA);
@@ -1466,7 +1459,7 @@ static void perform_stream_op_locked(void* stream_op,
if (op->send_message) {
GRPC_STATS_INC_HTTP2_OP_SEND_MESSAGE();
GRPC_STATS_INC_HTTP2_SEND_MESSAGE_SIZE(
- op->payload->send_message.send_message->length);
+ op->payload->send_message.send_message->length());
on_complete->next_data.scratch |= CLOSURE_BARRIER_MAY_COVER_WRITE;
s->fetching_send_message_finished = add_closure_barrier(op->on_complete);
if (s->write_closed) {
@@ -1475,7 +1468,7 @@ static void perform_stream_op_locked(void* stream_op,
// streaming call might send another message before getting a
// recv_message failure, breaking out of its loop, and then
// starting recv_trailing_metadata.
- grpc_byte_stream_destroy(op->payload->send_message.send_message);
+ op->payload->send_message.send_message.reset();
grpc_chttp2_complete_closure_step(
t, s, &s->fetching_send_message_finished,
t->is_client && s->received_trailing_metadata
@@ -1488,14 +1481,15 @@ static void perform_stream_op_locked(void* stream_op,
GPR_ASSERT(s->fetching_send_message == nullptr);
uint8_t* frame_hdr = grpc_slice_buffer_tiny_add(
&s->flow_controlled_buffer, GRPC_HEADER_SIZE_IN_BYTES);
- uint32_t flags = op_payload->send_message.send_message->flags;
+ uint32_t flags = op_payload->send_message.send_message->flags();
frame_hdr[0] = (flags & GRPC_WRITE_INTERNAL_COMPRESS) != 0;
- size_t len = op_payload->send_message.send_message->length;
+ size_t len = op_payload->send_message.send_message->length();
frame_hdr[1] = static_cast<uint8_t>(len >> 24);
frame_hdr[2] = static_cast<uint8_t>(len >> 16);
frame_hdr[3] = static_cast<uint8_t>(len >> 8);
frame_hdr[4] = static_cast<uint8_t>(len);
- s->fetching_send_message = op_payload->send_message.send_message;
+ s->fetching_send_message =
+ std::move(op_payload->send_message.send_message);
s->fetched_send_message_length = 0;
s->next_message_end_offset =
s->flow_controlled_bytes_written +
@@ -1947,12 +1941,12 @@ static void remove_stream(grpc_chttp2_transport* t, uint32_t id,
}
if (s->pending_byte_stream) {
if (s->on_next != nullptr) {
- grpc_chttp2_incoming_byte_stream* bs = s->data_parser.parsing_frame;
+ grpc_core::Chttp2IncomingByteStream* bs = s->data_parser.parsing_frame;
if (error == GRPC_ERROR_NONE) {
error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Truncated message");
}
- incoming_byte_stream_publish_error(bs, error);
- incoming_byte_stream_unref(bs);
+ bs->PublishError(error);
+ bs->Unref();
s->data_parser.parsing_frame = nullptr;
} else {
GRPC_ERROR_UNREF(s->byte_stream_error);
@@ -2096,10 +2090,7 @@ void grpc_chttp2_fail_pending_writes(grpc_chttp2_transport* t,
GRPC_ERROR_REF(error),
"send_trailing_metadata_finished");
- if (s->fetching_send_message != nullptr) {
- grpc_byte_stream_destroy(s->fetching_send_message);
- s->fetching_send_message = nullptr;
- }
+ s->fetching_send_message.reset();
grpc_chttp2_complete_closure_step(t, s, &s->fetching_send_message_finished,
GRPC_ERROR_REF(error),
"fetching_send_message_finished");
@@ -2715,7 +2706,6 @@ static void set_pollset_set(grpc_transport* gt, grpc_stream* gs,
static void reset_byte_stream(void* arg, grpc_error* error) {
grpc_chttp2_stream* s = static_cast<grpc_chttp2_stream*>(arg);
-
s->pending_byte_stream = false;
if (error == GRPC_ERROR_NONE) {
grpc_chttp2_maybe_complete_recv_message(s->t, s);
@@ -2731,22 +2721,56 @@ static void reset_byte_stream(void* arg, grpc_error* error) {
}
}
-static void incoming_byte_stream_unref(grpc_chttp2_incoming_byte_stream* bs) {
- if (gpr_unref(&bs->refs)) {
- gpr_free(bs);
+namespace grpc_core {
+
+Chttp2IncomingByteStream::Chttp2IncomingByteStream(
+ grpc_chttp2_transport* transport, grpc_chttp2_stream* stream,
+ uint32_t frame_size, uint32_t flags)
+ : ByteStream(frame_size, flags),
+ transport_(transport),
+ stream_(stream),
+ remaining_bytes_(frame_size) {
+ gpr_ref_init(&refs_, 2);
+ GRPC_ERROR_UNREF(stream->byte_stream_error);
+ stream->byte_stream_error = GRPC_ERROR_NONE;
+}
+
+void Chttp2IncomingByteStream::OrphanLocked(void* arg,
+ grpc_error* error_ignored) {
+ Chttp2IncomingByteStream* bs = static_cast<Chttp2IncomingByteStream*>(arg);
+ grpc_chttp2_stream* s = bs->stream_;
+ grpc_chttp2_transport* t = s->t;
+ bs->Unref();
+ s->pending_byte_stream = false;
+ grpc_chttp2_maybe_complete_recv_message(t, s);
+ grpc_chttp2_maybe_complete_recv_trailing_metadata(t, s);
+}
+
+void Chttp2IncomingByteStream::Orphan() {
+ GPR_TIMER_SCOPE("incoming_byte_stream_destroy", 0);
+ GRPC_CLOSURE_SCHED(
+ GRPC_CLOSURE_INIT(&destroy_action_,
+ &Chttp2IncomingByteStream::OrphanLocked, this,
+ grpc_combiner_scheduler(transport_->combiner)),
+ GRPC_ERROR_NONE);
+}
+
+void Chttp2IncomingByteStream::Unref() {
+ if (gpr_unref(&refs_)) {
+ Delete(this);
}
}
-static void incoming_byte_stream_next_locked(void* argp,
- grpc_error* error_ignored) {
- grpc_chttp2_incoming_byte_stream* bs =
- static_cast<grpc_chttp2_incoming_byte_stream*>(argp);
- grpc_chttp2_transport* t = bs->transport;
- grpc_chttp2_stream* s = bs->stream;
+void Chttp2IncomingByteStream::Ref() { gpr_ref(&refs_); }
+void Chttp2IncomingByteStream::NextLocked(void* arg,
+ grpc_error* error_ignored) {
+ Chttp2IncomingByteStream* bs = static_cast<Chttp2IncomingByteStream*>(arg);
+ grpc_chttp2_transport* t = bs->transport_;
+ grpc_chttp2_stream* s = bs->stream_;
size_t cur_length = s->frame_storage.length;
if (!s->read_closed) {
- s->flow_control->IncomingByteStreamUpdate(bs->next_action.max_size_hint,
+ s->flow_control->IncomingByteStreamUpdate(bs->next_action_.max_size_hint,
cur_length);
grpc_chttp2_act_on_flowctl_action(s->flow_control->MakeAction(), t, s);
}
@@ -2755,22 +2779,22 @@ static void incoming_byte_stream_next_locked(void* argp,
grpc_slice_buffer_swap(&s->frame_storage,
&s->unprocessed_incoming_frames_buffer);
s->unprocessed_incoming_frames_decompressed = false;
- GRPC_CLOSURE_SCHED(bs->next_action.on_complete, GRPC_ERROR_NONE);
+ GRPC_CLOSURE_SCHED(bs->next_action_.on_complete, GRPC_ERROR_NONE);
} else if (s->byte_stream_error != GRPC_ERROR_NONE) {
- GRPC_CLOSURE_SCHED(bs->next_action.on_complete,
+ GRPC_CLOSURE_SCHED(bs->next_action_.on_complete,
GRPC_ERROR_REF(s->byte_stream_error));
if (s->data_parser.parsing_frame != nullptr) {
- incoming_byte_stream_unref(s->data_parser.parsing_frame);
+ s->data_parser.parsing_frame->Unref();
s->data_parser.parsing_frame = nullptr;
}
} else if (s->read_closed) {
- if (bs->remaining_bytes != 0) {
+ if (bs->remaining_bytes_ != 0) {
s->byte_stream_error =
GRPC_ERROR_CREATE_FROM_STATIC_STRING("Truncated message");
- GRPC_CLOSURE_SCHED(bs->next_action.on_complete,
+ GRPC_CLOSURE_SCHED(bs->next_action_.on_complete,
GRPC_ERROR_REF(s->byte_stream_error));
if (s->data_parser.parsing_frame != nullptr) {
- incoming_byte_stream_unref(s->data_parser.parsing_frame);
+ s->data_parser.parsing_frame->Unref();
s->data_parser.parsing_frame = nullptr;
}
} else {
@@ -2778,122 +2802,94 @@ static void incoming_byte_stream_next_locked(void* argp,
GPR_ASSERT(false);
}
} else {
- s->on_next = bs->next_action.on_complete;
+ s->on_next = bs->next_action_.on_complete;
}
- incoming_byte_stream_unref(bs);
+ bs->Unref();
}
-static bool incoming_byte_stream_next(grpc_byte_stream* byte_stream,
- size_t max_size_hint,
- grpc_closure* on_complete) {
+bool Chttp2IncomingByteStream::Next(size_t max_size_hint,
+ grpc_closure* on_complete) {
GPR_TIMER_SCOPE("incoming_byte_stream_next", 0);
- grpc_chttp2_incoming_byte_stream* bs =
- reinterpret_cast<grpc_chttp2_incoming_byte_stream*>(byte_stream);
- grpc_chttp2_stream* s = bs->stream;
- if (s->unprocessed_incoming_frames_buffer.length > 0) {
+ if (stream_->unprocessed_incoming_frames_buffer.length > 0) {
return true;
} else {
- gpr_ref(&bs->refs);
- bs->next_action.max_size_hint = max_size_hint;
- bs->next_action.on_complete = on_complete;
+ Ref();
+ next_action_.max_size_hint = max_size_hint;
+ next_action_.on_complete = on_complete;
GRPC_CLOSURE_SCHED(
- GRPC_CLOSURE_INIT(&bs->next_action.closure,
- incoming_byte_stream_next_locked, bs,
- grpc_combiner_scheduler(bs->transport->combiner)),
+ GRPC_CLOSURE_INIT(&next_action_.closure,
+ &Chttp2IncomingByteStream::NextLocked, this,
+ grpc_combiner_scheduler(transport_->combiner)),
GRPC_ERROR_NONE);
return false;
}
}
-static grpc_error* incoming_byte_stream_pull(grpc_byte_stream* byte_stream,
- grpc_slice* slice) {
+grpc_error* Chttp2IncomingByteStream::Pull(grpc_slice* slice) {
GPR_TIMER_SCOPE("incoming_byte_stream_pull", 0);
- grpc_chttp2_incoming_byte_stream* bs =
- reinterpret_cast<grpc_chttp2_incoming_byte_stream*>(byte_stream);
- grpc_chttp2_stream* s = bs->stream;
grpc_error* error;
-
- if (s->unprocessed_incoming_frames_buffer.length > 0) {
- if (!s->unprocessed_incoming_frames_decompressed) {
+ if (stream_->unprocessed_incoming_frames_buffer.length > 0) {
+ if (!stream_->unprocessed_incoming_frames_decompressed) {
bool end_of_context;
- if (!s->stream_decompression_ctx) {
- s->stream_decompression_ctx = grpc_stream_compression_context_create(
- s->stream_decompression_method);
+ if (!stream_->stream_decompression_ctx) {
+ stream_->stream_decompression_ctx =
+ grpc_stream_compression_context_create(
+ stream_->stream_decompression_method);
}
- if (!grpc_stream_decompress(s->stream_decompression_ctx,
- &s->unprocessed_incoming_frames_buffer,
- &s->decompressed_data_buffer, nullptr,
+ if (!grpc_stream_decompress(stream_->stream_decompression_ctx,
+ &stream_->unprocessed_incoming_frames_buffer,
+ &stream_->decompressed_data_buffer, nullptr,
MAX_SIZE_T, &end_of_context)) {
error =
GRPC_ERROR_CREATE_FROM_STATIC_STRING("Stream decompression error.");
return error;
}
- GPR_ASSERT(s->unprocessed_incoming_frames_buffer.length == 0);
- grpc_slice_buffer_swap(&s->unprocessed_incoming_frames_buffer,
- &s->decompressed_data_buffer);
- s->unprocessed_incoming_frames_decompressed = true;
+ GPR_ASSERT(stream_->unprocessed_incoming_frames_buffer.length == 0);
+ grpc_slice_buffer_swap(&stream_->unprocessed_incoming_frames_buffer,
+ &stream_->decompressed_data_buffer);
+ stream_->unprocessed_incoming_frames_decompressed = true;
if (end_of_context) {
- grpc_stream_compression_context_destroy(s->stream_decompression_ctx);
- s->stream_decompression_ctx = nullptr;
+ grpc_stream_compression_context_destroy(
+ stream_->stream_decompression_ctx);
+ stream_->stream_decompression_ctx = nullptr;
}
- if (s->unprocessed_incoming_frames_buffer.length == 0) {
+ if (stream_->unprocessed_incoming_frames_buffer.length == 0) {
*slice = grpc_empty_slice();
}
}
error = grpc_deframe_unprocessed_incoming_frames(
- &s->data_parser, s, &s->unprocessed_incoming_frames_buffer, slice,
- nullptr);
+ &stream_->data_parser, stream_,
+ &stream_->unprocessed_incoming_frames_buffer, slice, nullptr);
if (error != GRPC_ERROR_NONE) {
return error;
}
} else {
error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Truncated message");
- GRPC_CLOSURE_SCHED(&s->reset_byte_stream, GRPC_ERROR_REF(error));
+ GRPC_CLOSURE_SCHED(&stream_->reset_byte_stream, GRPC_ERROR_REF(error));
return error;
}
return GRPC_ERROR_NONE;
}
-static void incoming_byte_stream_destroy_locked(void* byte_stream,
- grpc_error* error_ignored);
-
-static void incoming_byte_stream_destroy(grpc_byte_stream* byte_stream) {
- GPR_TIMER_SCOPE("incoming_byte_stream_destroy", 0);
- grpc_chttp2_incoming_byte_stream* bs =
- reinterpret_cast<grpc_chttp2_incoming_byte_stream*>(byte_stream);
- GRPC_CLOSURE_SCHED(
- GRPC_CLOSURE_INIT(&bs->destroy_action,
- incoming_byte_stream_destroy_locked, bs,
- grpc_combiner_scheduler(bs->transport->combiner)),
- GRPC_ERROR_NONE);
-}
-
-static void incoming_byte_stream_publish_error(
- grpc_chttp2_incoming_byte_stream* bs, grpc_error* error) {
- grpc_chttp2_stream* s = bs->stream;
-
+void Chttp2IncomingByteStream::PublishError(grpc_error* error) {
GPR_ASSERT(error != GRPC_ERROR_NONE);
- GRPC_CLOSURE_SCHED(s->on_next, GRPC_ERROR_REF(error));
- s->on_next = nullptr;
- GRPC_ERROR_UNREF(s->byte_stream_error);
- s->byte_stream_error = GRPC_ERROR_REF(error);
- grpc_chttp2_cancel_stream(bs->transport, bs->stream, GRPC_ERROR_REF(error));
+ GRPC_CLOSURE_SCHED(stream_->on_next, GRPC_ERROR_REF(error));
+ stream_->on_next = nullptr;
+ GRPC_ERROR_UNREF(stream_->byte_stream_error);
+ stream_->byte_stream_error = GRPC_ERROR_REF(error);
+ grpc_chttp2_cancel_stream(transport_, stream_, GRPC_ERROR_REF(error));
}
-grpc_error* grpc_chttp2_incoming_byte_stream_push(
- grpc_chttp2_incoming_byte_stream* bs, grpc_slice slice,
- grpc_slice* slice_out) {
- grpc_chttp2_stream* s = bs->stream;
-
- if (bs->remaining_bytes < GRPC_SLICE_LENGTH(slice)) {
+grpc_error* Chttp2IncomingByteStream::Push(grpc_slice slice,
+ grpc_slice* slice_out) {
+ if (remaining_bytes_ < GRPC_SLICE_LENGTH(slice)) {
grpc_error* error =
GRPC_ERROR_CREATE_FROM_STATIC_STRING("Too many bytes in stream");
-
- GRPC_CLOSURE_SCHED(&s->reset_byte_stream, GRPC_ERROR_REF(error));
+ GRPC_CLOSURE_SCHED(&stream_->reset_byte_stream, GRPC_ERROR_REF(error));
grpc_slice_unref_internal(slice);
return error;
} else {
- bs->remaining_bytes -= static_cast<uint32_t> GRPC_SLICE_LENGTH(slice);
+ remaining_bytes_ -= static_cast<uint32_t> GRPC_SLICE_LENGTH(slice);
if (slice_out != nullptr) {
*slice_out = slice;
}
@@ -2901,66 +2897,25 @@ grpc_error* grpc_chttp2_incoming_byte_stream_push(
}
}
-grpc_error* grpc_chttp2_incoming_byte_stream_finished(
- grpc_chttp2_incoming_byte_stream* bs, grpc_error* error,
- bool reset_on_error) {
- grpc_chttp2_stream* s = bs->stream;
-
+grpc_error* Chttp2IncomingByteStream::Finished(grpc_error* error,
+ bool reset_on_error) {
if (error == GRPC_ERROR_NONE) {
- if (bs->remaining_bytes != 0) {
+ if (remaining_bytes_ != 0) {
error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Truncated message");
}
}
if (error != GRPC_ERROR_NONE && reset_on_error) {
- GRPC_CLOSURE_SCHED(&s->reset_byte_stream, GRPC_ERROR_REF(error));
+ GRPC_CLOSURE_SCHED(&stream_->reset_byte_stream, GRPC_ERROR_REF(error));
}
- incoming_byte_stream_unref(bs);
+ Unref();
return error;
}
-static void incoming_byte_stream_shutdown(grpc_byte_stream* byte_stream,
- grpc_error* error) {
- grpc_chttp2_incoming_byte_stream* bs =
- reinterpret_cast<grpc_chttp2_incoming_byte_stream*>(byte_stream);
- GRPC_ERROR_UNREF(grpc_chttp2_incoming_byte_stream_finished(
- bs, error, true /* reset_on_error */));
+void Chttp2IncomingByteStream::Shutdown(grpc_error* error) {
+ GRPC_ERROR_UNREF(Finished(error, true /* reset_on_error */));
}
-static const grpc_byte_stream_vtable grpc_chttp2_incoming_byte_stream_vtable = {
- incoming_byte_stream_next, incoming_byte_stream_pull,
- incoming_byte_stream_shutdown, incoming_byte_stream_destroy};
-
-static void incoming_byte_stream_destroy_locked(void* byte_stream,
- grpc_error* error_ignored) {
- grpc_chttp2_incoming_byte_stream* bs =
- static_cast<grpc_chttp2_incoming_byte_stream*>(byte_stream);
- grpc_chttp2_stream* s = bs->stream;
- grpc_chttp2_transport* t = s->t;
-
- GPR_ASSERT(bs->base.vtable == &grpc_chttp2_incoming_byte_stream_vtable);
- incoming_byte_stream_unref(bs);
- s->pending_byte_stream = false;
- grpc_chttp2_maybe_complete_recv_message(t, s);
- grpc_chttp2_maybe_complete_recv_trailing_metadata(t, s);
-}
-
-grpc_chttp2_incoming_byte_stream* grpc_chttp2_incoming_byte_stream_create(
- grpc_chttp2_transport* t, grpc_chttp2_stream* s, uint32_t frame_size,
- uint32_t flags) {
- grpc_chttp2_incoming_byte_stream* incoming_byte_stream =
- static_cast<grpc_chttp2_incoming_byte_stream*>(
- gpr_malloc(sizeof(*incoming_byte_stream)));
- incoming_byte_stream->base.length = frame_size;
- incoming_byte_stream->remaining_bytes = frame_size;
- incoming_byte_stream->base.flags = flags;
- incoming_byte_stream->base.vtable = &grpc_chttp2_incoming_byte_stream_vtable;
- gpr_ref_init(&incoming_byte_stream->refs, 2);
- incoming_byte_stream->transport = t;
- incoming_byte_stream->stream = s;
- GRPC_ERROR_UNREF(s->byte_stream_error);
- s->byte_stream_error = GRPC_ERROR_NONE;
- return incoming_byte_stream;
-}
+} // namespace grpc_core
/*******************************************************************************
* RESOURCE QUOTAS
diff --git a/src/core/ext/transport/chttp2/transport/frame_data.cc b/src/core/ext/transport/chttp2/transport/frame_data.cc
index 0d37a494a2..f8f06f6789 100644
--- a/src/core/ext/transport/chttp2/transport/frame_data.cc
+++ b/src/core/ext/transport/chttp2/transport/frame_data.cc
@@ -27,6 +27,7 @@
#include <grpc/support/string_util.h>
#include "src/core/ext/transport/chttp2/transport/internal.h"
#include "src/core/lib/gpr/string.h"
+#include "src/core/lib/gprpp/memory.h"
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/lib/slice/slice_string_helpers.h"
#include "src/core/lib/transport/transport.h"
@@ -39,8 +40,7 @@ grpc_error* grpc_chttp2_data_parser_init(grpc_chttp2_data_parser* parser) {
void grpc_chttp2_data_parser_destroy(grpc_chttp2_data_parser* parser) {
if (parser->parsing_frame != nullptr) {
- GRPC_ERROR_UNREF(grpc_chttp2_incoming_byte_stream_finished(
- parser->parsing_frame,
+ GRPC_ERROR_UNREF(parser->parsing_frame->Finished(
GRPC_ERROR_CREATE_FROM_STATIC_STRING("Parser destroyed"), false));
}
GRPC_ERROR_UNREF(parser->error);
@@ -100,7 +100,7 @@ void grpc_chttp2_encode_data(uint32_t id, grpc_slice_buffer* inbuf,
grpc_error* grpc_deframe_unprocessed_incoming_frames(
grpc_chttp2_data_parser* p, grpc_chttp2_stream* s,
grpc_slice_buffer* slices, grpc_slice* slice_out,
- grpc_byte_stream** stream_out) {
+ grpc_core::OrphanablePtr<grpc_core::ByteStream>* stream_out) {
grpc_error* error = GRPC_ERROR_NONE;
grpc_chttp2_transport* t = s->t;
@@ -197,12 +197,11 @@ grpc_error* grpc_deframe_unprocessed_incoming_frames(
if (p->is_frame_compressed) {
message_flags |= GRPC_WRITE_INTERNAL_COMPRESS;
}
- p->parsing_frame = grpc_chttp2_incoming_byte_stream_create(
+ p->parsing_frame = grpc_core::New<grpc_core::Chttp2IncomingByteStream>(
t, s, p->frame_size, message_flags);
- *stream_out = &p->parsing_frame->base;
- if (p->parsing_frame->remaining_bytes == 0) {
- GRPC_ERROR_UNREF(grpc_chttp2_incoming_byte_stream_finished(
- p->parsing_frame, GRPC_ERROR_NONE, true));
+ stream_out->reset(p->parsing_frame);
+ if (p->parsing_frame->remaining_bytes() == 0) {
+ GRPC_ERROR_UNREF(p->parsing_frame->Finished(GRPC_ERROR_NONE, true));
p->parsing_frame = nullptr;
p->state = GRPC_CHTTP2_DATA_FH_0;
}
@@ -226,8 +225,7 @@ grpc_error* grpc_deframe_unprocessed_incoming_frames(
if (remaining == p->frame_size) {
s->stats.incoming.data_bytes += remaining;
if (GRPC_ERROR_NONE !=
- (error = grpc_chttp2_incoming_byte_stream_push(
- p->parsing_frame,
+ (error = p->parsing_frame->Push(
grpc_slice_sub(slice, static_cast<size_t>(cur - beg),
static_cast<size_t>(end - beg)),
slice_out))) {
@@ -235,8 +233,7 @@ grpc_error* grpc_deframe_unprocessed_incoming_frames(
return error;
}
if (GRPC_ERROR_NONE !=
- (error = grpc_chttp2_incoming_byte_stream_finished(
- p->parsing_frame, GRPC_ERROR_NONE, true))) {
+ (error = p->parsing_frame->Finished(GRPC_ERROR_NONE, true))) {
grpc_slice_unref_internal(slice);
return error;
}
@@ -247,8 +244,7 @@ grpc_error* grpc_deframe_unprocessed_incoming_frames(
} else if (remaining < p->frame_size) {
s->stats.incoming.data_bytes += remaining;
if (GRPC_ERROR_NONE !=
- (error = grpc_chttp2_incoming_byte_stream_push(
- p->parsing_frame,
+ (error = p->parsing_frame->Push(
grpc_slice_sub(slice, static_cast<size_t>(cur - beg),
static_cast<size_t>(end - beg)),
slice_out))) {
@@ -261,18 +257,16 @@ grpc_error* grpc_deframe_unprocessed_incoming_frames(
GPR_ASSERT(remaining > p->frame_size);
s->stats.incoming.data_bytes += p->frame_size;
if (GRPC_ERROR_NONE !=
- (grpc_chttp2_incoming_byte_stream_push(
- p->parsing_frame,
+ p->parsing_frame->Push(
grpc_slice_sub(
slice, static_cast<size_t>(cur - beg),
static_cast<size_t>(cur + p->frame_size - beg)),
- slice_out))) {
+ slice_out)) {
grpc_slice_unref_internal(slice);
return error;
}
if (GRPC_ERROR_NONE !=
- (error = grpc_chttp2_incoming_byte_stream_finished(
- p->parsing_frame, GRPC_ERROR_NONE, true))) {
+ (error = p->parsing_frame->Finished(GRPC_ERROR_NONE, true))) {
grpc_slice_unref_internal(slice);
return error;
}
diff --git a/src/core/ext/transport/chttp2/transport/frame_data.h b/src/core/ext/transport/chttp2/transport/frame_data.h
index 3efbbf9f76..e5d01f764e 100644
--- a/src/core/ext/transport/chttp2/transport/frame_data.h
+++ b/src/core/ext/transport/chttp2/transport/frame_data.h
@@ -26,7 +26,6 @@
#include <grpc/slice.h>
#include <grpc/slice_buffer.h>
#include "src/core/ext/transport/chttp2/transport/frame.h"
-#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/transport/byte_stream.h"
#include "src/core/lib/transport/transport.h"
@@ -40,8 +39,9 @@ typedef enum {
GRPC_CHTTP2_DATA_ERROR
} grpc_chttp2_stream_state;
-typedef struct grpc_chttp2_incoming_byte_stream
- grpc_chttp2_incoming_byte_stream;
+namespace grpc_core {
+class Chttp2IncomingByteStream;
+} // namespace grpc_core
typedef struct {
grpc_chttp2_stream_state state;
@@ -50,7 +50,7 @@ typedef struct {
grpc_error* error;
bool is_frame_compressed;
- grpc_chttp2_incoming_byte_stream* parsing_frame;
+ grpc_core::Chttp2IncomingByteStream* parsing_frame;
} grpc_chttp2_data_parser;
/* initialize per-stream state for data frame parsing */
@@ -79,6 +79,6 @@ void grpc_chttp2_encode_data(uint32_t id, grpc_slice_buffer* inbuf,
grpc_error* grpc_deframe_unprocessed_incoming_frames(
grpc_chttp2_data_parser* p, grpc_chttp2_stream* s,
grpc_slice_buffer* slices, grpc_slice* slice_out,
- grpc_byte_stream** stream_out);
+ grpc_core::OrphanablePtr<grpc_core::ByteStream>* stream_out);
#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_DATA_H */
diff --git a/src/core/ext/transport/chttp2/transport/frame_goaway.h b/src/core/ext/transport/chttp2/transport/frame_goaway.h
index e17ed8d563..66c7a68bef 100644
--- a/src/core/ext/transport/chttp2/transport/frame_goaway.h
+++ b/src/core/ext/transport/chttp2/transport/frame_goaway.h
@@ -24,7 +24,6 @@
#include <grpc/slice.h>
#include <grpc/slice_buffer.h>
#include "src/core/ext/transport/chttp2/transport/frame.h"
-#include "src/core/lib/iomgr/exec_ctx.h"
typedef enum {
GRPC_CHTTP2_GOAWAY_LSI0,
diff --git a/src/core/ext/transport/chttp2/transport/frame_ping.h b/src/core/ext/transport/chttp2/transport/frame_ping.h
index 8718d6a097..55a4499ad5 100644
--- a/src/core/ext/transport/chttp2/transport/frame_ping.h
+++ b/src/core/ext/transport/chttp2/transport/frame_ping.h
@@ -23,7 +23,6 @@
#include <grpc/slice.h>
#include "src/core/ext/transport/chttp2/transport/frame.h"
-#include "src/core/lib/iomgr/exec_ctx.h"
typedef struct {
uint8_t byte;
diff --git a/src/core/ext/transport/chttp2/transport/frame_rst_stream.h b/src/core/ext/transport/chttp2/transport/frame_rst_stream.h
index bb2d34f918..6bcf9c4479 100644
--- a/src/core/ext/transport/chttp2/transport/frame_rst_stream.h
+++ b/src/core/ext/transport/chttp2/transport/frame_rst_stream.h
@@ -23,7 +23,6 @@
#include <grpc/slice.h>
#include "src/core/ext/transport/chttp2/transport/frame.h"
-#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/transport/transport.h"
typedef struct {
diff --git a/src/core/ext/transport/chttp2/transport/frame_settings.h b/src/core/ext/transport/chttp2/transport/frame_settings.h
index df19627194..8d8d9b1a91 100644
--- a/src/core/ext/transport/chttp2/transport/frame_settings.h
+++ b/src/core/ext/transport/chttp2/transport/frame_settings.h
@@ -24,7 +24,6 @@
#include <grpc/slice.h>
#include "src/core/ext/transport/chttp2/transport/frame.h"
#include "src/core/ext/transport/chttp2/transport/http2_settings.h"
-#include "src/core/lib/iomgr/exec_ctx.h"
typedef enum {
GRPC_CHTTP2_SPS_ID0,
diff --git a/src/core/ext/transport/chttp2/transport/frame_window_update.h b/src/core/ext/transport/chttp2/transport/frame_window_update.h
index 30667c77e1..3d2391f637 100644
--- a/src/core/ext/transport/chttp2/transport/frame_window_update.h
+++ b/src/core/ext/transport/chttp2/transport/frame_window_update.h
@@ -23,7 +23,6 @@
#include <grpc/slice.h>
#include "src/core/ext/transport/chttp2/transport/frame.h"
-#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/transport/transport.h"
typedef struct {
diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser.h b/src/core/ext/transport/chttp2/transport/hpack_parser.h
index b3b8018b98..3e05de4b92 100644
--- a/src/core/ext/transport/chttp2/transport/hpack_parser.h
+++ b/src/core/ext/transport/chttp2/transport/hpack_parser.h
@@ -25,7 +25,6 @@
#include "src/core/ext/transport/chttp2/transport/frame.h"
#include "src/core/ext/transport/chttp2/transport/hpack_table.h"
-#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/transport/metadata.h"
typedef struct grpc_chttp2_hpack_parser grpc_chttp2_hpack_parser;
diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h
index b9431cd311..6d11e5aa31 100644
--- a/src/core/ext/transport/chttp2/transport/internal.h
+++ b/src/core/ext/transport/chttp2/transport/internal.h
@@ -203,18 +203,58 @@ typedef struct grpc_chttp2_write_cb {
struct grpc_chttp2_write_cb* next;
} grpc_chttp2_write_cb;
-/* forward declared in frame_data.h */
-struct grpc_chttp2_incoming_byte_stream {
- grpc_byte_stream base;
- gpr_refcount refs;
+namespace grpc_core {
+
+class Chttp2IncomingByteStream : public ByteStream {
+ public:
+ Chttp2IncomingByteStream(grpc_chttp2_transport* transport,
+ grpc_chttp2_stream* stream, uint32_t frame_size,
+ uint32_t flags);
+
+ void Orphan() override;
+
+ bool Next(size_t max_size_hint, grpc_closure* on_complete) override;
+ grpc_error* Pull(grpc_slice* slice) override;
+ void Shutdown(grpc_error* error) override;
+
+ // TODO(roth): When I converted this class to C++, I wanted to make it
+ // inherit from RefCounted or InternallyRefCounted instead of continuing
+ // to use its own custom ref-counting code. However, that would require
+ // using multiple inheritence, which sucks in general. And to make matters
+ // worse, it causes problems with our New<> and Delete<> wrappers.
+ // Specifically, unless RefCounted is first in the list of parent classes,
+ // it will see a different value of the address of the object than the one
+ // we actually allocated, in which case gpr_free() will be called on a
+ // different address than the one we got from gpr_malloc(), thus causing a
+ // crash. Given the fragility of depending on that, as well as a desire to
+ // avoid multiple inheritence in general, I've decided to leave this
+ // alone for now. We can revisit this once we're able to link against
+ // libc++, at which point we can eliminate New<> and Delete<> and
+ // switch to std::shared_ptr<>.
+ void Ref();
+ void Unref();
+
+ void PublishError(grpc_error* error);
+
+ grpc_error* Push(grpc_slice slice, grpc_slice* slice_out);
- grpc_chttp2_transport* transport; /* immutable */
- grpc_chttp2_stream* stream; /* immutable */
+ grpc_error* Finished(grpc_error* error, bool reset_on_error);
+
+ uint32_t remaining_bytes() const { return remaining_bytes_; }
+
+ private:
+ static void NextLocked(void* arg, grpc_error* error_ignored);
+ static void OrphanLocked(void* arg, grpc_error* error_ignored);
+
+ grpc_chttp2_transport* transport_; // Immutable.
+ grpc_chttp2_stream* stream_; // Immutable.
+
+ gpr_refcount refs_;
/* Accessed only by transport thread when stream->pending_byte_stream == false
* Accessed only by application thread when stream->pending_byte_stream ==
* true */
- uint32_t remaining_bytes;
+ uint32_t remaining_bytes_;
/* Accessed only by transport thread when stream->pending_byte_stream == false
* Accessed only by application thread when stream->pending_byte_stream ==
@@ -223,11 +263,12 @@ struct grpc_chttp2_incoming_byte_stream {
grpc_closure closure;
size_t max_size_hint;
grpc_closure* on_complete;
- } next_action;
- grpc_closure destroy_action;
- grpc_closure finished_action;
+ } next_action_;
+ grpc_closure destroy_action_;
};
+} // namespace grpc_core
+
typedef enum {
GRPC_CHTTP2_KEEPALIVE_STATE_WAITING,
GRPC_CHTTP2_KEEPALIVE_STATE_PINGING,
@@ -456,7 +497,7 @@ struct grpc_chttp2_stream {
grpc_metadata_batch* send_trailing_metadata;
grpc_closure* send_trailing_metadata_finished;
- grpc_byte_stream* fetching_send_message;
+ grpc_core::OrphanablePtr<grpc_core::ByteStream> fetching_send_message;
uint32_t fetched_send_message_length;
grpc_slice fetching_slice;
int64_t next_message_end_offset;
@@ -468,7 +509,7 @@ struct grpc_chttp2_stream {
grpc_metadata_batch* recv_initial_metadata;
grpc_closure* recv_initial_metadata_ready;
bool* trailing_metadata_available;
- grpc_byte_stream** recv_message;
+ grpc_core::OrphanablePtr<grpc_core::ByteStream>* recv_message;
grpc_closure* recv_message_ready;
grpc_metadata_batch* recv_trailing_metadata;
grpc_closure* recv_trailing_metadata_finished;
@@ -719,18 +760,6 @@ void grpc_chttp2_unref_transport(grpc_chttp2_transport* t);
void grpc_chttp2_ref_transport(grpc_chttp2_transport* t);
#endif
-grpc_chttp2_incoming_byte_stream* grpc_chttp2_incoming_byte_stream_create(
- grpc_chttp2_transport* t, grpc_chttp2_stream* s, uint32_t frame_size,
- uint32_t flags);
-grpc_error* grpc_chttp2_incoming_byte_stream_push(
- grpc_chttp2_incoming_byte_stream* bs, grpc_slice slice,
- grpc_slice* slice_out);
-grpc_error* grpc_chttp2_incoming_byte_stream_finished(
- grpc_chttp2_incoming_byte_stream* bs, grpc_error* error,
- bool reset_on_error);
-void grpc_chttp2_incoming_byte_stream_notify(
- grpc_chttp2_incoming_byte_stream* bs, grpc_error* error);
-
void grpc_chttp2_ack_ping(grpc_chttp2_transport* t, uint64_t id);
/** Add a new ping strike to ping_recv_state.ping_strikes. If
diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.cc b/src/core/ext/transport/cronet/transport/cronet_transport.cc
index ff1c1aad62..8e3ea05706 100644
--- a/src/core/ext/transport/cronet/transport/cronet_transport.cc
+++ b/src/core/ext/transport/cronet/transport/cronet_transport.cc
@@ -31,6 +31,7 @@
#include "src/core/ext/transport/cronet/transport/cronet_transport.h"
#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
+#include "src/core/lib/gprpp/manual_constructor.h"
#include "src/core/lib/iomgr/endpoint.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/slice/slice_internal.h"
@@ -122,7 +123,7 @@ struct read_state {
bool read_stream_closed;
/* vars for holding data destined for the application */
- struct grpc_slice_buffer_stream sbs;
+ grpc_core::ManualConstructor<grpc_core::SliceBufferByteStream> sbs;
grpc_slice_buffer read_slice_buffer;
/* vars for trailing metadata */
@@ -1041,16 +1042,14 @@ static enum e_op_result execute_stream_op(struct op_and_state* oas) {
grpc_slice_buffer write_slice_buffer;
grpc_slice slice;
grpc_slice_buffer_init(&write_slice_buffer);
- if (1 != grpc_byte_stream_next(
- stream_op->payload->send_message.send_message,
- stream_op->payload->send_message.send_message->length,
+ if (1 != stream_op->payload->send_message.send_message->Next(
+ stream_op->payload->send_message.send_message->length(),
nullptr)) {
/* Should never reach here */
GPR_ASSERT(false);
}
if (GRPC_ERROR_NONE !=
- grpc_byte_stream_pull(stream_op->payload->send_message.send_message,
- &slice)) {
+ stream_op->payload->send_message.send_message->Pull(&slice)) {
/* Should never reach here */
GPR_ASSERT(false);
}
@@ -1062,9 +1061,10 @@ static enum e_op_result execute_stream_op(struct op_and_state* oas) {
}
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,
- stream_op->payload->send_message.send_message->flags);
+ create_grpc_frame(
+ &write_slice_buffer, &stream_state->ws.write_buffer,
+ &write_buffer_size,
+ stream_op->payload->send_message.send_message->flags());
CRONET_LOG(GPR_DEBUG, "bidirectional_stream_write (%p, %p)", s->cbs,
stream_state->ws.write_buffer);
stream_state->state_callback_received[OP_SEND_MESSAGE] = false;
@@ -1089,6 +1089,7 @@ static enum e_op_result execute_stream_op(struct op_and_state* oas) {
}
stream_state->state_op_done[OP_SEND_MESSAGE] = true;
oas->state.state_op_done[OP_SEND_MESSAGE] = true;
+ stream_op->payload->send_message.send_message.reset();
} else if (stream_op->send_trailing_metadata &&
op_can_be_run(stream_op, s, &oas->state,
OP_SEND_TRAILING_METADATA)) {
@@ -1195,14 +1196,13 @@ static enum e_op_result execute_stream_op(struct op_and_state* oas) {
grpc_slice_buffer_destroy_internal(
&stream_state->rs.read_slice_buffer);
grpc_slice_buffer_init(&stream_state->rs.read_slice_buffer);
- grpc_slice_buffer_stream_init(&stream_state->rs.sbs,
- &stream_state->rs.read_slice_buffer, 0);
+ uint32_t flags = 0;
if (stream_state->rs.compressed) {
- stream_state->rs.sbs.base.flags |= GRPC_WRITE_INTERNAL_COMPRESS;
+ flags |= GRPC_WRITE_INTERNAL_COMPRESS;
}
- *(reinterpret_cast<grpc_byte_buffer**>(
- stream_op->payload->recv_message.recv_message)) =
- reinterpret_cast<grpc_byte_buffer*>(&stream_state->rs.sbs);
+ stream_state->rs.sbs.Init(&stream_state->rs.read_slice_buffer, flags);
+ stream_op->payload->recv_message.recv_message->reset(
+ stream_state->rs.sbs.get());
GRPC_CLOSURE_SCHED(
stream_op->payload->recv_message.recv_message_ready,
GRPC_ERROR_NONE);
@@ -1252,14 +1252,13 @@ static enum e_op_result execute_stream_op(struct op_and_state* oas) {
grpc_slice_buffer_init(&stream_state->rs.read_slice_buffer);
grpc_slice_buffer_add(&stream_state->rs.read_slice_buffer,
read_data_slice);
- grpc_slice_buffer_stream_init(&stream_state->rs.sbs,
- &stream_state->rs.read_slice_buffer, 0);
+ uint32_t flags = 0;
if (stream_state->rs.compressed) {
- stream_state->rs.sbs.base.flags = GRPC_WRITE_INTERNAL_COMPRESS;
+ flags = GRPC_WRITE_INTERNAL_COMPRESS;
}
- *(reinterpret_cast<grpc_byte_buffer**>(
- stream_op->payload->recv_message.recv_message)) =
- reinterpret_cast<grpc_byte_buffer*>(&stream_state->rs.sbs);
+ stream_state->rs.sbs.Init(&stream_state->rs.read_slice_buffer, flags);
+ stream_op->payload->recv_message.recv_message->reset(
+ stream_state->rs.sbs.get());
GRPC_CLOSURE_SCHED(stream_op->payload->recv_message.recv_message_ready,
GRPC_ERROR_NONE);
stream_state->state_op_done[OP_RECV_MESSAGE] = true;
diff --git a/src/core/ext/transport/inproc/inproc_transport.cc b/src/core/ext/transport/inproc/inproc_transport.cc
index 5f898bbf25..67a380077b 100644
--- a/src/core/ext/transport/inproc/inproc_transport.cc
+++ b/src/core/ext/transport/inproc/inproc_transport.cc
@@ -25,6 +25,7 @@
#include <string.h>
#include "src/core/ext/transport/inproc/inproc_transport.h"
#include "src/core/lib/channel/channel_args.h"
+#include "src/core/lib/gprpp/manual_constructor.h"
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/lib/surface/api_trace.h"
#include "src/core/lib/surface/channel.h"
@@ -99,7 +100,7 @@ typedef struct inproc_stream {
grpc_transport_stream_op_batch* recv_trailing_md_op;
grpc_slice_buffer recv_message;
- grpc_slice_buffer_stream recv_stream;
+ grpc_core::ManualConstructor<grpc_core::SliceBufferByteStream> recv_stream;
bool recv_inited;
bool initial_md_sent;
@@ -482,8 +483,7 @@ static void fail_helper_locked(inproc_stream* s, grpc_error* error) {
s->recv_message_op = nullptr;
}
if (s->send_message_op) {
- grpc_byte_stream_destroy(
- s->send_message_op->payload->send_message.send_message);
+ s->send_message_op->payload->send_message.send_message.reset();
complete_if_batch_end_locked(
s, error, s->send_message_op,
"fail_helper scheduling send-message-on-complete");
@@ -521,7 +521,7 @@ static void fail_helper_locked(inproc_stream* s, grpc_error* error) {
static void message_transfer_locked(inproc_stream* sender,
inproc_stream* receiver) {
size_t remaining =
- sender->send_message_op->payload->send_message.send_message->length;
+ sender->send_message_op->payload->send_message.send_message->length();
if (receiver->recv_inited) {
grpc_slice_buffer_destroy_internal(&receiver->recv_message);
}
@@ -530,12 +530,12 @@ static void message_transfer_locked(inproc_stream* sender,
do {
grpc_slice message_slice;
grpc_closure unused;
- GPR_ASSERT(grpc_byte_stream_next(
- sender->send_message_op->payload->send_message.send_message, SIZE_MAX,
- &unused));
- grpc_error* error = grpc_byte_stream_pull(
- sender->send_message_op->payload->send_message.send_message,
- &message_slice);
+ GPR_ASSERT(
+ sender->send_message_op->payload->send_message.send_message->Next(
+ SIZE_MAX, &unused));
+ grpc_error* error =
+ sender->send_message_op->payload->send_message.send_message->Pull(
+ &message_slice);
if (error != GRPC_ERROR_NONE) {
cancel_stream_locked(sender, GRPC_ERROR_REF(error));
break;
@@ -544,13 +544,11 @@ static void message_transfer_locked(inproc_stream* sender,
remaining -= GRPC_SLICE_LENGTH(message_slice);
grpc_slice_buffer_add(&receiver->recv_message, message_slice);
} while (remaining > 0);
- grpc_byte_stream_destroy(
- sender->send_message_op->payload->send_message.send_message);
+ sender->send_message_op->payload->send_message.send_message.reset();
- grpc_slice_buffer_stream_init(&receiver->recv_stream, &receiver->recv_message,
- 0);
- *receiver->recv_message_op->payload->recv_message.recv_message =
- &receiver->recv_stream.base;
+ receiver->recv_stream.Init(&receiver->recv_message, 0);
+ receiver->recv_message_op->payload->recv_message.recv_message->reset(
+ receiver->recv_stream.get());
INPROC_LOG(GPR_DEBUG, "message_transfer_locked %p scheduling message-ready",
receiver);
GRPC_CLOSURE_SCHED(
@@ -606,8 +604,7 @@ static void op_state_machine(void* arg, grpc_error* error) {
(s->trailing_md_sent || other->recv_trailing_md_op)) {
// A server send will never be matched if the client is waiting
// for trailing metadata already
- grpc_byte_stream_destroy(
- s->send_message_op->payload->send_message.send_message);
+ s->send_message_op->payload->send_message.send_message.reset();
complete_if_batch_end_locked(
s, GRPC_ERROR_NONE, s->send_message_op,
"op_state_machine scheduling send-message-on-complete");
@@ -744,8 +741,7 @@ static void op_state_machine(void* arg, grpc_error* error) {
if ((s->trailing_md_sent || s->t->is_client) && s->send_message_op) {
// Nothing further will try to receive from this stream, so finish off
// any outstanding send_message op
- grpc_byte_stream_destroy(
- s->send_message_op->payload->send_message.send_message);
+ s->send_message_op->payload->send_message.send_message.reset();
complete_if_batch_end_locked(
s, new_err, s->send_message_op,
"op_state_machine scheduling send-message-on-complete");
@@ -803,8 +799,7 @@ static void op_state_machine(void* arg, grpc_error* error) {
s->send_message_op) {
// Nothing further will try to receive from this stream, so finish off
// any outstanding send_message op
- grpc_byte_stream_destroy(
- s->send_message_op->payload->send_message.send_message);
+ s->send_message_op->payload->send_message.send_message.reset();
complete_if_batch_end_locked(
s, new_err, s->send_message_op,
"op_state_machine scheduling send-message-on-complete");
diff --git a/src/core/lib/channel/handshaker_factory.h b/src/core/lib/channel/handshaker_factory.h
index 9e36443958..3e45fcf20e 100644
--- a/src/core/lib/channel/handshaker_factory.h
+++ b/src/core/lib/channel/handshaker_factory.h
@@ -24,7 +24,6 @@
#include <grpc/impl/codegen/grpc_types.h>
#include "src/core/lib/channel/handshaker.h"
-#include "src/core/lib/iomgr/exec_ctx.h"
// A handshaker factory is used to create handshakers.
diff --git a/src/core/lib/channel/handshaker_registry.h b/src/core/lib/channel/handshaker_registry.h
index b42d61ff43..82ad9c5b9a 100644
--- a/src/core/lib/channel/handshaker_registry.h
+++ b/src/core/lib/channel/handshaker_registry.h
@@ -24,7 +24,6 @@
#include <grpc/impl/codegen/grpc_types.h>
#include "src/core/lib/channel/handshaker_factory.h"
-#include "src/core/lib/iomgr/exec_ctx.h"
typedef enum {
HANDSHAKER_CLIENT = 0,
diff --git a/src/core/lib/compression/stream_compression_identity.cc b/src/core/lib/compression/stream_compression_identity.cc
index 52a6236621..b7981394d5 100644
--- a/src/core/lib/compression/stream_compression_identity.cc
+++ b/src/core/lib/compression/stream_compression_identity.cc
@@ -22,7 +22,6 @@
#include <grpc/support/log.h>
#include "src/core/lib/compression/stream_compression_identity.h"
-#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/slice/slice_internal.h"
#define OUTPUT_BLOCK_SIZE (1024)
diff --git a/src/core/lib/gpr/cpu_linux.cc b/src/core/lib/gpr/cpu_linux.cc
index fda28916f8..9fc2f0b141 100644
--- a/src/core/lib/gpr/cpu_linux.cc
+++ b/src/core/lib/gpr/cpu_linux.cc
@@ -71,6 +71,10 @@ unsigned gpr_cpu_current_cpu(void) {
gpr_log(GPR_ERROR, "Error determining current CPU: %s\n", strerror(errno));
return 0;
}
+ if (static_cast<unsigned>(cpu) >= gpr_cpu_num_cores()) {
+ gpr_log(GPR_ERROR, "Cannot handle hot-plugged CPUs");
+ return 0;
+ }
return static_cast<unsigned>(cpu);
#endif
}
diff --git a/src/core/lib/gpr/log_linux.cc b/src/core/lib/gpr/log_linux.cc
index d743eedf38..e4417d9d5d 100644
--- a/src/core/lib/gpr/log_linux.cc
+++ b/src/core/lib/gpr/log_linux.cc
@@ -32,6 +32,7 @@
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
#include <grpc/support/time.h>
+#include <inttypes.h>
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
diff --git a/src/core/lib/http/httpcli_security_connector.cc b/src/core/lib/http/httpcli_security_connector.cc
index 180912383f..886357fc00 100644
--- a/src/core/lib/http/httpcli_security_connector.cc
+++ b/src/core/lib/http/httpcli_security_connector.cc
@@ -121,8 +121,11 @@ static grpc_security_status httpcli_ssl_channel_security_connector_create(
if (secure_peer_name != nullptr) {
c->secure_peer_name = gpr_strdup(secure_peer_name);
}
- result = tsi_create_ssl_client_handshaker_factory(
- nullptr, pem_root_certs, nullptr, nullptr, 0, &c->handshaker_factory);
+ tsi_ssl_client_handshaker_options options;
+ memset(&options, 0, sizeof(options));
+ options.pem_root_certs = pem_root_certs;
+ result = tsi_create_ssl_client_handshaker_factory_with_options(
+ &options, &c->handshaker_factory);
if (result != TSI_OK) {
gpr_log(GPR_ERROR, "Handshaker factory creation failed with %s.",
tsi_result_to_string(result));
diff --git a/src/core/lib/iomgr/call_combiner.h b/src/core/lib/iomgr/call_combiner.h
index 16829e5707..0ccd08ea57 100644
--- a/src/core/lib/iomgr/call_combiner.h
+++ b/src/core/lib/iomgr/call_combiner.h
@@ -27,7 +27,6 @@
#include "src/core/lib/gpr/mpscq.h"
#include "src/core/lib/iomgr/closure.h"
-#include "src/core/lib/iomgr/exec_ctx.h"
// A simple, lock-free mechanism for serializing activity related to a
// single call. This is similar to a combiner but is more lightweight.
diff --git a/src/core/lib/iomgr/endpoint.cc b/src/core/lib/iomgr/endpoint.cc
index e22c21e4bd..92e7930111 100644
--- a/src/core/lib/iomgr/endpoint.cc
+++ b/src/core/lib/iomgr/endpoint.cc
@@ -20,6 +20,8 @@
#include "src/core/lib/iomgr/endpoint.h"
+grpc_core::TraceFlag grpc_tcp_trace(false, "tcp");
+
void grpc_endpoint_read(grpc_endpoint* ep, grpc_slice_buffer* slices,
grpc_closure* cb) {
ep->vtable->read(ep, slices, cb);
diff --git a/src/core/lib/iomgr/endpoint_pair_windows.cc b/src/core/lib/iomgr/endpoint_pair_windows.cc
index 416c9d88a1..177331d681 100644
--- a/src/core/lib/iomgr/endpoint_pair_windows.cc
+++ b/src/core/lib/iomgr/endpoint_pair_windows.cc
@@ -22,6 +22,7 @@
#ifdef GRPC_WINSOCK_SOCKET
#include "src/core/lib/iomgr/endpoint_pair.h"
+#include "src/core/lib/iomgr/sockaddr.h"
#include "src/core/lib/iomgr/sockaddr_utils.h"
#include <errno.h>
@@ -46,19 +47,19 @@ static void create_sockets(SOCKET sv[2]) {
memset(&addr, 0, sizeof(addr));
addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
addr.sin_family = AF_INET;
- GPR_ASSERT(bind(lst_sock, (struct sockaddr*)&addr, sizeof(addr)) !=
+ GPR_ASSERT(bind(lst_sock, (grpc_sockaddr*)&addr, sizeof(addr)) !=
SOCKET_ERROR);
GPR_ASSERT(listen(lst_sock, SOMAXCONN) != SOCKET_ERROR);
- GPR_ASSERT(getsockname(lst_sock, (struct sockaddr*)&addr, &addr_len) !=
+ GPR_ASSERT(getsockname(lst_sock, (grpc_sockaddr*)&addr, &addr_len) !=
SOCKET_ERROR);
cli_sock = WSASocket(AF_INET, SOCK_STREAM, IPPROTO_TCP, NULL, 0,
WSA_FLAG_OVERLAPPED);
GPR_ASSERT(cli_sock != INVALID_SOCKET);
- GPR_ASSERT(WSAConnect(cli_sock, (struct sockaddr*)&addr, addr_len, NULL, NULL,
+ GPR_ASSERT(WSAConnect(cli_sock, (grpc_sockaddr*)&addr, addr_len, NULL, NULL,
NULL, NULL) == 0);
- svr_sock = accept(lst_sock, (struct sockaddr*)&addr, &addr_len);
+ svr_sock = accept(lst_sock, (grpc_sockaddr*)&addr, &addr_len);
GPR_ASSERT(svr_sock != INVALID_SOCKET);
closesocket(lst_sock);
diff --git a/src/core/lib/iomgr/ev_epollex_linux.cc b/src/core/lib/iomgr/ev_epollex_linux.cc
index d3cbaf9d0a..0ef7c03056 100644
--- a/src/core/lib/iomgr/ev_epollex_linux.cc
+++ b/src/core/lib/iomgr/ev_epollex_linux.cc
@@ -59,7 +59,7 @@
//#define GRPC_EPOLLEX_CREATE_WORKERS_ON_HEAP 1
#define MAX_EPOLL_EVENTS 100
-#define MAX_EPOLL_EVENTS_HANDLED_EACH_POLL_CALL 16
+#define MAX_EPOLL_EVENTS_HANDLED_EACH_POLL_CALL 1
grpc_core::DebugOnlyTraceFlag grpc_trace_pollable_refcount(false,
"pollable_refcount");
@@ -198,7 +198,6 @@ struct grpc_pollset_worker {
struct grpc_pollset {
gpr_mu mu;
- gpr_atm worker_count;
pollable* active_pollable;
bool kicked_without_poller;
grpc_closure* shutdown_closure;
@@ -686,7 +685,6 @@ static grpc_error* pollset_kick_all(grpc_pollset* pollset) {
static void pollset_init(grpc_pollset* pollset, gpr_mu** mu) {
gpr_mu_init(&pollset->mu);
- gpr_atm_no_barrier_store(&pollset->worker_count, 0);
pollset->active_pollable = POLLABLE_REF(g_empty_pollable, "pollset");
pollset->kicked_without_poller = false;
pollset->shutdown_closure = nullptr;
@@ -760,20 +758,8 @@ static grpc_error* pollable_process_events(grpc_pollset* pollset,
pollable* pollable_obj, bool drain) {
GPR_TIMER_SCOPE("pollable_process_events", 0);
static const char* err_desc = "pollset_process_events";
- // Use a simple heuristic to determine how many fd events to process
- // per loop iteration. (events/workers)
- int handle_count = 1;
- int worker_count = gpr_atm_no_barrier_load(&pollset->worker_count);
- GPR_ASSERT(worker_count > 0);
- handle_count =
- (pollable_obj->event_count - pollable_obj->event_cursor) / worker_count;
- if (handle_count == 0) {
- handle_count = 1;
- } else if (handle_count > MAX_EPOLL_EVENTS_HANDLED_EACH_POLL_CALL) {
- handle_count = MAX_EPOLL_EVENTS_HANDLED_EACH_POLL_CALL;
- }
grpc_error* error = GRPC_ERROR_NONE;
- for (int i = 0; (drain || i < handle_count) &&
+ for (int i = 0; (drain || i < MAX_EPOLL_EVENTS_HANDLED_EACH_POLL_CALL) &&
pollable_obj->event_cursor != pollable_obj->event_count;
i++) {
int n = pollable_obj->event_cursor++;
@@ -898,7 +884,6 @@ static bool begin_worker(grpc_pollset* pollset, grpc_pollset_worker* worker,
GPR_TIMER_SCOPE("begin_worker", 0);
bool do_poll =
(pollset->shutdown_closure == nullptr && !pollset->already_shutdown);
- gpr_atm_no_barrier_fetch_add(&pollset->worker_count, 1);
if (worker_hdl != nullptr) *worker_hdl = worker;
worker->initialized_cv = false;
worker->kicked = false;
@@ -979,7 +964,6 @@ static void end_worker(grpc_pollset* pollset, grpc_pollset_worker* worker,
if (worker->initialized_cv) {
gpr_cv_destroy(&worker->cv);
}
- gpr_atm_no_barrier_fetch_add(&pollset->worker_count, -1);
}
#ifndef NDEBUG
diff --git a/src/core/lib/iomgr/ev_poll_posix.cc b/src/core/lib/iomgr/ev_poll_posix.cc
index 436537bc0b..2e375b4022 100644
--- a/src/core/lib/iomgr/ev_poll_posix.cc
+++ b/src/core/lib/iomgr/ev_poll_posix.cc
@@ -177,7 +177,6 @@ struct grpc_pollset {
int called_shutdown;
int kicked_without_pollers;
grpc_closure* shutdown_done;
- grpc_closure_list idle_jobs;
int pollset_set_count;
/* all polled fds */
size_t fd_count;
@@ -812,7 +811,6 @@ static void pollset_init(grpc_pollset* pollset, gpr_mu** mu) {
pollset->shutting_down = 0;
pollset->called_shutdown = 0;
pollset->kicked_without_pollers = 0;
- pollset->idle_jobs.head = pollset->idle_jobs.tail = nullptr;
pollset->local_wakeup_cache = nullptr;
pollset->kicked_without_pollers = 0;
pollset->fd_count = 0;
@@ -823,7 +821,6 @@ static void pollset_init(grpc_pollset* pollset, gpr_mu** mu) {
static void pollset_destroy(grpc_pollset* pollset) {
GPR_ASSERT(!pollset_has_workers(pollset));
- GPR_ASSERT(pollset->idle_jobs.head == pollset->idle_jobs.tail);
while (pollset->local_wakeup_cache) {
grpc_cached_wakeup_fd* next = pollset->local_wakeup_cache->next;
grpc_wakeup_fd_destroy(&pollset->local_wakeup_cache->fd);
@@ -855,7 +852,6 @@ exit:
}
static void finish_shutdown(grpc_pollset* pollset) {
- GPR_ASSERT(grpc_closure_list_empty(pollset->idle_jobs));
size_t i;
for (i = 0; i < pollset->fd_count; i++) {
GRPC_FD_UNREF(pollset->fds[i], "multipoller");
@@ -906,14 +902,6 @@ static grpc_error* pollset_work(grpc_pollset* pollset,
}
}
worker.kicked_specifically = 0;
- /* If there's work waiting for the pollset to be idle, and the
- pollset is idle, then do that work */
- if (!pollset_has_workers(pollset) &&
- !grpc_closure_list_empty(pollset->idle_jobs)) {
- GPR_TIMER_MARK("pollset_work.idle_jobs", 0);
- GRPC_CLOSURE_LIST_SCHED(&pollset->idle_jobs);
- goto done;
- }
/* If we're shutting down then we don't execute any extended work */
if (pollset->shutting_down) {
GPR_TIMER_MARK("pollset_work.shutting_down", 0);
@@ -1101,11 +1089,6 @@ static grpc_error* pollset_work(grpc_pollset* pollset,
* pollset_work.
* TODO(dklempner): Can we refactor the shutdown logic to avoid this? */
gpr_mu_lock(&pollset->mu);
- } else if (!grpc_closure_list_empty(pollset->idle_jobs)) {
- GRPC_CLOSURE_LIST_SCHED(&pollset->idle_jobs);
- gpr_mu_unlock(&pollset->mu);
- grpc_core::ExecCtx::Get()->Flush();
- gpr_mu_lock(&pollset->mu);
}
}
if (worker_hdl) *worker_hdl = nullptr;
@@ -1118,9 +1101,6 @@ static void pollset_shutdown(grpc_pollset* pollset, grpc_closure* closure) {
pollset->shutting_down = 1;
pollset->shutdown_done = closure;
pollset_kick(pollset, GRPC_POLLSET_KICK_BROADCAST);
- if (!pollset_has_workers(pollset)) {
- GRPC_CLOSURE_LIST_SCHED(&pollset->idle_jobs);
- }
if (!pollset->called_shutdown && !pollset_has_observers(pollset)) {
pollset->called_shutdown = 1;
finish_shutdown(pollset);
diff --git a/src/core/lib/iomgr/ev_posix.cc b/src/core/lib/iomgr/ev_posix.cc
index 39ce459f1e..8b80070265 100644
--- a/src/core/lib/iomgr/ev_posix.cc
+++ b/src/core/lib/iomgr/ev_posix.cc
@@ -224,26 +224,26 @@ void grpc_fd_notify_on_write(grpc_fd* fd, grpc_closure* closure) {
g_event_engine->fd_notify_on_write(fd, closure);
}
-size_t grpc_pollset_size(void) { return g_event_engine->pollset_size; }
+static size_t pollset_size(void) { return g_event_engine->pollset_size; }
-void grpc_pollset_init(grpc_pollset* pollset, gpr_mu** mu) {
+static void pollset_init(grpc_pollset* pollset, gpr_mu** mu) {
GRPC_POLLING_API_TRACE("pollset_init(%p)", pollset);
g_event_engine->pollset_init(pollset, mu);
}
-void grpc_pollset_shutdown(grpc_pollset* pollset, grpc_closure* closure) {
+static void pollset_shutdown(grpc_pollset* pollset, grpc_closure* closure) {
GRPC_POLLING_API_TRACE("pollset_shutdown(%p)", pollset);
g_event_engine->pollset_shutdown(pollset, closure);
}
-void grpc_pollset_destroy(grpc_pollset* pollset) {
+static void pollset_destroy(grpc_pollset* pollset) {
GRPC_POLLING_API_TRACE("pollset_destroy(%p)", pollset);
g_event_engine->pollset_destroy(pollset);
}
-grpc_error* grpc_pollset_work(grpc_pollset* pollset,
- grpc_pollset_worker** worker,
- grpc_millis deadline) {
+static grpc_error* pollset_work(grpc_pollset* pollset,
+ grpc_pollset_worker** worker,
+ grpc_millis deadline) {
GRPC_POLLING_API_TRACE("pollset_work(%p, %" PRIdPTR ") begin", pollset,
deadline);
grpc_error* err = g_event_engine->pollset_work(pollset, worker, deadline);
@@ -252,8 +252,8 @@ grpc_error* grpc_pollset_work(grpc_pollset* pollset,
return err;
}
-grpc_error* grpc_pollset_kick(grpc_pollset* pollset,
- grpc_pollset_worker* specific_worker) {
+static grpc_error* pollset_kick(grpc_pollset* pollset,
+ grpc_pollset_worker* specific_worker) {
GRPC_POLLING_API_TRACE("pollset_kick(%p, %p)", pollset, specific_worker);
return g_event_engine->pollset_kick(pollset, specific_worker);
}
@@ -264,43 +264,57 @@ void grpc_pollset_add_fd(grpc_pollset* pollset, struct grpc_fd* fd) {
g_event_engine->pollset_add_fd(pollset, fd);
}
-grpc_pollset_set* grpc_pollset_set_create(void) {
+void pollset_global_init() {}
+void pollset_global_shutdown() {}
+
+grpc_pollset_vtable grpc_posix_pollset_vtable = {
+ pollset_global_init, pollset_global_shutdown,
+ pollset_init, pollset_shutdown,
+ pollset_destroy, pollset_work,
+ pollset_kick, pollset_size};
+
+static grpc_pollset_set* pollset_set_create(void) {
grpc_pollset_set* pss = g_event_engine->pollset_set_create();
GRPC_POLLING_API_TRACE("pollset_set_create(%p)", pss);
return pss;
}
-void grpc_pollset_set_destroy(grpc_pollset_set* pollset_set) {
+static void pollset_set_destroy(grpc_pollset_set* pollset_set) {
GRPC_POLLING_API_TRACE("pollset_set_destroy(%p)", pollset_set);
g_event_engine->pollset_set_destroy(pollset_set);
}
-void grpc_pollset_set_add_pollset(grpc_pollset_set* pollset_set,
- grpc_pollset* pollset) {
+static void pollset_set_add_pollset(grpc_pollset_set* pollset_set,
+ grpc_pollset* pollset) {
GRPC_POLLING_API_TRACE("pollset_set_add_pollset(%p, %p)", pollset_set,
pollset);
g_event_engine->pollset_set_add_pollset(pollset_set, pollset);
}
-void grpc_pollset_set_del_pollset(grpc_pollset_set* pollset_set,
- grpc_pollset* pollset) {
+static void pollset_set_del_pollset(grpc_pollset_set* pollset_set,
+ grpc_pollset* pollset) {
GRPC_POLLING_API_TRACE("pollset_set_del_pollset(%p, %p)", pollset_set,
pollset);
g_event_engine->pollset_set_del_pollset(pollset_set, pollset);
}
-void grpc_pollset_set_add_pollset_set(grpc_pollset_set* bag,
- grpc_pollset_set* item) {
+static void pollset_set_add_pollset_set(grpc_pollset_set* bag,
+ grpc_pollset_set* item) {
GRPC_POLLING_API_TRACE("pollset_set_add_pollset_set(%p, %p)", bag, item);
g_event_engine->pollset_set_add_pollset_set(bag, item);
}
-void grpc_pollset_set_del_pollset_set(grpc_pollset_set* bag,
- grpc_pollset_set* item) {
+static void pollset_set_del_pollset_set(grpc_pollset_set* bag,
+ grpc_pollset_set* item) {
GRPC_POLLING_API_TRACE("pollset_set_del_pollset_set(%p, %p)", bag, item);
g_event_engine->pollset_set_del_pollset_set(bag, item);
}
+grpc_pollset_set_vtable grpc_posix_pollset_set_vtable = {
+ pollset_set_create, pollset_set_destroy,
+ pollset_set_add_pollset, pollset_set_del_pollset,
+ pollset_set_add_pollset_set, pollset_set_del_pollset_set};
+
void grpc_pollset_set_add_fd(grpc_pollset_set* pollset_set, grpc_fd* fd) {
GRPC_POLLING_API_TRACE("pollset_set_add_fd(%p, %d)", pollset_set,
grpc_fd_wrapped_fd(fd));
diff --git a/src/core/lib/iomgr/exec_ctx.h b/src/core/lib/iomgr/exec_ctx.h
index de97164f02..72d0ae58c1 100644
--- a/src/core/lib/iomgr/exec_ctx.h
+++ b/src/core/lib/iomgr/exec_ctx.h
@@ -54,23 +54,32 @@ grpc_millis grpc_timespec_to_millis_round_up(gpr_timespec timespec);
namespace grpc_core {
/** Execution context.
* A bag of data that collects information along a callstack.
- * Generally created at public API entry points, and passed down as
- * pointer to child functions that manipulate it.
+ * It is created on the stack at public API entry points, and stored internally
+ * as a thread-local variable.
+ *
+ * Generally, to create an exec_ctx instance, add the following line at the top
+ * of the public API entry point or at the start of a thread's work function :
+ *
+ * grpc_core::ExecCtx exec_ctx;
+ *
+ * Access the created ExecCtx instance using :
+ * grpc_core::ExecCtx::Get()
*
* Specific responsibilities (this may grow in the future):
* - track a list of work that needs to be delayed until the top of the
* call stack (this provides a convenient mechanism to run callbacks
* without worrying about locking issues)
- * - provide a decision maker (via grpc_exec_ctx_ready_to_finish) that provides
+ * - provide a decision maker (via IsReadyToFinish) that provides a
* signal as to whether a borrowed thread should continue to do work or
* should actively try to finish up and get this thread back to its owner
*
* CONVENTIONS:
* - Instance of this must ALWAYS be constructed on the stack, never
* heap allocated.
- * - Instances and pointers to them must always be called exec_ctx.
- * - Instances are always passed as the first argument to a function that
- * takes it, and always as a pointer (grpc_exec_ctx is never copied).
+ * - Exactly one instance of ExecCtx must be created per thread. Instances must
+ * always be called exec_ctx.
+ * - Do not pass exec_ctx as a parameter to a function. Always access it using
+ * grpc_core::ExecCtx::Get()
*/
class ExecCtx {
public:
@@ -171,6 +180,10 @@ on outside context */
return reinterpret_cast<ExecCtx*>(gpr_tls_get(&exec_ctx_));
}
+ static void Set(ExecCtx* exec_ctx) {
+ gpr_tls_set(&exec_ctx_, reinterpret_cast<intptr_t>(exec_ctx));
+ }
+
protected:
/** Check if ready to finish */
virtual bool CheckReadyToFinish() { return false; }
@@ -180,9 +193,6 @@ on outside context */
private:
/** Set exec_ctx_ to exec_ctx */
- void Set(ExecCtx* exec_ctx) {
- gpr_tls_set(&exec_ctx_, reinterpret_cast<intptr_t>(exec_ctx));
- }
grpc_closure_list closure_list_ = GRPC_CLOSURE_LIST_INIT;
CombinerData combiner_data_ = {nullptr, nullptr};
diff --git a/src/core/lib/iomgr/iocp_windows.h b/src/core/lib/iomgr/iocp_windows.h
index 5079ea5d84..68d9de6158 100644
--- a/src/core/lib/iomgr/iocp_windows.h
+++ b/src/core/lib/iomgr/iocp_windows.h
@@ -27,6 +27,7 @@
#ifdef GRPC_WINSOCK_SOCKET
+#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/iomgr/socket_windows.h"
typedef enum {
diff --git a/src/core/lib/iomgr/iomgr.cc b/src/core/lib/iomgr/iomgr.cc
index 3c2b83a549..468814eaee 100644
--- a/src/core/lib/iomgr/iomgr.cc
+++ b/src/core/lib/iomgr/iomgr.cc
@@ -47,6 +47,7 @@ static grpc_iomgr_object g_root_object;
void grpc_iomgr_init() {
grpc_core::ExecCtx exec_ctx;
+ grpc_determine_iomgr_platform();
g_shutdown = 0;
gpr_mu_init(&g_mu);
gpr_cv_init(&g_rcv);
diff --git a/src/core/lib/iomgr/iomgr_custom.cc b/src/core/lib/iomgr/iomgr_custom.cc
new file mode 100644
index 0000000000..d34c8e7cd1
--- /dev/null
+++ b/src/core/lib/iomgr/iomgr_custom.cc
@@ -0,0 +1,63 @@
+/*
+ *
+ * Copyright 2018 gRPC authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <grpc/support/port_platform.h>
+
+#include "src/core/lib/iomgr/port.h"
+
+#include <grpc/support/thd_id.h>
+
+#include "src/core/lib/iomgr/exec_ctx.h"
+#include "src/core/lib/iomgr/executor.h"
+#include "src/core/lib/iomgr/iomgr_custom.h"
+#include "src/core/lib/iomgr/iomgr_internal.h"
+#include "src/core/lib/iomgr/pollset_custom.h"
+#include "src/core/lib/iomgr/pollset_set_custom.h"
+#include "src/core/lib/iomgr/resolve_address_custom.h"
+
+gpr_thd_id g_init_thread;
+
+static void iomgr_platform_init(void) {
+ grpc_core::ExecCtx exec_ctx;
+ grpc_executor_set_threading(false);
+ g_init_thread = gpr_thd_currentid();
+ grpc_pollset_global_init();
+}
+static void iomgr_platform_flush(void) {}
+static void iomgr_platform_shutdown(void) { grpc_pollset_global_shutdown(); }
+
+static grpc_iomgr_platform_vtable vtable = {
+ iomgr_platform_init, iomgr_platform_flush, iomgr_platform_shutdown};
+
+void grpc_custom_iomgr_init(grpc_socket_vtable* socket,
+ grpc_custom_resolver_vtable* resolver,
+ grpc_custom_timer_vtable* timer,
+ grpc_custom_poller_vtable* poller) {
+ grpc_custom_endpoint_init(socket);
+ grpc_custom_timer_init(timer);
+ grpc_custom_pollset_init(poller);
+ grpc_custom_pollset_set_init();
+ grpc_custom_resolver_init(resolver);
+ grpc_set_iomgr_platform_vtable(&vtable);
+}
+
+#ifdef GRPC_CUSTOM_SOCKET
+grpc_iomgr_platform_vtable* grpc_default_iomgr_platform_vtable() {
+ return &vtable;
+}
+#endif
diff --git a/src/core/lib/iomgr/iomgr_uv.h b/src/core/lib/iomgr/iomgr_custom.h
index 4d62f00ad6..ceb6c65db2 100644
--- a/src/core/lib/iomgr/iomgr_uv.h
+++ b/src/core/lib/iomgr/iomgr_custom.h
@@ -16,24 +16,32 @@
*
*/
-#ifndef GRPC_CORE_LIB_IOMGR_IOMGR_UV_H
-#define GRPC_CORE_LIB_IOMGR_IOMGR_UV_H
+#ifndef GRPC_CORE_LIB_IOMGR_IOMGR_CUSTOM_H
+#define GRPC_CORE_LIB_IOMGR_IOMGR_CUSTOM_H
#include <grpc/support/port_platform.h>
-#include "src/core/lib/iomgr/iomgr_internal.h"
+#include "src/core/lib/iomgr/pollset_custom.h"
+#include "src/core/lib/iomgr/resolve_address_custom.h"
+#include "src/core/lib/iomgr/tcp_custom.h"
+#include "src/core/lib/iomgr/timer_custom.h"
#include <grpc/support/thd_id.h>
/* The thread ID of the thread on which grpc was initialized. Used to verify
- * that all calls into libuv are made on that same thread */
+ * that all calls into the custom iomgr are made on that same thread */
extern gpr_thd_id g_init_thread;
-#ifdef GRPC_UV_THREAD_CHECK
-#define GRPC_UV_ASSERT_SAME_THREAD() \
+#ifdef GRPC_CUSTOM_IOMGR_THREAD_CHECK
+#define GRPC_CUSTOM_IOMGR_ASSERT_SAME_THREAD() \
GPR_ASSERT(gpr_thd_currentid() == g_init_thread)
#else
-#define GRPC_UV_ASSERT_SAME_THREAD()
+#define GRPC_CUSTOM_IOMGR_ASSERT_SAME_THREAD()
#endif /* GRPC_UV_THREAD_CHECK */
-#endif /* GRPC_CORE_LIB_IOMGR_IOMGR_UV_H */
+void grpc_custom_iomgr_init(grpc_socket_vtable* socket,
+ grpc_custom_resolver_vtable* resolver,
+ grpc_custom_timer_vtable* timer,
+ grpc_custom_poller_vtable* poller);
+
+#endif /* GRPC_CORE_LIB_IOMGR_IOMGR_CUSTOM_H */
diff --git a/src/core/lib/iomgr/iomgr_internal.cc b/src/core/lib/iomgr/iomgr_internal.cc
new file mode 100644
index 0000000000..32dbabb79d
--- /dev/null
+++ b/src/core/lib/iomgr/iomgr_internal.cc
@@ -0,0 +1,43 @@
+/*
+ *
+ * Copyright 2018 gRPC authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <grpc/support/port_platform.h>
+
+#include <stddef.h>
+
+#include "src/core/lib/iomgr/iomgr_internal.h"
+#include "src/core/lib/iomgr/timer.h"
+#include "src/core/lib/iomgr/timer_manager.h"
+
+static grpc_iomgr_platform_vtable* iomgr_platform_vtable = nullptr;
+
+void grpc_set_iomgr_platform_vtable(grpc_iomgr_platform_vtable* vtable) {
+ iomgr_platform_vtable = vtable;
+}
+
+void grpc_determine_iomgr_platform() {
+ if (iomgr_platform_vtable == nullptr) {
+ grpc_set_default_iomgr_platform();
+ }
+}
+
+void grpc_iomgr_platform_init() { iomgr_platform_vtable->init(); }
+
+void grpc_iomgr_platform_flush() { iomgr_platform_vtable->flush(); }
+
+void grpc_iomgr_platform_shutdown() { iomgr_platform_vtable->shutdown(); }
diff --git a/src/core/lib/iomgr/iomgr_internal.h b/src/core/lib/iomgr/iomgr_internal.h
index 644219fb4d..b011d9c7b1 100644
--- a/src/core/lib/iomgr/iomgr_internal.h
+++ b/src/core/lib/iomgr/iomgr_internal.h
@@ -31,9 +31,21 @@ typedef struct grpc_iomgr_object {
struct grpc_iomgr_object* prev;
} grpc_iomgr_object;
+typedef struct grpc_iomgr_platform_vtable {
+ void (*init)(void);
+ void (*flush)(void);
+ void (*shutdown)(void);
+} grpc_iomgr_platform_vtable;
+
void grpc_iomgr_register_object(grpc_iomgr_object* obj, const char* name);
void grpc_iomgr_unregister_object(grpc_iomgr_object* obj);
+void grpc_determine_iomgr_platform();
+
+void grpc_set_iomgr_platform_vtable(grpc_iomgr_platform_vtable* vtable);
+
+void grpc_set_default_iomgr_platform();
+
void grpc_iomgr_platform_init(void);
/** flush any globally queued work from iomgr */
void grpc_iomgr_platform_flush(void);
diff --git a/src/core/lib/iomgr/iomgr_posix.cc b/src/core/lib/iomgr/iomgr_posix.cc
index 35b8adf01e..66c9cb7ff7 100644
--- a/src/core/lib/iomgr/iomgr_posix.cc
+++ b/src/core/lib/iomgr/iomgr_posix.cc
@@ -24,19 +24,44 @@
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/iomgr/ev_posix.h"
+#include "src/core/lib/iomgr/iomgr_internal.h"
#include "src/core/lib/iomgr/iomgr_posix.h"
+#include "src/core/lib/iomgr/resolve_address.h"
+#include "src/core/lib/iomgr/tcp_client.h"
#include "src/core/lib/iomgr/tcp_posix.h"
+#include "src/core/lib/iomgr/tcp_server.h"
+#include "src/core/lib/iomgr/timer.h"
-void grpc_iomgr_platform_init(void) {
+extern grpc_tcp_server_vtable grpc_posix_tcp_server_vtable;
+extern grpc_tcp_client_vtable grpc_posix_tcp_client_vtable;
+extern grpc_timer_vtable grpc_generic_timer_vtable;
+extern grpc_pollset_vtable grpc_posix_pollset_vtable;
+extern grpc_pollset_set_vtable grpc_posix_pollset_set_vtable;
+extern grpc_address_resolver_vtable grpc_posix_resolver_vtable;
+
+static void iomgr_platform_init(void) {
grpc_wakeup_fd_global_init();
grpc_event_engine_init();
}
-void grpc_iomgr_platform_flush(void) {}
+static void iomgr_platform_flush(void) {}
-void grpc_iomgr_platform_shutdown(void) {
+static void iomgr_platform_shutdown(void) {
grpc_event_engine_shutdown();
grpc_wakeup_fd_global_destroy();
}
+static grpc_iomgr_platform_vtable vtable = {
+ iomgr_platform_init, iomgr_platform_flush, iomgr_platform_shutdown};
+
+void grpc_set_default_iomgr_platform() {
+ grpc_set_tcp_client_impl(&grpc_posix_tcp_client_vtable);
+ grpc_set_tcp_server_impl(&grpc_posix_tcp_server_vtable);
+ grpc_set_timer_impl(&grpc_generic_timer_vtable);
+ grpc_set_pollset_vtable(&grpc_posix_pollset_vtable);
+ grpc_set_pollset_set_vtable(&grpc_posix_pollset_set_vtable);
+ grpc_set_resolver_impl(&grpc_posix_resolver_vtable);
+ grpc_set_iomgr_platform_vtable(&vtable);
+}
+
#endif /* GRPC_POSIX_SOCKET */
diff --git a/src/core/lib/iomgr/iomgr_uv.cc b/src/core/lib/iomgr/iomgr_uv.cc
index c11c37ca20..4a984446db 100644
--- a/src/core/lib/iomgr/iomgr_uv.cc
+++ b/src/core/lib/iomgr/iomgr_uv.cc
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2016 gRPC authors.
+ * Copyright 2018 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,26 +20,21 @@
#include "src/core/lib/iomgr/port.h"
-#ifdef GRPC_UV
+#if defined(GRPC_CUSTOM_SOCKET) && defined(GRPC_UV)
-#include <grpc/support/thd_id.h>
+#include "src/core/lib/iomgr/iomgr_custom.h"
+#include "src/core/lib/iomgr/iomgr_internal.h"
+#include "src/core/lib/iomgr/pollset_custom.h"
+#include "src/core/lib/iomgr/tcp_custom.h"
+#include "src/core/lib/iomgr/timer_custom.h"
-#include "src/core/lib/debug/trace.h"
-#include "src/core/lib/iomgr/executor.h"
-#include "src/core/lib/iomgr/iomgr_uv.h"
-#include "src/core/lib/iomgr/pollset_uv.h"
-#include "src/core/lib/iomgr/tcp_uv.h"
+extern grpc_socket_vtable grpc_uv_socket_vtable;
+extern grpc_custom_resolver_vtable uv_resolver_vtable;
+extern grpc_custom_timer_vtable uv_timer_vtable;
+extern grpc_custom_poller_vtable uv_pollset_vtable;
-gpr_thd_id g_init_thread;
-
-void grpc_iomgr_platform_init(void) {
- grpc_core::ExecCtx exec_ctx;
- grpc_pollset_global_init();
-
- grpc_executor_set_threading(false);
- g_init_thread = gpr_thd_currentid();
+void grpc_set_default_iomgr_platform() {
+ grpc_custom_iomgr_init(&grpc_uv_socket_vtable, &uv_resolver_vtable,
+ &uv_timer_vtable, &uv_pollset_vtable);
}
-void grpc_iomgr_platform_flush(void) {}
-void grpc_iomgr_platform_shutdown(void) { grpc_pollset_global_shutdown(); }
-
-#endif /* GRPC_UV */
+#endif
diff --git a/src/core/lib/iomgr/iomgr_windows.cc b/src/core/lib/iomgr/iomgr_windows.cc
index 8c4888ca97..cdef89cbf0 100644
--- a/src/core/lib/iomgr/iomgr_windows.cc
+++ b/src/core/lib/iomgr/iomgr_windows.cc
@@ -29,7 +29,18 @@
#include "src/core/lib/iomgr/iocp_windows.h"
#include "src/core/lib/iomgr/iomgr.h"
#include "src/core/lib/iomgr/pollset_windows.h"
+#include "src/core/lib/iomgr/resolve_address.h"
#include "src/core/lib/iomgr/socket_windows.h"
+#include "src/core/lib/iomgr/tcp_client.h"
+#include "src/core/lib/iomgr/tcp_server.h"
+#include "src/core/lib/iomgr/timer.h"
+
+extern grpc_tcp_server_vtable grpc_windows_tcp_server_vtable;
+extern grpc_tcp_client_vtable grpc_windows_tcp_client_vtable;
+extern grpc_timer_vtable grpc_generic_timer_vtable;
+extern grpc_pollset_vtable grpc_windows_pollset_vtable;
+extern grpc_pollset_set_vtable grpc_windows_pollset_set_vtable;
+extern grpc_address_resolver_vtable grpc_windows_resolver_vtable;
/* Windows' io manager is going to be fully designed using IO completion
ports. All of what we're doing here is basically make sure that
@@ -46,18 +57,31 @@ static void winsock_shutdown(void) {
GPR_ASSERT(status == 0);
}
-void grpc_iomgr_platform_init(void) {
+static void iomgr_platform_init(void) {
winsock_init();
grpc_iocp_init();
grpc_pollset_global_init();
}
-void grpc_iomgr_platform_flush(void) { grpc_iocp_flush(); }
+static void iomgr_platform_flush(void) { grpc_iocp_flush(); }
-void grpc_iomgr_platform_shutdown(void) {
+static void iomgr_platform_shutdown(void) {
grpc_pollset_global_shutdown();
grpc_iocp_shutdown();
winsock_shutdown();
}
+static grpc_iomgr_platform_vtable vtable = {
+ iomgr_platform_init, iomgr_platform_flush, iomgr_platform_shutdown};
+
+void grpc_set_default_iomgr_platform() {
+ grpc_set_tcp_client_impl(&grpc_windows_tcp_client_vtable);
+ grpc_set_tcp_server_impl(&grpc_windows_tcp_server_vtable);
+ grpc_set_timer_impl(&grpc_generic_timer_vtable);
+ grpc_set_pollset_vtable(&grpc_windows_pollset_vtable);
+ grpc_set_pollset_set_vtable(&grpc_windows_pollset_set_vtable);
+ grpc_set_resolver_impl(&grpc_windows_resolver_vtable);
+ grpc_set_iomgr_platform_vtable(&vtable);
+}
+
#endif /* GRPC_WINSOCK_SOCKET */
diff --git a/src/core/lib/iomgr/lockfree_event.h b/src/core/lib/iomgr/lockfree_event.h
index 83de656f5f..b507b94648 100644
--- a/src/core/lib/iomgr/lockfree_event.h
+++ b/src/core/lib/iomgr/lockfree_event.h
@@ -25,7 +25,7 @@
#include <grpc/support/atm.h>
-#include "src/core/lib/iomgr/exec_ctx.h"
+#include "src/core/lib/iomgr/closure.h"
namespace grpc_core {
diff --git a/src/core/lib/iomgr/pollset.cc b/src/core/lib/iomgr/pollset.cc
new file mode 100644
index 0000000000..ebfef1dbc7
--- /dev/null
+++ b/src/core/lib/iomgr/pollset.cc
@@ -0,0 +1,56 @@
+/*
+ *
+ * Copyright 2018 gRPC authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <grpc/support/port_platform.h>
+
+#include "src/core/lib/iomgr/pollset.h"
+
+grpc_pollset_vtable* grpc_pollset_impl;
+
+void grpc_set_pollset_vtable(grpc_pollset_vtable* vtable) {
+ grpc_pollset_impl = vtable;
+}
+
+void grpc_pollset_global_init() { grpc_pollset_impl->global_init(); }
+
+void grpc_pollset_global_shutdown() { grpc_pollset_impl->global_shutdown(); }
+
+void grpc_pollset_init(grpc_pollset* pollset, gpr_mu** mu) {
+ grpc_pollset_impl->init(pollset, mu);
+}
+
+void grpc_pollset_shutdown(grpc_pollset* pollset, grpc_closure* closure) {
+ grpc_pollset_impl->shutdown(pollset, closure);
+}
+
+void grpc_pollset_destroy(grpc_pollset* pollset) {
+ grpc_pollset_impl->destroy(pollset);
+}
+
+grpc_error* grpc_pollset_work(grpc_pollset* pollset,
+ grpc_pollset_worker** worker,
+ grpc_millis deadline) {
+ return grpc_pollset_impl->work(pollset, worker, deadline);
+}
+
+grpc_error* grpc_pollset_kick(grpc_pollset* pollset,
+ grpc_pollset_worker* specific_worker) {
+ return grpc_pollset_impl->kick(pollset, specific_worker);
+}
+
+size_t grpc_pollset_size(void) { return grpc_pollset_impl->pollset_size(); }
diff --git a/src/core/lib/iomgr/pollset.h b/src/core/lib/iomgr/pollset.h
index 9cc3e4c7fa..28472b360d 100644
--- a/src/core/lib/iomgr/pollset.h
+++ b/src/core/lib/iomgr/pollset.h
@@ -38,6 +38,24 @@ extern grpc_core::DebugOnlyTraceFlag grpc_trace_fd_refcount;
typedef struct grpc_pollset grpc_pollset;
typedef struct grpc_pollset_worker grpc_pollset_worker;
+typedef struct grpc_pollset_vtable {
+ void (*global_init)(void);
+ void (*global_shutdown)(void);
+ void (*init)(grpc_pollset* pollset, gpr_mu** mu);
+ void (*shutdown)(grpc_pollset* pollset, grpc_closure* closure);
+ void (*destroy)(grpc_pollset* pollset);
+ grpc_error* (*work)(grpc_pollset* pollset, grpc_pollset_worker** worker,
+ grpc_millis deadline);
+ grpc_error* (*kick)(grpc_pollset* pollset,
+ grpc_pollset_worker* specific_worker);
+ size_t (*pollset_size)(void);
+} grpc_pollset_vtable;
+
+void grpc_set_pollset_vtable(grpc_pollset_vtable* vtable);
+
+void grpc_pollset_global_init(void);
+void grpc_pollset_global_shutdown(void);
+
size_t grpc_pollset_size(void);
/* Initialize a pollset: assumes *pollset contains all zeros */
void grpc_pollset_init(grpc_pollset* pollset, gpr_mu** mu);
diff --git a/src/core/lib/iomgr/pollset_custom.cc b/src/core/lib/iomgr/pollset_custom.cc
new file mode 100644
index 0000000000..04bd104055
--- /dev/null
+++ b/src/core/lib/iomgr/pollset_custom.cc
@@ -0,0 +1,106 @@
+/*
+ *
+ * Copyright 2018 gRPC authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <grpc/support/port_platform.h>
+
+#include "src/core/lib/iomgr/port.h"
+
+#include <stddef.h>
+#include <string.h>
+
+#include <grpc/support/alloc.h>
+#include <grpc/support/log.h>
+#include <grpc/support/sync.h>
+
+#include "src/core/lib/iomgr/closure.h"
+#include "src/core/lib/iomgr/iomgr_custom.h"
+#include "src/core/lib/iomgr/pollset.h"
+#include "src/core/lib/iomgr/pollset_custom.h"
+#include "src/core/lib/iomgr/timer.h"
+
+#include "src/core/lib/debug/trace.h"
+
+static grpc_custom_poller_vtable* poller_vtable;
+
+struct grpc_pollset {
+ gpr_mu mu;
+};
+
+static size_t pollset_size() { return sizeof(grpc_pollset); }
+
+static void pollset_global_init() { poller_vtable->init(); }
+
+static void pollset_global_shutdown() { poller_vtable->shutdown(); }
+
+static void pollset_init(grpc_pollset* pollset, gpr_mu** mu) {
+ GRPC_CUSTOM_IOMGR_ASSERT_SAME_THREAD();
+ gpr_mu_init(&pollset->mu);
+ *mu = &pollset->mu;
+}
+
+static void pollset_shutdown(grpc_pollset* pollset, grpc_closure* closure) {
+ GRPC_CUSTOM_IOMGR_ASSERT_SAME_THREAD();
+ GRPC_CLOSURE_SCHED(closure, GRPC_ERROR_NONE);
+}
+
+static void pollset_destroy(grpc_pollset* pollset) {
+ GRPC_CUSTOM_IOMGR_ASSERT_SAME_THREAD();
+ gpr_mu_destroy(&pollset->mu);
+}
+
+static grpc_error* pollset_work(grpc_pollset* pollset,
+ grpc_pollset_worker** worker_hdl,
+ grpc_millis deadline) {
+ GRPC_CUSTOM_IOMGR_ASSERT_SAME_THREAD();
+ gpr_mu_unlock(&pollset->mu);
+ grpc_millis now = grpc_core::ExecCtx::Get()->Now();
+ size_t timeout = 0;
+ if (deadline > now) {
+ timeout = deadline - now;
+ }
+ // We yield here because the poll() call might yield
+ // control back to the application
+ grpc_core::ExecCtx* curr = grpc_core::ExecCtx::Get();
+ grpc_core::ExecCtx::Set(nullptr);
+ poller_vtable->poll(timeout);
+ grpc_core::ExecCtx::Set(curr);
+ grpc_core::ExecCtx::Get()->InvalidateNow();
+ if (grpc_core::ExecCtx::Get()->HasWork()) {
+ grpc_core::ExecCtx::Get()->Flush();
+ }
+ gpr_mu_lock(&pollset->mu);
+ return GRPC_ERROR_NONE;
+}
+
+static grpc_error* pollset_kick(grpc_pollset* pollset,
+ grpc_pollset_worker* specific_worker) {
+ GRPC_CUSTOM_IOMGR_ASSERT_SAME_THREAD();
+ poller_vtable->kick();
+ return GRPC_ERROR_NONE;
+}
+
+grpc_pollset_vtable custom_pollset_vtable = {
+ pollset_global_init, pollset_global_shutdown,
+ pollset_init, pollset_shutdown,
+ pollset_destroy, pollset_work,
+ pollset_kick, pollset_size};
+
+void grpc_custom_pollset_init(grpc_custom_poller_vtable* vtable) {
+ poller_vtable = vtable;
+ grpc_set_pollset_vtable(&custom_pollset_vtable);
+}
diff --git a/src/core/lib/iomgr/pollset_custom.h b/src/core/lib/iomgr/pollset_custom.h
new file mode 100644
index 0000000000..9e2027f7f4
--- /dev/null
+++ b/src/core/lib/iomgr/pollset_custom.h
@@ -0,0 +1,35 @@
+/*
+ *
+ * Copyright 2018 gRPC authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef GRPC_CORE_LIB_IOMGR_POLLSET_CUSTOM_H
+#define GRPC_CORE_LIB_IOMGR_POLLSET_CUSTOM_H
+
+#include <grpc/support/port_platform.h>
+
+#include <stddef.h>
+
+typedef struct grpc_custom_poller_vtable {
+ void (*init)();
+ void (*poll)(size_t timeout_ms);
+ void (*kick)();
+ void (*shutdown)();
+} grpc_custom_poller_vtable;
+
+void grpc_custom_pollset_init(grpc_custom_poller_vtable* vtable);
+
+#endif /* GRPC_CORE_LIB_IOMGR_POLLSET_CUSTOM_H */
diff --git a/src/core/lib/iomgr/pollset_set_uv.cc b/src/core/lib/iomgr/pollset_set.cc
index 50814c1f0a..42a647a737 100644
--- a/src/core/lib/iomgr/pollset_set_uv.cc
+++ b/src/core/lib/iomgr/pollset_set.cc
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2016 gRPC authors.
+ * Copyright 2018 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,28 +18,38 @@
#include <grpc/support/port_platform.h>
-#include "src/core/lib/iomgr/port.h"
+#include "src/core/lib/iomgr/pollset_set.h"
-#ifdef GRPC_UV
+grpc_pollset_set_vtable* grpc_pollset_set_impl;
-#include "src/core/lib/iomgr/pollset_set.h"
+void grpc_set_pollset_set_vtable(grpc_pollset_set_vtable* vtable) {
+ grpc_pollset_set_impl = vtable;
+}
-grpc_pollset_set* grpc_pollset_set_create(void) {
- return (grpc_pollset_set*)((intptr_t)0xdeafbeef);
+grpc_pollset_set* grpc_pollset_set_create() {
+ return grpc_pollset_set_impl->create();
}
-void grpc_pollset_set_destroy(grpc_pollset_set* pollset_set) {}
+void grpc_pollset_set_destroy(grpc_pollset_set* pollset_set) {
+ grpc_pollset_set_impl->destroy(pollset_set);
+}
void grpc_pollset_set_add_pollset(grpc_pollset_set* pollset_set,
- grpc_pollset* pollset) {}
+ grpc_pollset* pollset) {
+ grpc_pollset_set_impl->add_pollset(pollset_set, pollset);
+}
void grpc_pollset_set_del_pollset(grpc_pollset_set* pollset_set,
- grpc_pollset* pollset) {}
+ grpc_pollset* pollset) {
+ grpc_pollset_set_impl->del_pollset(pollset_set, pollset);
+}
void grpc_pollset_set_add_pollset_set(grpc_pollset_set* bag,
- grpc_pollset_set* item) {}
+ grpc_pollset_set* item) {
+ grpc_pollset_set_impl->add_pollset_set(bag, item);
+}
void grpc_pollset_set_del_pollset_set(grpc_pollset_set* bag,
- grpc_pollset_set* item) {}
-
-#endif /* GRPC_UV */
+ grpc_pollset_set* item) {
+ grpc_pollset_set_impl->del_pollset_set(bag, item);
+}
diff --git a/src/core/lib/iomgr/pollset_set.h b/src/core/lib/iomgr/pollset_set.h
index 18f30aa94e..d3355b8ff8 100644
--- a/src/core/lib/iomgr/pollset_set.h
+++ b/src/core/lib/iomgr/pollset_set.h
@@ -30,6 +30,17 @@
typedef struct grpc_pollset_set grpc_pollset_set;
+typedef struct grpc_pollset_set_vtable {
+ grpc_pollset_set* (*create)(void);
+ void (*destroy)(grpc_pollset_set* pollset_set);
+ void (*add_pollset)(grpc_pollset_set* pollset_set, grpc_pollset* pollset);
+ void (*del_pollset)(grpc_pollset_set* pollset_set, grpc_pollset* pollset);
+ void (*add_pollset_set)(grpc_pollset_set* bag, grpc_pollset_set* item);
+ void (*del_pollset_set)(grpc_pollset_set* bag, grpc_pollset_set* item);
+} grpc_pollset_set_vtable;
+
+void grpc_set_pollset_set_vtable(grpc_pollset_set_vtable* vtable);
+
grpc_pollset_set* grpc_pollset_set_create(void);
void grpc_pollset_set_destroy(grpc_pollset_set* pollset_set);
void grpc_pollset_set_add_pollset(grpc_pollset_set* pollset_set,
diff --git a/src/core/lib/iomgr/pollset_set_custom.cc b/src/core/lib/iomgr/pollset_set_custom.cc
new file mode 100644
index 0000000000..b1ee66020d
--- /dev/null
+++ b/src/core/lib/iomgr/pollset_set_custom.cc
@@ -0,0 +1,48 @@
+/*
+ *
+ * Copyright 2016 gRPC authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <grpc/support/port_platform.h>
+
+#include "src/core/lib/iomgr/port.h"
+
+#include "src/core/lib/iomgr/pollset_set.h"
+
+grpc_pollset_set* pollset_set_create(void) {
+ return (grpc_pollset_set*)((intptr_t)0xdeafbeef);
+}
+
+void pollset_set_destroy(grpc_pollset_set* pollset_set) {}
+
+void pollset_set_add_pollset(grpc_pollset_set* pollset_set,
+ grpc_pollset* pollset) {}
+
+void pollset_set_del_pollset(grpc_pollset_set* pollset_set,
+ grpc_pollset* pollset) {}
+
+void pollset_set_add_pollset_set(grpc_pollset_set* bag,
+ grpc_pollset_set* item) {}
+
+void pollset_set_del_pollset_set(grpc_pollset_set* bag,
+ grpc_pollset_set* item) {}
+
+static grpc_pollset_set_vtable vtable = {
+ pollset_set_create, pollset_set_destroy,
+ pollset_set_add_pollset, pollset_set_del_pollset,
+ pollset_set_add_pollset_set, pollset_set_del_pollset_set};
+
+void grpc_custom_pollset_set_init() { grpc_set_pollset_set_vtable(&vtable); }
diff --git a/src/core/lib/iomgr/timer_uv.h b/src/core/lib/iomgr/pollset_set_custom.h
index 093b2d085d..80e19a1fef 100644
--- a/src/core/lib/iomgr/timer_uv.h
+++ b/src/core/lib/iomgr/pollset_set_custom.h
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2016 gRPC authors.
+ * Copyright 2018 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,19 +16,11 @@
*
*/
-#ifndef GRPC_CORE_LIB_IOMGR_TIMER_UV_H
-#define GRPC_CORE_LIB_IOMGR_TIMER_UV_H
+#ifndef GRPC_CORE_LIB_IOMGR_POLLSET_SET_CUSTOM_H
+#define GRPC_CORE_LIB_IOMGR_POLLSET_SET_CUSTOM_H
#include <grpc/support/port_platform.h>
-#include "src/core/lib/iomgr/exec_ctx.h"
+void grpc_custom_pollset_set_init();
-struct grpc_timer {
- grpc_closure* closure;
- /* This is actually a uv_timer_t*, but we want to keep platform-specific
- types out of headers */
- void* uv_timer;
- int pending;
-};
-
-#endif /* GRPC_CORE_LIB_IOMGR_TIMER_UV_H */
+#endif /* GRPC_CORE_LIB_IOMGR_POLLSET_SET_CUSTOM_H */
diff --git a/src/core/lib/iomgr/pollset_set_windows.cc b/src/core/lib/iomgr/pollset_set_windows.cc
index ff3f6a944e..bb9e7f5d28 100644
--- a/src/core/lib/iomgr/pollset_set_windows.cc
+++ b/src/core/lib/iomgr/pollset_set_windows.cc
@@ -25,22 +25,27 @@
#include "src/core/lib/iomgr/pollset_set_windows.h"
-grpc_pollset_set* grpc_pollset_set_create(void) {
+static grpc_pollset_set* pollset_set_create(void) {
return (grpc_pollset_set*)((intptr_t)0xdeafbeef);
}
-void grpc_pollset_set_destroy(grpc_pollset_set* pollset_set) {}
+static void pollset_set_destroy(grpc_pollset_set* pollset_set) {}
-void grpc_pollset_set_add_pollset(grpc_pollset_set* pollset_set,
- grpc_pollset* pollset) {}
+static void pollset_set_add_pollset(grpc_pollset_set* pollset_set,
+ grpc_pollset* pollset) {}
-void grpc_pollset_set_del_pollset(grpc_pollset_set* pollset_set,
- grpc_pollset* pollset) {}
+static void pollset_set_del_pollset(grpc_pollset_set* pollset_set,
+ grpc_pollset* pollset) {}
-void grpc_pollset_set_add_pollset_set(grpc_pollset_set* bag,
- grpc_pollset_set* item) {}
+static void pollset_set_add_pollset_set(grpc_pollset_set* bag,
+ grpc_pollset_set* item) {}
-void grpc_pollset_set_del_pollset_set(grpc_pollset_set* bag,
- grpc_pollset_set* item) {}
+static void pollset_set_del_pollset_set(grpc_pollset_set* bag,
+ grpc_pollset_set* item) {}
+
+grpc_pollset_set_vtable grpc_windows_pollset_set_vtable = {
+ pollset_set_create, pollset_set_destroy,
+ pollset_set_add_pollset, pollset_set_del_pollset,
+ pollset_set_add_pollset_set, pollset_set_del_pollset_set};
#endif /* GRPC_WINSOCK_SOCKET */
diff --git a/src/core/lib/iomgr/pollset_uv.cc b/src/core/lib/iomgr/pollset_uv.cc
index c6a2f43bf1..bade6eae6c 100644
--- a/src/core/lib/iomgr/pollset_uv.cc
+++ b/src/core/lib/iomgr/pollset_uv.cc
@@ -22,137 +22,72 @@
#ifdef GRPC_UV
-#include <uv.h>
-
-#include <string.h>
-
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
-#include <grpc/support/sync.h>
-
-#include "src/core/lib/iomgr/iomgr_uv.h"
-#include "src/core/lib/iomgr/pollset.h"
-#include "src/core/lib/iomgr/pollset_uv.h"
+#include "src/core/lib/iomgr/pollset_custom.h"
-#include "src/core/lib/debug/trace.h"
-
-grpc_core::DebugOnlyTraceFlag grpc_trace_fd_refcount(false, "fd_refcount");
-
-struct grpc_pollset {
- uv_timer_t* timer;
- int shutting_down;
-};
+#include <uv.h>
/* Indicates that grpc_pollset_work should run an iteration of the UV loop
before running callbacks. This defaults to 1, and should be disabled if
grpc_pollset_work will be called within the callstack of uv_run */
-int grpc_pollset_work_run_loop;
-
-gpr_mu grpc_polling_mu;
+int grpc_pollset_work_run_loop = 1;
-/* This is used solely to kick the uv loop, by setting a callback to be run
- immediately in the next loop iteration.
- Note: In the future, if there is a bug that involves missing wakeups in the
- future, try adding a uv_async_t to kick the loop differently */
-uv_timer_t* dummy_uv_handle;
+static bool g_kicked = false;
-size_t grpc_pollset_size() { return sizeof(grpc_pollset); }
+typedef struct uv_poller_handle {
+ uv_timer_t poll_timer;
+ uv_timer_t kick_timer;
+ int refs;
+} uv_poller_handle;
-void dummy_timer_cb(uv_timer_t* handle) {}
+static uv_poller_handle* g_handle;
-void dummy_handle_close_cb(uv_handle_t* handle) { gpr_free(handle); }
-
-void grpc_pollset_global_init(void) {
- gpr_mu_init(&grpc_polling_mu);
- dummy_uv_handle = (uv_timer_t*)gpr_malloc(sizeof(uv_timer_t));
- uv_timer_init(uv_default_loop(), dummy_uv_handle);
- grpc_pollset_work_run_loop = 1;
-}
-
-void grpc_pollset_global_shutdown(void) {
- GRPC_UV_ASSERT_SAME_THREAD();
- gpr_mu_destroy(&grpc_polling_mu);
- uv_close((uv_handle_t*)dummy_uv_handle, dummy_handle_close_cb);
+static void init() {
+ g_handle = (uv_poller_handle*)gpr_malloc(sizeof(uv_poller_handle));
+ g_handle->refs = 2;
+ uv_timer_init(uv_default_loop(), &g_handle->poll_timer);
+ uv_timer_init(uv_default_loop(), &g_handle->kick_timer);
}
-static void timer_run_cb(uv_timer_t* timer) {}
+static void empty_timer_cb(uv_timer_t* handle) {}
-static void timer_close_cb(uv_handle_t* handle) {
- handle->data = (void*)1;
- gpr_free(handle);
-}
+static void kick_timer_cb(uv_timer_t* handle) { g_kicked = false; }
-void grpc_pollset_init(grpc_pollset* pollset, gpr_mu** mu) {
- GRPC_UV_ASSERT_SAME_THREAD();
- *mu = &grpc_polling_mu;
- pollset->timer = (uv_timer_t*)gpr_malloc(sizeof(uv_timer_t));
- uv_timer_init(uv_default_loop(), pollset->timer);
- pollset->shutting_down = 0;
+static void run_loop(size_t timeout) {
+ if (grpc_pollset_work_run_loop) {
+ if (timeout == 0) {
+ uv_run(uv_default_loop(), UV_RUN_NOWAIT);
+ } else {
+ uv_timer_start(&g_handle->poll_timer, empty_timer_cb, timeout, 0);
+ uv_run(uv_default_loop(), UV_RUN_ONCE);
+ uv_timer_stop(&g_handle->poll_timer);
+ }
+ }
}
-void grpc_pollset_shutdown(grpc_pollset* pollset, grpc_closure* closure) {
- GPR_ASSERT(!pollset->shutting_down);
- GRPC_UV_ASSERT_SAME_THREAD();
- pollset->shutting_down = 1;
- if (grpc_pollset_work_run_loop) {
- // Drain any pending UV callbacks without blocking
- uv_run(uv_default_loop(), UV_RUN_NOWAIT);
- } else {
- // kick the loop once
- uv_timer_start(dummy_uv_handle, dummy_timer_cb, 0, 0);
+static void kick() {
+ if (!g_kicked) {
+ g_kicked = true;
+ uv_timer_start(&g_handle->kick_timer, kick_timer_cb, 0, 0);
}
- GRPC_CLOSURE_SCHED(closure, GRPC_ERROR_NONE);
}
-void grpc_pollset_destroy(grpc_pollset* pollset) {
- GRPC_UV_ASSERT_SAME_THREAD();
- uv_close((uv_handle_t*)pollset->timer, timer_close_cb);
- // timer.data is a boolean indicating that the timer has finished closing
- pollset->timer->data = (void*)0;
- if (grpc_pollset_work_run_loop) {
- while (!pollset->timer->data) {
- uv_run(uv_default_loop(), UV_RUN_NOWAIT);
- }
+static void close_timer_cb(uv_handle_t* handle) {
+ g_handle->refs--;
+ if (g_handle->refs == 0) {
+ gpr_free(g_handle);
}
}
-grpc_error* grpc_pollset_work(grpc_pollset* pollset,
- grpc_pollset_worker** worker_hdl,
- grpc_millis deadline) {
- uint64_t timeout;
- GRPC_UV_ASSERT_SAME_THREAD();
- gpr_mu_unlock(&grpc_polling_mu);
+static void shutdown() {
+ uv_close((uv_handle_t*)&g_handle->poll_timer, close_timer_cb);
+ uv_close((uv_handle_t*)&g_handle->kick_timer, close_timer_cb);
if (grpc_pollset_work_run_loop) {
- grpc_millis now = grpc_core::ExecCtx::Get()->Now();
- if (deadline >= now) {
- timeout = deadline - now;
- } else {
- timeout = 0;
- }
- /* We special-case timeout=0 so that we don't bother with the timer when
- the loop won't block anyway */
- if (timeout > 0) {
- uv_timer_start(pollset->timer, timer_run_cb, timeout, 0);
- /* Run until there is some I/O activity or the timer triggers. It doesn't
- matter which happens */
- uv_run(uv_default_loop(), UV_RUN_ONCE);
- uv_timer_stop(pollset->timer);
- } else {
- uv_run(uv_default_loop(), UV_RUN_NOWAIT);
- }
- }
- if (!grpc_closure_list_empty(*grpc_core::ExecCtx::Get()->closure_list())) {
- grpc_core::ExecCtx::Get()->Flush();
+ GPR_ASSERT(uv_run(uv_default_loop(), UV_RUN_DEFAULT) == 0);
}
- gpr_mu_lock(&grpc_polling_mu);
- return GRPC_ERROR_NONE;
}
-grpc_error* grpc_pollset_kick(grpc_pollset* pollset,
- grpc_pollset_worker* specific_worker) {
- GRPC_UV_ASSERT_SAME_THREAD();
- uv_timer_start(dummy_uv_handle, dummy_timer_cb, 0, 0);
- return GRPC_ERROR_NONE;
-}
+grpc_custom_poller_vtable uv_pollset_vtable = {init, run_loop, kick, shutdown};
#endif /* GRPC_UV */
diff --git a/src/core/lib/iomgr/pollset_uv.h b/src/core/lib/iomgr/pollset_uv.h
index 566c110ca6..de82bcc1d3 100644
--- a/src/core/lib/iomgr/pollset_uv.h
+++ b/src/core/lib/iomgr/pollset_uv.h
@@ -21,7 +21,12 @@
extern int grpc_pollset_work_run_loop;
-void grpc_pollset_global_init(void);
-void grpc_pollset_global_shutdown(void);
+typedef struct grpc_custom_poller_vtable {
+ void (*init)(void);
+ void (*run_loop)(int blocking);
+} grpc_custom_poller_vtable;
+
+void grpc_custom_pollset_global_init(grpc_custom_poller_vtable* vtable);
+void grpc_custom_pollset_global_shutdown(void);
#endif /* GRPC_CORE_LIB_IOMGR_POLLSET_UV_H */
diff --git a/src/core/lib/iomgr/pollset_windows.cc b/src/core/lib/iomgr/pollset_windows.cc
index c1b83ddc14..e9a808d8ad 100644
--- a/src/core/lib/iomgr/pollset_windows.cc
+++ b/src/core/lib/iomgr/pollset_windows.cc
@@ -38,7 +38,7 @@ gpr_mu grpc_polling_mu;
static grpc_pollset_worker* g_active_poller;
static grpc_pollset_worker g_global_root_worker;
-void grpc_pollset_global_init(void) {
+static void pollset_global_init(void) {
gpr_mu_init(&grpc_polling_mu);
g_active_poller = NULL;
g_global_root_worker.links[GRPC_POLLSET_WORKER_LINK_GLOBAL].next =
@@ -46,7 +46,7 @@ void grpc_pollset_global_init(void) {
&g_global_root_worker;
}
-void grpc_pollset_global_shutdown(void) { gpr_mu_destroy(&grpc_polling_mu); }
+static void pollset_global_shutdown(void) { gpr_mu_destroy(&grpc_polling_mu); }
static void remove_worker(grpc_pollset_worker* worker,
grpc_pollset_worker_link_type type) {
@@ -80,21 +80,21 @@ static void push_front_worker(grpc_pollset_worker* root,
worker->links[type].next->links[type].prev = worker;
}
-size_t grpc_pollset_size(void) { return sizeof(grpc_pollset); }
+static size_t pollset_size(void) { return sizeof(grpc_pollset); }
/* There isn't really any such thing as a pollset under Windows, due to the
nature of the IO completion ports. We're still going to provide a minimal
set of features for the sake of the rest of grpc. But grpc_pollset_work
won't actually do any polling, and return as quickly as possible. */
-void grpc_pollset_init(grpc_pollset* pollset, gpr_mu** mu) {
+static void pollset_init(grpc_pollset* pollset, gpr_mu** mu) {
*mu = &grpc_polling_mu;
pollset->root_worker.links[GRPC_POLLSET_WORKER_LINK_POLLSET].next =
pollset->root_worker.links[GRPC_POLLSET_WORKER_LINK_POLLSET].prev =
&pollset->root_worker;
}
-void grpc_pollset_shutdown(grpc_pollset* pollset, grpc_closure* closure) {
+static void pollset_shutdown(grpc_pollset* pollset, grpc_closure* closure) {
pollset->shutting_down = 1;
grpc_pollset_kick(pollset, GRPC_POLLSET_KICK_BROADCAST);
if (!pollset->is_iocp_worker) {
@@ -104,11 +104,11 @@ void grpc_pollset_shutdown(grpc_pollset* pollset, grpc_closure* closure) {
}
}
-void grpc_pollset_destroy(grpc_pollset* pollset) {}
+static void pollset_destroy(grpc_pollset* pollset) {}
-grpc_error* grpc_pollset_work(grpc_pollset* pollset,
- grpc_pollset_worker** worker_hdl,
- grpc_millis deadline) {
+static grpc_error* pollset_work(grpc_pollset* pollset,
+ grpc_pollset_worker** worker_hdl,
+ grpc_millis deadline) {
grpc_pollset_worker worker;
if (worker_hdl) *worker_hdl = &worker;
@@ -182,8 +182,8 @@ done:
return GRPC_ERROR_NONE;
}
-grpc_error* grpc_pollset_kick(grpc_pollset* p,
- grpc_pollset_worker* specific_worker) {
+static grpc_error* pollset_kick(grpc_pollset* p,
+ grpc_pollset_worker* specific_worker) {
if (specific_worker != NULL) {
if (specific_worker == GRPC_POLLSET_KICK_BROADCAST) {
for (specific_worker =
@@ -220,4 +220,10 @@ grpc_error* grpc_pollset_kick(grpc_pollset* p,
return GRPC_ERROR_NONE;
}
+grpc_pollset_vtable grpc_windows_pollset_vtable = {
+ pollset_global_init, pollset_global_shutdown,
+ pollset_init, pollset_shutdown,
+ pollset_destroy, pollset_work,
+ pollset_kick, pollset_size};
+
#endif /* GRPC_WINSOCK_SOCKET */
diff --git a/src/core/lib/iomgr/port.h b/src/core/lib/iomgr/port.h
index 25090898ed..c1dcc52618 100644
--- a/src/core/lib/iomgr/port.h
+++ b/src/core/lib/iomgr/port.h
@@ -21,8 +21,11 @@
#ifndef GRPC_CORE_LIB_IOMGR_PORT_H
#define GRPC_CORE_LIB_IOMGR_PORT_H
-#if defined(GRPC_UV)
-// Do nothing
+#ifdef GRPC_UV
+#define GRPC_CUSTOM_SOCKET
+#endif
+#if defined(GRPC_CUSTOM_SOCKET)
+// Do Nothing
#elif defined(GPR_MANYLINUX1)
#define GRPC_HAVE_ARPA_NAMESER 1
#define GRPC_HAVE_IFADDRS 1
@@ -33,13 +36,10 @@
#define GRPC_POSIX_FORK 1
#define GRPC_POSIX_NO_SPECIAL_WAKEUP_FD 1
#define GRPC_POSIX_SOCKET 1
-#define GRPC_POSIX_SOCKETADDR 1
#define GRPC_POSIX_SOCKETUTILS 1
#define GRPC_POSIX_WAKEUP_FD 1
-#define GRPC_TIMER_USE_GENERIC 1
#define GRPC_LINUX_EPOLL 1
#elif defined(GPR_WINDOWS)
-#define GRPC_TIMER_USE_GENERIC 1
#define GRPC_WINSOCK_SOCKET 1
#define GRPC_WINDOWS_SOCKETUTILS 1
#elif defined(GPR_ANDROID)
@@ -49,10 +49,8 @@
#define GRPC_HAVE_UNIX_SOCKET 1
#define GRPC_LINUX_EVENTFD 1
#define GRPC_POSIX_SOCKET 1
-#define GRPC_POSIX_SOCKETADDR 1
#define GRPC_POSIX_SOCKETUTILS 1
#define GRPC_POSIX_WAKEUP_FD 1
-#define GRPC_TIMER_USE_GENERIC 1
#elif defined(GPR_LINUX)
#define GRPC_HAVE_ARPA_NAMESER 1
#define GRPC_HAVE_IFADDRS 1
@@ -64,9 +62,7 @@
#define GRPC_POSIX_FORK 1
#define GRPC_POSIX_HOST_NAME_MAX 1
#define GRPC_POSIX_SOCKET 1
-#define GRPC_POSIX_SOCKETADDR 1
#define GRPC_POSIX_WAKEUP_FD 1
-#define GRPC_TIMER_USE_GENERIC 1
#ifdef __GLIBC_PREREQ
#if __GLIBC_PREREQ(2, 4)
#define GRPC_LINUX_EPOLL 1
@@ -100,11 +96,9 @@
#define GRPC_POSIX_FORK 1
#define GRPC_POSIX_NO_SPECIAL_WAKEUP_FD 1
#define GRPC_POSIX_SOCKET 1
-#define GRPC_POSIX_SOCKETADDR 1
#define GRPC_POSIX_SOCKETUTILS 1
#define GRPC_POSIX_SYSCONF 1
#define GRPC_POSIX_WAKEUP_FD 1
-#define GRPC_TIMER_USE_GENERIC 1
#elif defined(GPR_FREEBSD)
#define GRPC_HAVE_ARPA_NAMESER 1
#define GRPC_HAVE_IFADDRS 1
@@ -114,36 +108,31 @@
#define GRPC_POSIX_FORK 1
#define GRPC_POSIX_NO_SPECIAL_WAKEUP_FD 1
#define GRPC_POSIX_SOCKET 1
-#define GRPC_POSIX_SOCKETADDR 1
#define GRPC_POSIX_SOCKETUTILS 1
#define GRPC_POSIX_WAKEUP_FD 1
-#define GRPC_TIMER_USE_GENERIC 1
#elif defined(GPR_OPENBSD)
#define GRPC_HAVE_IFADDRS 1
#define GRPC_HAVE_IPV6_RECVPKTINFO 1
#define GRPC_HAVE_UNIX_SOCKET 1
#define GRPC_POSIX_NO_SPECIAL_WAKEUP_FD 1
#define GRPC_POSIX_SOCKET 1
-#define GRPC_POSIX_SOCKETADDR 1
#define GRPC_POSIX_SOCKETUTILS 1
#define GRPC_POSIX_WAKEUP_FD 1
-#define GRPC_TIMER_USE_GENERIC 1
#elif defined(GPR_NACL)
#define GRPC_HAVE_ARPA_NAMESER 1
#define GRPC_POSIX_NO_SPECIAL_WAKEUP_FD 1
#define GRPC_POSIX_SOCKET 1
-#define GRPC_POSIX_SOCKETADDR 1
#define GRPC_POSIX_SOCKETUTILS 1
#define GRPC_POSIX_WAKEUP_FD 1
-#define GRPC_TIMER_USE_GENERIC 1
#elif !defined(GPR_NO_AUTODETECT_PLATFORM)
#error "Platform not recognized"
#endif
#if defined(GRPC_POSIX_SOCKET) + defined(GRPC_WINSOCK_SOCKET) + \
- defined(GRPC_CUSTOM_SOCKET) + defined(GRPC_UV) != \
+ defined(GRPC_CUSTOM_SOCKET) != \
1
-#error Must define exactly one of GRPC_POSIX_SOCKET, GRPC_WINSOCK_SOCKET, GPR_CUSTOM_SOCKET
+#error \
+ "Must define exactly one of GRPC_POSIX_SOCKET, GRPC_WINSOCK_SOCKET, GRPC_CUSTOM_SOCKET"
#endif
#if defined(GRPC_POSIX_HOST_NAME_MAX) && defined(GRPC_POSIX_SYSCONF)
diff --git a/src/core/lib/iomgr/resolve_address.cc b/src/core/lib/iomgr/resolve_address.cc
new file mode 100644
index 0000000000..f2a4676369
--- /dev/null
+++ b/src/core/lib/iomgr/resolve_address.cc
@@ -0,0 +1,50 @@
+/*
+ *
+ * Copyright 2018 gRPC authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <grpc/support/port_platform.h>
+
+#include <grpc/support/alloc.h>
+#include "src/core/lib/iomgr/resolve_address.h"
+
+grpc_address_resolver_vtable* grpc_resolve_address_impl;
+
+void grpc_set_resolver_impl(grpc_address_resolver_vtable* vtable) {
+ grpc_resolve_address_impl = vtable;
+}
+
+void grpc_resolve_address(const char* addr, const char* default_port,
+ grpc_pollset_set* interested_parties,
+ grpc_closure* on_done,
+ grpc_resolved_addresses** addresses) {
+ grpc_resolve_address_impl->resolve_address(
+ addr, default_port, interested_parties, on_done, addresses);
+}
+
+void grpc_resolved_addresses_destroy(grpc_resolved_addresses* addrs) {
+ if (addrs != nullptr) {
+ gpr_free(addrs->addrs);
+ }
+ gpr_free(addrs);
+}
+
+grpc_error* grpc_blocking_resolve_address(const char* name,
+ const char* default_port,
+ grpc_resolved_addresses** addresses) {
+ return grpc_resolve_address_impl->blocking_resolve_address(name, default_port,
+ addresses);
+}
diff --git a/src/core/lib/iomgr/resolve_address.h b/src/core/lib/iomgr/resolve_address.h
index 10a7822654..fe0d834582 100644
--- a/src/core/lib/iomgr/resolve_address.h
+++ b/src/core/lib/iomgr/resolve_address.h
@@ -22,14 +22,28 @@
#include <grpc/support/port_platform.h>
#include <stddef.h>
-#include "src/core/lib/iomgr/exec_ctx.h"
+
+#include "src/core/lib/iomgr/port.h"
+
+#ifdef GRPC_UV
+#include <uv.h>
+#endif
+
+#ifdef GRPC_WINSOCK_SOCKET
+#include <ws2tcpip.h>
+#endif
+
+#ifdef GRPC_POSIX_SOCKET
+#include <sys/socket.h>
+#endif
+
#include "src/core/lib/iomgr/pollset_set.h"
#define GRPC_MAX_SOCKADDR_SIZE 128
typedef struct {
char addr[GRPC_MAX_SOCKADDR_SIZE];
- size_t len;
+ socklen_t len;
} grpc_resolved_address;
typedef struct {
@@ -37,20 +51,33 @@ typedef struct {
grpc_resolved_address* addrs;
} grpc_resolved_addresses;
+typedef struct grpc_address_resolver_vtable {
+ void (*resolve_address)(const char* addr, const char* default_port,
+ grpc_pollset_set* interested_parties,
+ grpc_closure* on_done,
+ grpc_resolved_addresses** addresses);
+ grpc_error* (*blocking_resolve_address)(const char* name,
+ const char* default_port,
+ grpc_resolved_addresses** addresses);
+} grpc_address_resolver_vtable;
+
+void grpc_set_resolver_impl(grpc_address_resolver_vtable* vtable);
+
/* Asynchronously resolve addr. Use default_port if a port isn't designated
in addr, otherwise use the port in addr. */
/* TODO(ctiller): add a timeout here */
-extern void (*grpc_resolve_address)(const char* addr, const char* default_port,
- grpc_pollset_set* interested_parties,
- grpc_closure* on_done,
- grpc_resolved_addresses** addresses);
+void grpc_resolve_address(const char* addr, const char* default_port,
+ grpc_pollset_set* interested_parties,
+ grpc_closure* on_done,
+ grpc_resolved_addresses** addresses);
+
/* Destroy resolved addresses */
void grpc_resolved_addresses_destroy(grpc_resolved_addresses* addresses);
-/* Resolve addr in a blocking fashion. Returns NULL on failure. On success,
+/* Resolve addr in a blocking fashion. On success,
result must be freed with grpc_resolved_addresses_destroy. */
-extern grpc_error* (*grpc_blocking_resolve_address)(
- const char* name, const char* default_port,
- grpc_resolved_addresses** addresses);
+grpc_error* grpc_blocking_resolve_address(const char* name,
+ const char* default_port,
+ grpc_resolved_addresses** addresses);
#endif /* GRPC_CORE_LIB_IOMGR_RESOLVE_ADDRESS_H */
diff --git a/src/core/lib/iomgr/resolve_address_custom.cc b/src/core/lib/iomgr/resolve_address_custom.cc
new file mode 100644
index 0000000000..9cf7817f66
--- /dev/null
+++ b/src/core/lib/iomgr/resolve_address_custom.cc
@@ -0,0 +1,187 @@
+/*
+ *
+ * Copyright 2018 gRPC authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <grpc/support/port_platform.h>
+
+#include "src/core/lib/iomgr/port.h"
+
+#include <grpc/support/alloc.h>
+#include <grpc/support/string_util.h>
+
+#include <grpc/support/log.h>
+#include "src/core/lib/gpr/host_port.h"
+#include "src/core/lib/gpr/string.h"
+#include "src/core/lib/gpr/useful.h"
+
+#include "src/core/lib/iomgr/iomgr_custom.h"
+#include "src/core/lib/iomgr/resolve_address_custom.h"
+#include "src/core/lib/iomgr/sockaddr_utils.h"
+
+#include <string.h>
+
+typedef struct grpc_custom_resolver {
+ grpc_closure* on_done;
+ grpc_resolved_addresses** addresses;
+ char* host;
+ char* port;
+} grpc_custom_resolver;
+
+static grpc_custom_resolver_vtable* resolve_address_vtable = nullptr;
+
+static int retry_named_port_failure(grpc_custom_resolver* r,
+ grpc_resolved_addresses** res) {
+ // This loop is copied from resolve_address_posix.c
+ const char* svc[][2] = {{"http", "80"}, {"https", "443"}};
+ for (size_t i = 0; i < GPR_ARRAY_SIZE(svc); i++) {
+ if (strcmp(r->port, svc[i][0]) == 0) {
+ gpr_free(r->port);
+ r->port = gpr_strdup(svc[i][1]);
+ if (res) {
+ grpc_error* error =
+ resolve_address_vtable->resolve(r->host, r->port, res);
+ if (error != GRPC_ERROR_NONE) {
+ GRPC_ERROR_UNREF(error);
+ return 0;
+ }
+ } else {
+ resolve_address_vtable->resolve_async(r, r->host, r->port);
+ }
+ return 1;
+ }
+ }
+ return 0;
+}
+
+void grpc_custom_resolve_callback(grpc_custom_resolver* r,
+ grpc_resolved_addresses* result,
+ grpc_error* error) {
+ GRPC_CUSTOM_IOMGR_ASSERT_SAME_THREAD();
+ grpc_core::ExecCtx exec_ctx;
+ if (error == GRPC_ERROR_NONE) {
+ *r->addresses = result;
+ } else if (retry_named_port_failure(r, nullptr)) {
+ return;
+ }
+ if (r->on_done) {
+ GRPC_CLOSURE_SCHED(r->on_done, error);
+ }
+ gpr_free(r->host);
+ gpr_free(r->port);
+ gpr_free(r);
+}
+
+static grpc_error* try_split_host_port(const char* name,
+ const char* default_port, char** host,
+ char** port) {
+ /* parse name, splitting it into host and port parts */
+ grpc_error* error;
+ gpr_split_host_port(name, host, port);
+ if (*host == nullptr) {
+ char* msg;
+ gpr_asprintf(&msg, "unparseable host:port: '%s'", name);
+ error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg);
+ gpr_free(msg);
+ return error;
+ }
+ if (*port == nullptr) {
+ // TODO(murgatroid99): add tests for this case
+ if (default_port == nullptr) {
+ char* msg;
+ gpr_asprintf(&msg, "no port in name '%s'", name);
+ error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg);
+ gpr_free(msg);
+ return error;
+ }
+ *port = gpr_strdup(default_port);
+ }
+ return GRPC_ERROR_NONE;
+}
+
+static grpc_error* blocking_resolve_address_impl(
+ const char* name, const char* default_port,
+ grpc_resolved_addresses** addresses) {
+ char* host;
+ char* port;
+ grpc_error* err;
+
+ GRPC_CUSTOM_IOMGR_ASSERT_SAME_THREAD();
+
+ err = try_split_host_port(name, default_port, &host, &port);
+ if (err != GRPC_ERROR_NONE) {
+ gpr_free(host);
+ gpr_free(port);
+ return err;
+ }
+
+ /* Call getaddrinfo */
+ grpc_custom_resolver resolver;
+ resolver.host = host;
+ resolver.port = port;
+
+ grpc_resolved_addresses* addrs;
+ grpc_core::ExecCtx* curr = grpc_core::ExecCtx::Get();
+ grpc_core::ExecCtx::Set(nullptr);
+ err = resolve_address_vtable->resolve(host, port, &addrs);
+ if (err != GRPC_ERROR_NONE) {
+ if (retry_named_port_failure(&resolver, &addrs)) {
+ GRPC_ERROR_UNREF(err);
+ err = GRPC_ERROR_NONE;
+ }
+ }
+ grpc_core::ExecCtx::Set(curr);
+ if (err == GRPC_ERROR_NONE) {
+ *addresses = addrs;
+ }
+ gpr_free(resolver.host);
+ gpr_free(resolver.port);
+ return err;
+}
+
+static void resolve_address_impl(const char* name, const char* default_port,
+ grpc_pollset_set* interested_parties,
+ grpc_closure* on_done,
+ grpc_resolved_addresses** addrs) {
+ grpc_custom_resolver* r = nullptr;
+ char* host = nullptr;
+ char* port = nullptr;
+ grpc_error* err;
+ GRPC_CUSTOM_IOMGR_ASSERT_SAME_THREAD();
+ err = try_split_host_port(name, default_port, &host, &port);
+ if (err != GRPC_ERROR_NONE) {
+ GRPC_CLOSURE_SCHED(on_done, err);
+ gpr_free(host);
+ gpr_free(port);
+ return;
+ }
+ r = (grpc_custom_resolver*)gpr_malloc(sizeof(grpc_custom_resolver));
+ r->on_done = on_done;
+ r->addresses = addrs;
+ r->host = host;
+ r->port = port;
+
+ /* Call getaddrinfo */
+ resolve_address_vtable->resolve_async(r, r->host, r->port);
+}
+
+static grpc_address_resolver_vtable custom_resolver_vtable = {
+ resolve_address_impl, blocking_resolve_address_impl};
+
+void grpc_custom_resolver_init(grpc_custom_resolver_vtable* impl) {
+ resolve_address_vtable = impl;
+ grpc_set_resolver_impl(&custom_resolver_vtable);
+}
diff --git a/src/core/lib/iomgr/resolve_address_custom.h b/src/core/lib/iomgr/resolve_address_custom.h
new file mode 100644
index 0000000000..e0c6714087
--- /dev/null
+++ b/src/core/lib/iomgr/resolve_address_custom.h
@@ -0,0 +1,43 @@
+/*
+ *
+ * Copyright 2018 gRPC authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef GRPC_CORE_LIB_IOMGR_RESOLVE_ADDRESS_CUSTOM_H
+#define GRPC_CORE_LIB_IOMGR_RESOLVE_ADDRESS_CUSTOM_H
+
+#include <grpc/support/port_platform.h>
+
+#include "src/core/lib/iomgr/port.h"
+
+#include "src/core/lib/iomgr/resolve_address.h"
+#include "src/core/lib/iomgr/sockaddr.h"
+
+typedef struct grpc_custom_resolver grpc_custom_resolver;
+
+typedef struct grpc_custom_resolver_vtable {
+ grpc_error* (*resolve)(char* host, char* port, grpc_resolved_addresses** res);
+ void (*resolve_async)(grpc_custom_resolver* resolver, char* host, char* port);
+} grpc_custom_resolver_vtable;
+
+void grpc_custom_resolve_callback(grpc_custom_resolver* resolver,
+ grpc_resolved_addresses* result,
+ grpc_error* error);
+
+/* Internal APIs */
+void grpc_custom_resolver_init(grpc_custom_resolver_vtable* impl);
+
+#endif /* GRPC_CORE_LIB_IOMGR_RESOLVE_ADDRESS_CUSTOM_H */
diff --git a/src/core/lib/iomgr/resolve_address_posix.cc b/src/core/lib/iomgr/resolve_address_posix.cc
index 2f68dbe214..a82075542f 100644
--- a/src/core/lib/iomgr/resolve_address_posix.cc
+++ b/src/core/lib/iomgr/resolve_address_posix.cc
@@ -42,7 +42,7 @@
#include "src/core/lib/iomgr/iomgr_internal.h"
#include "src/core/lib/iomgr/unix_sockets_posix.h"
-static grpc_error* blocking_resolve_address_impl(
+static grpc_error* posix_blocking_resolve_address(
const char* name, const char* default_port,
grpc_resolved_addresses** addresses) {
grpc_core::ExecCtx exec_ctx;
@@ -141,10 +141,6 @@ done:
return err;
}
-grpc_error* (*grpc_blocking_resolve_address)(
- const char* name, const char* default_port,
- grpc_resolved_addresses** addresses) = blocking_resolve_address_impl;
-
typedef struct {
char* name;
char* default_port;
@@ -165,17 +161,10 @@ static void do_request_thread(void* rp, grpc_error* error) {
gpr_free(r);
}
-void grpc_resolved_addresses_destroy(grpc_resolved_addresses* addrs) {
- if (addrs != nullptr) {
- gpr_free(addrs->addrs);
- }
- gpr_free(addrs);
-}
-
-static void resolve_address_impl(const char* name, const char* default_port,
- grpc_pollset_set* interested_parties,
- grpc_closure* on_done,
- grpc_resolved_addresses** addrs) {
+static void posix_resolve_address(const char* name, const char* default_port,
+ grpc_pollset_set* interested_parties,
+ grpc_closure* on_done,
+ grpc_resolved_addresses** addrs) {
request* r = static_cast<request*>(gpr_malloc(sizeof(request)));
GRPC_CLOSURE_INIT(&r->request_closure, do_request_thread, r,
grpc_executor_scheduler(GRPC_EXECUTOR_SHORT));
@@ -186,9 +175,6 @@ static void resolve_address_impl(const char* name, const char* default_port,
GRPC_CLOSURE_SCHED(&r->request_closure, GRPC_ERROR_NONE);
}
-void (*grpc_resolve_address)(
- const char* name, const char* default_port,
- grpc_pollset_set* interested_parties, grpc_closure* on_done,
- grpc_resolved_addresses** addrs) = resolve_address_impl;
-
+grpc_address_resolver_vtable grpc_posix_resolver_vtable = {
+ posix_resolve_address, posix_blocking_resolve_address};
#endif
diff --git a/src/core/lib/iomgr/resolve_address_uv.cc b/src/core/lib/iomgr/resolve_address_uv.cc
deleted file mode 100644
index 4d8ea596f3..0000000000
--- a/src/core/lib/iomgr/resolve_address_uv.cc
+++ /dev/null
@@ -1,286 +0,0 @@
-/*
- *
- * Copyright 2016 gRPC authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include <grpc/support/port_platform.h>
-
-#include "src/core/lib/iomgr/port.h"
-#ifdef GRPC_UV
-
-#include <uv.h>
-
-#include <grpc/support/alloc.h>
-#include <grpc/support/log.h>
-#include <grpc/support/string_util.h>
-
-#include "src/core/lib/gpr/host_port.h"
-#include "src/core/lib/gpr/useful.h"
-#include "src/core/lib/iomgr/closure.h"
-#include "src/core/lib/iomgr/error.h"
-#include "src/core/lib/iomgr/exec_ctx.h"
-#include "src/core/lib/iomgr/iomgr_uv.h"
-#include "src/core/lib/iomgr/resolve_address.h"
-#include "src/core/lib/iomgr/sockaddr.h"
-#include "src/core/lib/iomgr/sockaddr_utils.h"
-
-#include <string.h>
-
-typedef struct request {
- grpc_closure* on_done;
- grpc_resolved_addresses** addresses;
- struct addrinfo* hints;
- char* host;
- char* port;
-} request;
-
-static int retry_named_port_failure(int status, request* r,
- uv_getaddrinfo_cb getaddrinfo_cb) {
- if (status != 0) {
- // This loop is copied from resolve_address_posix.c
- const char* svc[][2] = {{"http", "80"}, {"https", "443"}};
- for (size_t i = 0; i < GPR_ARRAY_SIZE(svc); i++) {
- if (strcmp(r->port, svc[i][0]) == 0) {
- int retry_status;
- uv_getaddrinfo_t* req =
- (uv_getaddrinfo_t*)gpr_malloc(sizeof(uv_getaddrinfo_t));
- req->data = r;
- r->port = gpr_strdup(svc[i][1]);
- retry_status = uv_getaddrinfo(uv_default_loop(), req, getaddrinfo_cb,
- r->host, r->port, r->hints);
- if (retry_status < 0 || getaddrinfo_cb == NULL) {
- // The callback will not be called
- gpr_free(req);
- }
- return retry_status;
- }
- }
- }
- /* If this function calls uv_getaddrinfo, it will return that function's
- return value. That function only returns numbers <=0, so we can safely
- return 1 to indicate that we never retried */
- return 1;
-}
-
-static grpc_error* handle_addrinfo_result(int status, struct addrinfo* result,
- grpc_resolved_addresses** addresses) {
- struct addrinfo* resp;
- size_t i;
- if (status != 0) {
- grpc_error* error;
- *addresses = NULL;
- error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("getaddrinfo failed");
- error =
- grpc_error_set_str(error, GRPC_ERROR_STR_OS_ERROR,
- grpc_slice_from_static_string(uv_strerror(status)));
- return error;
- }
- (*addresses) =
- (grpc_resolved_addresses*)gpr_malloc(sizeof(grpc_resolved_addresses));
- (*addresses)->naddrs = 0;
- for (resp = result; resp != NULL; resp = resp->ai_next) {
- (*addresses)->naddrs++;
- }
- (*addresses)->addrs = (grpc_resolved_address*)gpr_malloc(
- sizeof(grpc_resolved_address) * (*addresses)->naddrs);
- i = 0;
- for (resp = result; resp != NULL; resp = resp->ai_next) {
- memcpy(&(*addresses)->addrs[i].addr, resp->ai_addr, resp->ai_addrlen);
- (*addresses)->addrs[i].len = resp->ai_addrlen;
- i++;
- }
-
- {
- for (i = 0; i < (*addresses)->naddrs; i++) {
- char* buf;
- grpc_sockaddr_to_string(&buf, &(*addresses)->addrs[i], 0);
- gpr_free(buf);
- }
- }
- return GRPC_ERROR_NONE;
-}
-
-static void getaddrinfo_callback(uv_getaddrinfo_t* req, int status,
- struct addrinfo* res) {
- request* r = (request*)req->data;
- grpc_core::ExecCtx exec_ctx;
- grpc_error* error;
- int retry_status;
- char* port = r->port;
-
- gpr_free(req);
- retry_status = retry_named_port_failure(status, r, getaddrinfo_callback);
- if (retry_status == 0) {
- /* The request is being retried. It is using its own port string, so we free
- * the original one */
- gpr_free(port);
- return;
- }
- /* Either no retry was attempted, or the retry failed. Either way, the
- original error probably has more interesting information */
- error = handle_addrinfo_result(status, res, r->addresses);
- GRPC_CLOSURE_SCHED(r->on_done, error);
-
- gpr_free(r->hints);
- gpr_free(r->host);
- gpr_free(r->port);
- gpr_free(r);
- uv_freeaddrinfo(res);
-}
-
-static grpc_error* try_split_host_port(const char* name,
- const char* default_port, char** host,
- char** port) {
- /* parse name, splitting it into host and port parts */
- grpc_error* error;
- gpr_split_host_port(name, host, port);
- if (*host == NULL) {
- char* msg;
- gpr_asprintf(&msg, "unparseable host:port: '%s'", name);
- error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg);
- gpr_free(msg);
- return error;
- }
- if (*port == NULL) {
- // TODO(murgatroid99): add tests for this case
- if (default_port == NULL) {
- char* msg;
- gpr_asprintf(&msg, "no port in name '%s'", name);
- error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg);
- gpr_free(msg);
- return error;
- }
- *port = gpr_strdup(default_port);
- }
- return GRPC_ERROR_NONE;
-}
-
-static grpc_error* blocking_resolve_address_impl(
- const char* name, const char* default_port,
- grpc_resolved_addresses** addresses) {
- char* host;
- char* port;
- struct addrinfo hints;
- uv_getaddrinfo_t req;
- int s;
- grpc_error* err;
- int retry_status;
- request r;
-
- GRPC_UV_ASSERT_SAME_THREAD();
-
- req.addrinfo = NULL;
-
- err = try_split_host_port(name, default_port, &host, &port);
- if (err != GRPC_ERROR_NONE) {
- goto done;
- }
-
- /* Call getaddrinfo */
- memset(&hints, 0, sizeof(hints));
- hints.ai_family = AF_UNSPEC; /* ipv4 or ipv6 */
- hints.ai_socktype = SOCK_STREAM; /* stream socket */
- hints.ai_flags = AI_PASSIVE; /* for wildcard IP address */
-
- s = uv_getaddrinfo(uv_default_loop(), &req, NULL, host, port, &hints);
- r.addresses = addresses;
- r.hints = &hints;
- r.host = host;
- r.port = port;
- retry_status = retry_named_port_failure(s, &r, NULL);
- if (retry_status <= 0) {
- s = retry_status;
- }
- err = handle_addrinfo_result(s, req.addrinfo, addresses);
-
-done:
- gpr_free(host);
- gpr_free(port);
- if (req.addrinfo) {
- uv_freeaddrinfo(req.addrinfo);
- }
- return err;
-}
-
-grpc_error* (*grpc_blocking_resolve_address)(
- const char* name, const char* default_port,
- grpc_resolved_addresses** addresses) = blocking_resolve_address_impl;
-
-void grpc_resolved_addresses_destroy(grpc_resolved_addresses* addrs) {
- if (addrs != NULL) {
- gpr_free(addrs->addrs);
- }
- gpr_free(addrs);
-}
-
-static void resolve_address_impl(const char* name, const char* default_port,
- grpc_pollset_set* interested_parties,
- grpc_closure* on_done,
- grpc_resolved_addresses** addrs) {
- uv_getaddrinfo_t* req = NULL;
- request* r = NULL;
- struct addrinfo* hints = NULL;
- char* host = NULL;
- char* port = NULL;
- grpc_error* err;
- int s;
- GRPC_UV_ASSERT_SAME_THREAD();
- err = try_split_host_port(name, default_port, &host, &port);
- if (err != GRPC_ERROR_NONE) {
- GRPC_CLOSURE_SCHED(on_done, err);
- gpr_free(host);
- gpr_free(port);
- return;
- }
- r = (request*)gpr_malloc(sizeof(request));
- r->on_done = on_done;
- r->addresses = addrs;
- r->host = host;
- r->port = port;
- req = (uv_getaddrinfo_t*)gpr_malloc(sizeof(uv_getaddrinfo_t));
- req->data = r;
-
- /* Call getaddrinfo */
- hints = (addrinfo*)gpr_malloc(sizeof(struct addrinfo));
- memset(hints, 0, sizeof(struct addrinfo));
- hints->ai_family = AF_UNSPEC; /* ipv4 or ipv6 */
- hints->ai_socktype = SOCK_STREAM; /* stream socket */
- hints->ai_flags = AI_PASSIVE; /* for wildcard IP address */
- r->hints = hints;
-
- s = uv_getaddrinfo(uv_default_loop(), req, getaddrinfo_callback, host, port,
- hints);
-
- if (s != 0) {
- *addrs = NULL;
- err = GRPC_ERROR_CREATE_FROM_STATIC_STRING("getaddrinfo failed");
- err = grpc_error_set_str(err, GRPC_ERROR_STR_OS_ERROR,
- grpc_slice_from_static_string(uv_strerror(s)));
- GRPC_CLOSURE_SCHED(on_done, err);
- gpr_free(r);
- gpr_free(req);
- gpr_free(hints);
- gpr_free(host);
- gpr_free(port);
- }
-}
-
-void (*grpc_resolve_address)(
- const char* name, const char* default_port,
- grpc_pollset_set* interested_parties, grpc_closure* on_done,
- grpc_resolved_addresses** addrs) = resolve_address_impl;
-
-#endif /* GRPC_UV */
diff --git a/src/core/lib/iomgr/resolve_address_windows.cc b/src/core/lib/iomgr/resolve_address_windows.cc
index 7a62c88720..71c92615ad 100644
--- a/src/core/lib/iomgr/resolve_address_windows.cc
+++ b/src/core/lib/iomgr/resolve_address_windows.cc
@@ -51,7 +51,7 @@ typedef struct {
grpc_resolved_addresses** addresses;
} request;
-static grpc_error* blocking_resolve_address_impl(
+static grpc_error* windows_blocking_resolve_address(
const char* name, const char* default_port,
grpc_resolved_addresses** addresses) {
grpc_core::ExecCtx exec_ctx;
@@ -130,10 +130,6 @@ done:
return error;
}
-grpc_error* (*grpc_blocking_resolve_address)(
- const char* name, const char* default_port,
- grpc_resolved_addresses** addresses) = blocking_resolve_address_impl;
-
/* Callback to be passed to grpc_executor to asynch-ify
* grpc_blocking_resolve_address */
static void do_request_thread(void* rp, grpc_error* error) {
@@ -150,17 +146,10 @@ static void do_request_thread(void* rp, grpc_error* error) {
gpr_free(r);
}
-void grpc_resolved_addresses_destroy(grpc_resolved_addresses* addrs) {
- if (addrs != NULL) {
- gpr_free(addrs->addrs);
- }
- gpr_free(addrs);
-}
-
-static void resolve_address_impl(const char* name, const char* default_port,
- grpc_pollset_set* interested_parties,
- grpc_closure* on_done,
- grpc_resolved_addresses** addresses) {
+static void windows_resolve_address(const char* name, const char* default_port,
+ grpc_pollset_set* interested_parties,
+ grpc_closure* on_done,
+ grpc_resolved_addresses** addresses) {
request* r = (request*)gpr_malloc(sizeof(request));
GRPC_CLOSURE_INIT(&r->request_closure, do_request_thread, r,
grpc_executor_scheduler(GRPC_EXECUTOR_SHORT));
@@ -171,9 +160,6 @@ static void resolve_address_impl(const char* name, const char* default_port,
GRPC_CLOSURE_SCHED(&r->request_closure, GRPC_ERROR_NONE);
}
-void (*grpc_resolve_address)(
- const char* name, const char* default_port,
- grpc_pollset_set* interested_parties, grpc_closure* on_done,
- grpc_resolved_addresses** addresses) = resolve_address_impl;
-
+grpc_address_resolver_vtable grpc_windows_resolver_vtable = {
+ windows_resolve_address, windows_blocking_resolve_address};
#endif
diff --git a/src/core/lib/iomgr/resource_quota.h b/src/core/lib/iomgr/resource_quota.h
index 4e1c651278..937daf8728 100644
--- a/src/core/lib/iomgr/resource_quota.h
+++ b/src/core/lib/iomgr/resource_quota.h
@@ -24,7 +24,7 @@
#include <grpc/grpc.h>
#include "src/core/lib/debug/trace.h"
-#include "src/core/lib/iomgr/exec_ctx.h"
+#include "src/core/lib/iomgr/closure.h"
/** \file Tracks resource usage against a pool.
@@ -139,8 +139,4 @@ void grpc_resource_user_alloc_slices(
grpc_resource_user_slice_allocator* slice_allocator, size_t length,
size_t count, grpc_slice_buffer* dest);
-/* Allocate one slice of length \a size synchronously. */
-grpc_slice grpc_resource_user_slice_malloc(grpc_resource_user* resource_user,
- size_t size);
-
#endif /* GRPC_CORE_LIB_IOMGR_RESOURCE_QUOTA_H */
diff --git a/src/core/lib/iomgr/sockaddr.h b/src/core/lib/iomgr/sockaddr.h
index 3b30da8a7d..5edf735cd1 100644
--- a/src/core/lib/iomgr/sockaddr.h
+++ b/src/core/lib/iomgr/sockaddr.h
@@ -25,18 +25,8 @@
#include <grpc/support/port_platform.h>
-#include "src/core/lib/iomgr/port.h"
-
-#ifdef GRPC_UV
-#include <uv.h>
-#endif
-
-#ifdef GPR_WINDOWS
-#include "src/core/lib/iomgr/sockaddr_windows.h"
-#endif
-
-#ifdef GRPC_POSIX_SOCKETADDR
+#include "src/core/lib/iomgr/sockaddr_custom.h"
#include "src/core/lib/iomgr/sockaddr_posix.h"
-#endif
+#include "src/core/lib/iomgr/sockaddr_windows.h"
#endif /* GRPC_CORE_LIB_IOMGR_SOCKADDR_H */
diff --git a/src/core/lib/iomgr/sockaddr_custom.h b/src/core/lib/iomgr/sockaddr_custom.h
new file mode 100644
index 0000000000..d85cc504d3
--- /dev/null
+++ b/src/core/lib/iomgr/sockaddr_custom.h
@@ -0,0 +1,54 @@
+/*
+ *
+ * Copyright 2018 gRPC authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef GRPC_CORE_LIB_IOMGR_SOCKADDR_CUSTOM_H
+#define GRPC_CORE_LIB_IOMGR_SOCKADDR_CUSTOM_H
+
+#include <grpc/support/port_platform.h>
+
+#include <stddef.h>
+#include "src/core/lib/iomgr/port.h"
+
+#ifdef GRPC_UV
+
+#include <uv.h>
+
+// TODO(kpayson) It would be nice to abstract this so we don't
+// depend on anything uv specific
+typedef struct sockaddr grpc_sockaddr;
+typedef struct sockaddr_in grpc_sockaddr_in;
+typedef struct in_addr grpc_in_addr;
+typedef struct sockaddr_in6 grpc_sockaddr_in6;
+typedef struct in6_addr grpc_in6_addr;
+
+#define GRPC_INET_ADDRSTRLEN INET_ADDRSTRLEN
+#define GRPC_INET6_ADDRSTRLEN INET6_ADDRSTRLEN
+
+#define GRPC_SOCK_STREAM SOCK_STREAM
+#define GRPC_SOCK_DGRAM SOCK_DGRAM
+
+#define GRPC_AF_UNSPEC AF_UNSPEC
+#define GRPC_AF_UNIX AF_UNIX
+#define GRPC_AF_INET AF_INET
+#define GRPC_AF_INET6 AF_INET6
+
+#define GRPC_AI_PASSIVE AI_PASSIVE
+
+#endif // GRPC_UV
+
+#endif /* GRPC_CORE_LIB_IOMGR_SOCKADDR_CUSTOM_H */
diff --git a/src/core/lib/iomgr/sockaddr_posix.h b/src/core/lib/iomgr/sockaddr_posix.h
index 83981e0aa5..5b18bbc465 100644
--- a/src/core/lib/iomgr/sockaddr_posix.h
+++ b/src/core/lib/iomgr/sockaddr_posix.h
@@ -21,6 +21,9 @@
#include <grpc/support/port_platform.h>
+#include "src/core/lib/iomgr/port.h"
+
+#ifdef GRPC_POSIX_SOCKET
#include <arpa/inet.h>
#include <netdb.h>
#include <netinet/in.h>
@@ -28,4 +31,25 @@
#include <sys/types.h>
#include <unistd.h>
+typedef struct sockaddr grpc_sockaddr;
+typedef struct sockaddr_in grpc_sockaddr_in;
+typedef struct in_addr grpc_in_addr;
+typedef struct sockaddr_in6 grpc_sockaddr_in6;
+typedef struct in6_addr grpc_in6_addr;
+
+#define GRPC_INET_ADDRSTRLEN INET_ADDRSTRLEN
+#define GRPC_INET6_ADDRSTRLEN INET6_ADDRSTRLEN
+
+#define GRPC_SOCK_STREAM SOCK_STREAM
+#define GRPC_SOCK_DGRAM SOCK_DGRAM
+
+#define GRPC_AF_UNSPEC AF_UNSPEC
+#define GRPC_AF_UNIX AF_UNIX
+#define GRPC_AF_INET AF_INET
+#define GRPC_AF_INET6 AF_INET6
+
+#define GRPC_AI_PASSIVE AI_PASSIVE
+
+#endif
+
#endif /* GRPC_CORE_LIB_IOMGR_SOCKADDR_POSIX_H */
diff --git a/src/core/lib/iomgr/sockaddr_utils.cc b/src/core/lib/iomgr/sockaddr_utils.cc
index 88f9b2ffd9..df25f7778a 100644
--- a/src/core/lib/iomgr/sockaddr_utils.cc
+++ b/src/core/lib/iomgr/sockaddr_utils.cc
@@ -40,25 +40,26 @@ static const uint8_t kV4MappedPrefix[] = {0, 0, 0, 0, 0, 0,
int grpc_sockaddr_is_v4mapped(const grpc_resolved_address* resolved_addr,
grpc_resolved_address* resolved_addr4_out) {
GPR_ASSERT(resolved_addr != resolved_addr4_out);
- const struct sockaddr* addr =
- reinterpret_cast<const struct sockaddr*>(resolved_addr->addr);
- struct sockaddr_in* addr4_out =
+ const grpc_sockaddr* addr =
+ reinterpret_cast<const grpc_sockaddr*>(resolved_addr->addr);
+ grpc_sockaddr_in* addr4_out =
resolved_addr4_out == nullptr
? nullptr
- : reinterpret_cast<struct sockaddr_in*>(resolved_addr4_out->addr);
- if (addr->sa_family == AF_INET6) {
- const struct sockaddr_in6* addr6 =
- reinterpret_cast<const struct sockaddr_in6*>(addr);
+ : reinterpret_cast<grpc_sockaddr_in*>(resolved_addr4_out->addr);
+ if (addr->sa_family == GRPC_AF_INET6) {
+ const grpc_sockaddr_in6* addr6 =
+ reinterpret_cast<const grpc_sockaddr_in6*>(addr);
if (memcmp(addr6->sin6_addr.s6_addr, kV4MappedPrefix,
sizeof(kV4MappedPrefix)) == 0) {
if (resolved_addr4_out != nullptr) {
/* Normalize ::ffff:0.0.0.0/96 to IPv4. */
memset(resolved_addr4_out, 0, sizeof(*resolved_addr4_out));
- addr4_out->sin_family = AF_INET;
+ addr4_out->sin_family = GRPC_AF_INET;
/* s6_addr32 would be nice, but it's non-standard. */
memcpy(&addr4_out->sin_addr, &addr6->sin6_addr.s6_addr[12], 4);
addr4_out->sin_port = addr6->sin6_port;
- resolved_addr4_out->len = sizeof(struct sockaddr_in);
+ resolved_addr4_out->len =
+ static_cast<socklen_t>(sizeof(grpc_sockaddr_in));
}
return 1;
}
@@ -69,19 +70,19 @@ int grpc_sockaddr_is_v4mapped(const grpc_resolved_address* resolved_addr,
int grpc_sockaddr_to_v4mapped(const grpc_resolved_address* resolved_addr,
grpc_resolved_address* resolved_addr6_out) {
GPR_ASSERT(resolved_addr != resolved_addr6_out);
- const struct sockaddr* addr =
- reinterpret_cast<const struct sockaddr*>(resolved_addr->addr);
- struct sockaddr_in6* addr6_out =
- reinterpret_cast<struct sockaddr_in6*>(resolved_addr6_out->addr);
- if (addr->sa_family == AF_INET) {
- const struct sockaddr_in* addr4 =
- reinterpret_cast<const struct sockaddr_in*>(addr);
+ const grpc_sockaddr* addr =
+ reinterpret_cast<const grpc_sockaddr*>(resolved_addr->addr);
+ grpc_sockaddr_in6* addr6_out =
+ reinterpret_cast<grpc_sockaddr_in6*>(resolved_addr6_out->addr);
+ if (addr->sa_family == GRPC_AF_INET) {
+ const grpc_sockaddr_in* addr4 =
+ reinterpret_cast<const grpc_sockaddr_in*>(addr);
memset(resolved_addr6_out, 0, sizeof(*resolved_addr6_out));
- addr6_out->sin6_family = AF_INET6;
+ addr6_out->sin6_family = GRPC_AF_INET6;
memcpy(&addr6_out->sin6_addr.s6_addr[0], kV4MappedPrefix, 12);
memcpy(&addr6_out->sin6_addr.s6_addr[12], &addr4->sin_addr, 4);
addr6_out->sin6_port = addr4->sin_port;
- resolved_addr6_out->len = sizeof(struct sockaddr_in6);
+ resolved_addr6_out->len = static_cast<socklen_t>(sizeof(grpc_sockaddr_in6));
return 1;
}
return 0;
@@ -89,32 +90,32 @@ int grpc_sockaddr_to_v4mapped(const grpc_resolved_address* resolved_addr,
int grpc_sockaddr_is_wildcard(const grpc_resolved_address* resolved_addr,
int* port_out) {
- const struct sockaddr* addr;
+ const grpc_sockaddr* addr;
grpc_resolved_address addr4_normalized;
if (grpc_sockaddr_is_v4mapped(resolved_addr, &addr4_normalized)) {
resolved_addr = &addr4_normalized;
}
- addr = reinterpret_cast<const struct sockaddr*>(resolved_addr->addr);
- if (addr->sa_family == AF_INET) {
+ addr = reinterpret_cast<const grpc_sockaddr*>(resolved_addr->addr);
+ if (addr->sa_family == GRPC_AF_INET) {
/* Check for 0.0.0.0 */
- const struct sockaddr_in* addr4 =
- reinterpret_cast<const struct sockaddr_in*>(addr);
+ const grpc_sockaddr_in* addr4 =
+ reinterpret_cast<const grpc_sockaddr_in*>(addr);
if (addr4->sin_addr.s_addr != 0) {
return 0;
}
- *port_out = ntohs(addr4->sin_port);
+ *port_out = grpc_ntohs(addr4->sin_port);
return 1;
- } else if (addr->sa_family == AF_INET6) {
+ } else if (addr->sa_family == GRPC_AF_INET6) {
/* Check for :: */
- const struct sockaddr_in6* addr6 =
- reinterpret_cast<const struct sockaddr_in6*>(addr);
+ const grpc_sockaddr_in6* addr6 =
+ reinterpret_cast<const grpc_sockaddr_in6*>(addr);
int i;
for (i = 0; i < 16; i++) {
if (addr6->sin6_addr.s6_addr[i] != 0) {
return 0;
}
}
- *port_out = ntohs(addr6->sin6_port);
+ *port_out = grpc_ntohs(addr6->sin6_port);
return 1;
} else {
return 0;
@@ -129,33 +130,33 @@ void grpc_sockaddr_make_wildcards(int port, grpc_resolved_address* wild4_out,
void grpc_sockaddr_make_wildcard4(int port,
grpc_resolved_address* resolved_wild_out) {
- struct sockaddr_in* wild_out =
- reinterpret_cast<struct sockaddr_in*>(resolved_wild_out->addr);
+ grpc_sockaddr_in* wild_out =
+ reinterpret_cast<grpc_sockaddr_in*>(resolved_wild_out->addr);
GPR_ASSERT(port >= 0 && port < 65536);
memset(resolved_wild_out, 0, sizeof(*resolved_wild_out));
- wild_out->sin_family = AF_INET;
- wild_out->sin_port = htons(static_cast<uint16_t>(port));
- resolved_wild_out->len = sizeof(struct sockaddr_in);
+ wild_out->sin_family = GRPC_AF_INET;
+ wild_out->sin_port = grpc_htons(static_cast<uint16_t>(port));
+ resolved_wild_out->len = static_cast<socklen_t>(sizeof(grpc_sockaddr_in));
}
void grpc_sockaddr_make_wildcard6(int port,
grpc_resolved_address* resolved_wild_out) {
- struct sockaddr_in6* wild_out =
- reinterpret_cast<struct sockaddr_in6*>(resolved_wild_out->addr);
+ grpc_sockaddr_in6* wild_out =
+ reinterpret_cast<grpc_sockaddr_in6*>(resolved_wild_out->addr);
GPR_ASSERT(port >= 0 && port < 65536);
memset(resolved_wild_out, 0, sizeof(*resolved_wild_out));
- wild_out->sin6_family = AF_INET6;
- wild_out->sin6_port = htons(static_cast<uint16_t>(port));
- resolved_wild_out->len = sizeof(struct sockaddr_in6);
+ wild_out->sin6_family = GRPC_AF_INET6;
+ wild_out->sin6_port = grpc_htons(static_cast<uint16_t>(port));
+ resolved_wild_out->len = static_cast<socklen_t>(sizeof(grpc_sockaddr_in6));
}
int grpc_sockaddr_to_string(char** out,
const grpc_resolved_address* resolved_addr,
int normalize) {
- const struct sockaddr* addr;
+ const grpc_sockaddr* addr;
const int save_errno = errno;
grpc_resolved_address addr_normalized;
- char ntop_buf[INET6_ADDRSTRLEN];
+ char ntop_buf[GRPC_INET6_ADDRSTRLEN];
const void* ip = nullptr;
int port = 0;
uint32_t sin6_scope_id = 0;
@@ -165,17 +166,17 @@ int grpc_sockaddr_to_string(char** out,
if (normalize && grpc_sockaddr_is_v4mapped(resolved_addr, &addr_normalized)) {
resolved_addr = &addr_normalized;
}
- addr = reinterpret_cast<const struct sockaddr*>(resolved_addr->addr);
- if (addr->sa_family == AF_INET) {
- const struct sockaddr_in* addr4 =
- reinterpret_cast<const struct sockaddr_in*>(addr);
+ addr = reinterpret_cast<const grpc_sockaddr*>(resolved_addr->addr);
+ if (addr->sa_family == GRPC_AF_INET) {
+ const grpc_sockaddr_in* addr4 =
+ reinterpret_cast<const grpc_sockaddr_in*>(addr);
ip = &addr4->sin_addr;
- port = ntohs(addr4->sin_port);
- } else if (addr->sa_family == AF_INET6) {
- const struct sockaddr_in6* addr6 =
- reinterpret_cast<const struct sockaddr_in6*>(addr);
+ port = grpc_ntohs(addr4->sin_port);
+ } else if (addr->sa_family == GRPC_AF_INET6) {
+ const grpc_sockaddr_in6* addr6 =
+ reinterpret_cast<const grpc_sockaddr_in6*>(addr);
ip = &addr6->sin6_addr;
- port = ntohs(addr6->sin6_port);
+ port = grpc_ntohs(addr6->sin6_port);
sin6_scope_id = addr6->sin6_scope_id;
}
if (ip != nullptr && grpc_inet_ntop(addr->sa_family, ip, ntop_buf,
@@ -197,6 +198,22 @@ int grpc_sockaddr_to_string(char** out,
return ret;
}
+void grpc_string_to_sockaddr(grpc_resolved_address* out, char* addr, int port) {
+ grpc_sockaddr_in6* addr6 = (grpc_sockaddr_in6*)out->addr;
+ grpc_sockaddr_in* addr4 = (grpc_sockaddr_in*)out->addr;
+
+ if (grpc_inet_pton(GRPC_AF_INET6, addr, &addr6->sin6_addr) == 1) {
+ addr6->sin6_family = GRPC_AF_INET6;
+ out->len = sizeof(grpc_sockaddr_in6);
+ } else if (grpc_inet_pton(GRPC_AF_INET, addr, &addr4->sin_addr) == 1) {
+ addr4->sin_family = GRPC_AF_INET;
+ out->len = sizeof(grpc_sockaddr_in);
+ } else {
+ GPR_ASSERT(0);
+ }
+ grpc_sockaddr_set_port(out, port);
+}
+
char* grpc_sockaddr_to_uri(const grpc_resolved_address* resolved_addr) {
grpc_resolved_address addr_normalized;
if (grpc_sockaddr_is_v4mapped(resolved_addr, &addr_normalized)) {
@@ -219,33 +236,33 @@ char* grpc_sockaddr_to_uri(const grpc_resolved_address* resolved_addr) {
const char* grpc_sockaddr_get_uri_scheme(
const grpc_resolved_address* resolved_addr) {
- const struct sockaddr* addr =
- reinterpret_cast<const struct sockaddr*>(resolved_addr->addr);
+ const grpc_sockaddr* addr =
+ reinterpret_cast<const grpc_sockaddr*>(resolved_addr->addr);
switch (addr->sa_family) {
- case AF_INET:
+ case GRPC_AF_INET:
return "ipv4";
- case AF_INET6:
+ case GRPC_AF_INET6:
return "ipv6";
- case AF_UNIX:
+ case GRPC_AF_UNIX:
return "unix";
}
return nullptr;
}
int grpc_sockaddr_get_family(const grpc_resolved_address* resolved_addr) {
- const struct sockaddr* addr =
- reinterpret_cast<const struct sockaddr*>(resolved_addr->addr);
+ const grpc_sockaddr* addr =
+ reinterpret_cast<const grpc_sockaddr*>(resolved_addr->addr);
return addr->sa_family;
}
int grpc_sockaddr_get_port(const grpc_resolved_address* resolved_addr) {
- const struct sockaddr* addr =
- reinterpret_cast<const struct sockaddr*>(resolved_addr->addr);
+ const grpc_sockaddr* addr =
+ reinterpret_cast<const grpc_sockaddr*>(resolved_addr->addr);
switch (addr->sa_family) {
- case AF_INET:
- return ntohs(((struct sockaddr_in*)addr)->sin_port);
- case AF_INET6:
- return ntohs(((struct sockaddr_in6*)addr)->sin6_port);
+ case GRPC_AF_INET:
+ return grpc_ntohs(((grpc_sockaddr_in*)addr)->sin_port);
+ case GRPC_AF_INET6:
+ return grpc_ntohs(((grpc_sockaddr_in6*)addr)->sin6_port);
default:
if (grpc_is_unix_socket(resolved_addr)) {
return 1;
@@ -258,18 +275,18 @@ int grpc_sockaddr_get_port(const grpc_resolved_address* resolved_addr) {
int grpc_sockaddr_set_port(const grpc_resolved_address* resolved_addr,
int port) {
- const struct sockaddr* addr =
- reinterpret_cast<const struct sockaddr*>(resolved_addr->addr);
+ const grpc_sockaddr* addr =
+ reinterpret_cast<const grpc_sockaddr*>(resolved_addr->addr);
switch (addr->sa_family) {
- case AF_INET:
+ case GRPC_AF_INET:
GPR_ASSERT(port >= 0 && port < 65536);
- ((struct sockaddr_in*)addr)->sin_port =
- htons(static_cast<uint16_t>(port));
+ ((grpc_sockaddr_in*)addr)->sin_port =
+ grpc_htons(static_cast<uint16_t>(port));
return 1;
- case AF_INET6:
+ case GRPC_AF_INET6:
GPR_ASSERT(port >= 0 && port < 65536);
- ((struct sockaddr_in6*)addr)->sin6_port =
- htons(static_cast<uint16_t>(port));
+ ((grpc_sockaddr_in6*)addr)->sin6_port =
+ grpc_htons(static_cast<uint16_t>(port));
return 1;
default:
gpr_log(GPR_ERROR, "Unknown socket family %d in grpc_sockaddr_set_port",
diff --git a/src/core/lib/iomgr/sockaddr_utils.h b/src/core/lib/iomgr/sockaddr_utils.h
index ace54a2a80..a4e90a73ab 100644
--- a/src/core/lib/iomgr/sockaddr_utils.h
+++ b/src/core/lib/iomgr/sockaddr_utils.h
@@ -71,6 +71,8 @@ int grpc_sockaddr_set_port(const grpc_resolved_address* addr, int port);
int grpc_sockaddr_to_string(char** out, const grpc_resolved_address* addr,
int normalize);
+void grpc_string_to_sockaddr(grpc_resolved_address* out, char* addr, int port);
+
/* Returns the URI string corresponding to \a addr */
char* grpc_sockaddr_to_uri(const grpc_resolved_address* addr);
diff --git a/src/core/lib/iomgr/sockaddr_windows.h b/src/core/lib/iomgr/sockaddr_windows.h
index 3a4fcc9e8a..4d637251a1 100644
--- a/src/core/lib/iomgr/sockaddr_windows.h
+++ b/src/core/lib/iomgr/sockaddr_windows.h
@@ -31,6 +31,25 @@
// must be included after the above
#include <mswsock.h>
+typedef struct sockaddr grpc_sockaddr;
+typedef struct sockaddr_in grpc_sockaddr_in;
+typedef struct in_addr grpc_in_addr;
+typedef struct sockaddr_in6 grpc_sockaddr_in6;
+typedef struct in6_addr grpc_in6_addr;
+
+#define GRPC_INET_ADDRSTRLEN INET_ADDRSTRLEN
+#define GRPC_INET6_ADDRSTRLEN INET6_ADDRSTRLEN
+
+#define GRPC_SOCK_STREAM SOCK_STREAM
+#define GRPC_SOCK_DGRAM SOCK_DGRAM
+
+#define GRPC_AF_UNSPEC AF_UNSPEC
+#define GRPC_AF_UNIX AF_UNIX
+#define GRPC_AF_INET AF_INET
+#define GRPC_AF_INET6 AF_INET6
+
+#define GRPC_AI_PASSIVE AI_PASSIVE
+
#endif
#endif /* GRPC_CORE_LIB_IOMGR_SOCKADDR_WINDOWS_H */
diff --git a/src/core/lib/iomgr/socket_utils.h b/src/core/lib/iomgr/socket_utils.h
index e96eb97a7e..cf1a7be648 100644
--- a/src/core/lib/iomgr/socket_utils.h
+++ b/src/core/lib/iomgr/socket_utils.h
@@ -23,6 +23,15 @@
#include <stddef.h>
+/* A wrapper for htons on POSIX and Windows */
+uint16_t grpc_htons(uint16_t hostshort);
+
+/* A wrapper for ntohs on POSIX and WINDOWS */
+uint16_t grpc_ntohs(uint16_t netshort);
+
+/* A wrapper for inet_pton on POSIX and WINDOWS */
+int grpc_inet_pton(int af, const char* src, void* dst);
+
/* A wrapper for inet_ntop on POSIX systems and InetNtop on Windows systems */
const char* grpc_inet_ntop(int af, const void* src, char* dst, size_t size);
diff --git a/src/core/lib/iomgr/socket_utils_common_posix.cc b/src/core/lib/iomgr/socket_utils_common_posix.cc
index 4fb6c7ad63..c52e237fa8 100644
--- a/src/core/lib/iomgr/socket_utils_common_posix.cc
+++ b/src/core/lib/iomgr/socket_utils_common_posix.cc
@@ -43,6 +43,7 @@
#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
+#include "src/core/lib/iomgr/sockaddr.h"
#include "src/core/lib/iomgr/sockaddr_utils.h"
/* set a socket to non blocking mode */
@@ -215,12 +216,11 @@ static void probe_ipv6_once(void) {
if (fd < 0) {
gpr_log(GPR_INFO, "Disabling AF_INET6 sockets because socket() failed.");
} else {
- struct sockaddr_in6 addr;
+ grpc_sockaddr_in6 addr;
memset(&addr, 0, sizeof(addr));
addr.sin6_family = AF_INET6;
addr.sin6_addr.s6_addr[15] = 1; /* [::1]:0 */
- if (bind(fd, reinterpret_cast<struct sockaddr*>(&addr), sizeof(addr)) ==
- 0) {
+ if (bind(fd, reinterpret_cast<grpc_sockaddr*>(&addr), sizeof(addr)) == 0) {
g_ipv6_loopback_available = 1;
} else {
gpr_log(GPR_INFO,
@@ -280,8 +280,8 @@ static int create_socket(grpc_socket_factory* factory, int domain, int type,
grpc_error* grpc_create_dualstack_socket_using_factory(
grpc_socket_factory* factory, const grpc_resolved_address* resolved_addr,
int type, int protocol, grpc_dualstack_mode* dsmode, int* newfd) {
- const struct sockaddr* addr =
- reinterpret_cast<const struct sockaddr*>(resolved_addr->addr);
+ const grpc_sockaddr* addr =
+ reinterpret_cast<const grpc_sockaddr*>(resolved_addr->addr);
int family = addr->sa_family;
if (family == AF_INET6) {
if (grpc_ipv6_loopback_available()) {
@@ -311,6 +311,14 @@ grpc_error* grpc_create_dualstack_socket_using_factory(
return error_for_fd(*newfd, resolved_addr);
}
+uint16_t grpc_htons(uint16_t hostshort) { return htons(hostshort); }
+
+uint16_t grpc_ntohs(uint16_t netshort) { return ntohs(netshort); }
+
+int grpc_inet_pton(int af, const char* src, void* dst) {
+ return inet_pton(af, src, dst);
+}
+
const char* grpc_inet_ntop(int af, const void* src, char* dst, size_t size) {
GPR_ASSERT(size <= (socklen_t)-1);
return inet_ntop(af, src, dst, static_cast<socklen_t>(size));
diff --git a/src/core/lib/iomgr/socket_utils_linux.cc b/src/core/lib/iomgr/socket_utils_linux.cc
index deb7c55267..f506329f97 100644
--- a/src/core/lib/iomgr/socket_utils_linux.cc
+++ b/src/core/lib/iomgr/socket_utils_linux.cc
@@ -37,9 +37,8 @@ int grpc_accept4(int sockfd, grpc_resolved_address* resolved_addr, int nonblock,
GPR_ASSERT(resolved_addr->len <= (socklen_t)-1);
flags |= nonblock ? SOCK_NONBLOCK : 0;
flags |= cloexec ? SOCK_CLOEXEC : 0;
- return accept4(sockfd,
- reinterpret_cast<struct sockaddr*>(resolved_addr->addr),
- reinterpret_cast<socklen_t*>(&resolved_addr->len), flags);
+ return accept4(sockfd, reinterpret_cast<grpc_sockaddr*>(resolved_addr->addr),
+ &resolved_addr->len, flags);
}
#endif
diff --git a/src/core/lib/iomgr/socket_utils_posix.cc b/src/core/lib/iomgr/socket_utils_posix.cc
index c856f641e3..d5d00af976 100644
--- a/src/core/lib/iomgr/socket_utils_posix.cc
+++ b/src/core/lib/iomgr/socket_utils_posix.cc
@@ -36,7 +36,7 @@ int grpc_accept4(int sockfd, grpc_resolved_address* resolved_addr, int nonblock,
int fd, flags;
GPR_ASSERT(sizeof(socklen_t) <= sizeof(size_t));
GPR_ASSERT(resolved_addr->len <= (socklen_t)-1);
- fd = accept(sockfd, (struct sockaddr*)resolved_addr->addr,
+ fd = accept(sockfd, (grpc_sockaddr*)resolved_addr->addr,
(socklen_t*)&resolved_addr->len);
if (fd >= 0) {
if (nonblock) {
diff --git a/src/core/lib/iomgr/socket_utils_uv.cc b/src/core/lib/iomgr/socket_utils_uv.cc
index 3f650eef66..8538abc7e4 100644
--- a/src/core/lib/iomgr/socket_utils_uv.cc
+++ b/src/core/lib/iomgr/socket_utils_uv.cc
@@ -22,15 +22,24 @@
#ifdef GRPC_UV
-#include <uv.h>
-
+#include "src/core/lib/iomgr/sockaddr.h"
#include "src/core/lib/iomgr/socket_utils.h"
#include <grpc/support/log.h>
+#include <uv.h>
+
+uint16_t grpc_htons(uint16_t hostshort) { return htons(hostshort); }
+
+uint16_t grpc_ntohs(uint16_t netshort) { return ntohs(netshort); }
+
+int grpc_inet_pton(int af, const char* src, void* dst) {
+ return inet_pton(af, src, dst);
+}
+
const char* grpc_inet_ntop(int af, const void* src, char* dst, size_t size) {
- uv_inet_ntop(af, src, dst, size);
- return dst;
+ /* Windows InetNtopA wants a mutable ip pointer */
+ return inet_ntop(af, src, dst, (socklen_t)size);
}
#endif /* GRPC_UV */
diff --git a/src/core/lib/iomgr/socket_utils_windows.cc b/src/core/lib/iomgr/socket_utils_windows.cc
index 5fc3b7617e..3e7b5b812d 100644
--- a/src/core/lib/iomgr/socket_utils_windows.cc
+++ b/src/core/lib/iomgr/socket_utils_windows.cc
@@ -27,6 +27,14 @@
#include <grpc/support/log.h>
+uint16_t grpc_htons(uint16_t hostshort) { return htons(hostshort); }
+
+uint16_t grpc_ntohs(uint16_t netshort) { return ntohs(netshort); }
+
+int grpc_inet_pton(int af, const char* src, void* dst) {
+ return inet_pton(af, src, dst);
+}
+
const char* grpc_inet_ntop(int af, const void* src, char* dst, size_t size) {
/* Windows InetNtopA wants a mutable ip pointer */
return InetNtopA(af, (void*)src, dst, size);
diff --git a/src/core/lib/iomgr/socket_windows.h b/src/core/lib/iomgr/socket_windows.h
index 3ff2c307e2..7bd01eded5 100644
--- a/src/core/lib/iomgr/socket_windows.h
+++ b/src/core/lib/iomgr/socket_windows.h
@@ -29,7 +29,7 @@
#include <grpc/support/atm.h>
#include <grpc/support/sync.h>
-#include "src/core/lib/iomgr/exec_ctx.h"
+#include "src/core/lib/iomgr/closure.h"
#include "src/core/lib/iomgr/iomgr_internal.h"
/* This holds the data for an outstanding read or write on a socket.
diff --git a/src/core/lib/iomgr/tcp_client.cc b/src/core/lib/iomgr/tcp_client.cc
new file mode 100644
index 0000000000..6c0ba40781
--- /dev/null
+++ b/src/core/lib/iomgr/tcp_client.cc
@@ -0,0 +1,36 @@
+/*
+ *
+ * Copyright 2018 gRPC authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <grpc/support/port_platform.h>
+
+#include "src/core/lib/iomgr/tcp_client.h"
+
+grpc_tcp_client_vtable* grpc_tcp_client_impl;
+
+void grpc_tcp_client_connect(grpc_closure* closure, grpc_endpoint** ep,
+ grpc_pollset_set* interested_parties,
+ const grpc_channel_args* channel_args,
+ const grpc_resolved_address* addr,
+ grpc_millis deadline) {
+ grpc_tcp_client_impl->connect(closure, ep, interested_parties, channel_args,
+ addr, deadline);
+}
+
+void grpc_set_tcp_client_impl(grpc_tcp_client_vtable* impl) {
+ grpc_tcp_client_impl = impl;
+}
diff --git a/src/core/lib/iomgr/tcp_client.h b/src/core/lib/iomgr/tcp_client.h
index a6b99e63c2..d209eeb8c2 100644
--- a/src/core/lib/iomgr/tcp_client.h
+++ b/src/core/lib/iomgr/tcp_client.h
@@ -27,6 +27,13 @@
#include "src/core/lib/iomgr/pollset_set.h"
#include "src/core/lib/iomgr/resolve_address.h"
+typedef struct grpc_tcp_client_vtable {
+ void (*connect)(grpc_closure* on_connect, grpc_endpoint** endpoint,
+ grpc_pollset_set* interested_parties,
+ const grpc_channel_args* channel_args,
+ const grpc_resolved_address* addr, grpc_millis deadline);
+} grpc_tcp_client_vtable;
+
/* Asynchronously connect to an address (specified as (addr, len)), and call
cb with arg and the completed connection when done (or call cb with arg and
NULL on failure).
@@ -38,4 +45,8 @@ void grpc_tcp_client_connect(grpc_closure* on_connect, grpc_endpoint** endpoint,
const grpc_resolved_address* addr,
grpc_millis deadline);
+void grpc_tcp_client_global_init();
+
+void grpc_set_tcp_client_impl(grpc_tcp_client_vtable* impl);
+
#endif /* GRPC_CORE_LIB_IOMGR_TCP_CLIENT_H */
diff --git a/src/core/lib/iomgr/tcp_client_custom.cc b/src/core/lib/iomgr/tcp_client_custom.cc
new file mode 100644
index 0000000000..55632a55a1
--- /dev/null
+++ b/src/core/lib/iomgr/tcp_client_custom.cc
@@ -0,0 +1,151 @@
+/*
+ *
+ * Copyright 2018 gRPC authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <grpc/support/port_platform.h>
+
+#include "src/core/lib/iomgr/port.h"
+
+#include <string.h>
+
+#include <grpc/support/alloc.h>
+#include <grpc/support/log.h>
+
+#include "src/core/lib/iomgr/error.h"
+#include "src/core/lib/iomgr/iomgr_custom.h"
+#include "src/core/lib/iomgr/sockaddr_utils.h"
+#include "src/core/lib/iomgr/tcp_client.h"
+#include "src/core/lib/iomgr/tcp_custom.h"
+#include "src/core/lib/iomgr/timer.h"
+
+extern grpc_core::TraceFlag grpc_tcp_trace;
+extern grpc_socket_vtable* grpc_custom_socket_vtable;
+
+struct grpc_custom_tcp_connect {
+ grpc_custom_socket* socket;
+ grpc_timer alarm;
+ grpc_closure on_alarm;
+ grpc_closure* closure;
+ grpc_endpoint** endpoint;
+ int refs;
+ char* addr_name;
+ grpc_resource_quota* resource_quota;
+};
+
+static void custom_tcp_connect_cleanup(grpc_custom_tcp_connect* connect) {
+ grpc_custom_socket* socket = connect->socket;
+ grpc_resource_quota_unref_internal(connect->resource_quota);
+ gpr_free(connect->addr_name);
+ gpr_free(connect);
+ socket->refs--;
+ if (socket->refs == 0) {
+ grpc_custom_socket_vtable->destroy(socket);
+ gpr_free(socket);
+ }
+}
+
+static void custom_close_callback(grpc_custom_socket* socket) {}
+
+static void on_alarm(void* acp, grpc_error* error) {
+ int done;
+ grpc_custom_socket* socket = (grpc_custom_socket*)acp;
+ grpc_custom_tcp_connect* connect = socket->connector;
+ if (grpc_tcp_trace.enabled()) {
+ const char* str = grpc_error_string(error);
+ gpr_log(GPR_DEBUG, "CLIENT_CONNECT: %s: on_alarm: error=%s",
+ connect->addr_name, str);
+ }
+ if (error == GRPC_ERROR_NONE) {
+ /* error == NONE implies that the timer ran out, and wasn't cancelled. If
+ it was cancelled, then the handler that cancelled it also should close
+ the handle, if applicable */
+ grpc_custom_socket_vtable->close(socket, custom_close_callback);
+ }
+ done = (--connect->refs == 0);
+ if (done) {
+ custom_tcp_connect_cleanup(connect);
+ }
+}
+
+static void custom_connect_callback(grpc_custom_socket* socket,
+ grpc_error* error) {
+ grpc_core::ExecCtx exec_ctx;
+ grpc_custom_tcp_connect* connect = socket->connector;
+ int done;
+ grpc_closure* closure = connect->closure;
+ grpc_timer_cancel(&connect->alarm);
+ if (error == GRPC_ERROR_NONE) {
+ *connect->endpoint = custom_tcp_endpoint_create(
+ socket, connect->resource_quota, connect->addr_name);
+ }
+ done = (--connect->refs == 0);
+ if (done) {
+ grpc_core::ExecCtx::Get()->Flush();
+ custom_tcp_connect_cleanup(connect);
+ }
+ GRPC_CLOSURE_SCHED(closure, error);
+}
+
+static void tcp_connect(grpc_closure* closure, grpc_endpoint** ep,
+ grpc_pollset_set* interested_parties,
+ const grpc_channel_args* channel_args,
+ const grpc_resolved_address* resolved_addr,
+ grpc_millis deadline) {
+ GRPC_CUSTOM_IOMGR_ASSERT_SAME_THREAD();
+ (void)channel_args;
+ (void)interested_parties;
+ grpc_custom_tcp_connect* connect;
+ grpc_resource_quota* resource_quota = grpc_resource_quota_create(nullptr);
+ if (channel_args != nullptr) {
+ for (size_t i = 0; i < channel_args->num_args; i++) {
+ if (0 == strcmp(channel_args->args[i].key, GRPC_ARG_RESOURCE_QUOTA)) {
+ grpc_resource_quota_unref_internal(resource_quota);
+ resource_quota = grpc_resource_quota_ref_internal(
+ (grpc_resource_quota*)channel_args->args[i].value.pointer.p);
+ }
+ }
+ }
+ grpc_custom_socket* socket =
+ (grpc_custom_socket*)gpr_malloc(sizeof(grpc_custom_socket));
+ socket->refs = 2;
+ grpc_custom_socket_vtable->init(socket, GRPC_AF_UNSPEC);
+ connect =
+ (grpc_custom_tcp_connect*)gpr_malloc(sizeof(grpc_custom_tcp_connect));
+ connect->closure = closure;
+ connect->endpoint = ep;
+ connect->addr_name = grpc_sockaddr_to_uri(resolved_addr);
+ connect->resource_quota = resource_quota;
+ connect->socket = socket;
+ socket->connector = connect;
+ socket->endpoint = nullptr;
+ socket->listener = nullptr;
+ connect->refs = 2;
+
+ if (grpc_tcp_trace.enabled()) {
+ gpr_log(GPR_DEBUG, "CLIENT_CONNECT: %p %s: asynchronously connecting",
+ socket, connect->addr_name);
+ }
+
+ grpc_custom_socket_vtable->connect(
+ socket, (const grpc_sockaddr*)resolved_addr->addr, resolved_addr->len,
+ custom_connect_callback);
+ GRPC_CLOSURE_INIT(&connect->on_alarm, on_alarm, socket,
+ grpc_schedule_on_exec_ctx);
+ grpc_timer_init(&connect->alarm, deadline, &connect->on_alarm);
+}
+
+grpc_tcp_client_vtable custom_tcp_client_vtable = {tcp_connect};
diff --git a/src/core/lib/iomgr/tcp_client_posix.cc b/src/core/lib/iomgr/tcp_client_posix.cc
index 3fe2989c6b..9f19b833da 100644
--- a/src/core/lib/iomgr/tcp_client_posix.cc
+++ b/src/core/lib/iomgr/tcp_client_posix.cc
@@ -38,6 +38,7 @@
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/iomgr/ev_posix.h"
#include "src/core/lib/iomgr/iomgr_posix.h"
+#include "src/core/lib/iomgr/sockaddr.h"
#include "src/core/lib/iomgr/sockaddr_utils.h"
#include "src/core/lib/iomgr/socket_mutator.h"
#include "src/core/lib/iomgr/socket_utils_posix.h"
@@ -292,9 +293,8 @@ void grpc_tcp_client_create_from_prepared_fd(
int err;
async_connect* ac;
do {
- GPR_ASSERT(addr->len < ~(socklen_t)0);
- err = connect(fd, reinterpret_cast<const struct sockaddr*>(addr->addr),
- static_cast<socklen_t>(addr->len));
+ err = connect(fd, reinterpret_cast<const grpc_sockaddr*>(addr->addr),
+ addr->len);
} while (err < 0 && errno == EINTR);
if (err >= 0) {
char* addr_str = grpc_sockaddr_to_uri(addr);
@@ -336,11 +336,11 @@ void grpc_tcp_client_create_from_prepared_fd(
gpr_mu_unlock(&ac->mu);
}
-static void tcp_client_connect_impl(grpc_closure* closure, grpc_endpoint** ep,
- grpc_pollset_set* interested_parties,
- const grpc_channel_args* channel_args,
- const grpc_resolved_address* addr,
- grpc_millis deadline) {
+static void tcp_connect(grpc_closure* closure, grpc_endpoint** ep,
+ grpc_pollset_set* interested_parties,
+ const grpc_channel_args* channel_args,
+ const grpc_resolved_address* addr,
+ grpc_millis deadline) {
grpc_resolved_address mapped_addr;
grpc_fd* fdobj = nullptr;
grpc_error* error;
@@ -355,20 +355,5 @@ static void tcp_client_connect_impl(grpc_closure* closure, grpc_endpoint** ep,
ep);
}
-// overridden by api_fuzzer.c
-void (*grpc_tcp_client_connect_impl)(
- grpc_closure* closure, grpc_endpoint** ep,
- grpc_pollset_set* interested_parties, const grpc_channel_args* channel_args,
- const grpc_resolved_address* addr,
- grpc_millis deadline) = tcp_client_connect_impl;
-
-void grpc_tcp_client_connect(grpc_closure* closure, grpc_endpoint** ep,
- grpc_pollset_set* interested_parties,
- const grpc_channel_args* channel_args,
- const grpc_resolved_address* addr,
- grpc_millis deadline) {
- grpc_tcp_client_connect_impl(closure, ep, interested_parties, channel_args,
- addr, deadline);
-}
-
+grpc_tcp_client_vtable grpc_posix_tcp_client_vtable = {tcp_connect};
#endif
diff --git a/src/core/lib/iomgr/tcp_client_uv.cc b/src/core/lib/iomgr/tcp_client_uv.cc
deleted file mode 100644
index d29d6c8f41..0000000000
--- a/src/core/lib/iomgr/tcp_client_uv.cc
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
- *
- * Copyright 2016 gRPC authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include <grpc/support/port_platform.h>
-
-#include "src/core/lib/iomgr/port.h"
-
-#ifdef GRPC_UV
-
-#include <string.h>
-
-#include <grpc/support/alloc.h>
-#include <grpc/support/log.h>
-
-#include "src/core/lib/iomgr/error.h"
-#include "src/core/lib/iomgr/iomgr_uv.h"
-#include "src/core/lib/iomgr/sockaddr_utils.h"
-#include "src/core/lib/iomgr/tcp_client.h"
-#include "src/core/lib/iomgr/tcp_uv.h"
-#include "src/core/lib/iomgr/timer.h"
-
-extern grpc_core::TraceFlag grpc_tcp_trace;
-
-typedef struct grpc_uv_tcp_connect {
- uv_connect_t connect_req;
- grpc_timer alarm;
- grpc_closure on_alarm;
- uv_tcp_t* tcp_handle;
- grpc_closure* closure;
- grpc_endpoint** endpoint;
- int refs;
- char* addr_name;
- grpc_resource_quota* resource_quota;
-} grpc_uv_tcp_connect;
-
-static void uv_tcp_connect_cleanup(grpc_uv_tcp_connect* connect) {
- grpc_resource_quota_unref_internal(connect->resource_quota);
- gpr_free(connect->addr_name);
- gpr_free(connect);
-}
-
-static void tcp_close_callback(uv_handle_t* handle) { gpr_free(handle); }
-
-static void uv_tc_on_alarm(void* acp, grpc_error* error) {
- int done;
- grpc_uv_tcp_connect* connect = (grpc_uv_tcp_connect*)acp;
- if (grpc_tcp_trace.enabled()) {
- const char* str = grpc_error_string(error);
- gpr_log(GPR_DEBUG, "CLIENT_CONNECT: %s: on_alarm: error=%s",
- connect->addr_name, str);
- }
- if (error == GRPC_ERROR_NONE) {
- /* error == NONE implies that the timer ran out, and wasn't cancelled. If
- it was cancelled, then the handler that cancelled it also should close
- the handle, if applicable */
- uv_close((uv_handle_t*)connect->tcp_handle, tcp_close_callback);
- }
- done = (--connect->refs == 0);
- if (done) {
- uv_tcp_connect_cleanup(connect);
- }
-}
-
-static void uv_tc_on_connect(uv_connect_t* req, int status) {
- grpc_uv_tcp_connect* connect = (grpc_uv_tcp_connect*)req->data;
- grpc_core::ExecCtx exec_ctx;
- grpc_error* error = GRPC_ERROR_NONE;
- int done;
- grpc_closure* closure = connect->closure;
- grpc_timer_cancel(&connect->alarm);
- if (status == 0) {
- *connect->endpoint = grpc_tcp_create(
- connect->tcp_handle, connect->resource_quota, connect->addr_name);
- } else {
- error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "Failed to connect to remote host");
- error = grpc_error_set_int(error, GRPC_ERROR_INT_ERRNO, -status);
- error =
- grpc_error_set_str(error, GRPC_ERROR_STR_OS_ERROR,
- grpc_slice_from_static_string(uv_strerror(status)));
- if (status == UV_ECANCELED) {
- error =
- grpc_error_set_str(error, GRPC_ERROR_STR_OS_ERROR,
- grpc_slice_from_static_string("Timeout occurred"));
- // This should only happen if the handle is already closed
- } else {
- error = grpc_error_set_str(
- error, GRPC_ERROR_STR_OS_ERROR,
- grpc_slice_from_static_string(uv_strerror(status)));
- uv_close((uv_handle_t*)connect->tcp_handle, tcp_close_callback);
- }
- }
- done = (--connect->refs == 0);
- if (done) {
- grpc_core::ExecCtx::Get()->Flush();
- uv_tcp_connect_cleanup(connect);
- }
- GRPC_CLOSURE_SCHED(closure, error);
-}
-
-static void tcp_client_connect_impl(grpc_closure* closure, grpc_endpoint** ep,
- grpc_pollset_set* interested_parties,
- const grpc_channel_args* channel_args,
- const grpc_resolved_address* resolved_addr,
- grpc_millis deadline) {
- grpc_uv_tcp_connect* connect;
- grpc_resource_quota* resource_quota = grpc_resource_quota_create(NULL);
- (void)channel_args;
- (void)interested_parties;
-
- GRPC_UV_ASSERT_SAME_THREAD();
-
- if (channel_args != NULL) {
- for (size_t i = 0; i < channel_args->num_args; i++) {
- if (0 == strcmp(channel_args->args[i].key, GRPC_ARG_RESOURCE_QUOTA)) {
- grpc_resource_quota_unref_internal(resource_quota);
- resource_quota = grpc_resource_quota_ref_internal(
- (grpc_resource_quota*)channel_args->args[i].value.pointer.p);
- }
- }
- }
-
- connect = (grpc_uv_tcp_connect*)gpr_zalloc(sizeof(grpc_uv_tcp_connect));
- connect->closure = closure;
- connect->endpoint = ep;
- connect->tcp_handle = (uv_tcp_t*)gpr_malloc(sizeof(uv_tcp_t));
- connect->addr_name = grpc_sockaddr_to_uri(resolved_addr);
- connect->resource_quota = resource_quota;
- uv_tcp_init(uv_default_loop(), connect->tcp_handle);
- connect->connect_req.data = connect;
- connect->refs = 2; // One for the connect operation, one for the timer.
-
- if (grpc_tcp_trace.enabled()) {
- gpr_log(GPR_DEBUG, "CLIENT_CONNECT: %s: asynchronously connecting",
- connect->addr_name);
- }
-
- // TODO(murgatroid99): figure out what the return value here means
- uv_tcp_connect(&connect->connect_req, connect->tcp_handle,
- (const struct sockaddr*)resolved_addr->addr, uv_tc_on_connect);
- GRPC_CLOSURE_INIT(&connect->on_alarm, uv_tc_on_alarm, connect,
- grpc_schedule_on_exec_ctx);
- grpc_timer_init(&connect->alarm, deadline, &connect->on_alarm);
-}
-
-// overridden by api_fuzzer.c
-void (*grpc_tcp_client_connect_impl)(
- grpc_closure* closure, grpc_endpoint** ep,
- grpc_pollset_set* interested_parties, const grpc_channel_args* channel_args,
- const grpc_resolved_address* addr,
- grpc_millis deadline) = tcp_client_connect_impl;
-
-void grpc_tcp_client_connect(grpc_closure* closure, grpc_endpoint** ep,
- grpc_pollset_set* interested_parties,
- const grpc_channel_args* channel_args,
- const grpc_resolved_address* addr,
- grpc_millis deadline) {
- grpc_tcp_client_connect_impl(closure, ep, interested_parties, channel_args,
- addr, deadline);
-}
-
-#endif /* GRPC_UV */
diff --git a/src/core/lib/iomgr/tcp_client_windows.cc b/src/core/lib/iomgr/tcp_client_windows.cc
index 70c2495350..e5b5502597 100644
--- a/src/core/lib/iomgr/tcp_client_windows.cc
+++ b/src/core/lib/iomgr/tcp_client_windows.cc
@@ -122,12 +122,11 @@ static void on_connect(void* acp, grpc_error* error) {
/* Tries to issue one async connection, then schedules both an IOCP
notification request for the connection, and one timeout alert. */
-static void tcp_client_connect_impl(grpc_closure* on_done,
- grpc_endpoint** endpoint,
- grpc_pollset_set* interested_parties,
- const grpc_channel_args* channel_args,
- const grpc_resolved_address* addr,
- grpc_millis deadline) {
+static void tcp_connect(grpc_closure* on_done, grpc_endpoint** endpoint,
+ grpc_pollset_set* interested_parties,
+ const grpc_channel_args* channel_args,
+ const grpc_resolved_address* addr,
+ grpc_millis deadline) {
SOCKET sock = INVALID_SOCKET;
BOOL success;
int status;
@@ -175,7 +174,7 @@ static void tcp_client_connect_impl(grpc_closure* on_done,
grpc_sockaddr_make_wildcard6(0, &local_address);
status =
- bind(sock, (struct sockaddr*)&local_address.addr, (int)local_address.len);
+ bind(sock, (grpc_sockaddr*)&local_address.addr, (int)local_address.len);
if (status != 0) {
error = GRPC_WSA_ERROR(WSAGetLastError(), "bind");
goto failure;
@@ -183,7 +182,7 @@ static void tcp_client_connect_impl(grpc_closure* on_done,
socket = grpc_winsocket_create(sock, "client");
info = &socket->write_info;
- success = ConnectEx(sock, (struct sockaddr*)&addr->addr, (int)addr->len, NULL,
+ success = ConnectEx(sock, (grpc_sockaddr*)&addr->addr, (int)addr->len, NULL,
0, NULL, &info->overlapped);
/* It wouldn't be unusual to get a success immediately. But we'll still get
@@ -227,20 +226,6 @@ failure:
GRPC_CLOSURE_SCHED(on_done, final_error);
}
-// overridden by api_fuzzer.c
-void (*grpc_tcp_client_connect_impl)(
- grpc_closure* closure, grpc_endpoint** ep,
- grpc_pollset_set* interested_parties, const grpc_channel_args* channel_args,
- const grpc_resolved_address* addr,
- grpc_millis deadline) = tcp_client_connect_impl;
-
-void grpc_tcp_client_connect(grpc_closure* closure, grpc_endpoint** ep,
- grpc_pollset_set* interested_parties,
- const grpc_channel_args* channel_args,
- const grpc_resolved_address* addr,
- grpc_millis deadline) {
- grpc_tcp_client_connect_impl(closure, ep, interested_parties, channel_args,
- addr, deadline);
-}
+grpc_tcp_client_vtable grpc_windows_tcp_client_vtable = {tcp_connect};
#endif /* GRPC_WINSOCK_SOCKET */
diff --git a/src/core/lib/iomgr/tcp_custom.cc b/src/core/lib/iomgr/tcp_custom.cc
new file mode 100644
index 0000000000..2b1fc93028
--- /dev/null
+++ b/src/core/lib/iomgr/tcp_custom.cc
@@ -0,0 +1,365 @@
+/*
+ *
+ * Copyright 2018 gRPC authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <grpc/support/port_platform.h>
+
+#include "src/core/lib/iomgr/port.h"
+
+#include <limits.h>
+#include <string.h>
+
+#include <grpc/slice_buffer.h>
+
+#include <grpc/support/alloc.h>
+#include <grpc/support/log.h>
+#include <grpc/support/string_util.h>
+
+#include "src/core/lib/iomgr/error.h"
+#include "src/core/lib/iomgr/iomgr_custom.h"
+#include "src/core/lib/iomgr/network_status_tracker.h"
+#include "src/core/lib/iomgr/resource_quota.h"
+#include "src/core/lib/iomgr/tcp_client.h"
+#include "src/core/lib/iomgr/tcp_custom.h"
+#include "src/core/lib/iomgr/tcp_server.h"
+#include "src/core/lib/slice/slice_internal.h"
+#include "src/core/lib/slice/slice_string_helpers.h"
+
+#define GRPC_TCP_DEFAULT_READ_SLICE_SIZE 8192
+
+extern grpc_core::TraceFlag grpc_tcp_trace;
+
+grpc_socket_vtable* grpc_custom_socket_vtable = nullptr;
+extern grpc_tcp_server_vtable custom_tcp_server_vtable;
+extern grpc_tcp_client_vtable custom_tcp_client_vtable;
+
+void grpc_custom_endpoint_init(grpc_socket_vtable* impl) {
+ grpc_custom_socket_vtable = impl;
+ grpc_set_tcp_client_impl(&custom_tcp_client_vtable);
+ grpc_set_tcp_server_impl(&custom_tcp_server_vtable);
+}
+
+typedef struct {
+ grpc_endpoint base;
+ gpr_refcount refcount;
+ grpc_custom_socket* socket;
+
+ grpc_closure* read_cb;
+ grpc_closure* write_cb;
+
+ grpc_slice_buffer* read_slices;
+ grpc_slice_buffer* write_slices;
+
+ grpc_resource_user* resource_user;
+ grpc_resource_user_slice_allocator slice_allocator;
+
+ bool shutting_down;
+
+ char* peer_string;
+} custom_tcp_endpoint;
+
+static void tcp_free(grpc_custom_socket* s) {
+ custom_tcp_endpoint* tcp = (custom_tcp_endpoint*)s->endpoint;
+ grpc_resource_user_unref(tcp->resource_user);
+ gpr_free(tcp->peer_string);
+ gpr_free(tcp);
+ s->refs--;
+ if (s->refs == 0) {
+ grpc_custom_socket_vtable->destroy(s);
+ gpr_free(s);
+ }
+}
+
+#ifndef NDEBUG
+#define TCP_UNREF(tcp, reason) tcp_unref((tcp), (reason), __FILE__, __LINE__)
+#define TCP_REF(tcp, reason) tcp_ref((tcp), (reason), __FILE__, __LINE__)
+static void tcp_unref(custom_tcp_endpoint* tcp, const char* reason,
+ const char* file, int line) {
+ if (grpc_tcp_trace.enabled()) {
+ gpr_atm val = gpr_atm_no_barrier_load(&tcp->refcount.count);
+ gpr_log(file, line, GPR_LOG_SEVERITY_ERROR,
+ "TCP unref %p : %s %" PRIdPTR " -> %" PRIdPTR, tcp->socket, reason,
+ val, val - 1);
+ }
+ if (gpr_unref(&tcp->refcount)) {
+ tcp_free(tcp->socket);
+ }
+}
+
+static void tcp_ref(custom_tcp_endpoint* tcp, const char* reason,
+ const char* file, int line) {
+ if (grpc_tcp_trace.enabled()) {
+ gpr_atm val = gpr_atm_no_barrier_load(&tcp->refcount.count);
+ gpr_log(file, line, GPR_LOG_SEVERITY_ERROR,
+ "TCP ref %p : %s %" PRIdPTR " -> %" PRIdPTR, tcp->socket, reason,
+ val, val + 1);
+ }
+ gpr_ref(&tcp->refcount);
+}
+#else
+#define TCP_UNREF(tcp, reason) tcp_unref((tcp))
+#define TCP_REF(tcp, reason) tcp_ref((tcp))
+static void tcp_unref(custom_tcp_endpoint* tcp) {
+ if (gpr_unref(&tcp->refcount)) {
+ tcp_free(tcp->socket);
+ }
+}
+
+static void tcp_ref(custom_tcp_endpoint* tcp) { gpr_ref(&tcp->refcount); }
+#endif
+
+static void call_read_cb(custom_tcp_endpoint* tcp, grpc_error* error) {
+ grpc_closure* cb = tcp->read_cb;
+ if (grpc_tcp_trace.enabled()) {
+ gpr_log(GPR_DEBUG, "TCP:%p call_cb %p %p:%p", tcp->socket, cb, cb->cb,
+ cb->cb_arg);
+ size_t i;
+ const char* str = grpc_error_string(error);
+ gpr_log(GPR_DEBUG, "read: error=%s", str);
+
+ for (i = 0; i < tcp->read_slices->count; i++) {
+ char* dump = grpc_dump_slice(tcp->read_slices->slices[i],
+ GPR_DUMP_HEX | GPR_DUMP_ASCII);
+ gpr_log(GPR_DEBUG, "READ %p (peer=%s): %s", tcp, tcp->peer_string, dump);
+ gpr_free(dump);
+ }
+ }
+ TCP_UNREF(tcp, "read");
+ tcp->read_slices = nullptr;
+ tcp->read_cb = nullptr;
+ GRPC_CLOSURE_RUN(cb, error);
+}
+
+static void custom_read_callback(grpc_custom_socket* socket, size_t nread,
+ grpc_error* error) {
+ grpc_core::ExecCtx exec_ctx;
+ grpc_slice_buffer garbage;
+ custom_tcp_endpoint* tcp = (custom_tcp_endpoint*)socket->endpoint;
+ if (error == GRPC_ERROR_NONE && nread == 0) {
+ error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("EOF");
+ }
+ if (error == GRPC_ERROR_NONE) {
+ // Successful read
+ if ((size_t)nread < tcp->read_slices->length) {
+ /* TODO(murgatroid99): Instead of discarding the unused part of the read
+ * buffer, reuse it as the next read buffer. */
+ grpc_slice_buffer_init(&garbage);
+ grpc_slice_buffer_trim_end(
+ tcp->read_slices, tcp->read_slices->length - (size_t)nread, &garbage);
+ grpc_slice_buffer_reset_and_unref_internal(&garbage);
+ }
+ } else {
+ grpc_slice_buffer_reset_and_unref_internal(tcp->read_slices);
+ }
+ call_read_cb(tcp, error);
+}
+
+static void tcp_read_allocation_done(void* tcpp, grpc_error* error) {
+ custom_tcp_endpoint* tcp = (custom_tcp_endpoint*)tcpp;
+ if (grpc_tcp_trace.enabled()) {
+ gpr_log(GPR_DEBUG, "TCP:%p read_allocation_done: %s", tcp->socket,
+ grpc_error_string(error));
+ }
+ if (error == GRPC_ERROR_NONE) {
+ /* Before calling read, we allocate a buffer with exactly one slice
+ * to tcp->read_slices and wait for the callback indicating that the
+ * allocation was successful. So slices[0] should always exist here */
+ char* buffer = (char*)GRPC_SLICE_START_PTR(tcp->read_slices->slices[0]);
+ size_t len = GRPC_SLICE_LENGTH(tcp->read_slices->slices[0]);
+ grpc_custom_socket_vtable->read(tcp->socket, buffer, len,
+ custom_read_callback);
+ } else {
+ grpc_slice_buffer_reset_and_unref_internal(tcp->read_slices);
+ call_read_cb(tcp, GRPC_ERROR_REF(error));
+ }
+ if (grpc_tcp_trace.enabled()) {
+ const char* str = grpc_error_string(error);
+ gpr_log(GPR_DEBUG, "Initiating read on %p: error=%s", tcp->socket, str);
+ }
+}
+
+static void endpoint_read(grpc_endpoint* ep, grpc_slice_buffer* read_slices,
+ grpc_closure* cb) {
+ custom_tcp_endpoint* tcp = (custom_tcp_endpoint*)ep;
+ GRPC_CUSTOM_IOMGR_ASSERT_SAME_THREAD();
+ GPR_ASSERT(tcp->read_cb == nullptr);
+ tcp->read_cb = cb;
+ tcp->read_slices = read_slices;
+ grpc_slice_buffer_reset_and_unref_internal(read_slices);
+ TCP_REF(tcp, "read");
+ grpc_resource_user_alloc_slices(&tcp->slice_allocator,
+ GRPC_TCP_DEFAULT_READ_SLICE_SIZE, 1,
+ tcp->read_slices);
+}
+
+static void custom_write_callback(grpc_custom_socket* socket,
+ grpc_error* error) {
+ grpc_core::ExecCtx exec_ctx;
+ custom_tcp_endpoint* tcp = (custom_tcp_endpoint*)socket->endpoint;
+ grpc_closure* cb = tcp->write_cb;
+ tcp->write_cb = nullptr;
+ if (grpc_tcp_trace.enabled()) {
+ const char* str = grpc_error_string(error);
+ gpr_log(GPR_DEBUG, "write complete on %p: error=%s", tcp->socket, str);
+ }
+ TCP_UNREF(tcp, "write");
+ GRPC_CLOSURE_SCHED(cb, error);
+}
+
+static void endpoint_write(grpc_endpoint* ep, grpc_slice_buffer* write_slices,
+ grpc_closure* cb) {
+ custom_tcp_endpoint* tcp = (custom_tcp_endpoint*)ep;
+ GRPC_CUSTOM_IOMGR_ASSERT_SAME_THREAD();
+
+ if (grpc_tcp_trace.enabled()) {
+ size_t j;
+
+ for (j = 0; j < write_slices->count; j++) {
+ char* data = grpc_dump_slice(write_slices->slices[j],
+ GPR_DUMP_HEX | GPR_DUMP_ASCII);
+ gpr_log(GPR_DEBUG, "WRITE %p (peer=%s): %s", tcp->socket,
+ tcp->peer_string, data);
+ gpr_free(data);
+ }
+ }
+
+ if (tcp->shutting_down) {
+ GRPC_CLOSURE_SCHED(cb, GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "TCP socket is shutting down"));
+ return;
+ }
+
+ GPR_ASSERT(tcp->write_cb == nullptr);
+ tcp->write_slices = write_slices;
+ GPR_ASSERT(tcp->write_slices->count <= UINT_MAX);
+ if (tcp->write_slices->count == 0) {
+ // No slices means we don't have to do anything,
+ // and libuv doesn't like empty writes
+ GRPC_CLOSURE_SCHED(cb, GRPC_ERROR_NONE);
+ return;
+ }
+ tcp->write_cb = cb;
+ TCP_REF(tcp, "write");
+ grpc_custom_socket_vtable->write(tcp->socket, tcp->write_slices,
+ custom_write_callback);
+}
+
+static void endpoint_add_to_pollset(grpc_endpoint* ep, grpc_pollset* pollset) {
+ // No-op. We're ignoring pollsets currently
+ (void)ep;
+ (void)pollset;
+}
+
+static void endpoint_add_to_pollset_set(grpc_endpoint* ep,
+ grpc_pollset_set* pollset) {
+ // No-op. We're ignoring pollsets currently
+ (void)ep;
+ (void)pollset;
+}
+
+static void endpoint_delete_from_pollset_set(grpc_endpoint* ep,
+ grpc_pollset_set* pollset) {
+ // No-op. We're ignoring pollsets currently
+ (void)ep;
+ (void)pollset;
+}
+
+static void endpoint_shutdown(grpc_endpoint* ep, grpc_error* why) {
+ custom_tcp_endpoint* tcp = (custom_tcp_endpoint*)ep;
+ if (!tcp->shutting_down) {
+ if (grpc_tcp_trace.enabled()) {
+ const char* str = grpc_error_string(why);
+ gpr_log(GPR_DEBUG, "TCP %p shutdown why=%s", tcp->socket, str);
+ }
+ tcp->shutting_down = true;
+ // GRPC_CLOSURE_SCHED(tcp->read_cb, GRPC_ERROR_REF(why));
+ // GRPC_CLOSURE_SCHED(tcp->write_cb, GRPC_ERROR_REF(why));
+ // tcp->read_cb = nullptr;
+ // tcp->write_cb = nullptr;
+ grpc_resource_user_shutdown(tcp->resource_user);
+ grpc_custom_socket_vtable->shutdown(tcp->socket);
+ }
+ GRPC_ERROR_UNREF(why);
+}
+
+static void custom_close_callback(grpc_custom_socket* socket) {
+ socket->refs--;
+ if (socket->refs == 0) {
+ grpc_custom_socket_vtable->destroy(socket);
+ gpr_free(socket);
+ } else if (socket->endpoint) {
+ grpc_core::ExecCtx exec_ctx;
+ custom_tcp_endpoint* tcp = (custom_tcp_endpoint*)socket->endpoint;
+ TCP_UNREF(tcp, "destroy");
+ }
+}
+
+static void endpoint_destroy(grpc_endpoint* ep) {
+ grpc_network_status_unregister_endpoint(ep);
+ custom_tcp_endpoint* tcp = (custom_tcp_endpoint*)ep;
+ grpc_custom_socket_vtable->close(tcp->socket, custom_close_callback);
+}
+
+static char* endpoint_get_peer(grpc_endpoint* ep) {
+ custom_tcp_endpoint* tcp = (custom_tcp_endpoint*)ep;
+ return gpr_strdup(tcp->peer_string);
+}
+
+static grpc_resource_user* endpoint_get_resource_user(grpc_endpoint* ep) {
+ custom_tcp_endpoint* tcp = (custom_tcp_endpoint*)ep;
+ return tcp->resource_user;
+}
+
+static int endpoint_get_fd(grpc_endpoint* ep) { return -1; }
+
+static grpc_endpoint_vtable vtable = {endpoint_read,
+ endpoint_write,
+ endpoint_add_to_pollset,
+ endpoint_add_to_pollset_set,
+ endpoint_delete_from_pollset_set,
+ endpoint_shutdown,
+ endpoint_destroy,
+ endpoint_get_resource_user,
+ endpoint_get_peer,
+ endpoint_get_fd};
+
+grpc_endpoint* custom_tcp_endpoint_create(grpc_custom_socket* socket,
+ grpc_resource_quota* resource_quota,
+ char* peer_string) {
+ custom_tcp_endpoint* tcp =
+ (custom_tcp_endpoint*)gpr_malloc(sizeof(custom_tcp_endpoint));
+ grpc_core::ExecCtx exec_ctx;
+
+ if (grpc_tcp_trace.enabled()) {
+ gpr_log(GPR_DEBUG, "Creating TCP endpoint %p", socket);
+ }
+ memset(tcp, 0, sizeof(custom_tcp_endpoint));
+ socket->refs++;
+ socket->endpoint = (grpc_endpoint*)tcp;
+ tcp->socket = socket;
+ tcp->base.vtable = &vtable;
+ gpr_ref_init(&tcp->refcount, 1);
+ tcp->peer_string = gpr_strdup(peer_string);
+ tcp->shutting_down = false;
+ tcp->resource_user = grpc_resource_user_create(resource_quota, peer_string);
+ grpc_resource_user_slice_allocator_init(
+ &tcp->slice_allocator, tcp->resource_user, tcp_read_allocation_done, tcp);
+ /* Tell network status tracking code about the new endpoint */
+ grpc_network_status_register_endpoint(&tcp->base);
+
+ return &tcp->base;
+}
diff --git a/src/core/lib/iomgr/tcp_custom.h b/src/core/lib/iomgr/tcp_custom.h
new file mode 100644
index 0000000000..22caa149f8
--- /dev/null
+++ b/src/core/lib/iomgr/tcp_custom.h
@@ -0,0 +1,83 @@
+/*
+ *
+ * Copyright 2018 gRPC authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef GRPC_CORE_LIB_IOMGR_TCP_CUSTOM_H
+#define GRPC_CORE_LIB_IOMGR_TCP_CUSTOM_H
+
+#include <grpc/support/port_platform.h>
+
+#include "src/core/lib/iomgr/endpoint.h"
+#include "src/core/lib/iomgr/sockaddr.h"
+
+typedef struct grpc_tcp_listener grpc_tcp_listener;
+typedef struct grpc_custom_tcp_connect grpc_custom_tcp_connect;
+
+typedef struct grpc_custom_socket {
+ // Implementation defined
+ void* impl;
+ grpc_endpoint* endpoint;
+ grpc_tcp_listener* listener;
+ grpc_custom_tcp_connect* connector;
+ int refs;
+} grpc_custom_socket;
+
+typedef void (*grpc_custom_connect_callback)(grpc_custom_socket* socket,
+ grpc_error* error);
+typedef void (*grpc_custom_write_callback)(grpc_custom_socket* socket,
+ grpc_error* error);
+typedef void (*grpc_custom_read_callback)(grpc_custom_socket* socket,
+ size_t nread, grpc_error* error);
+typedef void (*grpc_custom_accept_callback)(grpc_custom_socket* socket,
+ grpc_custom_socket* client,
+ grpc_error* error);
+typedef void (*grpc_custom_close_callback)(grpc_custom_socket* socket);
+
+typedef struct grpc_socket_vtable {
+ grpc_error* (*init)(grpc_custom_socket* socket, int domain);
+ void (*connect)(grpc_custom_socket* socket, const grpc_sockaddr* addr,
+ size_t len, grpc_custom_connect_callback cb);
+ void (*destroy)(grpc_custom_socket* socket);
+ void (*shutdown)(grpc_custom_socket* socket);
+ void (*close)(grpc_custom_socket* socket, grpc_custom_close_callback cb);
+ void (*write)(grpc_custom_socket* socket, grpc_slice_buffer* slices,
+ grpc_custom_write_callback cb);
+ void (*read)(grpc_custom_socket* socket, char* buffer, size_t length,
+ grpc_custom_read_callback cb);
+ grpc_error* (*getpeername)(grpc_custom_socket* socket,
+ const grpc_sockaddr* addr, int* len);
+ grpc_error* (*getsockname)(grpc_custom_socket* socket,
+ const grpc_sockaddr* addr, int* len);
+ grpc_error* (*setsockopt)(grpc_custom_socket* socket, int level, int optname,
+ const void* optval, uint32_t optlen);
+ grpc_error* (*bind)(grpc_custom_socket* socket, const grpc_sockaddr* addr,
+ size_t len, int flags);
+ grpc_error* (*listen)(grpc_custom_socket* socket);
+ void (*accept)(grpc_custom_socket* socket, grpc_custom_socket* client,
+ grpc_custom_accept_callback cb);
+} grpc_socket_vtable;
+
+/* Internal APIs */
+void grpc_custom_endpoint_init(grpc_socket_vtable* impl);
+
+void grpc_custom_close_server_callback(grpc_tcp_listener* listener);
+
+grpc_endpoint* custom_tcp_endpoint_create(grpc_custom_socket* socket,
+ grpc_resource_quota* resource_quota,
+ char* peer_string);
+
+#endif /* GRPC_CORE_LIB_IOMGR_TCP_CUSTOM_H */
diff --git a/src/core/lib/iomgr/tcp_posix.cc b/src/core/lib/iomgr/tcp_posix.cc
index ca0046b83b..205af22531 100644
--- a/src/core/lib/iomgr/tcp_posix.cc
+++ b/src/core/lib/iomgr/tcp_posix.cc
@@ -63,7 +63,7 @@ typedef GRPC_MSG_IOVLEN_TYPE msg_iovlen_type;
typedef size_t msg_iovlen_type;
#endif
-grpc_core::TraceFlag grpc_tcp_trace(false, "tcp");
+extern grpc_core::TraceFlag grpc_tcp_trace;
namespace {
struct grpc_tcp {
diff --git a/src/core/lib/iomgr/tcp_server.cc b/src/core/lib/iomgr/tcp_server.cc
new file mode 100644
index 0000000000..ea745f266b
--- /dev/null
+++ b/src/core/lib/iomgr/tcp_server.cc
@@ -0,0 +1,73 @@
+/*
+ *
+ * Copyright 2018 gRPC authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <grpc/support/port_platform.h>
+
+#include "src/core/lib/iomgr/tcp_server.h"
+
+grpc_tcp_server_vtable* grpc_tcp_server_impl;
+
+grpc_error* grpc_tcp_server_create(grpc_closure* shutdown_complete,
+ const grpc_channel_args* args,
+ grpc_tcp_server** server) {
+ return grpc_tcp_server_impl->create(shutdown_complete, args, server);
+}
+
+void grpc_tcp_server_start(grpc_tcp_server* server, grpc_pollset** pollsets,
+ size_t pollset_count,
+ grpc_tcp_server_cb on_accept_cb, void* cb_arg) {
+ grpc_tcp_server_impl->start(server, pollsets, pollset_count, on_accept_cb,
+ cb_arg);
+}
+
+grpc_error* grpc_tcp_server_add_port(grpc_tcp_server* s,
+ const grpc_resolved_address* addr,
+ int* out_port) {
+ return grpc_tcp_server_impl->add_port(s, addr, out_port);
+}
+
+unsigned grpc_tcp_server_port_fd_count(grpc_tcp_server* s,
+ unsigned port_index) {
+ return grpc_tcp_server_impl->port_fd_count(s, port_index);
+}
+
+int grpc_tcp_server_port_fd(grpc_tcp_server* s, unsigned port_index,
+ unsigned fd_index) {
+ return grpc_tcp_server_impl->port_fd(s, port_index, fd_index);
+}
+
+grpc_tcp_server* grpc_tcp_server_ref(grpc_tcp_server* s) {
+ return grpc_tcp_server_impl->ref(s);
+}
+
+void grpc_tcp_server_shutdown_starting_add(grpc_tcp_server* s,
+ grpc_closure* shutdown_starting) {
+ grpc_tcp_server_impl->shutdown_starting_add(s, shutdown_starting);
+}
+
+void grpc_tcp_server_unref(grpc_tcp_server* s) {
+ grpc_tcp_server_impl->unref(s);
+}
+
+void grpc_tcp_server_shutdown_listeners(grpc_tcp_server* s) {
+ grpc_tcp_server_impl->shutdown_listeners(s);
+}
+
+void grpc_set_tcp_server_impl(grpc_tcp_server_vtable* impl) {
+ grpc_tcp_server_impl = impl;
+}
diff --git a/src/core/lib/iomgr/tcp_server.h b/src/core/lib/iomgr/tcp_server.h
index 965d97407f..8fcbb2f680 100644
--- a/src/core/lib/iomgr/tcp_server.h
+++ b/src/core/lib/iomgr/tcp_server.h
@@ -45,6 +45,24 @@ typedef void (*grpc_tcp_server_cb)(void* arg, grpc_endpoint* ep,
grpc_pollset* accepting_pollset,
grpc_tcp_server_acceptor* acceptor);
+typedef struct grpc_tcp_server_vtable {
+ grpc_error* (*create)(grpc_closure* shutdown_complete,
+ const grpc_channel_args* args,
+ grpc_tcp_server** server);
+ void (*start)(grpc_tcp_server* server, grpc_pollset** pollsets,
+ size_t pollset_count, grpc_tcp_server_cb on_accept_cb,
+ void* cb_arg);
+ grpc_error* (*add_port)(grpc_tcp_server* s, const grpc_resolved_address* addr,
+ int* out_port);
+ unsigned (*port_fd_count)(grpc_tcp_server* s, unsigned port_index);
+ int (*port_fd)(grpc_tcp_server* s, unsigned port_index, unsigned fd_index);
+ grpc_tcp_server* (*ref)(grpc_tcp_server* s);
+ void (*shutdown_starting_add)(grpc_tcp_server* s,
+ grpc_closure* shutdown_starting);
+ void (*unref)(grpc_tcp_server* s);
+ void (*shutdown_listeners)(grpc_tcp_server* s);
+} grpc_tcp_server_vtable;
+
/* Create a server, initially not bound to any ports. The caller owns one ref.
If shutdown_complete is not NULL, it will be used by
grpc_tcp_server_unref() when the ref count reaches zero. */
@@ -97,4 +115,8 @@ void grpc_tcp_server_unref(grpc_tcp_server* s);
/* Shutdown the fds of listeners. */
void grpc_tcp_server_shutdown_listeners(grpc_tcp_server* s);
+void grpc_tcp_server_global_init();
+
+void grpc_set_tcp_server_impl(grpc_tcp_server_vtable* impl);
+
#endif /* GRPC_CORE_LIB_IOMGR_TCP_SERVER_H */
diff --git a/src/core/lib/iomgr/tcp_server_custom.cc b/src/core/lib/iomgr/tcp_server_custom.cc
new file mode 100644
index 0000000000..be92e61b62
--- /dev/null
+++ b/src/core/lib/iomgr/tcp_server_custom.cc
@@ -0,0 +1,479 @@
+/*
+ *
+ * Copyright 2018 gRPC authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <grpc/support/port_platform.h>
+
+#include "src/core/lib/iomgr/port.h"
+
+#include <assert.h>
+#include <string.h>
+
+#include <grpc/support/alloc.h>
+#include <grpc/support/log.h>
+
+#include "src/core/lib/iomgr/error.h"
+#include "src/core/lib/iomgr/exec_ctx.h"
+#include "src/core/lib/iomgr/iomgr_custom.h"
+#include "src/core/lib/iomgr/sockaddr.h"
+#include "src/core/lib/iomgr/sockaddr_utils.h"
+#include "src/core/lib/iomgr/tcp_custom.h"
+#include "src/core/lib/iomgr/tcp_server.h"
+
+extern grpc_core::TraceFlag grpc_tcp_trace;
+
+extern grpc_socket_vtable* grpc_custom_socket_vtable;
+
+/* one listening port */
+struct grpc_tcp_listener {
+ grpc_tcp_server* server;
+ unsigned port_index;
+ int port;
+
+ grpc_custom_socket* socket;
+
+ /* linked list */
+ struct grpc_tcp_listener* next;
+
+ bool closed;
+};
+
+struct grpc_tcp_server {
+ gpr_refcount refs;
+
+ /* Called whenever accept() succeeds on a server port. */
+ grpc_tcp_server_cb on_accept_cb;
+ void* on_accept_cb_arg;
+
+ int open_ports;
+
+ /* linked list of server ports */
+ grpc_tcp_listener* head;
+ grpc_tcp_listener* tail;
+
+ /* List of closures passed to shutdown_starting_add(). */
+ grpc_closure_list shutdown_starting;
+
+ /* shutdown callback */
+ grpc_closure* shutdown_complete;
+
+ bool shutdown;
+
+ grpc_resource_quota* resource_quota;
+};
+
+static grpc_error* tcp_server_create(grpc_closure* shutdown_complete,
+ const grpc_channel_args* args,
+ grpc_tcp_server** server) {
+ grpc_tcp_server* s = (grpc_tcp_server*)gpr_malloc(sizeof(grpc_tcp_server));
+ s->resource_quota = grpc_resource_quota_create(nullptr);
+ for (size_t i = 0; i < (args == nullptr ? 0 : args->num_args); i++) {
+ if (0 == strcmp(GRPC_ARG_RESOURCE_QUOTA, args->args[i].key)) {
+ if (args->args[i].type == GRPC_ARG_POINTER) {
+ grpc_resource_quota_unref_internal(s->resource_quota);
+ s->resource_quota = grpc_resource_quota_ref_internal(
+ (grpc_resource_quota*)args->args[i].value.pointer.p);
+ } else {
+ grpc_resource_quota_unref_internal(s->resource_quota);
+ gpr_free(s);
+ return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ GRPC_ARG_RESOURCE_QUOTA " must be a pointer to a buffer pool");
+ }
+ }
+ }
+ gpr_ref_init(&s->refs, 1);
+ s->on_accept_cb = nullptr;
+ s->on_accept_cb_arg = nullptr;
+ s->open_ports = 0;
+ s->head = nullptr;
+ s->tail = nullptr;
+ s->shutdown_starting.head = nullptr;
+ s->shutdown_starting.tail = nullptr;
+ s->shutdown_complete = shutdown_complete;
+ s->shutdown = false;
+ *server = s;
+ return GRPC_ERROR_NONE;
+}
+
+static grpc_tcp_server* tcp_server_ref(grpc_tcp_server* s) {
+ GRPC_CUSTOM_IOMGR_ASSERT_SAME_THREAD();
+ gpr_ref(&s->refs);
+ return s;
+}
+
+static void tcp_server_shutdown_starting_add(grpc_tcp_server* s,
+ grpc_closure* shutdown_starting) {
+ grpc_closure_list_append(&s->shutdown_starting, shutdown_starting,
+ GRPC_ERROR_NONE);
+}
+
+static void finish_shutdown(grpc_tcp_server* s) {
+ GPR_ASSERT(s->shutdown);
+ if (s->shutdown_complete != nullptr) {
+ GRPC_CLOSURE_SCHED(s->shutdown_complete, GRPC_ERROR_NONE);
+ }
+
+ while (s->head) {
+ grpc_tcp_listener* sp = s->head;
+ s->head = sp->next;
+ sp->next = nullptr;
+ gpr_free(sp);
+ }
+ grpc_resource_quota_unref_internal(s->resource_quota);
+ gpr_free(s);
+}
+
+static void custom_close_callback(grpc_custom_socket* socket) {
+ grpc_tcp_listener* sp = socket->listener;
+ if (sp) {
+ grpc_core::ExecCtx exec_ctx;
+ sp->server->open_ports--;
+ if (sp->server->open_ports == 0 && sp->server->shutdown) {
+ finish_shutdown(sp->server);
+ }
+ }
+ socket->refs--;
+ if (socket->refs == 0) {
+ grpc_custom_socket_vtable->destroy(socket);
+ gpr_free(socket);
+ }
+}
+
+void grpc_custom_close_server_callback(grpc_tcp_listener* sp) {
+ if (sp) {
+ grpc_core::ExecCtx exec_ctx;
+ sp->server->open_ports--;
+ if (sp->server->open_ports == 0 && sp->server->shutdown) {
+ finish_shutdown(sp->server);
+ }
+ }
+}
+
+static void close_listener(grpc_tcp_listener* sp) {
+ grpc_custom_socket* socket = sp->socket;
+ if (!sp->closed) {
+ sp->closed = true;
+ grpc_custom_socket_vtable->close(socket, custom_close_callback);
+ }
+}
+
+static void tcp_server_destroy(grpc_tcp_server* s) {
+ int immediately_done = 0;
+ grpc_tcp_listener* sp;
+
+ GPR_ASSERT(!s->shutdown);
+ s->shutdown = true;
+
+ if (s->open_ports == 0) {
+ immediately_done = 1;
+ }
+ for (sp = s->head; sp; sp = sp->next) {
+ close_listener(sp);
+ }
+
+ if (immediately_done) {
+ finish_shutdown(s);
+ }
+}
+
+static void tcp_server_unref(grpc_tcp_server* s) {
+ GRPC_CUSTOM_IOMGR_ASSERT_SAME_THREAD();
+ if (gpr_unref(&s->refs)) {
+ /* Complete shutdown_starting work before destroying. */
+ grpc_core::ExecCtx exec_ctx;
+ GRPC_CLOSURE_LIST_SCHED(&s->shutdown_starting);
+ grpc_core::ExecCtx::Get()->Flush();
+ tcp_server_destroy(s);
+ }
+}
+
+static void finish_accept(grpc_tcp_listener* sp, grpc_custom_socket* socket) {
+ grpc_tcp_server_acceptor* acceptor =
+ (grpc_tcp_server_acceptor*)gpr_malloc(sizeof(*acceptor));
+ grpc_endpoint* ep = nullptr;
+ grpc_resolved_address peer_name;
+ char* peer_name_string;
+ grpc_error* err;
+
+ peer_name_string = nullptr;
+ memset(&peer_name, 0, sizeof(grpc_resolved_address));
+ peer_name.len = GRPC_MAX_SOCKADDR_SIZE;
+ err = grpc_custom_socket_vtable->getpeername(
+ socket, (grpc_sockaddr*)&peer_name.addr, (int*)&peer_name.len);
+ if (err == GRPC_ERROR_NONE) {
+ peer_name_string = grpc_sockaddr_to_uri(&peer_name);
+ } else {
+ GRPC_LOG_IF_ERROR("getpeername error", err);
+ GRPC_ERROR_UNREF(err);
+ }
+ if (grpc_tcp_trace.enabled()) {
+ if (peer_name_string) {
+ gpr_log(GPR_DEBUG, "SERVER_CONNECT: %p accepted connection: %s",
+ sp->server, peer_name_string);
+ } else {
+ gpr_log(GPR_DEBUG, "SERVER_CONNECT: %p accepted connection", sp->server);
+ }
+ }
+ ep = custom_tcp_endpoint_create(socket, sp->server->resource_quota,
+ peer_name_string);
+ acceptor->from_server = sp->server;
+ acceptor->port_index = sp->port_index;
+ acceptor->fd_index = 0;
+ sp->server->on_accept_cb(sp->server->on_accept_cb_arg, ep, nullptr, acceptor);
+ gpr_free(peer_name_string);
+}
+
+static void custom_accept_callback(grpc_custom_socket* socket,
+ grpc_custom_socket* client,
+ grpc_error* error);
+
+static void custom_accept_callback(grpc_custom_socket* socket,
+ grpc_custom_socket* client,
+ grpc_error* error) {
+ grpc_core::ExecCtx exec_ctx;
+ grpc_tcp_listener* sp = socket->listener;
+ if (error != GRPC_ERROR_NONE) {
+ if (!sp->closed) {
+ gpr_log(GPR_ERROR, "Accept failed: %s", grpc_error_string(error));
+ }
+ gpr_free(client);
+ GRPC_ERROR_UNREF(error);
+ return;
+ }
+ finish_accept(sp, client);
+ if (!sp->closed) {
+ grpc_custom_socket* new_socket =
+ (grpc_custom_socket*)gpr_malloc(sizeof(grpc_custom_socket));
+ new_socket->endpoint = nullptr;
+ new_socket->listener = nullptr;
+ new_socket->connector = nullptr;
+ new_socket->refs = 1;
+ grpc_custom_socket_vtable->accept(sp->socket, new_socket,
+ custom_accept_callback);
+ }
+}
+
+static grpc_error* add_socket_to_server(grpc_tcp_server* s,
+ grpc_custom_socket* socket,
+ const grpc_resolved_address* addr,
+ unsigned port_index,
+ grpc_tcp_listener** listener) {
+ grpc_tcp_listener* sp = nullptr;
+ int port = -1;
+ grpc_error* error;
+ grpc_resolved_address sockname_temp;
+
+ // The last argument to uv_tcp_bind is flags
+ error = grpc_custom_socket_vtable->bind(socket, (grpc_sockaddr*)addr->addr,
+ addr->len, 0);
+ if (error != GRPC_ERROR_NONE) {
+ return error;
+ }
+
+ error = grpc_custom_socket_vtable->listen(socket);
+ if (error != GRPC_ERROR_NONE) {
+ return error;
+ }
+
+ sockname_temp.len = GRPC_MAX_SOCKADDR_SIZE;
+ error = grpc_custom_socket_vtable->getsockname(
+ socket, (grpc_sockaddr*)&sockname_temp.addr, (int*)&sockname_temp.len);
+ if (error != GRPC_ERROR_NONE) {
+ return error;
+ }
+
+ port = grpc_sockaddr_get_port(&sockname_temp);
+
+ GPR_ASSERT(port >= 0);
+ GPR_ASSERT(!s->on_accept_cb && "must add ports before starting server");
+ sp = (grpc_tcp_listener*)gpr_zalloc(sizeof(grpc_tcp_listener));
+ sp->next = nullptr;
+ if (s->head == nullptr) {
+ s->head = sp;
+ } else {
+ s->tail->next = sp;
+ }
+ s->tail = sp;
+ sp->server = s;
+ sp->socket = socket;
+ sp->port = port;
+ sp->port_index = port_index;
+ sp->closed = false;
+ s->open_ports++;
+ *listener = sp;
+
+ return GRPC_ERROR_NONE;
+}
+
+static grpc_error* tcp_server_add_port(grpc_tcp_server* s,
+ const grpc_resolved_address* addr,
+ int* port) {
+ // This function is mostly copied from tcp_server_windows.c
+ grpc_tcp_listener* sp = nullptr;
+ grpc_custom_socket* socket;
+ grpc_resolved_address addr6_v4mapped;
+ grpc_resolved_address wildcard;
+ grpc_resolved_address* allocated_addr = nullptr;
+ grpc_resolved_address sockname_temp;
+ unsigned port_index = 0;
+ grpc_error* error = GRPC_ERROR_NONE;
+ int family;
+
+ GRPC_CUSTOM_IOMGR_ASSERT_SAME_THREAD();
+
+ if (s->tail != nullptr) {
+ port_index = s->tail->port_index + 1;
+ }
+
+ /* Check if this is a wildcard port, and if so, try to keep the port the same
+ as some previously created listener. */
+ if (grpc_sockaddr_get_port(addr) == 0) {
+ for (sp = s->head; sp; sp = sp->next) {
+ socket = sp->socket;
+ sockname_temp.len = GRPC_MAX_SOCKADDR_SIZE;
+ if (nullptr == grpc_custom_socket_vtable->getsockname(
+ socket, (grpc_sockaddr*)&sockname_temp.addr,
+ (int*)&sockname_temp.len)) {
+ *port = grpc_sockaddr_get_port(&sockname_temp);
+ if (*port > 0) {
+ allocated_addr =
+ (grpc_resolved_address*)gpr_malloc(sizeof(grpc_resolved_address));
+ memcpy(allocated_addr, addr, sizeof(grpc_resolved_address));
+ grpc_sockaddr_set_port(allocated_addr, *port);
+ addr = allocated_addr;
+ break;
+ }
+ }
+ }
+ }
+
+ if (grpc_sockaddr_to_v4mapped(addr, &addr6_v4mapped)) {
+ addr = &addr6_v4mapped;
+ }
+
+ /* Treat :: or 0.0.0.0 as a family-agnostic wildcard. */
+ if (grpc_sockaddr_is_wildcard(addr, port)) {
+ grpc_sockaddr_make_wildcard6(*port, &wildcard);
+
+ addr = &wildcard;
+ }
+
+ if (grpc_tcp_trace.enabled()) {
+ char* port_string;
+ grpc_sockaddr_to_string(&port_string, addr, 0);
+ const char* str = grpc_error_string(error);
+ if (port_string) {
+ gpr_log(GPR_DEBUG, "SERVER %p add_port %s error=%s", s, port_string, str);
+ gpr_free(port_string);
+ } else {
+ gpr_log(GPR_DEBUG, "SERVER %p add_port error=%s", s, str);
+ }
+ }
+
+ family = grpc_sockaddr_get_family(addr);
+ socket = (grpc_custom_socket*)gpr_malloc(sizeof(grpc_custom_socket));
+ socket->refs = 1;
+ socket->endpoint = nullptr;
+ socket->listener = nullptr;
+ socket->connector = nullptr;
+ grpc_custom_socket_vtable->init(socket, family);
+
+ if (error == GRPC_ERROR_NONE) {
+#if defined(GPR_LINUX) && defined(SO_REUSEPORT)
+ if (family == AF_INET || family == AF_INET6) {
+ int enable = 1;
+ grpc_custom_socket_vtable->setsockopt(socket, SOL_SOCKET, SO_REUSEPORT,
+ &enable, sizeof(enable));
+ }
+#endif /* GPR_LINUX && SO_REUSEPORT */
+ error = add_socket_to_server(s, socket, addr, port_index, &sp);
+ }
+ gpr_free(allocated_addr);
+
+ if (error != GRPC_ERROR_NONE) {
+ grpc_error* error_out = GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(
+ "Failed to add port to server", &error, 1);
+ GRPC_ERROR_UNREF(error);
+ error = error_out;
+ *port = -1;
+ } else {
+ GPR_ASSERT(sp != nullptr);
+ *port = sp->port;
+ }
+ socket->listener = sp;
+ return error;
+}
+
+static void tcp_server_start(grpc_tcp_server* server, grpc_pollset** pollsets,
+ size_t pollset_count,
+ grpc_tcp_server_cb on_accept_cb, void* cb_arg) {
+ grpc_tcp_listener* sp;
+ (void)pollsets;
+ (void)pollset_count;
+ GRPC_CUSTOM_IOMGR_ASSERT_SAME_THREAD();
+ if (grpc_tcp_trace.enabled()) {
+ gpr_log(GPR_DEBUG, "SERVER_START %p", server);
+ }
+ GPR_ASSERT(on_accept_cb);
+ GPR_ASSERT(!server->on_accept_cb);
+ server->on_accept_cb = on_accept_cb;
+ server->on_accept_cb_arg = cb_arg;
+ for (sp = server->head; sp; sp = sp->next) {
+ grpc_custom_socket* new_socket =
+ (grpc_custom_socket*)gpr_malloc(sizeof(grpc_custom_socket));
+ new_socket->endpoint = nullptr;
+ new_socket->listener = nullptr;
+ new_socket->connector = nullptr;
+ new_socket->refs = 1;
+ grpc_custom_socket_vtable->accept(sp->socket, new_socket,
+ custom_accept_callback);
+ }
+}
+
+static unsigned tcp_server_port_fd_count(grpc_tcp_server* s,
+ unsigned port_index) {
+ return 0;
+}
+
+static int tcp_server_port_fd(grpc_tcp_server* s, unsigned port_index,
+ unsigned fd_index) {
+ return -1;
+}
+
+static void tcp_server_shutdown_listeners(grpc_tcp_server* s) {
+ for (grpc_tcp_listener* sp = s->head; sp; sp = sp->next) {
+ if (!sp->closed) {
+ sp->closed = true;
+ grpc_custom_socket_vtable->close(sp->socket, custom_close_callback);
+ }
+ }
+}
+
+grpc_tcp_server_vtable custom_tcp_server_vtable = {
+ tcp_server_create,
+ tcp_server_start,
+ tcp_server_add_port,
+ tcp_server_port_fd_count,
+ tcp_server_port_fd,
+ tcp_server_ref,
+ tcp_server_shutdown_starting_add,
+ tcp_server_unref,
+ tcp_server_shutdown_listeners};
+
+#ifdef GRPC_UV_TEST
+grpc_tcp_server_vtable* default_tcp_server_vtable = &custom_tcp_server_vtable;
+#endif
diff --git a/src/core/lib/iomgr/tcp_server_posix.cc b/src/core/lib/iomgr/tcp_server_posix.cc
index a609c09ea7..4e1d90e86a 100644
--- a/src/core/lib/iomgr/tcp_server_posix.cc
+++ b/src/core/lib/iomgr/tcp_server_posix.cc
@@ -61,6 +61,11 @@ static bool has_so_reuseport = false;
static void init(void) {
#ifndef GPR_MANYLINUX1
int s = socket(AF_INET, SOCK_STREAM, 0);
+ if (s < 0) {
+ /* This might be an ipv6-only environment in which case 'socket(AF_INET,..)'
+ call would fail. Try creating IPv6 socket in that case */
+ s = socket(AF_INET6, SOCK_STREAM, 0);
+ }
if (s >= 0) {
has_so_reuseport = GRPC_LOG_IF_ERROR("check for SO_REUSEPORT",
grpc_set_socket_reuse_port(s, 1));
@@ -69,9 +74,9 @@ static void init(void) {
#endif
}
-grpc_error* grpc_tcp_server_create(grpc_closure* shutdown_complete,
- const grpc_channel_args* args,
- grpc_tcp_server** server) {
+static grpc_error* tcp_server_create(grpc_closure* shutdown_complete,
+ const grpc_channel_args* args,
+ grpc_tcp_server** server) {
gpr_once_init(&check_init, init);
grpc_tcp_server* s =
@@ -213,7 +218,8 @@ static void on_read(void* arg, grpc_error* err) {
grpc_resolved_address addr;
char* addr_str;
char* name;
- addr.len = sizeof(struct sockaddr_storage);
+ memset(&addr, 0, sizeof(addr));
+ addr.len = static_cast<socklen_t>(sizeof(struct sockaddr_storage));
/* Note: If we ever decide to return this address to the user, remember to
strip off the ::ffff:0.0.0.0/96 prefix first. */
int fd = grpc_accept4(sp->fd, &addr, 1, 1);
@@ -392,9 +398,9 @@ static grpc_error* clone_port(grpc_tcp_listener* listener, unsigned count) {
return GRPC_ERROR_NONE;
}
-grpc_error* grpc_tcp_server_add_port(grpc_tcp_server* s,
- const grpc_resolved_address* addr,
- int* out_port) {
+static grpc_error* tcp_server_add_port(grpc_tcp_server* s,
+ const grpc_resolved_address* addr,
+ int* out_port) {
grpc_tcp_listener* sp;
grpc_resolved_address sockname_temp;
grpc_resolved_address addr6_v4mapped;
@@ -412,11 +418,12 @@ grpc_error* grpc_tcp_server_add_port(grpc_tcp_server* s,
as some previously created listener. */
if (requested_port == 0) {
for (sp = s->head; sp; sp = sp->next) {
- sockname_temp.len = sizeof(struct sockaddr_storage);
+ sockname_temp.len =
+ static_cast<socklen_t>(sizeof(struct sockaddr_storage));
if (0 ==
getsockname(sp->fd,
- reinterpret_cast<struct sockaddr*>(&sockname_temp.addr),
- reinterpret_cast<socklen_t*>(&sockname_temp.len))) {
+ reinterpret_cast<grpc_sockaddr*>(&sockname_temp.addr),
+ &sockname_temp.len)) {
int used_port = grpc_sockaddr_get_port(&sockname_temp);
if (used_port > 0) {
memcpy(&sockname_temp, addr, sizeof(grpc_resolved_address));
@@ -458,8 +465,7 @@ static grpc_tcp_listener* get_port_index(grpc_tcp_server* s,
return nullptr;
}
-unsigned grpc_tcp_server_port_fd_count(grpc_tcp_server* s,
- unsigned port_index) {
+unsigned tcp_server_port_fd_count(grpc_tcp_server* s, unsigned port_index) {
unsigned num_fds = 0;
gpr_mu_lock(&s->mu);
grpc_tcp_listener* sp = get_port_index(s, port_index);
@@ -470,8 +476,8 @@ unsigned grpc_tcp_server_port_fd_count(grpc_tcp_server* s,
return num_fds;
}
-int grpc_tcp_server_port_fd(grpc_tcp_server* s, unsigned port_index,
- unsigned fd_index) {
+static int tcp_server_port_fd(grpc_tcp_server* s, unsigned port_index,
+ unsigned fd_index) {
gpr_mu_lock(&s->mu);
grpc_tcp_listener* sp = get_port_index(s, port_index);
for (; sp; sp = sp->sibling, --fd_index) {
@@ -484,10 +490,10 @@ int grpc_tcp_server_port_fd(grpc_tcp_server* s, unsigned port_index,
return -1;
}
-void grpc_tcp_server_start(grpc_tcp_server* s, grpc_pollset** pollsets,
- size_t pollset_count,
- grpc_tcp_server_cb on_accept_cb,
- void* on_accept_cb_arg) {
+static void tcp_server_start(grpc_tcp_server* s, grpc_pollset** pollsets,
+ size_t pollset_count,
+ grpc_tcp_server_cb on_accept_cb,
+ void* on_accept_cb_arg) {
size_t i;
grpc_tcp_listener* sp;
GPR_ASSERT(on_accept_cb);
@@ -526,20 +532,20 @@ void grpc_tcp_server_start(grpc_tcp_server* s, grpc_pollset** pollsets,
gpr_mu_unlock(&s->mu);
}
-grpc_tcp_server* grpc_tcp_server_ref(grpc_tcp_server* s) {
+grpc_tcp_server* tcp_server_ref(grpc_tcp_server* s) {
gpr_ref_non_zero(&s->refs);
return s;
}
-void grpc_tcp_server_shutdown_starting_add(grpc_tcp_server* s,
- grpc_closure* shutdown_starting) {
+static void tcp_server_shutdown_starting_add(grpc_tcp_server* s,
+ grpc_closure* shutdown_starting) {
gpr_mu_lock(&s->mu);
grpc_closure_list_append(&s->shutdown_starting, shutdown_starting,
GRPC_ERROR_NONE);
gpr_mu_unlock(&s->mu);
}
-void grpc_tcp_server_unref(grpc_tcp_server* s) {
+static void tcp_server_unref(grpc_tcp_server* s) {
if (gpr_unref(&s->refs)) {
grpc_tcp_server_shutdown_listeners(s);
gpr_mu_lock(&s->mu);
@@ -549,7 +555,7 @@ void grpc_tcp_server_unref(grpc_tcp_server* s) {
}
}
-void grpc_tcp_server_shutdown_listeners(grpc_tcp_server* s) {
+static void tcp_server_shutdown_listeners(grpc_tcp_server* s) {
gpr_mu_lock(&s->mu);
s->shutdown_listeners = true;
/* shutdown all fd's */
@@ -563,4 +569,14 @@ void grpc_tcp_server_shutdown_listeners(grpc_tcp_server* s) {
gpr_mu_unlock(&s->mu);
}
+grpc_tcp_server_vtable grpc_posix_tcp_server_vtable = {
+ tcp_server_create,
+ tcp_server_start,
+ tcp_server_add_port,
+ tcp_server_port_fd_count,
+ tcp_server_port_fd,
+ tcp_server_ref,
+ tcp_server_shutdown_starting_add,
+ tcp_server_unref,
+ tcp_server_shutdown_listeners};
#endif
diff --git a/src/core/lib/iomgr/tcp_server_utils_posix_common.cc b/src/core/lib/iomgr/tcp_server_utils_posix_common.cc
index 846f9cccb7..0734453364 100644
--- a/src/core/lib/iomgr/tcp_server_utils_posix_common.cc
+++ b/src/core/lib/iomgr/tcp_server_utils_posix_common.cc
@@ -171,9 +171,8 @@ grpc_error* grpc_tcp_server_prepare_socket(int fd,
if (err != GRPC_ERROR_NONE) goto error;
GPR_ASSERT(addr->len < ~(socklen_t)0);
- if (bind(fd,
- reinterpret_cast<struct sockaddr*>(const_cast<char*>(addr->addr)),
- static_cast<socklen_t>(addr->len)) < 0) {
+ if (bind(fd, reinterpret_cast<grpc_sockaddr*>(const_cast<char*>(addr->addr)),
+ addr->len) < 0) {
err = GRPC_OS_ERROR(errno, "bind");
goto error;
}
@@ -183,10 +182,10 @@ grpc_error* grpc_tcp_server_prepare_socket(int fd,
goto error;
}
- sockname_temp.len = sizeof(struct sockaddr_storage);
+ sockname_temp.len = static_cast<socklen_t>(sizeof(struct sockaddr_storage));
- if (getsockname(fd, reinterpret_cast<struct sockaddr*>(sockname_temp.addr),
- reinterpret_cast<socklen_t*>(&sockname_temp.len)) < 0) {
+ if (getsockname(fd, reinterpret_cast<grpc_sockaddr*>(sockname_temp.addr),
+ &sockname_temp.len) < 0) {
err = GRPC_OS_ERROR(errno, "getsockname");
goto error;
}
diff --git a/src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc b/src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc
index 308ff0f8a6..7fd86c57eb 100644
--- a/src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc
+++ b/src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc
@@ -68,14 +68,14 @@ static grpc_error* get_unused_port(int* port) {
if (dsmode == GRPC_DSMODE_IPV4) {
grpc_sockaddr_make_wildcard4(0, &wild);
}
- if (bind(fd, reinterpret_cast<const struct sockaddr*>(wild.addr),
- static_cast<socklen_t>(wild.len)) != 0) {
+ if (bind(fd, reinterpret_cast<const grpc_sockaddr*>(wild.addr), wild.len) !=
+ 0) {
err = GRPC_OS_ERROR(errno, "bind");
close(fd);
return err;
}
- if (getsockname(fd, reinterpret_cast<struct sockaddr*>(wild.addr),
- reinterpret_cast<socklen_t*>(&wild.len)) != 0) {
+ if (getsockname(fd, reinterpret_cast<grpc_sockaddr*>(wild.addr), &wild.len) !=
+ 0) {
err = GRPC_OS_ERROR(errno, "getsockname");
close(fd);
return err;
@@ -119,9 +119,9 @@ grpc_error* grpc_tcp_server_add_all_local_addrs(grpc_tcp_server* s,
if (ifa_it->ifa_addr == nullptr) {
continue;
} else if (ifa_it->ifa_addr->sa_family == AF_INET) {
- addr.len = sizeof(struct sockaddr_in);
+ addr.len = static_cast<socklen_t>(sizeof(grpc_sockaddr_in));
} else if (ifa_it->ifa_addr->sa_family == AF_INET6) {
- addr.len = sizeof(struct sockaddr_in6);
+ addr.len = static_cast<socklen_t>(sizeof(grpc_sockaddr_in6));
} else {
continue;
}
diff --git a/src/core/lib/iomgr/tcp_server_uv.cc b/src/core/lib/iomgr/tcp_server_uv.cc
deleted file mode 100644
index aa423766c7..0000000000
--- a/src/core/lib/iomgr/tcp_server_uv.cc
+++ /dev/null
@@ -1,473 +0,0 @@
-/*
- *
- * Copyright 2015 gRPC authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include <grpc/support/port_platform.h>
-
-#include "src/core/lib/iomgr/port.h"
-
-#ifdef GRPC_UV
-
-#include <assert.h>
-#include <string.h>
-
-#include <grpc/support/alloc.h>
-#include <grpc/support/log.h>
-
-#include "src/core/lib/iomgr/error.h"
-#include "src/core/lib/iomgr/exec_ctx.h"
-#include "src/core/lib/iomgr/iomgr_uv.h"
-#include "src/core/lib/iomgr/sockaddr.h"
-#include "src/core/lib/iomgr/sockaddr_utils.h"
-#include "src/core/lib/iomgr/tcp_server.h"
-#include "src/core/lib/iomgr/tcp_uv.h"
-
-/* one listening port */
-typedef struct grpc_tcp_listener grpc_tcp_listener;
-struct grpc_tcp_listener {
- uv_tcp_t* handle;
- grpc_tcp_server* server;
- unsigned port_index;
- int port;
- /* linked list */
- struct grpc_tcp_listener* next;
-
- bool closed;
-
- bool has_pending_connection;
-};
-
-struct grpc_tcp_server {
- gpr_refcount refs;
-
- /* Called whenever accept() succeeds on a server port. */
- grpc_tcp_server_cb on_accept_cb;
- void* on_accept_cb_arg;
-
- int open_ports;
-
- /* linked list of server ports */
- grpc_tcp_listener* head;
- grpc_tcp_listener* tail;
-
- /* List of closures passed to shutdown_starting_add(). */
- grpc_closure_list shutdown_starting;
-
- /* shutdown callback */
- grpc_closure* shutdown_complete;
-
- bool shutdown;
-
- grpc_resource_quota* resource_quota;
-};
-
-grpc_error* grpc_tcp_server_create(grpc_closure* shutdown_complete,
- const grpc_channel_args* args,
- grpc_tcp_server** server) {
- grpc_tcp_server* s = (grpc_tcp_server*)gpr_malloc(sizeof(grpc_tcp_server));
- s->resource_quota = grpc_resource_quota_create(NULL);
- for (size_t i = 0; i < (args == NULL ? 0 : args->num_args); i++) {
- if (0 == strcmp(GRPC_ARG_RESOURCE_QUOTA, args->args[i].key)) {
- if (args->args[i].type == GRPC_ARG_POINTER) {
- grpc_resource_quota_unref_internal(s->resource_quota);
- s->resource_quota = grpc_resource_quota_ref_internal(
- (grpc_resource_quota*)args->args[i].value.pointer.p);
- } else {
- grpc_resource_quota_unref_internal(s->resource_quota);
- gpr_free(s);
- return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- GRPC_ARG_RESOURCE_QUOTA " must be a pointer to a buffer pool");
- }
- }
- }
- gpr_ref_init(&s->refs, 1);
- s->on_accept_cb = NULL;
- s->on_accept_cb_arg = NULL;
- s->open_ports = 0;
- s->head = NULL;
- s->tail = NULL;
- s->shutdown_starting.head = NULL;
- s->shutdown_starting.tail = NULL;
- s->shutdown_complete = shutdown_complete;
- s->shutdown = false;
- *server = s;
- return GRPC_ERROR_NONE;
-}
-
-grpc_tcp_server* grpc_tcp_server_ref(grpc_tcp_server* s) {
- GRPC_UV_ASSERT_SAME_THREAD();
- gpr_ref(&s->refs);
- return s;
-}
-
-void grpc_tcp_server_shutdown_starting_add(grpc_tcp_server* s,
- grpc_closure* shutdown_starting) {
- grpc_closure_list_append(&s->shutdown_starting, shutdown_starting,
- GRPC_ERROR_NONE);
-}
-
-static void finish_shutdown(grpc_tcp_server* s) {
- GPR_ASSERT(s->shutdown);
- if (s->shutdown_complete != NULL) {
- GRPC_CLOSURE_SCHED(s->shutdown_complete, GRPC_ERROR_NONE);
- }
-
- while (s->head) {
- grpc_tcp_listener* sp = s->head;
- s->head = sp->next;
- sp->next = NULL;
- gpr_free(sp->handle);
- gpr_free(sp);
- }
- grpc_resource_quota_unref_internal(s->resource_quota);
- gpr_free(s);
-}
-
-static void handle_close_callback(uv_handle_t* handle) {
- grpc_tcp_listener* sp = (grpc_tcp_listener*)handle->data;
- grpc_core::ExecCtx exec_ctx;
- sp->server->open_ports--;
- if (sp->server->open_ports == 0 && sp->server->shutdown) {
- finish_shutdown(sp->server);
- }
-}
-
-static void close_listener(grpc_tcp_listener* sp) {
- if (!sp->closed) {
- sp->closed = true;
- uv_close((uv_handle_t*)sp->handle, handle_close_callback);
- }
-}
-
-static void tcp_server_destroy(grpc_tcp_server* s) {
- int immediately_done = 0;
- grpc_tcp_listener* sp;
-
- GPR_ASSERT(!s->shutdown);
- s->shutdown = true;
-
- if (s->open_ports == 0) {
- immediately_done = 1;
- }
- for (sp = s->head; sp; sp = sp->next) {
- close_listener(sp);
- }
-
- if (immediately_done) {
- finish_shutdown(s);
- }
-}
-
-void grpc_tcp_server_unref(grpc_tcp_server* s) {
- GRPC_UV_ASSERT_SAME_THREAD();
- if (gpr_unref(&s->refs)) {
- /* Complete shutdown_starting work before destroying. */
- grpc_core::ExecCtx exec_ctx;
- GRPC_CLOSURE_LIST_SCHED(&s->shutdown_starting);
- grpc_core::ExecCtx::Get()->Flush();
- tcp_server_destroy(s);
- }
-}
-
-static void finish_accept(grpc_tcp_listener* sp) {
- grpc_tcp_server_acceptor* acceptor =
- (grpc_tcp_server_acceptor*)gpr_malloc(sizeof(*acceptor));
- uv_tcp_t* client = NULL;
- grpc_endpoint* ep = NULL;
- grpc_resolved_address peer_name;
- char* peer_name_string;
- int err;
- uv_tcp_t* server = sp->handle;
-
- client = (uv_tcp_t*)gpr_malloc(sizeof(uv_tcp_t));
- uv_tcp_init(uv_default_loop(), client);
- // UV documentation says this is guaranteed to succeed
- uv_accept((uv_stream_t*)server, (uv_stream_t*)client);
- peer_name_string = NULL;
- memset(&peer_name, 0, sizeof(grpc_resolved_address));
- peer_name.len = sizeof(struct sockaddr_storage);
- err = uv_tcp_getpeername(client, (struct sockaddr*)&peer_name.addr,
- (int*)&peer_name.len);
- if (err == 0) {
- peer_name_string = grpc_sockaddr_to_uri(&peer_name);
- } else {
- gpr_log(GPR_INFO, "uv_tcp_getpeername error: %s", uv_strerror(err));
- }
- if (grpc_tcp_trace.enabled()) {
- if (peer_name_string) {
- gpr_log(GPR_DEBUG, "SERVER_CONNECT: %p accepted connection: %s",
- sp->server, peer_name_string);
- } else {
- gpr_log(GPR_DEBUG, "SERVER_CONNECT: %p accepted connection", sp->server);
- }
- }
- ep = grpc_tcp_create(client, sp->server->resource_quota, peer_name_string);
- acceptor->from_server = sp->server;
- acceptor->port_index = sp->port_index;
- acceptor->fd_index = 0;
- sp->server->on_accept_cb(sp->server->on_accept_cb_arg, ep, NULL, acceptor);
- gpr_free(peer_name_string);
-}
-
-static void on_connect(uv_stream_t* server, int status) {
- grpc_tcp_listener* sp = (grpc_tcp_listener*)server->data;
- grpc_core::ExecCtx exec_ctx;
-
- if (status < 0) {
- switch (status) {
- case UV_EINTR:
- case UV_EAGAIN:
- return;
- default:
- close_listener(sp);
- return;
- }
- }
-
- GPR_ASSERT(!sp->has_pending_connection);
-
- if (grpc_tcp_trace.enabled()) {
- gpr_log(GPR_DEBUG, "SERVER_CONNECT: %p incoming connection", sp->server);
- }
-
- // Create acceptor.
- if (sp->server->on_accept_cb) {
- finish_accept(sp);
- } else {
- sp->has_pending_connection = true;
- }
-}
-
-static grpc_error* add_addr_to_server(grpc_tcp_server* s,
- const grpc_resolved_address* addr,
- unsigned port_index,
- grpc_tcp_listener** listener) {
- grpc_tcp_listener* sp = NULL;
- int port = -1;
- int status;
- grpc_error* error;
- grpc_resolved_address sockname_temp;
- uv_tcp_t* handle = (uv_tcp_t*)gpr_malloc(sizeof(uv_tcp_t));
- int family = grpc_sockaddr_get_family(addr);
-
- status = uv_tcp_init_ex(uv_default_loop(), handle, (unsigned int)family);
-#if defined(GPR_LINUX) && defined(SO_REUSEPORT)
- if (family == AF_INET || family == AF_INET6) {
- int fd;
- uv_fileno((uv_handle_t*)handle, &fd);
- int enable = 1;
- setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &enable, sizeof(enable));
- }
-#endif /* GPR_LINUX && SO_REUSEPORT */
-
- if (status != 0) {
- error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "Failed to initialize UV tcp handle");
- error =
- grpc_error_set_str(error, GRPC_ERROR_STR_OS_ERROR,
- grpc_slice_from_static_string(uv_strerror(status)));
- return error;
- }
-
- // The last argument to uv_tcp_bind is flags
- status = uv_tcp_bind(handle, (struct sockaddr*)addr->addr, 0);
- if (status != 0) {
- error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Failed to bind to port");
- error =
- grpc_error_set_str(error, GRPC_ERROR_STR_OS_ERROR,
- grpc_slice_from_static_string(uv_strerror(status)));
- return error;
- }
-
- status = uv_listen((uv_stream_t*)handle, SOMAXCONN, on_connect);
- if (status != 0) {
- error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Failed to listen to port");
- error =
- grpc_error_set_str(error, GRPC_ERROR_STR_OS_ERROR,
- grpc_slice_from_static_string(uv_strerror(status)));
- return error;
- }
-
- sockname_temp.len = (int)sizeof(struct sockaddr_storage);
- status = uv_tcp_getsockname(handle, (struct sockaddr*)&sockname_temp.addr,
- (int*)&sockname_temp.len);
- if (status != 0) {
- error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("getsockname failed");
- error =
- grpc_error_set_str(error, GRPC_ERROR_STR_OS_ERROR,
- grpc_slice_from_static_string(uv_strerror(status)));
- return error;
- }
-
- port = grpc_sockaddr_get_port(&sockname_temp);
-
- GPR_ASSERT(port >= 0);
- GPR_ASSERT(!s->on_accept_cb && "must add ports before starting server");
- sp = (grpc_tcp_listener*)gpr_zalloc(sizeof(grpc_tcp_listener));
- sp->next = NULL;
- if (s->head == NULL) {
- s->head = sp;
- } else {
- s->tail->next = sp;
- }
- s->tail = sp;
- sp->server = s;
- sp->handle = handle;
- sp->port = port;
- sp->port_index = port_index;
- sp->closed = false;
- handle->data = sp;
- s->open_ports++;
- GPR_ASSERT(sp->handle);
- *listener = sp;
-
- return GRPC_ERROR_NONE;
-}
-
-static grpc_error* add_wildcard_addrs_to_server(grpc_tcp_server* s,
- unsigned port_index,
- int requested_port,
- grpc_tcp_listener** listener) {
- grpc_resolved_address wild4;
- grpc_resolved_address wild6;
- grpc_tcp_listener* sp = nullptr;
- grpc_tcp_listener* sp2 = nullptr;
- grpc_error* v6_err = GRPC_ERROR_NONE;
- grpc_error* v4_err = GRPC_ERROR_NONE;
-
- grpc_sockaddr_make_wildcards(requested_port, &wild4, &wild6);
- /* Try listening on IPv6 first. */
- if ((v6_err = add_addr_to_server(s, &wild6, port_index, &sp)) ==
- GRPC_ERROR_NONE) {
- *listener = sp;
- return GRPC_ERROR_NONE;
- }
-
- if ((v4_err = add_addr_to_server(s, &wild4, port_index, &sp2)) ==
- GRPC_ERROR_NONE) {
- *listener = sp2;
- return GRPC_ERROR_NONE;
- }
-
- grpc_error* root_err = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "Failed to add any wildcard listeners");
- root_err = grpc_error_add_child(root_err, v6_err);
- root_err = grpc_error_add_child(root_err, v4_err);
- return root_err;
-}
-
-grpc_error* grpc_tcp_server_add_port(grpc_tcp_server* s,
- const grpc_resolved_address* addr,
- int* port) {
- // This function is mostly copied from tcp_server_windows.c
- grpc_tcp_listener* sp = NULL;
- grpc_resolved_address addr6_v4mapped;
- grpc_resolved_address* allocated_addr = NULL;
- grpc_resolved_address sockname_temp;
- unsigned port_index = 0;
- grpc_error* error = GRPC_ERROR_NONE;
-
- GRPC_UV_ASSERT_SAME_THREAD();
-
- if (s->tail != NULL) {
- port_index = s->tail->port_index + 1;
- }
-
- /* Check if this is a wildcard port, and if so, try to keep the port the same
- as some previously created listener. */
- if (grpc_sockaddr_get_port(addr) == 0) {
- for (sp = s->head; sp; sp = sp->next) {
- sockname_temp.len = sizeof(struct sockaddr_storage);
- if (0 == uv_tcp_getsockname(sp->handle,
- (struct sockaddr*)&sockname_temp.addr,
- (int*)&sockname_temp.len)) {
- *port = grpc_sockaddr_get_port(&sockname_temp);
- if (*port > 0) {
- allocated_addr =
- (grpc_resolved_address*)gpr_malloc(sizeof(grpc_resolved_address));
- memcpy(allocated_addr, addr, sizeof(grpc_resolved_address));
- grpc_sockaddr_set_port(allocated_addr, *port);
- addr = allocated_addr;
- break;
- }
- }
- }
- }
-
- /* Treat :: or 0.0.0.0 as a family-agnostic wildcard. */
- if (grpc_sockaddr_is_wildcard(addr, port)) {
- error = add_wildcard_addrs_to_server(s, port_index, *port, &sp);
- } else {
- if (grpc_sockaddr_to_v4mapped(addr, &addr6_v4mapped)) {
- addr = &addr6_v4mapped;
- }
-
- error = add_addr_to_server(s, addr, port_index, &sp);
- }
-
- gpr_free(allocated_addr);
-
- if (grpc_tcp_trace.enabled()) {
- char* port_string;
- grpc_sockaddr_to_string(&port_string, addr, 0);
- const char* str = grpc_error_string(error);
- if (port_string) {
- gpr_log(GPR_DEBUG, "SERVER %p add_port %s error=%s", s, port_string, str);
- gpr_free(port_string);
- } else {
- gpr_log(GPR_DEBUG, "SERVER %p add_port error=%s", s, str);
- }
- }
-
- if (error != GRPC_ERROR_NONE) {
- grpc_error* error_out = GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(
- "Failed to add port to server", &error, 1);
- GRPC_ERROR_UNREF(error);
- error = error_out;
- *port = -1;
- } else {
- GPR_ASSERT(sp != NULL);
- *port = sp->port;
- }
- return error;
-}
-
-void grpc_tcp_server_start(grpc_tcp_server* server, grpc_pollset** pollsets,
- size_t pollset_count,
- grpc_tcp_server_cb on_accept_cb, void* cb_arg) {
- grpc_tcp_listener* sp;
- (void)pollsets;
- (void)pollset_count;
- GRPC_UV_ASSERT_SAME_THREAD();
- if (grpc_tcp_trace.enabled()) {
- gpr_log(GPR_DEBUG, "SERVER_START %p", server);
- }
- GPR_ASSERT(on_accept_cb);
- GPR_ASSERT(!server->on_accept_cb);
- server->on_accept_cb = on_accept_cb;
- server->on_accept_cb_arg = cb_arg;
- for (sp = server->head; sp; sp = sp->next) {
- if (sp->has_pending_connection) {
- finish_accept(sp);
- sp->has_pending_connection = false;
- }
- }
-}
-
-void grpc_tcp_server_shutdown_listeners(grpc_tcp_server* s) {}
-
-#endif /* GRPC_UV */
diff --git a/src/core/lib/iomgr/tcp_server_windows.cc b/src/core/lib/iomgr/tcp_server_windows.cc
index 6d19c1c4d7..77f3811dca 100644
--- a/src/core/lib/iomgr/tcp_server_windows.cc
+++ b/src/core/lib/iomgr/tcp_server_windows.cc
@@ -50,7 +50,7 @@ typedef struct grpc_tcp_listener grpc_tcp_listener;
struct grpc_tcp_listener {
/* This seemingly magic number comes from AcceptEx's documentation. each
address buffer needs to have at least 16 more bytes at their end. */
- uint8_t addresses[(sizeof(struct sockaddr_in6) + 16) * 2];
+ uint8_t addresses[(sizeof(grpc_sockaddr_in6) + 16) * 2];
/* This will hold the socket for the next accept. */
SOCKET new_socket;
/* The listener winsocket. */
@@ -96,9 +96,9 @@ struct grpc_tcp_server {
/* Public function. Allocates the proper data structures to hold a
grpc_tcp_server. */
-grpc_error* grpc_tcp_server_create(grpc_closure* shutdown_complete,
- const grpc_channel_args* args,
- grpc_tcp_server** server) {
+static grpc_error* tcp_server_create(grpc_closure* shutdown_complete,
+ const grpc_channel_args* args,
+ grpc_tcp_server** server) {
grpc_tcp_server* s = (grpc_tcp_server*)gpr_malloc(sizeof(grpc_tcp_server));
s->channel_args = grpc_channel_args_copy(args);
gpr_ref_init(&s->refs, 1);
@@ -142,13 +142,13 @@ static void finish_shutdown_locked(grpc_tcp_server* s) {
GRPC_ERROR_NONE);
}
-grpc_tcp_server* grpc_tcp_server_ref(grpc_tcp_server* s) {
+static grpc_tcp_server* tcp_server_ref(grpc_tcp_server* s) {
gpr_ref_non_zero(&s->refs);
return s;
}
-void grpc_tcp_server_shutdown_starting_add(grpc_tcp_server* s,
- grpc_closure* shutdown_starting) {
+static void tcp_server_shutdown_starting_add(grpc_tcp_server* s,
+ grpc_closure* shutdown_starting) {
gpr_mu_lock(&s->mu);
grpc_closure_list_append(&s->shutdown_starting, shutdown_starting,
GRPC_ERROR_NONE);
@@ -172,7 +172,7 @@ static void tcp_server_destroy(grpc_tcp_server* s) {
gpr_mu_unlock(&s->mu);
}
-void grpc_tcp_server_unref(grpc_tcp_server* s) {
+static void tcp_server_unref(grpc_tcp_server* s) {
if (gpr_unref(&s->refs)) {
grpc_tcp_server_shutdown_listeners(s);
gpr_mu_lock(&s->mu);
@@ -195,7 +195,7 @@ static grpc_error* prepare_socket(SOCKET sock,
goto failure;
}
- if (bind(sock, (const struct sockaddr*)addr->addr, (int)addr->len) ==
+ if (bind(sock, (const grpc_sockaddr*)addr->addr, (int)addr->len) ==
SOCKET_ERROR) {
error = GRPC_WSA_ERROR(WSAGetLastError(), "bind");
goto failure;
@@ -207,7 +207,7 @@ static grpc_error* prepare_socket(SOCKET sock,
}
sockname_temp_len = sizeof(struct sockaddr_storage);
- if (getsockname(sock, (struct sockaddr*)sockname_temp.addr,
+ if (getsockname(sock, (grpc_sockaddr*)sockname_temp.addr,
&sockname_temp_len) == SOCKET_ERROR) {
error = GRPC_WSA_ERROR(WSAGetLastError(), "getsockname");
goto failure;
@@ -245,7 +245,7 @@ static void decrement_active_ports_and_notify_locked(grpc_tcp_listener* sp) {
static grpc_error* start_accept_locked(grpc_tcp_listener* port) {
SOCKET sock = INVALID_SOCKET;
BOOL success;
- DWORD addrlen = sizeof(struct sockaddr_in6) + 16;
+ DWORD addrlen = sizeof(grpc_sockaddr_in6) + 16;
DWORD bytes_received = 0;
grpc_error* error = GRPC_ERROR_NONE;
@@ -343,7 +343,7 @@ static void on_accept(void* arg, grpc_error* error) {
gpr_free(utf8_message);
}
int peer_name_len = (int)peer_name.len;
- err = getpeername(sock, (struct sockaddr*)peer_name.addr, &peer_name_len);
+ err = getpeername(sock, (grpc_sockaddr*)peer_name.addr, &peer_name_len);
peer_name.len = (size_t)peer_name_len;
if (!err) {
peer_name_string = grpc_sockaddr_to_uri(&peer_name);
@@ -442,9 +442,9 @@ static grpc_error* add_socket_to_server(grpc_tcp_server* s, SOCKET sock,
return GRPC_ERROR_NONE;
}
-grpc_error* grpc_tcp_server_add_port(grpc_tcp_server* s,
- const grpc_resolved_address* addr,
- int* port) {
+static grpc_error* tcp_server_add_port(grpc_tcp_server* s,
+ const grpc_resolved_address* addr,
+ int* port) {
grpc_tcp_listener* sp = NULL;
SOCKET sock;
grpc_resolved_address addr6_v4mapped;
@@ -464,7 +464,7 @@ grpc_error* grpc_tcp_server_add_port(grpc_tcp_server* s,
for (sp = s->head; sp; sp = sp->next) {
int sockname_temp_len = sizeof(struct sockaddr_storage);
if (0 == getsockname(sp->socket->socket,
- (struct sockaddr*)sockname_temp.addr,
+ (grpc_sockaddr*)sockname_temp.addr,
&sockname_temp_len)) {
sockname_temp.len = (size_t)sockname_temp_len;
*port = grpc_sockaddr_get_port(&sockname_temp);
@@ -516,10 +516,10 @@ done:
return error;
}
-void grpc_tcp_server_start(grpc_tcp_server* s, grpc_pollset** pollset,
- size_t pollset_count,
- grpc_tcp_server_cb on_accept_cb,
- void* on_accept_cb_arg) {
+static void tcp_server_start(grpc_tcp_server* s, grpc_pollset** pollset,
+ size_t pollset_count,
+ grpc_tcp_server_cb on_accept_cb,
+ void* on_accept_cb_arg) {
grpc_tcp_listener* sp;
GPR_ASSERT(on_accept_cb);
gpr_mu_lock(&s->mu);
@@ -534,6 +534,26 @@ void grpc_tcp_server_start(grpc_tcp_server* s, grpc_pollset** pollset,
gpr_mu_unlock(&s->mu);
}
-void grpc_tcp_server_shutdown_listeners(grpc_tcp_server* s) {}
+static unsigned tcp_server_port_fd_count(grpc_tcp_server* s,
+ unsigned port_index) {
+ return 0;
+}
+
+static int tcp_server_port_fd(grpc_tcp_server* s, unsigned port_index,
+ unsigned fd_index) {
+ return -1;
+}
+static void tcp_server_shutdown_listeners(grpc_tcp_server* s) {}
+
+grpc_tcp_server_vtable grpc_windows_tcp_server_vtable = {
+ tcp_server_create,
+ tcp_server_start,
+ tcp_server_add_port,
+ tcp_server_port_fd_count,
+ tcp_server_port_fd,
+ tcp_server_ref,
+ tcp_server_shutdown_starting_add,
+ tcp_server_unref,
+ tcp_server_shutdown_listeners};
#endif /* GRPC_WINSOCK_SOCKET */
diff --git a/src/core/lib/iomgr/tcp_uv.cc b/src/core/lib/iomgr/tcp_uv.cc
index 6db3217d6e..5e3166926b 100644
--- a/src/core/lib/iomgr/tcp_uv.cc
+++ b/src/core/lib/iomgr/tcp_uv.cc
@@ -21,7 +21,6 @@
#include "src/core/lib/iomgr/port.h"
#ifdef GRPC_UV
-
#include <limits.h>
#include <string.h>
@@ -33,393 +32,393 @@
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/iomgr/error.h"
-#include "src/core/lib/iomgr/iomgr_uv.h"
+#include "src/core/lib/iomgr/iomgr_custom.h"
#include "src/core/lib/iomgr/network_status_tracker.h"
+#include "src/core/lib/iomgr/resolve_address_custom.h"
#include "src/core/lib/iomgr/resource_quota.h"
-#include "src/core/lib/iomgr/tcp_uv.h"
+#include "src/core/lib/iomgr/tcp_custom.h"
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/lib/slice/slice_string_helpers.h"
-grpc_core::TraceFlag grpc_tcp_trace(false, "tcp");
+#include <uv.h>
-typedef struct {
- grpc_endpoint base;
- gpr_refcount refcount;
+#define IGNORE_CONST(addr) ((grpc_sockaddr*)(uintptr_t)(addr))
+typedef struct uv_socket_t {
+ uv_connect_t connect_req;
uv_write_t write_req;
uv_shutdown_t shutdown_req;
-
uv_tcp_t* handle;
-
- grpc_closure* read_cb;
- grpc_closure* write_cb;
-
- grpc_slice_buffer* read_slices;
- grpc_slice_buffer* write_slices;
uv_buf_t* write_buffers;
- grpc_resource_user* resource_user;
- grpc_resource_user_slice_allocator slice_allocator;
-
- bool shutting_down;
+ char* read_buf;
+ size_t read_len;
- char* peer_string;
- grpc_pollset* pollset;
-} grpc_tcp;
+ bool pending_connection;
+ grpc_custom_socket* accept_socket;
+ grpc_error* accept_error;
-static grpc_error* tcp_annotate_error(grpc_error* src_error, grpc_tcp* tcp) {
- return grpc_error_set_str(
- grpc_error_set_int(
- src_error,
- /* All tcp errors are marked with UNAVAILABLE so that application may
- * choose to retry. */
- GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_UNAVAILABLE),
- GRPC_ERROR_STR_TARGET_ADDRESS,
- grpc_slice_from_copied_string(tcp->peer_string));
-}
+ grpc_custom_connect_callback connect_cb;
+ grpc_custom_write_callback write_cb;
+ grpc_custom_read_callback read_cb;
+ grpc_custom_accept_callback accept_cb;
+ grpc_custom_close_callback close_cb;
-static void tcp_free(grpc_tcp* tcp) {
- grpc_resource_user_unref(tcp->resource_user);
- gpr_free(tcp->handle);
- gpr_free(tcp->peer_string);
- gpr_free(tcp);
-}
-
-#ifndef NDEBUG
-#define TCP_UNREF(tcp, reason) tcp_unref((tcp), (reason), __FILE__, __LINE__)
-#define TCP_REF(tcp, reason) tcp_ref((tcp), (reason), __FILE__, __LINE__)
-static void tcp_unref(grpc_tcp* tcp, const char* reason, const char* file,
- int line) {
- if (grpc_tcp_trace.enabled()) {
- gpr_atm val = gpr_atm_no_barrier_load(&tcp->refcount.count);
- gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG,
- "TCP unref %p : %s %" PRIdPTR " -> %" PRIdPTR, tcp, reason, val,
- val - 1);
- }
- if (gpr_unref(&tcp->refcount)) {
- tcp_free(tcp);
- }
-}
+} uv_socket_t;
-static void tcp_ref(grpc_tcp* tcp, const char* reason, const char* file,
- int line) {
- if (grpc_tcp_trace.enabled()) {
- gpr_atm val = gpr_atm_no_barrier_load(&tcp->refcount.count);
- gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG,
- "TCP ref %p : %s %" PRIdPTR " -> %" PRIdPTR, tcp, reason, val,
- val + 1);
- }
- gpr_ref(&tcp->refcount);
-}
-#else
-#define TCP_UNREF(tcp, reason) tcp_unref((tcp))
-#define TCP_REF(tcp, reason) tcp_ref((tcp))
-static void tcp_unref(grpc_tcp* tcp) {
- if (gpr_unref(&tcp->refcount)) {
- tcp_free(tcp);
+static grpc_error* tcp_error_create(const char* desc, int status) {
+ if (status == 0) {
+ return GRPC_ERROR_NONE;
}
+ grpc_error* error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(desc);
+ /* All tcp errors are marked with UNAVAILABLE so that application may
+ * choose to retry. */
+ error = grpc_error_set_int(error, GRPC_ERROR_INT_GRPC_STATUS,
+ GRPC_STATUS_UNAVAILABLE);
+ return grpc_error_set_str(error, GRPC_ERROR_STR_OS_ERROR,
+ grpc_slice_from_static_string(uv_strerror(status)));
}
-static void tcp_ref(grpc_tcp* tcp) { gpr_ref(&tcp->refcount); }
-#endif
-
-static void uv_close_callback(uv_handle_t* handle) {
- grpc_core::ExecCtx exec_ctx;
- grpc_tcp* tcp = (grpc_tcp*)handle->data;
- TCP_UNREF(tcp, "destroy");
+static void uv_socket_destroy(grpc_custom_socket* socket) {
+ uv_socket_t* uv_socket = (uv_socket_t*)socket->impl;
+ gpr_free(uv_socket->handle);
+ gpr_free(uv_socket);
}
static void alloc_uv_buf(uv_handle_t* handle, size_t suggested_size,
uv_buf_t* buf) {
- grpc_core::ExecCtx exec_ctx;
- grpc_tcp* tcp = (grpc_tcp*)handle->data;
+ uv_socket_t* uv_socket =
+ (uv_socket_t*)((grpc_custom_socket*)handle->data)->impl;
(void)suggested_size;
- /* Before calling uv_read_start, we allocate a buffer with exactly one slice
- * to tcp->read_slices and wait for the callback indicating that the
- * allocation was successful. So slices[0] should always exist here */
- buf->base = (char*)GRPC_SLICE_START_PTR(tcp->read_slices->slices[0]);
- buf->len = GRPC_SLICE_LENGTH(tcp->read_slices->slices[0]);
-}
-
-static void call_read_cb(grpc_tcp* tcp, grpc_error* error) {
- grpc_closure* cb = tcp->read_cb;
- if (grpc_tcp_trace.enabled()) {
- gpr_log(GPR_DEBUG, "TCP:%p call_cb %p %p:%p", tcp, cb, cb->cb, cb->cb_arg);
- size_t i;
- const char* str = grpc_error_string(error);
- gpr_log(GPR_DEBUG, "read: error=%s", str);
-
- for (i = 0; i < tcp->read_slices->count; i++) {
- char* dump = grpc_dump_slice(tcp->read_slices->slices[i],
- GPR_DUMP_HEX | GPR_DUMP_ASCII);
- gpr_log(GPR_DEBUG, "READ %p (peer=%s): %s", tcp, tcp->peer_string, dump);
- gpr_free(dump);
- }
- }
- tcp->read_slices = NULL;
- tcp->read_cb = NULL;
- GRPC_CLOSURE_RUN(cb, error);
+ buf->base = uv_socket->read_buf;
+ buf->len = uv_socket->read_len;
}
-static void read_callback(uv_stream_t* stream, ssize_t nread,
- const uv_buf_t* buf) {
- grpc_error* error;
- grpc_core::ExecCtx exec_ctx;
- grpc_tcp* tcp = (grpc_tcp*)stream->data;
- grpc_slice_buffer garbage;
+static void uv_read_callback(uv_stream_t* stream, ssize_t nread,
+ const uv_buf_t* buf) {
+ grpc_error* error = GRPC_ERROR_NONE;
if (nread == 0) {
// Nothing happened. Wait for the next callback
return;
}
- TCP_UNREF(tcp, "read");
// TODO(murgatroid99): figure out what the return value here means
uv_read_stop(stream);
if (nread == UV_EOF) {
- error =
- tcp_annotate_error(GRPC_ERROR_CREATE_FROM_STATIC_STRING("EOF"), tcp);
- grpc_slice_buffer_reset_and_unref_internal(tcp->read_slices);
- } else if (nread > 0) {
- // Successful read
- error = GRPC_ERROR_NONE;
- if ((size_t)nread < tcp->read_slices->length) {
- /* TODO(murgatroid99): Instead of discarding the unused part of the read
- * buffer, reuse it as the next read buffer. */
- grpc_slice_buffer_init(&garbage);
- grpc_slice_buffer_trim_end(
- tcp->read_slices, tcp->read_slices->length - (size_t)nread, &garbage);
- grpc_slice_buffer_reset_and_unref_internal(&garbage);
- }
- } else {
- // nread < 0: Error
- error = tcp_annotate_error(
- GRPC_ERROR_CREATE_FROM_STATIC_STRING("TCP Read failed"), tcp);
- grpc_slice_buffer_reset_and_unref_internal(tcp->read_slices);
+ error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("EOF");
+ } else if (nread < 0) {
+ error = tcp_error_create("TCP Read failed", nread);
}
- call_read_cb(tcp, error);
+ grpc_custom_socket* socket = (grpc_custom_socket*)stream->data;
+ uv_socket_t* uv_socket = (uv_socket_t*)socket->impl;
+ uv_socket->read_cb(socket, (size_t)nread, error);
}
-static void tcp_read_allocation_done(void* tcpp, grpc_error* error) {
- int status;
- grpc_tcp* tcp = (grpc_tcp*)tcpp;
- if (grpc_tcp_trace.enabled()) {
- gpr_log(GPR_DEBUG, "TCP:%p read_allocation_done: %s", tcp,
- grpc_error_string(error));
- }
- if (error == GRPC_ERROR_NONE) {
- status =
- uv_read_start((uv_stream_t*)tcp->handle, alloc_uv_buf, read_callback);
- if (status != 0) {
- error = tcp_annotate_error(
- GRPC_ERROR_CREATE_FROM_STATIC_STRING("TCP Read failed at start"),
- tcp);
- error = grpc_error_set_str(
- error, GRPC_ERROR_STR_OS_ERROR,
- grpc_slice_from_static_string(uv_strerror(status)));
- }
- }
- if (error != GRPC_ERROR_NONE) {
- grpc_slice_buffer_reset_and_unref_internal(tcp->read_slices);
- call_read_cb(tcp, GRPC_ERROR_REF(error));
- TCP_UNREF(tcp, "read");
+static void uv_close_callback(uv_handle_t* handle) {
+ grpc_custom_socket* socket = (grpc_custom_socket*)handle->data;
+ uv_socket_t* uv_socket = (uv_socket_t*)socket->impl;
+ if (uv_socket->accept_socket) {
+ uv_socket->accept_cb(socket, uv_socket->accept_socket,
+ GRPC_ERROR_CREATE_FROM_STATIC_STRING("socket closed"));
}
- if (grpc_tcp_trace.enabled()) {
- const char* str = grpc_error_string(error);
- gpr_log(GPR_DEBUG, "Initiating read on %p: error=%s", tcp, str);
+ uv_socket->close_cb(socket);
+}
+
+static void uv_socket_read(grpc_custom_socket* socket, char* buffer,
+ size_t length, grpc_custom_read_callback read_cb) {
+ uv_socket_t* uv_socket = (uv_socket_t*)socket->impl;
+ int status;
+ grpc_error* error;
+ uv_socket->read_cb = read_cb;
+ uv_socket->read_buf = buffer;
+ uv_socket->read_len = length;
+ // TODO(murgatroid99): figure out what the return value here means
+ status =
+ uv_read_start((uv_stream_t*)uv_socket->handle, (uv_alloc_cb)alloc_uv_buf,
+ (uv_read_cb)uv_read_callback);
+ if (status != 0) {
+ error = tcp_error_create("TCP Read failed at start", status);
+ uv_socket->read_cb(socket, 0, error);
}
}
-static void uv_endpoint_read(grpc_endpoint* ep, grpc_slice_buffer* read_slices,
- grpc_closure* cb) {
- grpc_tcp* tcp = (grpc_tcp*)ep;
- GRPC_UV_ASSERT_SAME_THREAD();
- GPR_ASSERT(tcp->read_cb == NULL);
- tcp->read_cb = cb;
- tcp->read_slices = read_slices;
- grpc_slice_buffer_reset_and_unref_internal(read_slices);
- TCP_REF(tcp, "read");
- grpc_resource_user_alloc_slices(&tcp->slice_allocator,
- GRPC_TCP_DEFAULT_READ_SLICE_SIZE, 1,
- tcp->read_slices);
+static void uv_write_callback(uv_write_t* req, int status) {
+ grpc_custom_socket* socket = (grpc_custom_socket*)req->data;
+ uv_socket_t* uv_socket = (uv_socket_t*)socket->impl;
+ gpr_free(uv_socket->write_buffers);
+ uv_socket->write_cb(socket, tcp_error_create("TCP Write failed", status));
}
-static void write_callback(uv_write_t* req, int status) {
- grpc_tcp* tcp = (grpc_tcp*)req->data;
- grpc_error* error;
- grpc_core::ExecCtx exec_ctx;
- grpc_closure* cb = tcp->write_cb;
- tcp->write_cb = NULL;
- TCP_UNREF(tcp, "write");
- if (status == 0) {
- error = GRPC_ERROR_NONE;
- } else {
- error = tcp_annotate_error(
- GRPC_ERROR_CREATE_FROM_STATIC_STRING("TCP Write failed"), tcp);
- }
- if (grpc_tcp_trace.enabled()) {
- const char* str = grpc_error_string(error);
- gpr_log(GPR_DEBUG, "write complete on %p: error=%s", tcp, str);
+void uv_socket_write(grpc_custom_socket* socket,
+ grpc_slice_buffer* write_slices,
+ grpc_custom_write_callback write_cb) {
+ uv_socket_t* uv_socket = (uv_socket_t*)socket->impl;
+ uv_socket->write_cb = write_cb;
+ uv_buf_t* uv_buffers;
+ uv_write_t* write_req;
+
+ uv_buffers = (uv_buf_t*)gpr_malloc(sizeof(uv_buf_t) * write_slices->count);
+ for (size_t i = 0; i < write_slices->count; i++) {
+ uv_buffers[i].base = (char*)GRPC_SLICE_START_PTR(write_slices->slices[i]);
+ uv_buffers[i].len = GRPC_SLICE_LENGTH(write_slices->slices[i]);
}
- gpr_free(tcp->write_buffers);
- GRPC_CLOSURE_SCHED(cb, error);
+
+ uv_socket->write_buffers = uv_buffers;
+ write_req = &uv_socket->write_req;
+ write_req->data = socket;
+ // TODO(murgatroid99): figure out what the return value here means
+ uv_write(write_req, (uv_stream_t*)uv_socket->handle, uv_buffers,
+ write_slices->count, uv_write_callback);
}
-static void uv_endpoint_write(grpc_endpoint* ep,
- grpc_slice_buffer* write_slices,
- grpc_closure* cb) {
- grpc_tcp* tcp = (grpc_tcp*)ep;
- uv_buf_t* buffers;
- unsigned int buffer_count;
- unsigned int i;
- grpc_slice* slice;
- uv_write_t* write_req;
- GRPC_UV_ASSERT_SAME_THREAD();
+static void shutdown_callback(uv_shutdown_t* req, int status) {}
- if (grpc_tcp_trace.enabled()) {
- size_t j;
+static void uv_socket_shutdown(grpc_custom_socket* socket) {
+ uv_socket_t* uv_socket = (uv_socket_t*)socket->impl;
+ uv_shutdown_t* req = &uv_socket->shutdown_req;
+ uv_shutdown(req, (uv_stream_t*)uv_socket->handle, shutdown_callback);
+}
- for (j = 0; j < write_slices->count; j++) {
- char* data = grpc_dump_slice(write_slices->slices[j],
- GPR_DUMP_HEX | GPR_DUMP_ASCII);
- gpr_log(GPR_DEBUG, "WRITE %p (peer=%s): %s", tcp, tcp->peer_string, data);
- gpr_free(data);
- }
+static void uv_socket_close(grpc_custom_socket* socket,
+ grpc_custom_close_callback close_cb) {
+ uv_socket_t* uv_socket = (uv_socket_t*)socket->impl;
+ uv_socket->close_cb = close_cb;
+ uv_close((uv_handle_t*)uv_socket->handle, uv_close_callback);
+}
+
+static grpc_error* uv_socket_init_helper(uv_socket_t* uv_socket, int domain) {
+ uv_tcp_t* tcp = (uv_tcp_t*)gpr_malloc(sizeof(uv_tcp_t));
+ uv_socket->handle = tcp;
+ int status = uv_tcp_init_ex(uv_default_loop(), tcp, (unsigned int)domain);
+ if (status != 0) {
+ return tcp_error_create("Failed to initialize UV tcp handle", status);
}
+ uv_socket->write_buffers = nullptr;
+ uv_socket->read_len = 0;
+ uv_tcp_nodelay(uv_socket->handle, 1);
+ uv_socket->pending_connection = false;
+ uv_socket->accept_socket = nullptr;
+ uv_socket->accept_error = GRPC_ERROR_NONE;
+ return GRPC_ERROR_NONE;
+}
- if (tcp->shutting_down) {
- GRPC_CLOSURE_SCHED(cb,
- tcp_annotate_error(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "TCP socket is shutting down"),
- tcp));
- return;
+static grpc_error* uv_socket_init(grpc_custom_socket* socket, int domain) {
+ uv_socket_t* uv_socket = (uv_socket_t*)gpr_malloc(sizeof(uv_socket_t));
+ grpc_error* error = uv_socket_init_helper(uv_socket, domain);
+ if (error != GRPC_ERROR_NONE) {
+ return error;
}
+ uv_socket->handle->data = socket;
+ socket->impl = uv_socket;
+ return GRPC_ERROR_NONE;
+}
+
+static grpc_error* uv_socket_getpeername(grpc_custom_socket* socket,
+ const grpc_sockaddr* addr,
+ int* addr_len) {
+ uv_socket_t* uv_socket = (uv_socket_t*)socket->impl;
+ int err = uv_tcp_getpeername(uv_socket->handle,
+ (struct sockaddr*)IGNORE_CONST(addr), addr_len);
+ return tcp_error_create("getpeername failed", err);
+}
+
+static grpc_error* uv_socket_getsockname(grpc_custom_socket* socket,
+ const grpc_sockaddr* addr,
+ int* addr_len) {
+ uv_socket_t* uv_socket = (uv_socket_t*)socket->impl;
+ int err = uv_tcp_getsockname(uv_socket->handle,
+ (struct sockaddr*)IGNORE_CONST(addr), addr_len);
+ return tcp_error_create("getsockname failed", err);
+}
- GPR_ASSERT(tcp->write_cb == NULL);
- tcp->write_slices = write_slices;
- GPR_ASSERT(tcp->write_slices->count <= UINT_MAX);
- if (tcp->write_slices->count == 0) {
- // No slices means we don't have to do anything,
- // and libuv doesn't like empty writes
- GRPC_CLOSURE_SCHED(cb, GRPC_ERROR_NONE);
+static void accept_new_connection(grpc_custom_socket* socket) {
+ uv_socket_t* uv_socket = (uv_socket_t*)socket->impl;
+ if (!uv_socket->pending_connection || !uv_socket->accept_socket) {
return;
}
+ grpc_custom_socket* new_socket = uv_socket->accept_socket;
+ grpc_error* error = uv_socket->accept_error;
+ uv_socket->accept_socket = nullptr;
+ uv_socket->accept_error = GRPC_ERROR_NONE;
+ uv_socket->pending_connection = false;
+ if (uv_socket->accept_error != GRPC_ERROR_NONE) {
+ uv_stream_t dummy_handle;
+ uv_accept((uv_stream_t*)uv_socket->handle, &dummy_handle);
+ uv_socket->accept_cb(socket, new_socket, error);
+ } else {
+ uv_socket_t* uv_new_socket = (uv_socket_t*)gpr_malloc(sizeof(uv_socket_t));
+ uv_socket_init_helper(uv_new_socket, AF_UNSPEC);
+ // UV documentation says this is guaranteed to succeed
+ GPR_ASSERT(uv_accept((uv_stream_t*)uv_socket->handle,
+ (uv_stream_t*)uv_new_socket->handle) == 0);
+ new_socket->impl = uv_new_socket;
+ uv_new_socket->handle->data = new_socket;
+ uv_socket->accept_cb(socket, new_socket, error);
+ }
+}
- tcp->write_cb = cb;
- buffer_count = (unsigned int)tcp->write_slices->count;
- buffers = (uv_buf_t*)gpr_malloc(sizeof(uv_buf_t) * buffer_count);
- for (i = 0; i < buffer_count; i++) {
- slice = &tcp->write_slices->slices[i];
- buffers[i].base = (char*)GRPC_SLICE_START_PTR(*slice);
- buffers[i].len = GRPC_SLICE_LENGTH(*slice);
+static void uv_on_connect(uv_stream_t* server, int status) {
+ grpc_custom_socket* socket = (grpc_custom_socket*)server->data;
+ uv_socket_t* uv_socket = (uv_socket_t*)socket->impl;
+ GPR_ASSERT(!uv_socket->pending_connection);
+ uv_socket->pending_connection = true;
+ if (status < 0) {
+ switch (status) {
+ case UV_EINTR:
+ case UV_EAGAIN:
+ return;
+ default:
+ uv_socket->accept_error = tcp_error_create("accept failed", status);
+ }
}
- tcp->write_buffers = buffers;
- write_req = &tcp->write_req;
- write_req->data = tcp;
- TCP_REF(tcp, "write");
- // TODO(murgatroid99): figure out what the return value here means
- uv_write(write_req, (uv_stream_t*)tcp->handle, buffers, buffer_count,
- write_callback);
+ accept_new_connection(socket);
}
-static void uv_add_to_pollset(grpc_endpoint* ep, grpc_pollset* pollset) {
- // No-op. We're ignoring pollsets currently
- (void)ep;
- (void)pollset;
- grpc_tcp* tcp = (grpc_tcp*)ep;
- tcp->pollset = pollset;
+void uv_socket_accept(grpc_custom_socket* socket,
+ grpc_custom_socket* new_socket,
+ grpc_custom_accept_callback accept_cb) {
+ uv_socket_t* uv_socket = (uv_socket_t*)socket->impl;
+ uv_socket->accept_cb = accept_cb;
+ GPR_ASSERT(uv_socket->accept_socket == nullptr);
+ uv_socket->accept_socket = new_socket;
+ accept_new_connection(socket);
}
-static void uv_add_to_pollset_set(grpc_endpoint* ep,
- grpc_pollset_set* pollset) {
- // No-op. We're ignoring pollsets currently
- (void)ep;
- (void)pollset;
+static grpc_error* uv_socket_bind(grpc_custom_socket* socket,
+ const grpc_sockaddr* addr, size_t len,
+ int flags) {
+ uv_socket_t* uv_socket = (uv_socket_t*)socket->impl;
+ int status =
+ uv_tcp_bind((uv_tcp_t*)uv_socket->handle, (struct sockaddr*)addr, 0);
+ return tcp_error_create("Failed to bind to port", status);
}
-static void uv_delete_from_pollset_set(grpc_endpoint* ep,
- grpc_pollset_set* pollset) {
- // No-op. We're ignoring pollsets currently
- (void)ep;
- (void)pollset;
+static grpc_error* uv_socket_listen(grpc_custom_socket* socket) {
+ uv_socket_t* uv_socket = (uv_socket_t*)socket->impl;
+ int status =
+ uv_listen((uv_stream_t*)uv_socket->handle, SOMAXCONN, uv_on_connect);
+ return tcp_error_create("Failed to listen to port", status);
}
-static void shutdown_callback(uv_shutdown_t* req, int status) {}
+static grpc_error* uv_socket_setsockopt(grpc_custom_socket* socket, int level,
+ int option_name, const void* optval,
+ socklen_t option_len) {
+ int fd;
+ uv_socket_t* uv_socket = (uv_socket_t*)socket->impl;
+ uv_fileno((uv_handle_t*)uv_socket->handle, &fd);
+ // TODO Handle error here. Also, does this work on windows??
+ setsockopt(fd, level, option_name, &optval, (socklen_t)option_len);
+ return GRPC_ERROR_NONE;
+}
-static void uv_endpoint_shutdown(grpc_endpoint* ep, grpc_error* why) {
- grpc_tcp* tcp = (grpc_tcp*)ep;
- if (!tcp->shutting_down) {
- if (grpc_tcp_trace.enabled()) {
- const char* str = grpc_error_string(why);
- gpr_log(GPR_DEBUG, "TCP %p shutdown why=%s", tcp->handle, str);
- }
- tcp->shutting_down = true;
- uv_shutdown_t* req = &tcp->shutdown_req;
- uv_shutdown(req, (uv_stream_t*)tcp->handle, shutdown_callback);
- grpc_resource_user_shutdown(tcp->resource_user);
+static void uv_tc_on_connect(uv_connect_t* req, int status) {
+ grpc_custom_socket* socket = (grpc_custom_socket*)req->data;
+ uv_socket_t* uv_socket = (uv_socket_t*)socket->impl;
+ grpc_error* error;
+ if (status == UV_ECANCELED) {
+ // This should only happen if the handle is already closed
+ error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Timeout occurred");
+ } else {
+ error = tcp_error_create("Failed to connect to remote host", status);
}
- GRPC_ERROR_UNREF(why);
+ uv_socket->connect_cb(socket, error);
}
-static void uv_destroy(grpc_endpoint* ep) {
- grpc_network_status_unregister_endpoint(ep);
- grpc_tcp* tcp = (grpc_tcp*)ep;
- uv_close((uv_handle_t*)tcp->handle, uv_close_callback);
+static void uv_socket_connect(grpc_custom_socket* socket,
+ const grpc_sockaddr* addr, size_t len,
+ grpc_custom_connect_callback connect_cb) {
+ uv_socket_t* uv_socket = (uv_socket_t*)socket->impl;
+ uv_socket->connect_cb = connect_cb;
+ uv_socket->connect_req.data = socket;
+ int status = uv_tcp_connect(&uv_socket->connect_req, uv_socket->handle,
+ (struct sockaddr*)addr, uv_tc_on_connect);
+ if (status != 0) {
+ // The callback will not be called
+ uv_socket->connect_cb(socket, tcp_error_create("connect failed", status));
+ }
+}
+
+static grpc_resolved_addresses* handle_addrinfo_result(
+ struct addrinfo* result) {
+ struct addrinfo* resp;
+ struct addrinfo* prev;
+ size_t i;
+ grpc_resolved_addresses* addresses =
+ (grpc_resolved_addresses*)gpr_malloc(sizeof(grpc_resolved_addresses));
+ addresses->naddrs = 0;
+ for (resp = result; resp != nullptr; resp = resp->ai_next) {
+ addresses->naddrs++;
+ }
+ addresses->addrs = (grpc_resolved_address*)gpr_malloc(
+ sizeof(grpc_resolved_address) * addresses->naddrs);
+ i = 0;
+ resp = result;
+ while (resp != nullptr) {
+ memcpy(&addresses->addrs[i].addr, resp->ai_addr, resp->ai_addrlen);
+ addresses->addrs[i].len = resp->ai_addrlen;
+ i++;
+ prev = resp;
+ resp = resp->ai_next;
+ gpr_free(prev);
+ }
+ return addresses;
}
-static char* uv_get_peer(grpc_endpoint* ep) {
- grpc_tcp* tcp = (grpc_tcp*)ep;
- return gpr_strdup(tcp->peer_string);
+static void uv_resolve_callback(uv_getaddrinfo_t* req, int status,
+ struct addrinfo* res) {
+ grpc_custom_resolver* r = (grpc_custom_resolver*)req->data;
+ gpr_free(req);
+ grpc_resolved_addresses* result = nullptr;
+ if (status == 0) {
+ result = handle_addrinfo_result(res);
+ }
+ grpc_custom_resolve_callback(r, result,
+ tcp_error_create("getaddrinfo failed", status));
}
-static grpc_resource_user* uv_get_resource_user(grpc_endpoint* ep) {
- grpc_tcp* tcp = (grpc_tcp*)ep;
- return tcp->resource_user;
+static grpc_error* uv_resolve(char* host, char* port,
+ grpc_resolved_addresses** result) {
+ int status;
+ uv_getaddrinfo_t req;
+ struct addrinfo hints;
+ memset(&hints, 0, sizeof(struct addrinfo));
+ hints.ai_family = AF_UNSPEC; /* ipv4 or ipv6 */
+ hints.ai_socktype = SOCK_STREAM; /* stream socket */
+ hints.ai_flags = AI_PASSIVE; /* for wildcard IP address */
+ status = uv_getaddrinfo(uv_default_loop(), &req, NULL, host, port, &hints);
+ if (status != 0) {
+ *result = nullptr;
+ } else {
+ *result = handle_addrinfo_result(req.addrinfo);
+ }
+ return tcp_error_create("getaddrinfo failed", status);
}
-static int uv_get_fd(grpc_endpoint* ep) { return -1; }
-
-static grpc_endpoint_vtable vtable = {uv_endpoint_read,
- uv_endpoint_write,
- uv_add_to_pollset,
- uv_add_to_pollset_set,
- uv_delete_from_pollset_set,
- uv_endpoint_shutdown,
- uv_destroy,
- uv_get_resource_user,
- uv_get_peer,
- uv_get_fd};
-
-grpc_endpoint* grpc_tcp_create(uv_tcp_t* handle,
- grpc_resource_quota* resource_quota,
- char* peer_string) {
- grpc_tcp* tcp = (grpc_tcp*)gpr_malloc(sizeof(grpc_tcp));
- grpc_core::ExecCtx exec_ctx;
-
- if (grpc_tcp_trace.enabled()) {
- gpr_log(GPR_DEBUG, "Creating TCP endpoint %p", tcp);
+static void uv_resolve_async(grpc_custom_resolver* r, char* host, char* port) {
+ int status;
+ uv_getaddrinfo_t* req =
+ (uv_getaddrinfo_t*)gpr_malloc(sizeof(uv_getaddrinfo_t));
+ req->data = r;
+ struct addrinfo hints;
+ memset(&hints, 0, sizeof(struct addrinfo));
+ hints.ai_family = GRPC_AF_UNSPEC; /* ipv4 or ipv6 */
+ hints.ai_socktype = GRPC_SOCK_STREAM; /* stream socket */
+ hints.ai_flags = GRPC_AI_PASSIVE; /* for wildcard IP address */
+ status = uv_getaddrinfo(uv_default_loop(), req, uv_resolve_callback, host,
+ port, &hints);
+ if (status != 0) {
+ gpr_free(req);
+ grpc_error* error = tcp_error_create("getaddrinfo failed", status);
+ grpc_custom_resolve_callback(r, NULL, error);
}
+}
- /* Disable Nagle's Algorithm */
- uv_tcp_nodelay(handle, 1);
-
- memset(tcp, 0, sizeof(grpc_tcp));
- tcp->base.vtable = &vtable;
- tcp->handle = handle;
- handle->data = tcp;
- gpr_ref_init(&tcp->refcount, 1);
- tcp->peer_string = gpr_strdup(peer_string);
- tcp->shutting_down = false;
- tcp->read_slices = NULL;
- tcp->resource_user = grpc_resource_user_create(resource_quota, peer_string);
- grpc_resource_user_slice_allocator_init(
- &tcp->slice_allocator, tcp->resource_user, tcp_read_allocation_done, tcp);
- /* Tell network status tracking code about the new endpoint */
- grpc_network_status_register_endpoint(&tcp->base);
-
-#ifndef GRPC_UV_TCP_HOLD_LOOP
- uv_unref((uv_handle_t*)handle);
-#endif
+grpc_custom_resolver_vtable uv_resolver_vtable = {uv_resolve, uv_resolve_async};
- return &tcp->base;
-}
+grpc_socket_vtable grpc_uv_socket_vtable = {
+ uv_socket_init, uv_socket_connect, uv_socket_destroy,
+ uv_socket_shutdown, uv_socket_close, uv_socket_write,
+ uv_socket_read, uv_socket_getpeername, uv_socket_getsockname,
+ uv_socket_setsockopt, uv_socket_bind, uv_socket_listen,
+ uv_socket_accept};
-#endif /* GRPC_UV */
+#endif
diff --git a/src/core/lib/iomgr/tcp_uv.h b/src/core/lib/iomgr/tcp_uv.h
deleted file mode 100644
index 6b1a6f77c2..0000000000
--- a/src/core/lib/iomgr/tcp_uv.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- *
- * Copyright 2016 gRPC authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#ifndef GRPC_CORE_LIB_IOMGR_TCP_UV_H
-#define GRPC_CORE_LIB_IOMGR_TCP_UV_H
-/*
- Low level TCP "bottom half" implementation, for use by transports built on
- top of a TCP connection.
-
- Note that this file does not (yet) include APIs for creating the socket in
- the first place.
-
- All calls passing slice transfer ownership of a slice refcount unless
- otherwise specified.
-*/
-
-#include <grpc/support/port_platform.h>
-
-#include "src/core/lib/debug/trace.h"
-#include "src/core/lib/iomgr/endpoint.h"
-
-#include "src/core/lib/iomgr/port.h"
-
-#ifdef GRPC_UV
-
-#include <uv.h>
-
-extern grpc_core::TraceFlag grpc_tcp_trace;
-
-#define GRPC_TCP_DEFAULT_READ_SLICE_SIZE 8192
-
-grpc_endpoint* grpc_tcp_create(uv_tcp_t* handle,
- grpc_resource_quota* resource_quota,
- char* peer_string);
-
-#endif /* GRPC_UV */
-
-#endif /* GRPC_CORE_LIB_IOMGR_TCP_UV_H */
diff --git a/src/core/lib/iomgr/tcp_windows.cc b/src/core/lib/iomgr/tcp_windows.cc
index aab8edc888..04e6f11eee 100644
--- a/src/core/lib/iomgr/tcp_windows.cc
+++ b/src/core/lib/iomgr/tcp_windows.cc
@@ -51,7 +51,7 @@
#define GRPC_FIONBIO FIONBIO
#endif
-grpc_core::TraceFlag grpc_tcp_trace(false, "tcp");
+extern grpc_core::TraceFlag grpc_tcp_trace;
static grpc_error* set_non_block(SOCKET sock) {
int status;
diff --git a/src/core/lib/iomgr/timer.cc b/src/core/lib/iomgr/timer.cc
new file mode 100644
index 0000000000..e647cdefa0
--- /dev/null
+++ b/src/core/lib/iomgr/timer.cc
@@ -0,0 +1,45 @@
+/*
+ *
+ * Copyright 2018 gRPC authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <grpc/support/port_platform.h>
+
+#include "src/core/lib/iomgr/timer.h"
+#include "src/core/lib/iomgr/timer_manager.h"
+
+grpc_timer_vtable* grpc_timer_impl;
+
+void grpc_set_timer_impl(grpc_timer_vtable* vtable) {
+ grpc_timer_impl = vtable;
+}
+
+void grpc_timer_init(grpc_timer* timer, grpc_millis deadline,
+ grpc_closure* closure) {
+ grpc_timer_impl->init(timer, deadline, closure);
+}
+
+void grpc_timer_cancel(grpc_timer* timer) { grpc_timer_impl->cancel(timer); }
+
+grpc_timer_check_result grpc_timer_check(grpc_millis* next) {
+ return grpc_timer_impl->check(next);
+}
+
+void grpc_timer_list_init() { grpc_timer_impl->list_init(); }
+
+void grpc_timer_list_shutdown() { grpc_timer_impl->list_shutdown(); }
+
+void grpc_timer_consume_kick() { grpc_timer_impl->consume_kick(); }
diff --git a/src/core/lib/iomgr/timer.h b/src/core/lib/iomgr/timer.h
index 67f1b1b3f9..5ff10d3aee 100644
--- a/src/core/lib/iomgr/timer.h
+++ b/src/core/lib/iomgr/timer.h
@@ -23,17 +23,41 @@
#include "src/core/lib/iomgr/port.h"
-#ifdef GRPC_UV
-#include "src/core/lib/iomgr/timer_uv.h"
-#else
-#include "src/core/lib/iomgr/timer_generic.h"
-#endif /* GRPC_UV */
-
#include <grpc/support/time.h>
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/iomgr/iomgr.h"
-typedef struct grpc_timer grpc_timer;
+typedef struct grpc_timer {
+ gpr_atm deadline;
+ uint32_t heap_index; /* INVALID_HEAP_INDEX if not in heap */
+ bool pending;
+ struct grpc_timer* next;
+ struct grpc_timer* prev;
+ grpc_closure* closure;
+#ifndef NDEBUG
+ struct grpc_timer* hash_table_next;
+#endif
+
+ // Optional field used by custom timers
+ void* custom_timer;
+} grpc_timer;
+
+typedef enum {
+ GRPC_TIMERS_NOT_CHECKED,
+ GRPC_TIMERS_CHECKED_AND_EMPTY,
+ GRPC_TIMERS_FIRED,
+} grpc_timer_check_result;
+
+typedef struct grpc_timer_vtable {
+ void (*init)(grpc_timer* timer, grpc_millis, grpc_closure* closure);
+ void (*cancel)(grpc_timer* timer);
+
+ /* Internal API */
+ grpc_timer_check_result (*check)(grpc_millis* next);
+ void (*list_init)();
+ void (*list_shutdown)(void);
+ void (*consume_kick)(void);
+} grpc_timer_vtable;
/* Initialize *timer. When expired or canceled, closure will be called with
error set to indicate if it expired (GRPC_ERROR_NONE) or was canceled
@@ -78,12 +102,6 @@ void grpc_timer_cancel(grpc_timer* timer);
/* iomgr internal api for dealing with timers */
-typedef enum {
- GRPC_TIMERS_NOT_CHECKED,
- GRPC_TIMERS_CHECKED_AND_EMPTY,
- GRPC_TIMERS_FIRED,
-} grpc_timer_check_result;
-
/* Check for timers to be run, and run them.
Return true if timer callbacks were executed.
If next is non-null, TRY to update *next with the next running timer
@@ -99,7 +117,9 @@ void grpc_timer_list_shutdown();
void grpc_timer_consume_kick(void);
/* the following must be implemented by each iomgr implementation */
-
void grpc_kick_poller(void);
+/* Sets the timer implementation */
+void grpc_set_timer_impl(grpc_timer_vtable* vtable);
+
#endif /* GRPC_CORE_LIB_IOMGR_TIMER_H */
diff --git a/src/core/lib/iomgr/timer_custom.cc b/src/core/lib/iomgr/timer_custom.cc
new file mode 100644
index 0000000000..71d825ff9f
--- /dev/null
+++ b/src/core/lib/iomgr/timer_custom.cc
@@ -0,0 +1,93 @@
+/*
+ *
+ * Copyright 2017 gRPC authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <grpc/support/port_platform.h>
+
+#include "src/core/lib/iomgr/port.h"
+
+#include <grpc/support/alloc.h>
+#include <grpc/support/log.h>
+
+#include "src/core/lib/debug/trace.h"
+#include "src/core/lib/iomgr/iomgr_custom.h"
+#include "src/core/lib/iomgr/timer.h"
+#include "src/core/lib/iomgr/timer_custom.h"
+
+static grpc_custom_timer_vtable* custom_timer_impl;
+
+void grpc_custom_timer_callback(grpc_custom_timer* t, grpc_error* error) {
+ GRPC_CUSTOM_IOMGR_ASSERT_SAME_THREAD();
+ grpc_core::ExecCtx exec_ctx;
+ grpc_timer* timer = t->original;
+ GPR_ASSERT(timer->pending);
+ timer->pending = 0;
+ GRPC_CLOSURE_SCHED(timer->closure, GRPC_ERROR_NONE);
+ custom_timer_impl->stop(t);
+ gpr_free(t);
+}
+
+static void timer_init(grpc_timer* timer, grpc_millis deadline,
+ grpc_closure* closure) {
+ uint64_t timeout;
+ GRPC_CUSTOM_IOMGR_ASSERT_SAME_THREAD();
+ grpc_millis now = grpc_core::ExecCtx::Get()->Now();
+ if (deadline <= grpc_core::ExecCtx::Get()->Now()) {
+ GRPC_CLOSURE_SCHED(closure, GRPC_ERROR_NONE);
+ timer->pending = false;
+ return;
+ } else {
+ timeout = deadline - now;
+ }
+ timer->pending = true;
+ timer->closure = closure;
+ grpc_custom_timer* timer_wrapper =
+ (grpc_custom_timer*)gpr_malloc(sizeof(grpc_custom_timer));
+ timer_wrapper->timeout_ms = timeout;
+ timer->custom_timer = (void*)timer_wrapper;
+ timer_wrapper->original = timer;
+ custom_timer_impl->start(timer_wrapper);
+}
+
+static void timer_cancel(grpc_timer* timer) {
+ GRPC_CUSTOM_IOMGR_ASSERT_SAME_THREAD();
+ grpc_custom_timer* tw = (grpc_custom_timer*)timer->custom_timer;
+ if (timer->pending) {
+ timer->pending = 0;
+ GRPC_CLOSURE_SCHED(timer->closure, GRPC_ERROR_CANCELLED);
+ custom_timer_impl->stop(tw);
+ gpr_free(tw);
+ }
+}
+
+static grpc_timer_check_result timer_check(grpc_millis* next) {
+ return GRPC_TIMERS_NOT_CHECKED;
+}
+
+static void timer_list_init() {}
+static void timer_list_shutdown() {}
+
+static void timer_consume_kick(void) {}
+
+static grpc_timer_vtable custom_timer_vtable = {
+ timer_init, timer_cancel, timer_check,
+ timer_list_init, timer_list_shutdown, timer_consume_kick};
+
+void grpc_custom_timer_init(grpc_custom_timer_vtable* impl) {
+ custom_timer_impl = impl;
+ grpc_set_timer_impl(&custom_timer_vtable);
+}
diff --git a/src/core/lib/iomgr/timer_custom.h b/src/core/lib/iomgr/timer_custom.h
new file mode 100644
index 0000000000..bfea8bafa6
--- /dev/null
+++ b/src/core/lib/iomgr/timer_custom.h
@@ -0,0 +1,43 @@
+/*
+ *
+ * Copyright 2018 gRPC authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef GRPC_CORE_LIB_IOMGR_TIMER_CUSTOM_H
+#define GRPC_CORE_LIB_IOMGR_TIMER_CUSTOM_H
+
+#include <grpc/support/port_platform.h>
+
+#include "src/core/lib/iomgr/timer.h"
+
+typedef struct grpc_custom_timer {
+ // Implementation defined
+ void* timer;
+ uint64_t timeout_ms;
+
+ grpc_timer* original;
+} grpc_custom_timer;
+
+typedef struct grpc_custom_timer_vtable {
+ void (*start)(grpc_custom_timer* t);
+ void (*stop)(grpc_custom_timer* t);
+} grpc_custom_timer_vtable;
+
+void grpc_custom_timer_init(grpc_custom_timer_vtable* impl);
+
+void grpc_custom_timer_callback(grpc_custom_timer* t, grpc_error* error);
+
+#endif /* GRPC_CORE_LIB_IOMGR_TIMER_CUSTOM_H */
diff --git a/src/core/lib/iomgr/timer_generic.cc b/src/core/lib/iomgr/timer_generic.cc
index 52a571f425..93e654b7fa 100644
--- a/src/core/lib/iomgr/timer_generic.cc
+++ b/src/core/lib/iomgr/timer_generic.cc
@@ -22,8 +22,6 @@
#include <inttypes.h>
-#ifdef GRPC_TIMER_USE_GENERIC
-
#include "src/core/lib/iomgr/timer.h"
#include <grpc/support/alloc.h>
@@ -238,7 +236,7 @@ static gpr_atm compute_min_deadline(timer_shard* shard) {
: grpc_timer_heap_top(&shard->heap)->deadline;
}
-void grpc_timer_list_init() {
+static void timer_list_init() {
uint32_t i;
g_num_shards = GPR_MIN(1, 2 * gpr_cpu_num_cores());
@@ -270,7 +268,7 @@ void grpc_timer_list_init() {
INIT_TIMER_HASH_TABLE();
}
-void grpc_timer_list_shutdown() {
+static void timer_list_shutdown() {
size_t i;
run_some_expired_timers(
GPR_ATM_MAX, nullptr,
@@ -326,8 +324,8 @@ static void note_deadline_change(timer_shard* shard) {
void grpc_timer_init_unset(grpc_timer* timer) { timer->pending = false; }
-void grpc_timer_init(grpc_timer* timer, grpc_millis deadline,
- grpc_closure* closure) {
+static void timer_init(grpc_timer* timer, grpc_millis deadline,
+ grpc_closure* closure) {
int is_first_timer = 0;
timer_shard* shard = &g_shards[GPR_HASH_POINTER(timer, g_num_shards)];
timer->closure = closure;
@@ -412,12 +410,12 @@ void grpc_timer_init(grpc_timer* timer, grpc_millis deadline,
}
}
-void grpc_timer_consume_kick(void) {
+static void timer_consume_kick(void) {
/* force re-evaluation of last seeen min */
gpr_tls_set(&g_last_seen_min_timer, 0);
}
-void grpc_timer_cancel(grpc_timer* timer) {
+static void timer_cancel(grpc_timer* timer) {
if (!g_shared_mutables.initialized) {
/* must have already been cancelled, also the shard mutex is invalid */
return;
@@ -604,7 +602,7 @@ static grpc_timer_check_result run_some_expired_timers(gpr_atm now,
return result;
}
-grpc_timer_check_result grpc_timer_check(grpc_millis* next) {
+static grpc_timer_check_result timer_check(grpc_millis* next) {
// prelude
grpc_millis now = grpc_core::ExecCtx::Get()->Now();
@@ -660,4 +658,6 @@ grpc_timer_check_result grpc_timer_check(grpc_millis* next) {
return r;
}
-#endif /* GRPC_TIMER_USE_GENERIC */
+grpc_timer_vtable grpc_generic_timer_vtable = {
+ timer_init, timer_cancel, timer_check,
+ timer_list_init, timer_list_shutdown, timer_consume_kick};
diff --git a/src/core/lib/iomgr/timer_heap.cc b/src/core/lib/iomgr/timer_heap.cc
index e5b5abfc97..0c17d607eb 100644
--- a/src/core/lib/iomgr/timer_heap.cc
+++ b/src/core/lib/iomgr/timer_heap.cc
@@ -20,8 +20,6 @@
#include "src/core/lib/iomgr/port.h"
-#ifdef GRPC_TIMER_USE_GENERIC
-
#include "src/core/lib/iomgr/timer_heap.h"
#include <string.h>
@@ -135,5 +133,3 @@ grpc_timer* grpc_timer_heap_top(grpc_timer_heap* heap) {
void grpc_timer_heap_pop(grpc_timer_heap* heap) {
grpc_timer_heap_remove(heap, grpc_timer_heap_top(heap));
}
-
-#endif /* GRPC_TIMER_USE_GENERIC */
diff --git a/src/core/lib/iomgr/timer_uv.cc b/src/core/lib/iomgr/timer_uv.cc
index 6f28f553c5..dadeb960b2 100644
--- a/src/core/lib/iomgr/timer_uv.cc
+++ b/src/core/lib/iomgr/timer_uv.cc
@@ -20,20 +20,18 @@
#include "src/core/lib/iomgr/port.h"
-#if GRPC_UV
+#ifdef GRPC_UV
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include "src/core/lib/debug/trace.h"
-#include "src/core/lib/iomgr/iomgr_uv.h"
+#include "src/core/lib/iomgr/iomgr_custom.h"
#include "src/core/lib/iomgr/timer.h"
+#include "src/core/lib/iomgr/timer_custom.h"
#include <uv.h>
-grpc_core::TraceFlag grpc_timer_trace(false, "timer");
-grpc_core::TraceFlag grpc_timer_check_trace(false, "timer_check");
-
static void timer_close_callback(uv_handle_t* handle) { gpr_free(handle); }
static void stop_uv_timer(uv_timer_t* handle) {
@@ -43,57 +41,23 @@ static void stop_uv_timer(uv_timer_t* handle) {
}
void run_expired_timer(uv_timer_t* handle) {
- grpc_timer* timer = (grpc_timer*)handle->data;
- grpc_core::ExecCtx exec_ctx;
- GRPC_UV_ASSERT_SAME_THREAD();
- GPR_ASSERT(timer->pending);
- timer->pending = 0;
- GRPC_CLOSURE_SCHED(timer->closure, GRPC_ERROR_NONE);
- stop_uv_timer(handle);
+ grpc_custom_timer* timer_wrapper = (grpc_custom_timer*)handle->data;
+ grpc_custom_timer_callback(timer_wrapper, GRPC_ERROR_NONE);
}
-void grpc_timer_init(grpc_timer* timer, grpc_millis deadline,
- grpc_closure* closure) {
- uint64_t timeout;
+static void timer_start(grpc_custom_timer* t) {
uv_timer_t* uv_timer;
- GRPC_UV_ASSERT_SAME_THREAD();
- timer->closure = closure;
- if (deadline <= grpc_core::ExecCtx::Get()->Now()) {
- timer->pending = 0;
- GRPC_CLOSURE_SCHED(timer->closure, GRPC_ERROR_NONE);
- return;
- }
- timer->pending = 1;
- timeout = (uint64_t)(deadline - grpc_core::ExecCtx::Get()->Now());
uv_timer = (uv_timer_t*)gpr_malloc(sizeof(uv_timer_t));
uv_timer_init(uv_default_loop(), uv_timer);
- uv_timer->data = timer;
- timer->uv_timer = uv_timer;
- uv_timer_start(uv_timer, run_expired_timer, timeout, 0);
- /* We assume that gRPC timers are only used alongside other active gRPC
- objects, and that there will therefore always be something else keeping
- the uv loop alive whenever there is a timer */
- uv_unref((uv_handle_t*)uv_timer);
+ uv_timer->data = t;
+ t->timer = (void*)uv_timer;
+ uv_timer_start(uv_timer, run_expired_timer, t->timeout_ms, 0);
}
-void grpc_timer_init_unset(grpc_timer* timer) { timer->pending = 0; }
-
-void grpc_timer_cancel(grpc_timer* timer) {
- GRPC_UV_ASSERT_SAME_THREAD();
- if (timer->pending) {
- timer->pending = 0;
- GRPC_CLOSURE_SCHED(timer->closure, GRPC_ERROR_CANCELLED);
- stop_uv_timer((uv_timer_t*)timer->uv_timer);
- }
+static void timer_stop(grpc_custom_timer* t) {
+ stop_uv_timer((uv_timer_t*)t->timer);
}
-grpc_timer_check_result grpc_timer_check(grpc_millis* next) {
- return GRPC_TIMERS_NOT_CHECKED;
-}
-
-void grpc_timer_list_init() {}
-void grpc_timer_list_shutdown() {}
-
-void grpc_timer_consume_kick(void) {}
+grpc_custom_timer_vtable uv_timer_vtable = {timer_start, timer_stop};
-#endif /* GRPC_UV */
+#endif
diff --git a/src/core/lib/iomgr/udp_server.cc b/src/core/lib/iomgr/udp_server.cc
index e739a5df93..04716a254d 100644
--- a/src/core/lib/iomgr/udp_server.cc
+++ b/src/core/lib/iomgr/udp_server.cc
@@ -345,9 +345,9 @@ static int bind_socket(grpc_socket_factory* socket_factory, int sockfd,
return (socket_factory != nullptr)
? grpc_socket_factory_bind(socket_factory, sockfd, addr)
: bind(sockfd,
- reinterpret_cast<struct sockaddr*>(
+ reinterpret_cast<grpc_sockaddr*>(
const_cast<char*>(addr->addr)),
- static_cast<socklen_t>(addr->len));
+ addr->len);
}
/* Prepare a recently-created socket for listening. */
@@ -355,8 +355,8 @@ static int prepare_socket(grpc_socket_factory* socket_factory, int fd,
const grpc_resolved_address* addr, int rcv_buf_size,
int snd_buf_size) {
grpc_resolved_address sockname_temp;
- struct sockaddr* addr_ptr =
- reinterpret_cast<struct sockaddr*>(const_cast<char*>(addr->addr));
+ grpc_sockaddr* addr_ptr =
+ reinterpret_cast<grpc_sockaddr*>(const_cast<char*>(addr->addr));
if (fd < 0) {
goto error;
@@ -390,10 +390,10 @@ static int prepare_socket(grpc_socket_factory* socket_factory, int fd,
goto error;
}
- sockname_temp.len = sizeof(struct sockaddr_storage);
+ sockname_temp.len = static_cast<socklen_t>(sizeof(struct sockaddr_storage));
- if (getsockname(fd, reinterpret_cast<struct sockaddr*>(sockname_temp.addr),
- reinterpret_cast<socklen_t*>(&sockname_temp.len)) < 0) {
+ if (getsockname(fd, reinterpret_cast<grpc_sockaddr*>(sockname_temp.addr),
+ &sockname_temp.len) < 0) {
goto error;
}
@@ -575,11 +575,11 @@ int grpc_udp_server_add_port(grpc_udp_server* s,
as some previously created listener. */
if (grpc_sockaddr_get_port(addr) == 0) {
for (size_t i = 0; i < s->listeners.size(); ++i) {
- sockname_temp.len = sizeof(struct sockaddr_storage);
- if (0 ==
- getsockname(s->listeners[i].fd(),
- reinterpret_cast<struct sockaddr*>(sockname_temp.addr),
- reinterpret_cast<socklen_t*>(&sockname_temp.len))) {
+ sockname_temp.len =
+ static_cast<socklen_t>(sizeof(struct sockaddr_storage));
+ if (0 == getsockname(s->listeners[i].fd(),
+ reinterpret_cast<grpc_sockaddr*>(sockname_temp.addr),
+ &sockname_temp.len)) {
port = grpc_sockaddr_get_port(&sockname_temp);
if (port > 0) {
allocated_addr = static_cast<grpc_resolved_address*>(
diff --git a/src/core/lib/iomgr/unix_sockets_posix.cc b/src/core/lib/iomgr/unix_sockets_posix.cc
index 8d252fd331..22fcaf57fc 100644
--- a/src/core/lib/iomgr/unix_sockets_posix.cc
+++ b/src/core/lib/iomgr/unix_sockets_posix.cc
@@ -61,20 +61,21 @@ grpc_error* grpc_resolve_unix_domain_address(const char* name,
un = reinterpret_cast<struct sockaddr_un*>((*addrs)->addrs->addr);
un->sun_family = AF_UNIX;
strncpy(un->sun_path, name, sizeof(un->sun_path));
- (*addrs)->addrs->len = strlen(un->sun_path) + sizeof(un->sun_family) + 1;
+ (*addrs)->addrs->len =
+ static_cast<socklen_t>(strlen(un->sun_path) + sizeof(un->sun_family) + 1);
return GRPC_ERROR_NONE;
}
int grpc_is_unix_socket(const grpc_resolved_address* resolved_addr) {
- const struct sockaddr* addr =
- reinterpret_cast<const struct sockaddr*>(resolved_addr->addr);
+ const grpc_sockaddr* addr =
+ reinterpret_cast<const grpc_sockaddr*>(resolved_addr->addr);
return addr->sa_family == AF_UNIX;
}
void grpc_unlink_if_unix_domain_socket(
const grpc_resolved_address* resolved_addr) {
- const struct sockaddr* addr =
- reinterpret_cast<const struct sockaddr*>(resolved_addr->addr);
+ const grpc_sockaddr* addr =
+ reinterpret_cast<const grpc_sockaddr*>(resolved_addr->addr);
if (addr->sa_family != AF_UNIX) {
return;
}
@@ -89,8 +90,8 @@ void grpc_unlink_if_unix_domain_socket(
char* grpc_sockaddr_to_uri_unix_if_possible(
const grpc_resolved_address* resolved_addr) {
- const struct sockaddr* addr =
- reinterpret_cast<const struct sockaddr*>(resolved_addr->addr);
+ const grpc_sockaddr* addr =
+ reinterpret_cast<const grpc_sockaddr*>(resolved_addr->addr);
if (addr->sa_family != AF_UNIX) {
return nullptr;
}
diff --git a/src/core/lib/profiling/basic_timers.cc b/src/core/lib/profiling/basic_timers.cc
index 43384fd0ca..652a498b6e 100644
--- a/src/core/lib/profiling/basic_timers.cc
+++ b/src/core/lib/profiling/basic_timers.cc
@@ -26,11 +26,11 @@
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
#include <grpc/support/time.h>
+#include <inttypes.h>
#include <stdio.h>
#include <string.h>
#include "src/core/lib/gpr/env.h"
-#include "src/core/lib/gprpp/thd.h"
typedef enum { BEGIN = '{', END = '}', MARK = '.' } marker_type;
@@ -68,7 +68,7 @@ static pthread_cond_t g_cv;
static gpr_timer_log_list g_in_progress_logs;
static gpr_timer_log_list g_done_logs;
static int g_shutdown;
-static grpc_core::Thread* g_writing_thread;
+static pthread_t g_writing_thread;
static __thread int g_thread_id;
static int g_next_thread_id;
static int g_writing_enabled = 1;
@@ -149,7 +149,7 @@ static void write_log(gpr_timer_log* log) {
}
}
-static void writing_thread(void* unused) {
+static void* writing_thread(void* unused) {
gpr_timer_log* log;
pthread_mutex_lock(&g_mu);
for (;;) {
@@ -164,7 +164,7 @@ static void writing_thread(void* unused) {
}
if (g_shutdown) {
pthread_mutex_unlock(&g_mu);
- return;
+ return NULL;
}
}
}
@@ -182,8 +182,7 @@ static void finish_writing(void) {
g_shutdown = 1;
pthread_cond_signal(&g_cv);
pthread_mutex_unlock(&g_mu);
- g_writing_thread->Join();
- grpc_core::Delete(g_writing_thread);
+ pthread_join(g_writing_thread, NULL);
gpr_log(GPR_INFO, "flushing logs");
@@ -202,8 +201,12 @@ void gpr_timers_set_log_filename(const char* filename) {
}
static void init_output() {
- g_writing_thread = grpc_core::New<grpc_core::Thread>("timer_output_thread",
- writing_thread, nullptr);
+ pthread_attr_t attr;
+ pthread_attr_init(&attr);
+ pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
+ pthread_create(&g_writing_thread, &attr, &writing_thread, NULL);
+ pthread_attr_destroy(&attr);
+
atexit(finish_writing);
}
diff --git a/src/core/lib/profiling/timers.h b/src/core/lib/profiling/timers.h
index d0188b5054..7ff72783ec 100644
--- a/src/core/lib/profiling/timers.h
+++ b/src/core/lib/profiling/timers.h
@@ -82,9 +82,12 @@ class ProfileScope {
};
} // namespace grpc
-#define GPR_TIMER_SCOPE(tag, important) \
- ::grpc::ProfileScope _profile_scope_##__LINE__((tag), (important), __FILE__, \
- __LINE__)
+#define GPR_TIMER_SCOPE_NAME_INTERNAL(prefix, line) prefix##line
+#define GPR_TIMER_SCOPE_NAME(prefix, line) \
+ GPR_TIMER_SCOPE_NAME_INTERNAL(prefix, line)
+#define GPR_TIMER_SCOPE(tag, important) \
+ ::grpc::ProfileScope GPR_TIMER_SCOPE_NAME(_profile_scope_, __LINE__)( \
+ (tag), (important), __FILE__, __LINE__)
#endif /* at least one profiler requested. */
diff --git a/src/core/lib/security/credentials/ssl/ssl_credentials.cc b/src/core/lib/security/credentials/ssl/ssl_credentials.cc
index 252b25bc0a..2b6377d3ec 100644
--- a/src/core/lib/security/credentials/ssl/ssl_credentials.cc
+++ b/src/core/lib/security/credentials/ssl/ssl_credentials.cc
@@ -24,6 +24,7 @@
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/surface/api_trace.h"
+#include "src/core/tsi/ssl_transport_security.h"
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
@@ -56,16 +57,22 @@ static grpc_security_status ssl_create_security_connector(
grpc_ssl_credentials* c = reinterpret_cast<grpc_ssl_credentials*>(creds);
grpc_security_status status = GRPC_SECURITY_OK;
const char* overridden_target_name = nullptr;
+ tsi_ssl_session_cache* ssl_session_cache = nullptr;
for (size_t i = 0; args && i < args->num_args; i++) {
grpc_arg* arg = &args->args[i];
if (strcmp(arg->key, GRPC_SSL_TARGET_NAME_OVERRIDE_ARG) == 0 &&
arg->type == GRPC_ARG_STRING) {
overridden_target_name = arg->value.string;
- break;
+ }
+ if (strcmp(arg->key, GRPC_SSL_SESSION_CACHE_ARG) == 0 &&
+ arg->type == GRPC_ARG_POINTER) {
+ ssl_session_cache =
+ static_cast<tsi_ssl_session_cache*>(arg->value.pointer.p);
}
}
status = grpc_ssl_channel_security_connector_create(
- creds, call_creds, &c->config, target, overridden_target_name, sc);
+ creds, call_creds, &c->config, target, overridden_target_name,
+ ssl_session_cache, sc);
if (status != GRPC_SECURITY_OK) {
return status;
}
diff --git a/src/core/lib/security/security_connector/security_connector.cc b/src/core/lib/security/security_connector/security_connector.cc
index 7b90b19075..32ac8033ea 100644
--- a/src/core/lib/security/security_connector/security_connector.cc
+++ b/src/core/lib/security/security_connector/security_connector.cc
@@ -540,6 +540,46 @@ grpc_server_security_connector* grpc_fake_server_security_connector_create(
/* --- Ssl implementation. --- */
+grpc_ssl_session_cache* grpc_ssl_session_cache_create_lru(size_t capacity) {
+ tsi_ssl_session_cache* cache = tsi_ssl_session_cache_create_lru(capacity);
+ return reinterpret_cast<grpc_ssl_session_cache*>(cache);
+}
+
+void grpc_ssl_session_cache_destroy(grpc_ssl_session_cache* cache) {
+ tsi_ssl_session_cache* tsi_cache =
+ reinterpret_cast<tsi_ssl_session_cache*>(cache);
+ tsi_ssl_session_cache_unref(tsi_cache);
+}
+
+static void* grpc_ssl_session_cache_arg_copy(void* p) {
+ tsi_ssl_session_cache* tsi_cache =
+ reinterpret_cast<tsi_ssl_session_cache*>(p);
+ // destroy call below will unref the pointer.
+ tsi_ssl_session_cache_ref(tsi_cache);
+ return p;
+}
+
+static void grpc_ssl_session_cache_arg_destroy(void* p) {
+ tsi_ssl_session_cache* tsi_cache =
+ reinterpret_cast<tsi_ssl_session_cache*>(p);
+ tsi_ssl_session_cache_unref(tsi_cache);
+}
+
+static int grpc_ssl_session_cache_arg_cmp(void* p, void* q) {
+ return GPR_ICMP(p, q);
+}
+
+grpc_arg grpc_ssl_session_cache_create_channel_arg(
+ grpc_ssl_session_cache* cache) {
+ static const grpc_arg_pointer_vtable vtable = {
+ grpc_ssl_session_cache_arg_copy,
+ grpc_ssl_session_cache_arg_destroy,
+ grpc_ssl_session_cache_arg_cmp,
+ };
+ return grpc_channel_arg_pointer_create(
+ const_cast<char*>(GRPC_SSL_SESSION_CACHE_ARG), cache, &vtable);
+}
+
typedef struct {
grpc_channel_security_connector base;
tsi_ssl_client_handshaker_factory* client_handshaker_factory;
@@ -758,6 +798,9 @@ grpc_auth_context* tsi_ssl_peer_to_auth_context(const tsi_peer* peer) {
} else if (strcmp(prop->name, TSI_X509_PEM_CERT_PROPERTY) == 0) {
grpc_auth_context_add_property(ctx, GRPC_X509_PEM_CERT_PROPERTY_NAME,
prop->value.data, prop->value.length);
+ } else if (strcmp(prop->name, TSI_SSL_SESSION_REUSED_PEER_PROPERTY) == 0) {
+ grpc_auth_context_add_property(ctx, GRPC_SSL_SESSION_REUSED_PROPERTY,
+ prop->value.data, prop->value.length);
}
}
if (peer_identity_property_name != nullptr) {
@@ -981,28 +1024,30 @@ grpc_security_status grpc_ssl_channel_security_connector_create(
grpc_channel_credentials* channel_creds,
grpc_call_credentials* request_metadata_creds,
const grpc_ssl_config* config, const char* target_name,
- const char* overridden_target_name, grpc_channel_security_connector** sc) {
- size_t num_alpn_protocols = 0;
- const char** alpn_protocol_strings =
- fill_alpn_protocol_strings(&num_alpn_protocols);
+ const char* overridden_target_name,
+ tsi_ssl_session_cache* ssl_session_cache,
+ grpc_channel_security_connector** sc) {
tsi_result result = TSI_OK;
grpc_ssl_channel_security_connector* c;
- const char* pem_root_certs;
char* port;
bool has_key_cert_pair;
+ tsi_ssl_client_handshaker_options options;
+ memset(&options, 0, sizeof(options));
+ options.alpn_protocols =
+ fill_alpn_protocol_strings(&options.num_alpn_protocols);
if (config == nullptr || target_name == nullptr) {
gpr_log(GPR_ERROR, "An ssl channel needs a config and a target name.");
goto error;
}
if (config->pem_root_certs == nullptr) {
- pem_root_certs = grpc_get_default_ssl_roots();
- if (pem_root_certs == nullptr) {
+ options.pem_root_certs = grpc_get_default_ssl_roots();
+ if (options.pem_root_certs == nullptr) {
gpr_log(GPR_ERROR, "Could not get default pem root certs.");
goto error;
}
} else {
- pem_root_certs = config->pem_root_certs;
+ options.pem_root_certs = config->pem_root_certs;
}
c = static_cast<grpc_ssl_channel_security_connector*>(
@@ -1026,10 +1071,13 @@ grpc_security_status grpc_ssl_channel_security_connector_create(
has_key_cert_pair = config->pem_key_cert_pair != nullptr &&
config->pem_key_cert_pair->private_key != nullptr &&
config->pem_key_cert_pair->cert_chain != nullptr;
- result = tsi_create_ssl_client_handshaker_factory(
- has_key_cert_pair ? config->pem_key_cert_pair : nullptr, pem_root_certs,
- ssl_cipher_suites(), alpn_protocol_strings,
- static_cast<uint16_t>(num_alpn_protocols), &c->client_handshaker_factory);
+ if (has_key_cert_pair) {
+ options.pem_key_cert_pair = config->pem_key_cert_pair;
+ }
+ options.cipher_suites = ssl_cipher_suites();
+ options.session_cache = ssl_session_cache;
+ result = tsi_create_ssl_client_handshaker_factory_with_options(
+ &options, &c->client_handshaker_factory);
if (result != TSI_OK) {
gpr_log(GPR_ERROR, "Handshaker factory creation failed with %s.",
tsi_result_to_string(result));
@@ -1038,11 +1086,11 @@ grpc_security_status grpc_ssl_channel_security_connector_create(
goto error;
}
*sc = &c->base;
- gpr_free((void*)alpn_protocol_strings);
+ gpr_free((void*)options.alpn_protocols);
return GRPC_SECURITY_OK;
error:
- gpr_free((void*)alpn_protocol_strings);
+ gpr_free((void*)options.alpn_protocols);
return GRPC_SECURITY_ERROR;
}
diff --git a/src/core/lib/security/security_connector/security_connector.h b/src/core/lib/security/security_connector/security_connector.h
index 130c8ecd3e..dc847d94f9 100644
--- a/src/core/lib/security/security_connector/security_connector.h
+++ b/src/core/lib/security/security_connector/security_connector.h
@@ -212,7 +212,9 @@ grpc_security_status grpc_ssl_channel_security_connector_create(
grpc_channel_credentials* channel_creds,
grpc_call_credentials* request_metadata_creds,
const grpc_ssl_config* config, const char* target_name,
- const char* overridden_target_name, grpc_channel_security_connector** sc);
+ const char* overridden_target_name,
+ tsi_ssl_session_cache* ssl_session_cache,
+ grpc_channel_security_connector** sc);
/* Gets the default ssl roots. Returns NULL if not found. */
const char* grpc_get_default_ssl_roots(void);
diff --git a/src/core/lib/security/transport/client_auth_filter.cc b/src/core/lib/security/transport/client_auth_filter.cc
index d6ca8ee8f8..048e390a71 100644
--- a/src/core/lib/security/transport/client_auth_filter.cc
+++ b/src/core/lib/security/transport/client_auth_filter.cc
@@ -45,8 +45,6 @@ struct call_data {
grpc_call_stack* owning_call;
grpc_call_combiner* call_combiner;
grpc_call_credentials* creds;
- bool have_host;
- bool have_method;
grpc_slice host;
grpc_slice method;
/* pollset{_set} bound to this call; if we need to make external
@@ -294,27 +292,15 @@ static void auth_start_transport_stream_op_batch(
}
if (batch->send_initial_metadata) {
- for (grpc_linked_mdelem* l = batch->payload->send_initial_metadata
- .send_initial_metadata->list.head;
- l != nullptr; l = l->next) {
- grpc_mdelem md = l->md;
- /* Pointer comparison is OK for md_elems created from the same context.
- */
- if (grpc_slice_eq(GRPC_MDKEY(md), GRPC_MDSTR_AUTHORITY)) {
- if (calld->have_host) {
- grpc_slice_unref_internal(calld->host);
- }
- calld->host = grpc_slice_ref_internal(GRPC_MDVALUE(md));
- calld->have_host = true;
- } else if (grpc_slice_eq(GRPC_MDKEY(md), GRPC_MDSTR_PATH)) {
- if (calld->have_method) {
- grpc_slice_unref_internal(calld->method);
- }
- calld->method = grpc_slice_ref_internal(GRPC_MDVALUE(md));
- calld->have_method = true;
- }
+ grpc_metadata_batch* metadata =
+ batch->payload->send_initial_metadata.send_initial_metadata;
+ if (metadata->idx.named.path != nullptr) {
+ calld->method =
+ grpc_slice_ref_internal(GRPC_MDVALUE(metadata->idx.named.path->md));
}
- if (calld->have_host) {
+ if (metadata->idx.named.authority != nullptr) {
+ calld->host = grpc_slice_ref_internal(
+ GRPC_MDVALUE(metadata->idx.named.authority->md));
batch->handler_private.extra_arg = elem;
GRPC_CALL_STACK_REF(calld->owning_call, "check_call_host");
GRPC_CLOSURE_INIT(&calld->async_result_closure, on_host_checked, batch,
@@ -351,6 +337,8 @@ static grpc_error* init_call_elem(grpc_call_element* elem,
call_data* calld = static_cast<call_data*>(elem->call_data);
calld->owning_call = args->call_stack;
calld->call_combiner = args->call_combiner;
+ calld->host = grpc_empty_slice();
+ calld->method = grpc_empty_slice();
return GRPC_ERROR_NONE;
}
@@ -367,12 +355,8 @@ static void destroy_call_elem(grpc_call_element* elem,
call_data* calld = static_cast<call_data*>(elem->call_data);
grpc_credentials_mdelem_array_destroy(&calld->md_array);
grpc_call_credentials_unref(calld->creds);
- if (calld->have_host) {
- grpc_slice_unref_internal(calld->host);
- }
- if (calld->have_method) {
- grpc_slice_unref_internal(calld->method);
- }
+ grpc_slice_unref_internal(calld->host);
+ grpc_slice_unref_internal(calld->method);
grpc_auth_metadata_context_reset(&calld->auth_md_context);
}
diff --git a/src/core/lib/security/transport/security_handshaker.h b/src/core/lib/security/transport/security_handshaker.h
index ecf59ec5c5..88483b02e7 100644
--- a/src/core/lib/security/transport/security_handshaker.h
+++ b/src/core/lib/security/transport/security_handshaker.h
@@ -22,7 +22,6 @@
#include <grpc/support/port_platform.h>
#include "src/core/lib/channel/handshaker.h"
-#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/security/security_connector/security_connector.h"
/// Creates a security handshaker using \a handshaker.
diff --git a/src/core/lib/slice/slice_buffer.cc b/src/core/lib/slice/slice_buffer.cc
index e418ab10ef..58ca495517 100644
--- a/src/core/lib/slice/slice_buffer.cc
+++ b/src/core/lib/slice/slice_buffer.cc
@@ -26,6 +26,7 @@
#include <grpc/support/log.h>
#include "src/core/lib/gpr/useful.h"
+#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/slice/slice_internal.h"
/* grow a buffer; requires GRPC_SLICE_BUFFER_INLINE_ELEMENTS > 1 */
diff --git a/src/core/lib/slice/slice_internal.h b/src/core/lib/slice/slice_internal.h
index 065c25c90c..5d3d26b67b 100644
--- a/src/core/lib/slice/slice_internal.h
+++ b/src/core/lib/slice/slice_internal.h
@@ -24,8 +24,6 @@
#include <grpc/slice.h>
#include <grpc/slice_buffer.h>
-#include "src/core/lib/iomgr/exec_ctx.h"
-
grpc_slice grpc_slice_ref_internal(grpc_slice slice);
void grpc_slice_unref_internal(grpc_slice slice);
void grpc_slice_buffer_reset_and_unref_internal(grpc_slice_buffer* sb);
diff --git a/src/core/lib/surface/byte_buffer.cc b/src/core/lib/surface/byte_buffer.cc
index fce87dc611..6246796e46 100644
--- a/src/core/lib/surface/byte_buffer.cc
+++ b/src/core/lib/surface/byte_buffer.cc
@@ -22,6 +22,7 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
+#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/slice/slice_internal.h"
grpc_byte_buffer* grpc_raw_byte_buffer_create(grpc_slice* slices,
diff --git a/src/core/lib/surface/byte_buffer_reader.cc b/src/core/lib/surface/byte_buffer_reader.cc
index a10f1a3933..1debc98ea0 100644
--- a/src/core/lib/surface/byte_buffer_reader.cc
+++ b/src/core/lib/surface/byte_buffer_reader.cc
@@ -29,6 +29,7 @@
#include <grpc/support/log.h>
#include "src/core/lib/compression/message_compress.h"
+#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/slice/slice_internal.h"
static int is_compressed(grpc_byte_buffer* buffer) {
diff --git a/src/core/lib/surface/call.cc b/src/core/lib/surface/call.cc
index c4844da318..c683cc02de 100644
--- a/src/core/lib/surface/call.cc
+++ b/src/core/lib/surface/call.cc
@@ -37,6 +37,7 @@
#include "src/core/lib/gpr/arena.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/gpr/useful.h"
+#include "src/core/lib/gprpp/manual_constructor.h"
#include "src/core/lib/iomgr/timer.h"
#include "src/core/lib/profiling/timers.h"
#include "src/core/lib/slice/slice_internal.h"
@@ -221,9 +222,9 @@ struct grpc_call {
int send_extra_metadata_count;
grpc_millis send_deadline;
- grpc_slice_buffer_stream sending_stream;
+ grpc_core::ManualConstructor<grpc_core::SliceBufferByteStream> sending_stream;
- grpc_byte_stream* receiving_stream;
+ grpc_core::OrphanablePtr<grpc_core::ByteStream> receiving_stream;
grpc_byte_buffer** receiving_buffer;
grpc_slice receiving_slice;
grpc_closure receiving_slice_ready;
@@ -379,7 +380,7 @@ grpc_error* grpc_call_create(const grpc_call_create_args* args,
bool immediately_cancel = false;
if (args->parent != nullptr) {
- child_call* cc = call->child =
+ call->child =
static_cast<child_call*>(gpr_arena_alloc(arena, sizeof(child_call)));
call->child->parent = args->parent;
@@ -387,10 +388,6 @@ grpc_error* grpc_call_create(const grpc_call_create_args* args,
GPR_ASSERT(call->is_client);
GPR_ASSERT(!args->parent->is_client);
- parent_call* pc = get_or_create_parent_call(args->parent);
-
- gpr_mu_lock(&pc->child_list_mu);
-
if (args->propagation_mask & GRPC_PROPAGATE_DEADLINE) {
send_deadline = GPR_MIN(send_deadline, args->parent->send_deadline);
}
@@ -418,18 +415,6 @@ grpc_error* grpc_call_create(const grpc_call_create_args* args,
immediately_cancel = true;
}
}
-
- if (pc->first_child == nullptr) {
- pc->first_child = call;
- cc->sibling_next = cc->sibling_prev = call;
- } else {
- cc->sibling_next = pc->first_child;
- cc->sibling_prev = pc->first_child->child->sibling_prev;
- cc->sibling_next->child->sibling_prev =
- cc->sibling_prev->child->sibling_next = call;
- }
-
- gpr_mu_unlock(&pc->child_list_mu);
}
call->send_deadline = send_deadline;
@@ -446,6 +431,22 @@ grpc_error* grpc_call_create(const grpc_call_create_args* args,
&call->call_combiner};
add_init_error(&error, grpc_call_stack_init(channel_stack, 1, destroy_call,
call, &call_args));
+ // Publish this call to parent only after the call stack has been initialized.
+ if (args->parent != nullptr) {
+ child_call* cc = call->child;
+ parent_call* pc = get_or_create_parent_call(args->parent);
+ gpr_mu_lock(&pc->child_list_mu);
+ if (pc->first_child == nullptr) {
+ pc->first_child = call;
+ cc->sibling_next = cc->sibling_prev = call;
+ } else {
+ cc->sibling_next = pc->first_child;
+ cc->sibling_prev = pc->first_child->child->sibling_prev;
+ cc->sibling_next->child->sibling_prev =
+ cc->sibling_prev->child->sibling_next = call;
+ }
+ gpr_mu_unlock(&pc->child_list_mu);
+ }
if (error != GRPC_ERROR_NONE) {
cancel_with_error(call, STATUS_FROM_SURFACE, GRPC_ERROR_REF(error));
}
@@ -522,9 +523,7 @@ static void destroy_call(void* call, grpc_error* error) {
grpc_metadata_batch_destroy(
&c->metadata_batch[1 /* is_receiving */][i /* is_initial */]);
}
- if (c->receiving_stream != nullptr) {
- grpc_byte_stream_destroy(c->receiving_stream);
- }
+ c->receiving_stream.reset();
parent_call* pc = get_parent_call(c);
if (pc != nullptr) {
gpr_mu_destroy(&pc->child_list_mu);
@@ -1281,25 +1280,21 @@ static void continue_receiving_slices(batch_control* bctl) {
grpc_error* error;
grpc_call* call = bctl->call;
for (;;) {
- size_t remaining = call->receiving_stream->length -
+ size_t remaining = call->receiving_stream->length() -
(*call->receiving_buffer)->data.raw.slice_buffer.length;
if (remaining == 0) {
call->receiving_message = 0;
- grpc_byte_stream_destroy(call->receiving_stream);
- call->receiving_stream = nullptr;
+ call->receiving_stream.reset();
finish_batch_step(bctl);
return;
}
- if (grpc_byte_stream_next(call->receiving_stream, remaining,
- &call->receiving_slice_ready)) {
- error =
- grpc_byte_stream_pull(call->receiving_stream, &call->receiving_slice);
+ if (call->receiving_stream->Next(remaining, &call->receiving_slice_ready)) {
+ error = call->receiving_stream->Pull(&call->receiving_slice);
if (error == GRPC_ERROR_NONE) {
grpc_slice_buffer_add(&(*call->receiving_buffer)->data.raw.slice_buffer,
call->receiving_slice);
} else {
- grpc_byte_stream_destroy(call->receiving_stream);
- call->receiving_stream = nullptr;
+ call->receiving_stream.reset();
grpc_byte_buffer_destroy(*call->receiving_buffer);
*call->receiving_buffer = nullptr;
call->receiving_message = 0;
@@ -1315,19 +1310,17 @@ static void continue_receiving_slices(batch_control* bctl) {
static void receiving_slice_ready(void* bctlp, grpc_error* error) {
batch_control* bctl = static_cast<batch_control*>(bctlp);
grpc_call* call = bctl->call;
- grpc_byte_stream* bs = call->receiving_stream;
bool release_error = false;
if (error == GRPC_ERROR_NONE) {
grpc_slice slice;
- error = grpc_byte_stream_pull(bs, &slice);
+ error = call->receiving_stream->Pull(&slice);
if (error == GRPC_ERROR_NONE) {
grpc_slice_buffer_add(&(*call->receiving_buffer)->data.raw.slice_buffer,
slice);
continue_receiving_slices(bctl);
} else {
- /* Error returned by grpc_byte_stream_pull needs to be released manually
- */
+ /* Error returned by ByteStream::Pull() needs to be released manually */
release_error = true;
}
}
@@ -1336,8 +1329,7 @@ static void receiving_slice_ready(void* bctlp, grpc_error* error) {
if (grpc_trace_operation_failures.enabled()) {
GRPC_LOG_IF_ERROR("receiving_slice_ready", GRPC_ERROR_REF(error));
}
- grpc_byte_stream_destroy(call->receiving_stream);
- call->receiving_stream = nullptr;
+ call->receiving_stream.reset();
grpc_byte_buffer_destroy(*call->receiving_buffer);
*call->receiving_buffer = nullptr;
call->receiving_message = 0;
@@ -1355,8 +1347,8 @@ static void process_data_after_md(batch_control* bctl) {
call->receiving_message = 0;
finish_batch_step(bctl);
} else {
- call->test_only_last_message_flags = call->receiving_stream->flags;
- if ((call->receiving_stream->flags & GRPC_WRITE_INTERNAL_COMPRESS) &&
+ call->test_only_last_message_flags = call->receiving_stream->flags();
+ if ((call->receiving_stream->flags() & GRPC_WRITE_INTERNAL_COMPRESS) &&
(call->incoming_message_compression_algorithm >
GRPC_MESSAGE_COMPRESS_NONE)) {
grpc_compression_algorithm algo;
@@ -1379,10 +1371,7 @@ static void receiving_stream_ready(void* bctlp, grpc_error* error) {
batch_control* bctl = static_cast<batch_control*>(bctlp);
grpc_call* call = bctl->call;
if (error != GRPC_ERROR_NONE) {
- if (call->receiving_stream != nullptr) {
- grpc_byte_stream_destroy(call->receiving_stream);
- call->receiving_stream = nullptr;
- }
+ call->receiving_stream.reset();
add_batch_error(bctl, GRPC_ERROR_REF(error), true);
cancel_with_error(call, STATUS_FROM_SURFACE, GRPC_ERROR_REF(error));
}
@@ -1676,21 +1665,20 @@ static grpc_call_error call_start_batch(grpc_call* call, const grpc_op* ops,
error = GRPC_CALL_ERROR_TOO_MANY_OPERATIONS;
goto done_with_error;
}
- stream_op->send_message = true;
- call->sending_message = true;
- grpc_slice_buffer_stream_init(
- &call->sending_stream,
- &op->data.send_message.send_message->data.raw.slice_buffer,
- op->flags);
+ uint32_t flags = op->flags;
/* If the outgoing buffer is already compressed, mark it as so in the
flags. These will be picked up by the compression filter and further
(wasteful) attempts at compression skipped. */
if (op->data.send_message.send_message->data.raw.compression >
GRPC_COMPRESS_NONE) {
- call->sending_stream.base.flags |= GRPC_WRITE_INTERNAL_COMPRESS;
+ flags |= GRPC_WRITE_INTERNAL_COMPRESS;
}
- stream_op_payload->send_message.send_message =
- &call->sending_stream.base;
+ stream_op->send_message = true;
+ call->sending_message = true;
+ call->sending_stream.Init(
+ &op->data.send_message.send_message->data.raw.slice_buffer, flags);
+ stream_op_payload->send_message.send_message.reset(
+ call->sending_stream.get());
break;
}
case GRPC_OP_SEND_CLOSE_FROM_CLIENT: {
@@ -1909,7 +1897,7 @@ done_with_error:
}
if (stream_op->send_message) {
call->sending_message = false;
- grpc_byte_stream_destroy(&call->sending_stream.base);
+ call->sending_stream->Orphan();
}
if (stream_op->send_trailing_metadata) {
call->sent_final_op = false;
diff --git a/src/core/lib/transport/byte_stream.cc b/src/core/lib/transport/byte_stream.cc
index e1751f8010..cb15a71a91 100644
--- a/src/core/lib/transport/byte_stream.cc
+++ b/src/core/lib/transport/byte_stream.cc
@@ -25,160 +25,136 @@
#include <grpc/support/log.h>
+#include "src/core/lib/gprpp/memory.h"
#include "src/core/lib/slice/slice_internal.h"
-bool grpc_byte_stream_next(grpc_byte_stream* byte_stream, size_t max_size_hint,
- grpc_closure* on_complete) {
- return byte_stream->vtable->next(byte_stream, max_size_hint, on_complete);
-}
+namespace grpc_core {
-grpc_error* grpc_byte_stream_pull(grpc_byte_stream* byte_stream,
- grpc_slice* slice) {
- return byte_stream->vtable->pull(byte_stream, slice);
-}
+//
+// SliceBufferByteStream
+//
-void grpc_byte_stream_shutdown(grpc_byte_stream* byte_stream,
- grpc_error* error) {
- byte_stream->vtable->shutdown(byte_stream, error);
+SliceBufferByteStream::SliceBufferByteStream(grpc_slice_buffer* slice_buffer,
+ uint32_t flags)
+ : ByteStream(static_cast<uint32_t>(slice_buffer->length), flags) {
+ GPR_ASSERT(slice_buffer->length <= UINT32_MAX);
+ grpc_slice_buffer_init(&backing_buffer_);
+ grpc_slice_buffer_swap(slice_buffer, &backing_buffer_);
}
-void grpc_byte_stream_destroy(grpc_byte_stream* byte_stream) {
- byte_stream->vtable->destroy(byte_stream);
-}
+SliceBufferByteStream::~SliceBufferByteStream() {}
-// grpc_slice_buffer_stream
+void SliceBufferByteStream::Orphan() {
+ grpc_slice_buffer_destroy(&backing_buffer_);
+ GRPC_ERROR_UNREF(shutdown_error_);
+ // Note: We do not actually delete the object here, since
+ // SliceBufferByteStream is usually allocated as part of a larger
+ // object and has an OrphanablePtr of itself passed down through the
+ // filter stack.
+}
-static bool slice_buffer_stream_next(grpc_byte_stream* byte_stream,
- size_t max_size_hint,
- grpc_closure* on_complete) {
- grpc_slice_buffer_stream* stream =
- reinterpret_cast<grpc_slice_buffer_stream*>(byte_stream);
- GPR_ASSERT(stream->cursor < stream->backing_buffer.count);
+bool SliceBufferByteStream::Next(size_t max_size_hint,
+ grpc_closure* on_complete) {
+ GPR_ASSERT(cursor_ < backing_buffer_.count);
return true;
}
-static grpc_error* slice_buffer_stream_pull(grpc_byte_stream* byte_stream,
- grpc_slice* slice) {
- grpc_slice_buffer_stream* stream =
- reinterpret_cast<grpc_slice_buffer_stream*>(byte_stream);
- if (stream->shutdown_error != GRPC_ERROR_NONE) {
- return GRPC_ERROR_REF(stream->shutdown_error);
+grpc_error* SliceBufferByteStream::Pull(grpc_slice* slice) {
+ if (shutdown_error_ != GRPC_ERROR_NONE) {
+ return GRPC_ERROR_REF(shutdown_error_);
}
- GPR_ASSERT(stream->cursor < stream->backing_buffer.count);
- *slice =
- grpc_slice_ref_internal(stream->backing_buffer.slices[stream->cursor]);
- stream->cursor++;
+ GPR_ASSERT(cursor_ < backing_buffer_.count);
+ *slice = grpc_slice_ref_internal(backing_buffer_.slices[cursor_]);
+ ++cursor_;
return GRPC_ERROR_NONE;
}
-static void slice_buffer_stream_shutdown(grpc_byte_stream* byte_stream,
- grpc_error* error) {
- grpc_slice_buffer_stream* stream =
- reinterpret_cast<grpc_slice_buffer_stream*>(byte_stream);
- GRPC_ERROR_UNREF(stream->shutdown_error);
- stream->shutdown_error = error;
+void SliceBufferByteStream::Shutdown(grpc_error* error) {
+ GRPC_ERROR_UNREF(shutdown_error_);
+ shutdown_error_ = error;
}
-static void slice_buffer_stream_destroy(grpc_byte_stream* byte_stream) {
- grpc_slice_buffer_stream* stream =
- reinterpret_cast<grpc_slice_buffer_stream*>(byte_stream);
- grpc_slice_buffer_destroy(&stream->backing_buffer);
- GRPC_ERROR_UNREF(stream->shutdown_error);
+//
+// ByteStreamCache
+//
+
+ByteStreamCache::ByteStreamCache(OrphanablePtr<ByteStream> underlying_stream)
+ : underlying_stream_(std::move(underlying_stream)),
+ length_(underlying_stream_->length()),
+ flags_(underlying_stream_->flags()) {
+ grpc_slice_buffer_init(&cache_buffer_);
}
-static const grpc_byte_stream_vtable slice_buffer_stream_vtable = {
- slice_buffer_stream_next, slice_buffer_stream_pull,
- slice_buffer_stream_shutdown, slice_buffer_stream_destroy};
+ByteStreamCache::~ByteStreamCache() { Destroy(); }
-void grpc_slice_buffer_stream_init(grpc_slice_buffer_stream* stream,
- grpc_slice_buffer* slice_buffer,
- uint32_t flags) {
- GPR_ASSERT(slice_buffer->length <= UINT32_MAX);
- stream->base.length = static_cast<uint32_t>(slice_buffer->length);
- stream->base.flags = flags;
- stream->base.vtable = &slice_buffer_stream_vtable;
- grpc_slice_buffer_init(&stream->backing_buffer);
- grpc_slice_buffer_swap(slice_buffer, &stream->backing_buffer);
- stream->cursor = 0;
- stream->shutdown_error = GRPC_ERROR_NONE;
+void ByteStreamCache::Destroy() {
+ underlying_stream_.reset();
+ if (cache_buffer_.length > 0) {
+ grpc_slice_buffer_destroy_internal(&cache_buffer_);
+ }
}
-// grpc_caching_byte_stream
+//
+// ByteStreamCache::CachingByteStream
+//
-void grpc_byte_stream_cache_init(grpc_byte_stream_cache* cache,
- grpc_byte_stream* underlying_stream) {
- cache->underlying_stream = underlying_stream;
- grpc_slice_buffer_init(&cache->cache_buffer);
-}
+ByteStreamCache::CachingByteStream::CachingByteStream(ByteStreamCache* cache)
+ : ByteStream(cache->length_, cache->flags_), cache_(cache) {}
-void grpc_byte_stream_cache_destroy(grpc_byte_stream_cache* cache) {
- grpc_byte_stream_destroy(cache->underlying_stream);
- grpc_slice_buffer_destroy_internal(&cache->cache_buffer);
+ByteStreamCache::CachingByteStream::~CachingByteStream() {}
+
+void ByteStreamCache::CachingByteStream::Orphan() {
+ GRPC_ERROR_UNREF(shutdown_error_);
+ // Note: We do not actually delete the object here, since
+ // CachingByteStream is usually allocated as part of a larger
+ // object and has an OrphanablePtr of itself passed down through the
+ // filter stack.
}
-static bool caching_byte_stream_next(grpc_byte_stream* byte_stream,
- size_t max_size_hint,
- grpc_closure* on_complete) {
- grpc_caching_byte_stream* stream =
- reinterpret_cast<grpc_caching_byte_stream*>(byte_stream);
- if (stream->shutdown_error != GRPC_ERROR_NONE) return true;
- if (stream->cursor < stream->cache->cache_buffer.count) return true;
- return grpc_byte_stream_next(stream->cache->underlying_stream, max_size_hint,
- on_complete);
+bool ByteStreamCache::CachingByteStream::Next(size_t max_size_hint,
+ grpc_closure* on_complete) {
+ if (shutdown_error_ != GRPC_ERROR_NONE) return true;
+ if (cursor_ < cache_->cache_buffer_.count) return true;
+ GPR_ASSERT(cache_->underlying_stream_ != nullptr);
+ return cache_->underlying_stream_->Next(max_size_hint, on_complete);
}
-static grpc_error* caching_byte_stream_pull(grpc_byte_stream* byte_stream,
- grpc_slice* slice) {
- grpc_caching_byte_stream* stream =
- reinterpret_cast<grpc_caching_byte_stream*>(byte_stream);
- if (stream->shutdown_error != GRPC_ERROR_NONE) {
- return GRPC_ERROR_REF(stream->shutdown_error);
+grpc_error* ByteStreamCache::CachingByteStream::Pull(grpc_slice* slice) {
+ if (shutdown_error_ != GRPC_ERROR_NONE) {
+ return GRPC_ERROR_REF(shutdown_error_);
}
- if (stream->cursor < stream->cache->cache_buffer.count) {
- *slice = grpc_slice_ref_internal(
- stream->cache->cache_buffer.slices[stream->cursor]);
- ++stream->cursor;
+ if (cursor_ < cache_->cache_buffer_.count) {
+ *slice = grpc_slice_ref_internal(cache_->cache_buffer_.slices[cursor_]);
+ ++cursor_;
+ offset_ += GRPC_SLICE_LENGTH(*slice);
return GRPC_ERROR_NONE;
}
- grpc_error* error =
- grpc_byte_stream_pull(stream->cache->underlying_stream, slice);
+ GPR_ASSERT(cache_->underlying_stream_ != nullptr);
+ grpc_error* error = cache_->underlying_stream_->Pull(slice);
if (error == GRPC_ERROR_NONE) {
- ++stream->cursor;
- grpc_slice_buffer_add(&stream->cache->cache_buffer,
+ grpc_slice_buffer_add(&cache_->cache_buffer_,
grpc_slice_ref_internal(*slice));
+ ++cursor_;
+ offset_ += GRPC_SLICE_LENGTH(*slice);
+ // Orphan the underlying stream if it's been drained.
+ if (offset_ == cache_->underlying_stream_->length()) {
+ cache_->underlying_stream_.reset();
+ }
}
return error;
}
-static void caching_byte_stream_shutdown(grpc_byte_stream* byte_stream,
- grpc_error* error) {
- grpc_caching_byte_stream* stream =
- reinterpret_cast<grpc_caching_byte_stream*>(byte_stream);
- GRPC_ERROR_UNREF(stream->shutdown_error);
- stream->shutdown_error = GRPC_ERROR_REF(error);
- grpc_byte_stream_shutdown(stream->cache->underlying_stream, error);
-}
-
-static void caching_byte_stream_destroy(grpc_byte_stream* byte_stream) {
- grpc_caching_byte_stream* stream =
- reinterpret_cast<grpc_caching_byte_stream*>(byte_stream);
- GRPC_ERROR_UNREF(stream->shutdown_error);
+void ByteStreamCache::CachingByteStream::Shutdown(grpc_error* error) {
+ GRPC_ERROR_UNREF(shutdown_error_);
+ shutdown_error_ = GRPC_ERROR_REF(error);
+ if (cache_->underlying_stream_ != nullptr) {
+ cache_->underlying_stream_->Shutdown(error);
+ }
}
-static const grpc_byte_stream_vtable caching_byte_stream_vtable = {
- caching_byte_stream_next, caching_byte_stream_pull,
- caching_byte_stream_shutdown, caching_byte_stream_destroy};
-
-void grpc_caching_byte_stream_init(grpc_caching_byte_stream* stream,
- grpc_byte_stream_cache* cache) {
- memset(stream, 0, sizeof(*stream));
- stream->base.length = cache->underlying_stream->length;
- stream->base.flags = cache->underlying_stream->flags;
- stream->base.vtable = &caching_byte_stream_vtable;
- stream->cache = cache;
- stream->shutdown_error = GRPC_ERROR_NONE;
+void ByteStreamCache::CachingByteStream::Reset() {
+ cursor_ = 0;
+ offset_ = 0;
}
-void grpc_caching_byte_stream_reset(grpc_caching_byte_stream* stream) {
- stream->cursor = 0;
-}
+} // namespace grpc_core
diff --git a/src/core/lib/transport/byte_stream.h b/src/core/lib/transport/byte_stream.h
index 4d3c3c131b..eff832515d 100644
--- a/src/core/lib/transport/byte_stream.h
+++ b/src/core/lib/transport/byte_stream.h
@@ -22,7 +22,9 @@
#include <grpc/support/port_platform.h>
#include <grpc/slice_buffer.h>
-#include "src/core/lib/iomgr/exec_ctx.h"
+#include "src/core/lib/gprpp/abstract.h"
+#include "src/core/lib/gprpp/orphanable.h"
+#include "src/core/lib/iomgr/closure.h"
/** Internal bit flag for grpc_begin_message's \a flags signaling the use of
* compression for the message */
@@ -30,71 +32,82 @@
/** Mask of all valid internal flags. */
#define GRPC_WRITE_INTERNAL_USED_MASK (GRPC_WRITE_INTERNAL_COMPRESS)
-typedef struct grpc_byte_stream grpc_byte_stream;
-
-typedef struct {
- bool (*next)(grpc_byte_stream* byte_stream, size_t max_size_hint,
- grpc_closure* on_complete);
- grpc_error* (*pull)(grpc_byte_stream* byte_stream, grpc_slice* slice);
- void (*shutdown)(grpc_byte_stream* byte_stream, grpc_error* error);
- void (*destroy)(grpc_byte_stream* byte_stream);
-} grpc_byte_stream_vtable;
-
-struct grpc_byte_stream {
- uint32_t length;
- uint32_t flags;
- const grpc_byte_stream_vtable* vtable;
+namespace grpc_core {
+
+class ByteStream : public Orphanable {
+ public:
+ virtual ~ByteStream() {}
+
+ // Returns true if the bytes are available immediately (in which case
+ // on_complete will not be called), or false if the bytes will be available
+ // asynchronously (in which case on_complete will be called when they
+ // are available).
+ //
+ // max_size_hint can be set as a hint as to the maximum number
+ // of bytes that would be acceptable to read.
+ virtual bool Next(size_t max_size_hint,
+ grpc_closure* on_complete) GRPC_ABSTRACT;
+
+ // Returns the next slice in the byte stream when it is available, as
+ // indicated by Next().
+ //
+ // Once a slice is returned into *slice, it is owned by the caller.
+ virtual grpc_error* Pull(grpc_slice* slice) GRPC_ABSTRACT;
+
+ // Shuts down the byte stream.
+ //
+ // If there is a pending call to on_complete from Next(), it will be
+ // invoked with the error passed to Shutdown().
+ //
+ // The next call to Pull() (if any) will return the error passed to
+ // Shutdown().
+ virtual void Shutdown(grpc_error* error) GRPC_ABSTRACT;
+
+ uint32_t length() const { return length_; }
+ uint32_t flags() const { return flags_; }
+
+ void set_flags(uint32_t flags) { flags_ = flags; }
+
+ GRPC_ABSTRACT_BASE_CLASS
+
+ protected:
+ ByteStream(uint32_t length, uint32_t flags)
+ : length_(length), flags_(flags) {}
+
+ private:
+ const uint32_t length_;
+ uint32_t flags_;
};
-// Returns true if the bytes are available immediately (in which case
-// on_complete will not be called), false if the bytes will be available
-// asynchronously.
//
-// max_size_hint can be set as a hint as to the maximum number
-// of bytes that would be acceptable to read.
-bool grpc_byte_stream_next(grpc_byte_stream* byte_stream, size_t max_size_hint,
- grpc_closure* on_complete);
-
-// Returns the next slice in the byte stream when it is ready (indicated by
-// either grpc_byte_stream_next returning true or on_complete passed to
-// grpc_byte_stream_next is called).
+// SliceBufferByteStream
//
-// Once a slice is returned into *slice, it is owned by the caller.
-grpc_error* grpc_byte_stream_pull(grpc_byte_stream* byte_stream,
- grpc_slice* slice);
-
-// Shuts down the byte stream.
+// A ByteStream that wraps a slice buffer.
//
-// If there is a pending call to on_complete from grpc_byte_stream_next(),
-// it will be invoked with the error passed to grpc_byte_stream_shutdown().
-//
-// The next call to grpc_byte_stream_pull() (if any) will return the error
-// passed to grpc_byte_stream_shutdown().
-void grpc_byte_stream_shutdown(grpc_byte_stream* byte_stream,
- grpc_error* error);
-void grpc_byte_stream_destroy(grpc_byte_stream* byte_stream);
+class SliceBufferByteStream : public ByteStream {
+ public:
+ // Removes all slices in slice_buffer, leaving it empty.
+ SliceBufferByteStream(grpc_slice_buffer* slice_buffer, uint32_t flags);
+
+ ~SliceBufferByteStream();
+
+ void Orphan() override;
+
+ bool Next(size_t max_size_hint, grpc_closure* on_complete) override;
+ grpc_error* Pull(grpc_slice* slice) override;
+ void Shutdown(grpc_error* error) override;
+
+ private:
+ grpc_slice_buffer backing_buffer_;
+ size_t cursor_ = 0;
+ grpc_error* shutdown_error_ = GRPC_ERROR_NONE;
+};
-// grpc_slice_buffer_stream
//
-// A grpc_byte_stream that wraps a slice buffer. The stream takes
-// ownership of the slices in the buffer, and on destruction will
-// reset the contents of the buffer.
-
-typedef struct grpc_slice_buffer_stream {
- grpc_byte_stream base;
- grpc_slice_buffer backing_buffer;
- size_t cursor;
- grpc_error* shutdown_error;
-} grpc_slice_buffer_stream;
-
-void grpc_slice_buffer_stream_init(grpc_slice_buffer_stream* stream,
- grpc_slice_buffer* slice_buffer,
- uint32_t flags);
-
-// grpc_caching_byte_stream
+// CachingByteStream
//
-// A grpc_byte_stream that that wraps an underlying byte stream but caches
+// A ByteStream that that wraps an underlying byte stream but caches
// the resulting slices in a slice buffer. If an initial attempt fails
// without fully draining the underlying stream, a new caching stream
// can be created from the same underlying cache, in which case it will
@@ -102,32 +115,50 @@ void grpc_slice_buffer_stream_init(grpc_slice_buffer_stream* stream,
// underlying stream.
//
// NOTE: No synchronization is done, so it is not safe to have multiple
-// grpc_caching_byte_streams simultaneously drawing from the same underlying
-// grpc_byte_stream_cache at the same time.
+// CachingByteStreams simultaneously drawing from the same underlying
+// ByteStreamCache at the same time.
+//
+
+class ByteStreamCache {
+ public:
+ class CachingByteStream : public ByteStream {
+ public:
+ explicit CachingByteStream(ByteStreamCache* cache);
+
+ ~CachingByteStream();
+
+ void Orphan() override;
-typedef struct {
- grpc_byte_stream* underlying_stream;
- grpc_slice_buffer cache_buffer;
-} grpc_byte_stream_cache;
+ bool Next(size_t max_size_hint, grpc_closure* on_complete) override;
+ grpc_error* Pull(grpc_slice* slice) override;
+ void Shutdown(grpc_error* error) override;
-// Takes ownership of underlying_stream.
-void grpc_byte_stream_cache_init(grpc_byte_stream_cache* cache,
- grpc_byte_stream* underlying_stream);
+ // Resets the byte stream to the start of the underlying stream.
+ void Reset();
-// Must not be called while still in use by a grpc_caching_byte_stream.
-void grpc_byte_stream_cache_destroy(grpc_byte_stream_cache* cache);
+ private:
+ ByteStreamCache* cache_;
+ size_t cursor_ = 0;
+ size_t offset_ = 0;
+ grpc_error* shutdown_error_ = GRPC_ERROR_NONE;
+ };
-typedef struct {
- grpc_byte_stream base;
- grpc_byte_stream_cache* cache;
- size_t cursor;
- grpc_error* shutdown_error;
-} grpc_caching_byte_stream;
+ explicit ByteStreamCache(OrphanablePtr<ByteStream> underlying_stream);
-void grpc_caching_byte_stream_init(grpc_caching_byte_stream* stream,
- grpc_byte_stream_cache* cache);
+ ~ByteStreamCache();
+
+ // Must not be destroyed while still in use by a CachingByteStream.
+ void Destroy();
+
+ grpc_slice_buffer* cache_buffer() { return &cache_buffer_; }
+
+ private:
+ OrphanablePtr<ByteStream> underlying_stream_;
+ uint32_t length_;
+ uint32_t flags_;
+ grpc_slice_buffer cache_buffer_;
+};
-// Resets the byte stream to the start of the underlying stream.
-void grpc_caching_byte_stream_reset(grpc_caching_byte_stream* stream);
+} // namespace grpc_core
#endif /* GRPC_CORE_LIB_TRANSPORT_BYTE_STREAM_H */
diff --git a/src/core/lib/transport/connectivity_state.h b/src/core/lib/transport/connectivity_state.h
index 421db5aa39..ecb083cfc2 100644
--- a/src/core/lib/transport/connectivity_state.h
+++ b/src/core/lib/transport/connectivity_state.h
@@ -23,7 +23,7 @@
#include <grpc/grpc.h>
#include "src/core/lib/debug/trace.h"
-#include "src/core/lib/iomgr/exec_ctx.h"
+#include "src/core/lib/iomgr/closure.h"
typedef struct grpc_connectivity_state_watcher {
/** we keep watchers in a linked list */
diff --git a/src/core/lib/transport/metadata.h b/src/core/lib/transport/metadata.h
index 5e0ecbdb96..78df4bc3a3 100644
--- a/src/core/lib/transport/metadata.h
+++ b/src/core/lib/transport/metadata.h
@@ -24,8 +24,8 @@
#include <grpc/grpc.h>
#include <grpc/slice.h>
+#include "src/core/lib/debug/trace.h"
#include "src/core/lib/gpr/useful.h"
-#include "src/core/lib/iomgr/exec_ctx.h"
extern grpc_core::DebugOnlyTraceFlag grpc_trace_metadata;
diff --git a/src/core/lib/transport/metadata_batch.h b/src/core/lib/transport/metadata_batch.h
index 3876063b52..7068750b6f 100644
--- a/src/core/lib/transport/metadata_batch.h
+++ b/src/core/lib/transport/metadata_batch.h
@@ -26,6 +26,7 @@
#include <grpc/grpc.h>
#include <grpc/slice.h>
#include <grpc/support/time.h>
+#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/transport/metadata.h"
#include "src/core/lib/transport/static_metadata.h"
diff --git a/src/core/lib/transport/status_conversion.h b/src/core/lib/transport/status_conversion.h
index 9f14e9bee0..487f00c08b 100644
--- a/src/core/lib/transport/status_conversion.h
+++ b/src/core/lib/transport/status_conversion.h
@@ -22,6 +22,7 @@
#include <grpc/support/port_platform.h>
#include <grpc/grpc.h>
+
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/transport/http2_errors.h"
diff --git a/src/core/lib/transport/transport.cc b/src/core/lib/transport/transport.cc
index c90d16fc32..6b41e4b37e 100644
--- a/src/core/lib/transport/transport.cc
+++ b/src/core/lib/transport/transport.cc
@@ -209,7 +209,7 @@ void grpc_transport_stream_op_batch_finish_with_failure(
grpc_transport_stream_op_batch* batch, grpc_error* error,
grpc_call_combiner* call_combiner) {
if (batch->send_message) {
- grpc_byte_stream_destroy(batch->payload->send_message.send_message);
+ batch->payload->send_message.send_message.reset();
}
if (batch->recv_message) {
GRPC_CALL_COMBINER_START(
diff --git a/src/core/lib/transport/transport.h b/src/core/lib/transport/transport.h
index 37e50344c4..10e9df0f7c 100644
--- a/src/core/lib/transport/transport.h
+++ b/src/core/lib/transport/transport.h
@@ -184,11 +184,10 @@ struct grpc_transport_stream_op_batch_payload {
struct {
// The transport (or a filter that decides to return a failure before
- // the op gets down to the transport) is responsible for calling
- // grpc_byte_stream_destroy() on this.
+ // the op gets down to the transport) takes ownership.
// The batch's on_complete will not be called until after the byte
- // stream is destroyed.
- grpc_byte_stream* send_message;
+ // stream is orphaned.
+ grpc_core::OrphanablePtr<grpc_core::ByteStream> send_message;
} send_message;
struct {
@@ -216,10 +215,8 @@ struct grpc_transport_stream_op_batch_payload {
struct {
// Will be set by the transport to point to the byte stream
// containing a received message.
- // The caller is responsible for calling grpc_byte_stream_destroy()
- // on this byte stream.
// Will be NULL if trailing metadata is received instead of a message.
- grpc_byte_stream** recv_message;
+ grpc_core::OrphanablePtr<grpc_core::ByteStream>* recv_message;
/** Should be enqueued when one message is ready to be processed. */
grpc_closure* recv_message_ready;
} recv_message;
diff --git a/src/core/lib/transport/transport_op_string.cc b/src/core/lib/transport/transport_op_string.cc
index 6898da17ed..99af7c1931 100644
--- a/src/core/lib/transport/transport_op_string.cc
+++ b/src/core/lib/transport/transport_op_string.cc
@@ -75,9 +75,16 @@ char* grpc_transport_stream_op_batch_string(
if (op->send_message) {
gpr_strvec_add(&b, gpr_strdup(" "));
- gpr_asprintf(&tmp, "SEND_MESSAGE:flags=0x%08x:len=%d",
- op->payload->send_message.send_message->flags,
- op->payload->send_message.send_message->length);
+ if (op->payload->send_message.send_message != nullptr) {
+ gpr_asprintf(&tmp, "SEND_MESSAGE:flags=0x%08x:len=%d",
+ op->payload->send_message.send_message->flags(),
+ op->payload->send_message.send_message->length());
+ } else {
+ // This can happen when we check a batch after the transport has
+ // processed and cleared the send_message op.
+ tmp =
+ gpr_strdup("SEND_MESSAGE(flag and length unknown, already orphaned)");
+ }
gpr_strvec_add(&b, tmp);
}
diff --git a/src/core/plugin_registry/grpc_cronet_plugin_registry.cc b/src/core/plugin_registry/grpc_cronet_plugin_registry.cc
index 49b9c7d4fe..ab0f4994ea 100644
--- a/src/core/plugin_registry/grpc_cronet_plugin_registry.cc
+++ b/src/core/plugin_registry/grpc_cronet_plugin_registry.cc
@@ -20,30 +20,34 @@
#include <grpc/grpc.h>
+void grpc_deadline_filter_init(void);
+void grpc_deadline_filter_shutdown(void);
+void grpc_message_size_filter_init(void);
+void grpc_message_size_filter_shutdown(void);
+void grpc_server_load_reporting_plugin_init(void);
+void grpc_server_load_reporting_plugin_shutdown(void);
void grpc_http_filters_init(void);
void grpc_http_filters_shutdown(void);
void grpc_chttp2_plugin_init(void);
void grpc_chttp2_plugin_shutdown(void);
-void grpc_deadline_filter_init(void);
-void grpc_deadline_filter_shutdown(void);
void grpc_client_channel_init(void);
void grpc_client_channel_shutdown(void);
void grpc_tsi_alts_init(void);
void grpc_tsi_alts_shutdown(void);
-void grpc_server_load_reporting_plugin_init(void);
-void grpc_server_load_reporting_plugin_shutdown(void);
void grpc_register_built_in_plugins(void) {
+ grpc_register_plugin(grpc_deadline_filter_init,
+ grpc_deadline_filter_shutdown);
+ grpc_register_plugin(grpc_message_size_filter_init,
+ grpc_message_size_filter_shutdown);
+ grpc_register_plugin(grpc_server_load_reporting_plugin_init,
+ grpc_server_load_reporting_plugin_shutdown);
grpc_register_plugin(grpc_http_filters_init,
grpc_http_filters_shutdown);
grpc_register_plugin(grpc_chttp2_plugin_init,
grpc_chttp2_plugin_shutdown);
- grpc_register_plugin(grpc_deadline_filter_init,
- grpc_deadline_filter_shutdown);
grpc_register_plugin(grpc_client_channel_init,
grpc_client_channel_shutdown);
grpc_register_plugin(grpc_tsi_alts_init,
grpc_tsi_alts_shutdown);
- grpc_register_plugin(grpc_server_load_reporting_plugin_init,
- grpc_server_load_reporting_plugin_shutdown);
}
diff --git a/src/core/tsi/alts/handshaker/proto/altscontext.proto b/src/core/tsi/alts/handshaker/proto/altscontext.proto
index d195b37e08..9a1dad5f56 100644
--- a/src/core/tsi/alts/handshaker/proto/altscontext.proto
+++ b/src/core/tsi/alts/handshaker/proto/altscontext.proto
@@ -18,7 +18,7 @@ import "transport_security_common.proto";
package grpc.gcp;
-option java_package = "io.grpc.alts";
+option java_package = "io.grpc.alts.internal";
message AltsContext {
// The application protocol negotiated for this connection.
diff --git a/src/core/tsi/alts/handshaker/proto/handshaker.proto b/src/core/tsi/alts/handshaker/proto/handshaker.proto
index 46b8b09eb0..84a4153b70 100644
--- a/src/core/tsi/alts/handshaker/proto/handshaker.proto
+++ b/src/core/tsi/alts/handshaker/proto/handshaker.proto
@@ -18,7 +18,7 @@ import "transport_security_common.proto";
package grpc.gcp;
-option java_package = "io.grpc.alts";
+option java_package = "io.grpc.alts.internal";
enum HandshakeProtocol {
// Default value.
@@ -85,7 +85,7 @@ message StartClientHandshakeReq {
Endpoint local_endpoint = 6;
// (Optional) Endpoint information of the remote server, such as IP address,
- // port number, and network protocool.
+ // port number, and network protocol.
Endpoint remote_endpoint = 7;
// (Optional) If target name is provided, a secure naming check is performed
@@ -128,7 +128,7 @@ message StartServerHandshakeReq {
Endpoint local_endpoint = 4;
// (Optional) Endpoint information of the remote client, such as IP address,
- // port number, and network protocool.
+ // port number, and network protocol.
Endpoint remote_endpoint = 5;
// (Optional) RPC protocol versions supported by the server.
@@ -212,8 +212,12 @@ message HandshakerResp {
}
service HandshakerService {
- // Accepts a stream of handshaker request, returning a stream of handshaker
- // response.
+ // Handshaker service accepts a stream of handshaker request, returning a
+ // stream of handshaker response. Client is expected to send exactly one
+ // message with either client_start or server_start followed by one or more
+ // messages with next. Each time client sends a request, the handshaker
+ // service expects to respond. Client does not have to wait for service's
+ // response before sending next request.
rpc DoHandshake(stream HandshakerReq)
returns (stream HandshakerResp) {
}
diff --git a/src/core/tsi/alts/handshaker/proto/transport_security_common.proto b/src/core/tsi/alts/handshaker/proto/transport_security_common.proto
index 41983ab9f9..d0f861e644 100644
--- a/src/core/tsi/alts/handshaker/proto/transport_security_common.proto
+++ b/src/core/tsi/alts/handshaker/proto/transport_security_common.proto
@@ -16,7 +16,7 @@ syntax = "proto3";
package grpc.gcp;
-option java_package = "io.grpc.alts";
+option java_package = "io.grpc.alts.internal";
// The security level of the created channel. The list is sorted in increasing
// level of security. This order must always be maintained.
diff --git a/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_common.cc b/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_common.cc
index ff91aea350..1048b600f0 100644
--- a/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_common.cc
+++ b/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_common.cc
@@ -26,6 +26,7 @@
#include <grpc/support/log.h>
#include "src/core/lib/gpr/useful.h"
+#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/slice/slice_internal.h"
const size_t kInitialIovecBufferSize = 8;
diff --git a/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.cc b/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.cc
index 8c764961b3..608213745e 100644
--- a/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.cc
+++ b/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.cc
@@ -26,6 +26,7 @@
#include <grpc/support/log.h>
#include "src/core/lib/gpr/useful.h"
+#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/tsi/alts/crypt/gsec.h"
#include "src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_integrity_only_record_protocol.h"
diff --git a/src/core/tsi/ssl/session_cache/ssl_session.h b/src/core/tsi/ssl/session_cache/ssl_session.h
new file mode 100644
index 0000000000..115221ec06
--- /dev/null
+++ b/src/core/tsi/ssl/session_cache/ssl_session.h
@@ -0,0 +1,73 @@
+/*
+ *
+ * Copyright 2018 gRPC authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef GRPC_CORE_TSI_SSL_SESSION_CACHE_SSL_SESSION_H
+#define GRPC_CORE_TSI_SSL_SESSION_CACHE_SSL_SESSION_H
+
+#include <grpc/support/port_platform.h>
+
+#include <grpc/slice.h>
+
+extern "C" {
+#include <openssl/ssl.h>
+}
+
+#include "src/core/lib/gprpp/ref_counted.h"
+
+// The main purpose of code here is to provide means to cache SSL sessions
+// in a way that they can be shared between connections.
+//
+// SSL_SESSION stands for single instance of session and is not generally safe
+// to share between SSL contexts with different lifetimes. It happens because
+// not all SSL implementations guarantee immutability of SSL_SESSION object.
+// See SSL_SESSION documentation in BoringSSL and OpenSSL for more details.
+
+namespace tsi {
+
+struct SslSessionDeleter {
+ void operator()(SSL_SESSION* session) { SSL_SESSION_free(session); }
+};
+
+typedef std::unique_ptr<SSL_SESSION, SslSessionDeleter> SslSessionPtr;
+
+/// SslCachedSession is an immutable thread-safe storage for single session
+/// representation. It provides means to share SSL session data (e.g. TLS
+/// ticket) between encrypted connections regardless of SSL context lifetime.
+class SslCachedSession {
+ public:
+ // Not copyable nor movable.
+ SslCachedSession(const SslCachedSession&) = delete;
+ SslCachedSession& operator=(const SslCachedSession&) = delete;
+
+ /// Create single cached instance of \a session.
+ static grpc_core::UniquePtr<SslCachedSession> Create(SslSessionPtr session);
+
+ virtual ~SslCachedSession() = default;
+
+ /// Returns a copy of previously cached session.
+ virtual SslSessionPtr CopySession() const GRPC_ABSTRACT;
+
+ GRPC_ABSTRACT_BASE_CLASS
+
+ protected:
+ SslCachedSession() = default;
+};
+
+} // namespace tsi
+
+#endif /* GRPC_CORE_TSI_SSL_SESSION_CACHE_SSL_SESSION_H */
diff --git a/src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc b/src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc
new file mode 100644
index 0000000000..0da5a96164
--- /dev/null
+++ b/src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc
@@ -0,0 +1,58 @@
+/*
+ *
+ * Copyright 2018 gRPC authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <grpc/support/port_platform.h>
+
+#include "src/core/tsi/ssl/session_cache/ssl_session.h"
+
+#ifdef OPENSSL_IS_BORINGSSL
+
+// BoringSSL allows SSL_SESSION to outlive SSL and SSL_CTX objects which are
+// re-created by gRPC on every certificate rotation or subchannel creation.
+// BoringSSL guarantees that SSL_SESSION is immutable so it's safe to share
+// the same original session object between different threads and connections.
+
+namespace tsi {
+namespace {
+
+class BoringSslCachedSession : public SslCachedSession {
+ public:
+ BoringSslCachedSession(SslSessionPtr session)
+ : session_(std::move(session)) {}
+
+ SslSessionPtr CopySession() const override {
+ // SslSessionPtr will dereference on destruction.
+ SSL_SESSION_up_ref(session_.get());
+ return SslSessionPtr(session_.get());
+ }
+
+ private:
+ SslSessionPtr session_;
+};
+
+} // namespace
+
+grpc_core::UniquePtr<SslCachedSession> SslCachedSession::Create(
+ SslSessionPtr session) {
+ return grpc_core::UniquePtr<SslCachedSession>(
+ grpc_core::New<BoringSslCachedSession>(std::move(session)));
+}
+
+} // namespace tsi
+
+#endif /* OPENSSL_IS_BORINGSSL */
diff --git a/src/core/tsi/ssl/session_cache/ssl_session_cache.cc b/src/core/tsi/ssl/session_cache/ssl_session_cache.cc
new file mode 100644
index 0000000000..fe4f83a13d
--- /dev/null
+++ b/src/core/tsi/ssl/session_cache/ssl_session_cache.cc
@@ -0,0 +1,211 @@
+/*
+ *
+ * Copyright 2018 gRPC authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <grpc/support/port_platform.h>
+
+#include "src/core/tsi/ssl/session_cache/ssl_session_cache.h"
+
+#include "src/core/tsi/ssl/session_cache/ssl_session.h"
+
+#include <grpc/support/log.h>
+#include <grpc/support/string_util.h>
+
+namespace tsi {
+
+static void cache_key_avl_destroy(void* key, void* unused) {}
+
+static void* cache_key_avl_copy(void* key, void* unused) { return key; }
+
+static long cache_key_avl_compare(void* key1, void* key2, void* unused) {
+ return grpc_slice_cmp(*static_cast<grpc_slice*>(key1),
+ *static_cast<grpc_slice*>(key2));
+}
+
+static void cache_value_avl_destroy(void* value, void* unused) {}
+
+static void* cache_value_avl_copy(void* value, void* unused) { return value; }
+
+// AVL only stores pointers, ownership belonges to the linked list.
+static const grpc_avl_vtable cache_avl_vtable = {
+ cache_key_avl_destroy, cache_key_avl_copy, cache_key_avl_compare,
+ cache_value_avl_destroy, cache_value_avl_copy,
+};
+
+/// Node for single cached session.
+class SslSessionLRUCache::Node {
+ public:
+ Node(const grpc_slice& key, SslSessionPtr session) : key_(key) {
+ SetSession(std::move(session));
+ }
+
+ ~Node() { grpc_slice_unref(key_); }
+
+ // Not copyable nor movable.
+ Node(const Node&) = delete;
+ Node& operator=(const Node&) = delete;
+
+ void* AvlKey() { return &key_; }
+
+ /// Returns a copy of the node's cache session.
+ SslSessionPtr CopySession() const { return session_->CopySession(); }
+
+ /// Set the \a session (which is moved) for the node.
+ void SetSession(SslSessionPtr session) {
+ session_ = SslCachedSession::Create(std::move(session));
+ }
+
+ private:
+ friend class SslSessionLRUCache;
+
+ grpc_slice key_;
+ grpc_core::UniquePtr<SslCachedSession> session_;
+
+ Node* next_ = nullptr;
+ Node* prev_ = nullptr;
+};
+
+SslSessionLRUCache::SslSessionLRUCache(size_t capacity) : capacity_(capacity) {
+ GPR_ASSERT(capacity > 0);
+ gpr_mu_init(&lock_);
+ entry_by_key_ = grpc_avl_create(&cache_avl_vtable);
+}
+
+SslSessionLRUCache::~SslSessionLRUCache() {
+ Node* node = use_order_list_head_;
+ while (node) {
+ Node* next = node->next_;
+ grpc_core::Delete(node);
+ node = next;
+ }
+ grpc_avl_unref(entry_by_key_, nullptr);
+ gpr_mu_destroy(&lock_);
+}
+
+size_t SslSessionLRUCache::Size() {
+ grpc_core::mu_guard guard(&lock_);
+ return use_order_list_size_;
+}
+
+SslSessionLRUCache::Node* SslSessionLRUCache::FindLocked(
+ const grpc_slice& key) {
+ void* value =
+ grpc_avl_get(entry_by_key_, const_cast<grpc_slice*>(&key), nullptr);
+ if (value == nullptr) {
+ return nullptr;
+ }
+ Node* node = static_cast<Node*>(value);
+ // Move to the beginning.
+ Remove(node);
+ PushFront(node);
+ AssertInvariants();
+ return node;
+}
+
+void SslSessionLRUCache::Put(const char* key, SslSessionPtr session) {
+ grpc_core::mu_guard guard(&lock_);
+ Node* node = FindLocked(grpc_slice_from_static_string(key));
+ if (node != nullptr) {
+ node->SetSession(std::move(session));
+ return;
+ }
+ grpc_slice key_slice = grpc_slice_from_copied_string(key);
+ node = grpc_core::New<Node>(key_slice, std::move(session));
+ PushFront(node);
+ entry_by_key_ = grpc_avl_add(entry_by_key_, node->AvlKey(), node, nullptr);
+ AssertInvariants();
+ if (use_order_list_size_ > capacity_) {
+ GPR_ASSERT(use_order_list_tail_);
+ node = use_order_list_tail_;
+ Remove(node);
+ // Order matters, key is destroyed after deleting node.
+ entry_by_key_ = grpc_avl_remove(entry_by_key_, node->AvlKey(), nullptr);
+ grpc_core::Delete(node);
+ AssertInvariants();
+ }
+}
+
+SslSessionPtr SslSessionLRUCache::Get(const char* key) {
+ grpc_core::mu_guard guard(&lock_);
+ // Key is only used for lookups.
+ grpc_slice key_slice = grpc_slice_from_static_string(key);
+ Node* node = FindLocked(key_slice);
+ if (node == nullptr) {
+ return nullptr;
+ }
+ return node->CopySession();
+}
+
+void SslSessionLRUCache::Remove(SslSessionLRUCache::Node* node) {
+ if (node->prev_ == nullptr) {
+ use_order_list_head_ = node->next_;
+ } else {
+ node->prev_->next_ = node->next_;
+ }
+ if (node->next_ == nullptr) {
+ use_order_list_tail_ = node->prev_;
+ } else {
+ node->next_->prev_ = node->prev_;
+ }
+ GPR_ASSERT(use_order_list_size_ >= 1);
+ use_order_list_size_--;
+}
+
+void SslSessionLRUCache::PushFront(SslSessionLRUCache::Node* node) {
+ if (use_order_list_head_ == nullptr) {
+ use_order_list_head_ = node;
+ use_order_list_tail_ = node;
+ node->next_ = nullptr;
+ node->prev_ = nullptr;
+ } else {
+ node->next_ = use_order_list_head_;
+ node->next_->prev_ = node;
+ use_order_list_head_ = node;
+ node->prev_ = nullptr;
+ }
+ use_order_list_size_++;
+}
+
+#ifndef NDEBUG
+static size_t calculate_tree_size(grpc_avl_node* node) {
+ if (node == nullptr) {
+ return 0;
+ }
+ return 1 + calculate_tree_size(node->left) + calculate_tree_size(node->right);
+}
+
+void SslSessionLRUCache::AssertInvariants() {
+ size_t size = 0;
+ Node* prev = nullptr;
+ Node* current = use_order_list_head_;
+ while (current != nullptr) {
+ size++;
+ GPR_ASSERT(current->prev_ == prev);
+ void* node = grpc_avl_get(entry_by_key_, current->AvlKey(), nullptr);
+ GPR_ASSERT(node == current);
+ prev = current;
+ current = current->next_;
+ }
+ GPR_ASSERT(prev == use_order_list_tail_);
+ GPR_ASSERT(size == use_order_list_size_);
+ GPR_ASSERT(calculate_tree_size(entry_by_key_.root) == use_order_list_size_);
+}
+#else
+void SslSessionLRUCache::AssertInvariants() {}
+#endif
+
+} // namespace tsi
diff --git a/src/core/tsi/ssl/session_cache/ssl_session_cache.h b/src/core/tsi/ssl/session_cache/ssl_session_cache.h
new file mode 100644
index 0000000000..488638c9bb
--- /dev/null
+++ b/src/core/tsi/ssl/session_cache/ssl_session_cache.h
@@ -0,0 +1,93 @@
+/*
+ *
+ * Copyright 2018 gRPC authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef GRPC_CORE_TSI_SSL_SESSION_CACHE_SSL_SESSION_CACHE_H
+#define GRPC_CORE_TSI_SSL_SESSION_CACHE_SSL_SESSION_CACHE_H
+
+#include <grpc/support/port_platform.h>
+
+#include <grpc/slice.h>
+#include <grpc/support/sync.h>
+
+extern "C" {
+#include <openssl/ssl.h>
+}
+
+#include "src/core/lib/avl/avl.h"
+#include "src/core/lib/gprpp/memory.h"
+#include "src/core/lib/gprpp/ref_counted.h"
+#include "src/core/tsi/ssl/session_cache/ssl_session.h"
+
+/// Cache for SSL sessions for sessions resumption.
+///
+/// Older sessions may be evicted from the cache using LRU policy if capacity
+/// limit is hit. All sessions are associated with some key, usually server
+/// name. Note that servers are required to share session ticket encryption keys
+/// in order for cache to be effective.
+///
+/// This class is thread safe.
+
+namespace tsi {
+
+class SslSessionLRUCache : public grpc_core::RefCounted<SslSessionLRUCache> {
+ public:
+ /// Create new LRU cache with the given capacity.
+ static grpc_core::RefCountedPtr<SslSessionLRUCache> Create(size_t capacity) {
+ return grpc_core::MakeRefCounted<SslSessionLRUCache>(capacity);
+ }
+
+ // Not copyable nor movable.
+ SslSessionLRUCache(const SslSessionLRUCache&) = delete;
+ SslSessionLRUCache& operator=(const SslSessionLRUCache&) = delete;
+
+ /// Returns current number of sessions in the cache.
+ size_t Size();
+ /// Add \a session in the cache using \a key. This operation may discard older
+ /// sessions.
+ void Put(const char* key, SslSessionPtr session);
+ /// Returns the session from the cache associated with \a key or null if not
+ /// found.
+ SslSessionPtr Get(const char* key);
+
+ private:
+ // So New() can call our private ctor.
+ template <typename T, typename... Args>
+ friend T* grpc_core::New(Args&&... args);
+
+ class Node;
+
+ explicit SslSessionLRUCache(size_t capacity);
+ ~SslSessionLRUCache();
+
+ Node* FindLocked(const grpc_slice& key);
+ void Remove(Node* node);
+ void PushFront(Node* node);
+ void AssertInvariants();
+
+ gpr_mu lock_;
+ size_t capacity_;
+
+ Node* use_order_list_head_ = nullptr;
+ Node* use_order_list_tail_ = nullptr;
+ size_t use_order_list_size_ = 0;
+ grpc_avl entry_by_key_;
+};
+
+} // namespace tsi
+
+#endif /* GRPC_CORE_TSI_SSL_SESSION_CACHE_SSL_SESSION_CACHE_H */
diff --git a/src/core/tsi/ssl/session_cache/ssl_session_openssl.cc b/src/core/tsi/ssl/session_cache/ssl_session_openssl.cc
new file mode 100644
index 0000000000..61c036c7eb
--- /dev/null
+++ b/src/core/tsi/ssl/session_cache/ssl_session_openssl.cc
@@ -0,0 +1,76 @@
+/*
+ *
+ * Copyright 2018 gRPC authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <grpc/support/port_platform.h>
+
+#include "src/core/tsi/ssl/session_cache/ssl_session.h"
+
+#include <grpc/support/log.h>
+
+#ifndef OPENSSL_IS_BORINGSSL
+
+// OpenSSL invalidates SSL_SESSION on SSL destruction making it pointless
+// to cache sessions. The workaround is to serialize (relatively expensive)
+// session into binary blob and re-create it from blob on every handshake.
+// Note that it's safe to keep serialized session outside of SSL lifetime
+// as openssl performs all necessary validation while attempting to use a
+// session and creates a new one if something is wrong (e.g. server changed
+// set of allowed codecs).
+
+namespace tsi {
+namespace {
+
+class OpenSslCachedSession : public SslCachedSession {
+ public:
+ OpenSslCachedSession(SslSessionPtr session) {
+ int size = i2d_SSL_SESSION(session.get(), nullptr);
+ GPR_ASSERT(size > 0);
+ grpc_slice slice = grpc_slice_malloc(size_t(size));
+ unsigned char* start = GRPC_SLICE_START_PTR(slice);
+ int second_size = i2d_SSL_SESSION(session.get(), &start);
+ GPR_ASSERT(size == second_size);
+ serialized_session_ = slice;
+ }
+
+ virtual ~OpenSslCachedSession() { grpc_slice_unref(serialized_session_); }
+
+ SslSessionPtr CopySession() const override {
+ const unsigned char* data = GRPC_SLICE_START_PTR(serialized_session_);
+ size_t length = GRPC_SLICE_LENGTH(serialized_session_);
+ SSL_SESSION* session = d2i_SSL_SESSION(nullptr, &data, length);
+ if (session == nullptr) {
+ return SslSessionPtr();
+ }
+ return SslSessionPtr(session);
+ }
+
+ private:
+ grpc_slice serialized_session_;
+};
+
+} // namespace
+
+grpc_core::UniquePtr<SslCachedSession> SslCachedSession::Create(
+ SslSessionPtr session) {
+ return grpc_core::UniquePtr<SslCachedSession>(
+ grpc_core::New<OpenSslCachedSession>(std::move(session)));
+}
+
+} // namespace tsi
+
+#endif /* OPENSSL_IS_BORINGSSL */
diff --git a/src/core/tsi/ssl_transport_security.cc b/src/core/tsi/ssl_transport_security.cc
index 971170b7c5..0fc2926cf6 100644
--- a/src/core/tsi/ssl_transport_security.cc
+++ b/src/core/tsi/ssl_transport_security.cc
@@ -35,6 +35,7 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
+#include <grpc/support/string_util.h>
#include <grpc/support/sync.h>
#include <grpc/support/thd_id.h>
@@ -47,6 +48,8 @@ extern "C" {
#include <openssl/x509v3.h>
}
+#include "src/core/lib/gpr/useful.h"
+#include "src/core/tsi/ssl/session_cache/ssl_session_cache.h"
#include "src/core/tsi/ssl_types.h"
#include "src/core/tsi/transport_security.h"
@@ -78,6 +81,7 @@ struct tsi_ssl_client_handshaker_factory {
SSL_CTX* ssl_context;
unsigned char* alpn_protocol_list;
size_t alpn_protocol_list_length;
+ grpc_core::RefCountedPtr<tsi::SslSessionLRUCache> session_cache;
};
struct tsi_ssl_server_handshaker_factory {
@@ -111,17 +115,19 @@ typedef struct {
/* --- Library Initialization. ---*/
-static gpr_once init_openssl_once = GPR_ONCE_INIT;
-static gpr_mu* openssl_mutexes = nullptr;
+static gpr_once g_init_openssl_once = GPR_ONCE_INIT;
+static gpr_mu* g_openssl_mutexes = nullptr;
+static int g_ssl_ctx_ex_factory_index = -1;
static void openssl_locking_cb(int mode, int type, const char* file,
int line) GRPC_UNUSED;
static unsigned long openssl_thread_id_cb(void) GRPC_UNUSED;
+static const unsigned char kSslSessionIdContext[] = {'g', 'r', 'p', 'c'};
static void openssl_locking_cb(int mode, int type, const char* file, int line) {
if (mode & CRYPTO_LOCK) {
- gpr_mu_lock(&openssl_mutexes[type]);
+ gpr_mu_lock(&g_openssl_mutexes[type]);
} else {
- gpr_mu_unlock(&openssl_mutexes[type]);
+ gpr_mu_unlock(&g_openssl_mutexes[type]);
}
}
@@ -137,13 +143,16 @@ static void init_openssl(void) {
OpenSSL_add_all_algorithms();
num_locks = CRYPTO_num_locks();
GPR_ASSERT(num_locks > 0);
- openssl_mutexes = static_cast<gpr_mu*>(
+ g_openssl_mutexes = static_cast<gpr_mu*>(
gpr_malloc(static_cast<size_t>(num_locks) * sizeof(gpr_mu)));
for (i = 0; i < CRYPTO_num_locks(); i++) {
- gpr_mu_init(&openssl_mutexes[i]);
+ gpr_mu_init(&g_openssl_mutexes[i]);
}
CRYPTO_set_locking_callback(openssl_locking_cb);
CRYPTO_set_id_callback(openssl_thread_id_cb);
+ g_ssl_ctx_ex_factory_index =
+ SSL_CTX_get_ex_new_index(0, nullptr, nullptr, nullptr, nullptr);
+ GPR_ASSERT(g_ssl_ctx_ex_factory_index != -1);
}
/* --- Ssl utils. ---*/
@@ -721,6 +730,23 @@ static int NullVerifyCallback(int preverify_ok, X509_STORE_CTX* ctx) {
return 1;
}
+/* --- tsi_ssl_session_cache methods implementation. ---*/
+
+tsi_ssl_session_cache* tsi_ssl_session_cache_create_lru(size_t capacity) {
+ /* Pointer will be dereferenced by unref call. */
+ return reinterpret_cast<tsi_ssl_session_cache*>(
+ tsi::SslSessionLRUCache::Create(capacity).release());
+}
+
+void tsi_ssl_session_cache_ref(tsi_ssl_session_cache* cache) {
+ /* Pointer will be dereferenced by unref call. */
+ reinterpret_cast<tsi::SslSessionLRUCache*>(cache)->Ref().release();
+}
+
+void tsi_ssl_session_cache_unref(tsi_ssl_session_cache* cache) {
+ reinterpret_cast<tsi::SslSessionLRUCache*>(cache)->Unref();
+}
+
/* --- tsi_frame_protector methods implementation. ---*/
static tsi_result ssl_protector_protect(tsi_frame_protector* self,
@@ -1015,25 +1041,34 @@ static tsi_result ssl_handshaker_extract_peer(tsi_handshaker* self,
SSL_get0_next_proto_negotiated(impl->ssl, &alpn_selected,
&alpn_selected_len);
}
+
+ // 1 is for session reused property.
+ size_t new_property_count = peer->property_count + 1;
+ if (alpn_selected != nullptr) new_property_count++;
+ tsi_peer_property* new_properties = static_cast<tsi_peer_property*>(
+ gpr_zalloc(sizeof(*new_properties) * new_property_count));
+ for (size_t i = 0; i < peer->property_count; i++) {
+ new_properties[i] = peer->properties[i];
+ }
+ if (peer->properties != nullptr) gpr_free(peer->properties);
+ peer->properties = new_properties;
+
if (alpn_selected != nullptr) {
- size_t i;
- tsi_peer_property* new_properties = static_cast<tsi_peer_property*>(
- gpr_zalloc(sizeof(*new_properties) * (peer->property_count + 1)));
- for (i = 0; i < peer->property_count; i++) {
- new_properties[i] = peer->properties[i];
- }
result = tsi_construct_string_peer_property(
TSI_SSL_ALPN_SELECTED_PROTOCOL,
reinterpret_cast<const char*>(alpn_selected), alpn_selected_len,
- &new_properties[peer->property_count]);
- if (result != TSI_OK) {
- gpr_free(new_properties);
- return result;
- }
- if (peer->properties != nullptr) gpr_free(peer->properties);
+ &peer->properties[peer->property_count]);
+ if (result != TSI_OK) return result;
peer->property_count++;
- peer->properties = new_properties;
}
+
+ const char* session_reused = SSL_session_reused(impl->ssl) ? "true" : "false";
+ result = tsi_construct_string_peer_property(
+ TSI_SSL_SESSION_REUSED_PEER_PROPERTY, session_reused,
+ strlen(session_reused) + 1, &peer->properties[peer->property_count]);
+ if (result != TSI_OK) return result;
+ peer->property_count++;
+
return result;
}
@@ -1103,6 +1138,19 @@ static const tsi_handshaker_vtable handshaker_vtable = {
/* --- tsi_ssl_handshaker_factory common methods. --- */
+static void tsi_ssl_handshaker_resume_session(
+ SSL* ssl, tsi::SslSessionLRUCache* session_cache) {
+ const char* server_name = SSL_get_servername(ssl, TLSEXT_NAMETYPE_host_name);
+ if (server_name == nullptr) {
+ return;
+ }
+ tsi::SslSessionPtr session = session_cache->Get(server_name);
+ if (session != nullptr) {
+ // SSL_set_session internally increments reference counter.
+ SSL_set_session(ssl, session.get());
+ }
+}
+
static tsi_result create_tsi_ssl_handshaker(SSL_CTX* ctx, int is_client,
const char* server_name_indication,
tsi_ssl_handshaker_factory* factory,
@@ -1139,6 +1187,12 @@ static tsi_result create_tsi_ssl_handshaker(SSL_CTX* ctx, int is_client,
return TSI_INTERNAL_ERROR;
}
}
+ tsi_ssl_client_handshaker_factory* client_factory =
+ reinterpret_cast<tsi_ssl_client_handshaker_factory*>(factory);
+ if (client_factory->session_cache != nullptr) {
+ tsi_ssl_handshaker_resume_session(ssl,
+ client_factory->session_cache.get());
+ }
ssl_result = SSL_do_handshake(ssl);
ssl_result = SSL_get_error(ssl, ssl_result);
if (ssl_result != SSL_ERROR_WANT_READ) {
@@ -1214,6 +1268,7 @@ static void tsi_ssl_client_handshaker_factory_destroy(
reinterpret_cast<tsi_ssl_client_handshaker_factory*>(factory);
if (self->ssl_context != nullptr) SSL_CTX_free(self->ssl_context);
if (self->alpn_protocol_list != nullptr) gpr_free(self->alpn_protocol_list);
+ self->session_cache.reset();
gpr_free(self);
}
@@ -1357,6 +1412,30 @@ static int server_handshaker_factory_npn_advertised_callback(
return SSL_TLSEXT_ERR_OK;
}
+/// This callback is called when new \a session is established and ready to
+/// be cached. This session can be reused for new connections to similar
+/// servers at later point of time.
+/// It's intended to be used with SSL_CTX_sess_set_new_cb function.
+///
+/// It returns 1 if callback takes ownership over \a session and 0 otherwise.
+static int server_handshaker_factory_new_session_callback(
+ SSL* ssl, SSL_SESSION* session) {
+ SSL_CTX* ssl_context = SSL_get_SSL_CTX(ssl);
+ if (ssl_context == nullptr) {
+ return 0;
+ }
+ void* arg = SSL_CTX_get_ex_data(ssl_context, g_ssl_ctx_ex_factory_index);
+ tsi_ssl_client_handshaker_factory* factory =
+ static_cast<tsi_ssl_client_handshaker_factory*>(arg);
+ const char* server_name = SSL_get_servername(ssl, TLSEXT_NAMETYPE_host_name);
+ if (server_name == nullptr) {
+ return 0;
+ }
+ factory->session_cache->Put(server_name, tsi::SslSessionPtr(session));
+ // Return 1 to indicate transfered ownership over the given session.
+ return 1;
+}
+
/* --- tsi_ssl_handshaker_factory constructors. --- */
static tsi_ssl_handshaker_factory_vtable client_handshaker_factory_vtable = {
@@ -1367,15 +1446,29 @@ tsi_result tsi_create_ssl_client_handshaker_factory(
const char* pem_root_certs, const char* cipher_suites,
const char** alpn_protocols, uint16_t num_alpn_protocols,
tsi_ssl_client_handshaker_factory** factory) {
+ tsi_ssl_client_handshaker_options options;
+ memset(&options, 0, sizeof(options));
+ options.pem_key_cert_pair = pem_key_cert_pair;
+ options.pem_root_certs = pem_root_certs;
+ options.cipher_suites = cipher_suites;
+ options.alpn_protocols = alpn_protocols;
+ options.num_alpn_protocols = num_alpn_protocols;
+ return tsi_create_ssl_client_handshaker_factory_with_options(&options,
+ factory);
+}
+
+tsi_result tsi_create_ssl_client_handshaker_factory_with_options(
+ const tsi_ssl_client_handshaker_options* options,
+ tsi_ssl_client_handshaker_factory** factory) {
SSL_CTX* ssl_context = nullptr;
tsi_ssl_client_handshaker_factory* impl = nullptr;
tsi_result result = TSI_OK;
- gpr_once_init(&init_openssl_once, init_openssl);
+ gpr_once_init(&g_init_openssl_once, init_openssl);
if (factory == nullptr) return TSI_INVALID_ARGUMENT;
*factory = nullptr;
- if (pem_root_certs == nullptr) return TSI_INVALID_ARGUMENT;
+ if (options->pem_root_certs == nullptr) return TSI_INVALID_ARGUMENT;
ssl_context = SSL_CTX_new(TLSv1_2_method());
if (ssl_context == nullptr) {
@@ -1390,21 +1483,33 @@ tsi_result tsi_create_ssl_client_handshaker_factory(
impl->ssl_context = ssl_context;
+ if (options->session_cache != nullptr) {
+ // Unref is called manually on factory destruction.
+ impl->session_cache =
+ reinterpret_cast<tsi::SslSessionLRUCache*>(options->session_cache)
+ ->Ref();
+ SSL_CTX_set_ex_data(ssl_context, g_ssl_ctx_ex_factory_index, impl);
+ SSL_CTX_sess_set_new_cb(ssl_context,
+ server_handshaker_factory_new_session_callback);
+ SSL_CTX_set_session_cache_mode(ssl_context, SSL_SESS_CACHE_CLIENT);
+ }
+
do {
- result =
- populate_ssl_context(ssl_context, pem_key_cert_pair, cipher_suites);
+ result = populate_ssl_context(ssl_context, options->pem_key_cert_pair,
+ options->cipher_suites);
if (result != TSI_OK) break;
- result = ssl_ctx_load_verification_certs(ssl_context, pem_root_certs,
- strlen(pem_root_certs), nullptr);
+ result = ssl_ctx_load_verification_certs(
+ ssl_context, options->pem_root_certs, strlen(options->pem_root_certs),
+ nullptr);
if (result != TSI_OK) {
gpr_log(GPR_ERROR, "Cannot load server root certificates.");
break;
}
- if (num_alpn_protocols != 0) {
- result = build_alpn_protocol_name_list(alpn_protocols, num_alpn_protocols,
- &impl->alpn_protocol_list,
- &impl->alpn_protocol_list_length);
+ if (options->num_alpn_protocols != 0) {
+ result = build_alpn_protocol_name_list(
+ options->alpn_protocols, options->num_alpn_protocols,
+ &impl->alpn_protocol_list, &impl->alpn_protocol_list_length);
if (result != TSI_OK) {
gpr_log(GPR_ERROR, "Building alpn list failed with error %s.",
tsi_result_to_string(result));
@@ -1457,15 +1562,32 @@ tsi_result tsi_create_ssl_server_handshaker_factory_ex(
tsi_client_certificate_request_type client_certificate_request,
const char* cipher_suites, const char** alpn_protocols,
uint16_t num_alpn_protocols, tsi_ssl_server_handshaker_factory** factory) {
+ tsi_ssl_server_handshaker_options options;
+ memset(&options, 0, sizeof(options));
+ options.pem_key_cert_pairs = pem_key_cert_pairs;
+ options.num_key_cert_pairs = num_key_cert_pairs;
+ options.pem_client_root_certs = pem_client_root_certs;
+ options.client_certificate_request = client_certificate_request;
+ options.cipher_suites = cipher_suites;
+ options.alpn_protocols = alpn_protocols;
+ options.num_alpn_protocols = num_alpn_protocols;
+ return tsi_create_ssl_server_handshaker_factory_with_options(&options,
+ factory);
+}
+
+tsi_result tsi_create_ssl_server_handshaker_factory_with_options(
+ const tsi_ssl_server_handshaker_options* options,
+ tsi_ssl_server_handshaker_factory** factory) {
tsi_ssl_server_handshaker_factory* impl = nullptr;
tsi_result result = TSI_OK;
size_t i = 0;
- gpr_once_init(&init_openssl_once, init_openssl);
+ gpr_once_init(&g_init_openssl_once, init_openssl);
if (factory == nullptr) return TSI_INVALID_ARGUMENT;
*factory = nullptr;
- if (num_key_cert_pairs == 0 || pem_key_cert_pairs == nullptr) {
+ if (options->num_key_cert_pairs == 0 ||
+ options->pem_key_cert_pairs == nullptr) {
return TSI_INVALID_ARGUMENT;
}
@@ -1474,28 +1596,28 @@ tsi_result tsi_create_ssl_server_handshaker_factory_ex(
tsi_ssl_handshaker_factory_init(&impl->base);
impl->base.vtable = &server_handshaker_factory_vtable;
- impl->ssl_contexts =
- static_cast<SSL_CTX**>(gpr_zalloc(num_key_cert_pairs * sizeof(SSL_CTX*)));
- impl->ssl_context_x509_subject_names =
- static_cast<tsi_peer*>(gpr_zalloc(num_key_cert_pairs * sizeof(tsi_peer)));
+ impl->ssl_contexts = static_cast<SSL_CTX**>(
+ gpr_zalloc(options->num_key_cert_pairs * sizeof(SSL_CTX*)));
+ impl->ssl_context_x509_subject_names = static_cast<tsi_peer*>(
+ gpr_zalloc(options->num_key_cert_pairs * sizeof(tsi_peer)));
if (impl->ssl_contexts == nullptr ||
impl->ssl_context_x509_subject_names == nullptr) {
tsi_ssl_handshaker_factory_unref(&impl->base);
return TSI_OUT_OF_RESOURCES;
}
- impl->ssl_context_count = num_key_cert_pairs;
+ impl->ssl_context_count = options->num_key_cert_pairs;
- if (num_alpn_protocols > 0) {
- result = build_alpn_protocol_name_list(alpn_protocols, num_alpn_protocols,
- &impl->alpn_protocol_list,
- &impl->alpn_protocol_list_length);
+ if (options->num_alpn_protocols > 0) {
+ result = build_alpn_protocol_name_list(
+ options->alpn_protocols, options->num_alpn_protocols,
+ &impl->alpn_protocol_list, &impl->alpn_protocol_list_length);
if (result != TSI_OK) {
tsi_ssl_handshaker_factory_unref(&impl->base);
return result;
}
}
- for (i = 0; i < num_key_cert_pairs; i++) {
+ for (i = 0; i < options->num_key_cert_pairs; i++) {
do {
impl->ssl_contexts[i] = SSL_CTX_new(TLSv1_2_method());
if (impl->ssl_contexts[i] == nullptr) {
@@ -1504,20 +1626,44 @@ tsi_result tsi_create_ssl_server_handshaker_factory_ex(
break;
}
result = populate_ssl_context(impl->ssl_contexts[i],
- &pem_key_cert_pairs[i], cipher_suites);
+ &options->pem_key_cert_pairs[i],
+ options->cipher_suites);
if (result != TSI_OK) break;
- if (pem_client_root_certs != nullptr) {
+ // TODO(elessar): Provide ability to disable session ticket keys.
+
+ // Allow client cache sessions (it's needed for OpenSSL only).
+ int set_sid_ctx_result = SSL_CTX_set_session_id_context(
+ impl->ssl_contexts[i], kSslSessionIdContext,
+ GPR_ARRAY_SIZE(kSslSessionIdContext));
+ if (set_sid_ctx_result == 0) {
+ gpr_log(GPR_ERROR, "Failed to set session id context.");
+ result = TSI_INTERNAL_ERROR;
+ break;
+ }
+
+ if (options->session_ticket_key != nullptr) {
+ if (SSL_CTX_set_tlsext_ticket_keys(
+ impl->ssl_contexts[i],
+ const_cast<char*>(options->session_ticket_key),
+ options->session_ticket_key_size) == 0) {
+ gpr_log(GPR_ERROR, "Invalid STEK size.");
+ result = TSI_INVALID_ARGUMENT;
+ break;
+ }
+ }
+
+ if (options->pem_client_root_certs != nullptr) {
STACK_OF(X509_NAME)* root_names = nullptr;
result = ssl_ctx_load_verification_certs(
- impl->ssl_contexts[i], pem_client_root_certs,
- strlen(pem_client_root_certs), &root_names);
+ impl->ssl_contexts[i], options->pem_client_root_certs,
+ strlen(options->pem_client_root_certs), &root_names);
if (result != TSI_OK) {
gpr_log(GPR_ERROR, "Invalid verification certs.");
break;
}
SSL_CTX_set_client_CA_list(impl->ssl_contexts[i], root_names);
- switch (client_certificate_request) {
+ switch (options->client_certificate_request) {
case TSI_DONT_REQUEST_CLIENT_CERTIFICATE:
SSL_CTX_set_verify(impl->ssl_contexts[i], SSL_VERIFY_NONE, nullptr);
break;
@@ -1544,7 +1690,7 @@ tsi_result tsi_create_ssl_server_handshaker_factory_ex(
}
result = extract_x509_subject_names_from_pem_cert(
- pem_key_cert_pairs[i].cert_chain,
+ options->pem_key_cert_pairs[i].cert_chain,
&impl->ssl_context_x509_subject_names[i]);
if (result != TSI_OK) break;
diff --git a/src/core/tsi/ssl_transport_security.h b/src/core/tsi/ssl_transport_security.h
index edebadc1be..29d209b8f5 100644
--- a/src/core/tsi/ssl_transport_security.h
+++ b/src/core/tsi/ssl_transport_security.h
@@ -30,11 +30,27 @@
#define TSI_X509_SUBJECT_COMMON_NAME_PEER_PROPERTY "x509_subject_common_name"
#define TSI_X509_SUBJECT_ALTERNATIVE_NAME_PEER_PROPERTY \
"x509_subject_alternative_name"
+#define TSI_SSL_SESSION_REUSED_PEER_PROPERTY "ssl_session_reused"
#define TSI_X509_PEM_CERT_PROPERTY "x509_pem_cert"
#define TSI_SSL_ALPN_SELECTED_PROTOCOL "ssl_alpn_selected_protocol"
+/* --- tsi_ssl_session_cache object ---
+
+ Cache for SSL sessions for sessions resumption. */
+
+typedef struct tsi_ssl_session_cache tsi_ssl_session_cache;
+
+/* Create LRU cache for SSL sessions with \a capacity. */
+tsi_ssl_session_cache* tsi_ssl_session_cache_create_lru(size_t capacity);
+
+/* Increment reference counter of \a cache. */
+void tsi_ssl_session_cache_ref(tsi_ssl_session_cache* cache);
+
+/* Decrement reference counter of \a cache. */
+void tsi_ssl_session_cache_unref(tsi_ssl_session_cache* cache);
+
/* --- tsi_ssl_client_handshaker_factory object ---
This object creates a client tsi_handshaker objects implemented in terms of
@@ -81,6 +97,43 @@ tsi_result tsi_create_ssl_client_handshaker_factory(
const char** alpn_protocols, uint16_t num_alpn_protocols,
tsi_ssl_client_handshaker_factory** factory);
+typedef struct {
+ /* pem_key_cert_pair is a pointer to the object containing client's private
+ key and certificate chain. This parameter can be NULL if the client does
+ not have such a key/cert pair. */
+ const tsi_ssl_pem_key_cert_pair* pem_key_cert_pair;
+ /* pem_roots_cert is the NULL-terminated string containing the PEM encoding of
+ the client root certificates. This parameter may be NULL if the server does
+ not want the client to be authenticated with SSL. */
+ const char* pem_root_certs;
+ /* cipher_suites contains an optional list of the ciphers that the client
+ supports. The format of this string is described in:
+ https://www.openssl.org/docs/apps/ciphers.html.
+ This parameter can be set to NULL to use the default set of ciphers.
+ TODO(jboeuf): Revisit the format of this parameter. */
+ const char* cipher_suites;
+ /* alpn_protocols is an array containing the NULL terminated protocol names
+ that the handshakers created with this factory support. This parameter can
+ be NULL. */
+ const char** alpn_protocols;
+ /* num_alpn_protocols is the number of alpn protocols and associated lengths
+ specified. If this parameter is 0, the other alpn parameters must be
+ NULL. */
+ size_t num_alpn_protocols;
+ /* ssl_session_cache is a cache for reusable client-side sessions. */
+ tsi_ssl_session_cache* session_cache;
+} tsi_ssl_client_handshaker_options;
+
+/* Creates a client handshaker factory.
+ - options is the options used to create a factory.
+ - factory is the address of the factory pointer to be created.
+
+ - This method returns TSI_OK on success or TSI_INVALID_PARAMETER in the case
+ where a parameter is invalid. */
+tsi_result tsi_create_ssl_client_handshaker_factory_with_options(
+ const tsi_ssl_client_handshaker_options* options,
+ tsi_ssl_client_handshaker_factory** factory);
+
/* Creates a client handshaker.
- self is the factory from which the handshaker will be created.
- server_name_indication indicates the name of the server the client is
@@ -147,6 +200,51 @@ tsi_result tsi_create_ssl_server_handshaker_factory_ex(
const char* cipher_suites, const char** alpn_protocols,
uint16_t num_alpn_protocols, tsi_ssl_server_handshaker_factory** factory);
+typedef struct {
+ /* pem_key_cert_pairs is an array private key / certificate chains of the
+ server. */
+ const tsi_ssl_pem_key_cert_pair* pem_key_cert_pairs;
+ /* num_key_cert_pairs is the number of items in the pem_key_cert_pairs
+ array. */
+ size_t num_key_cert_pairs;
+ /* pem_root_certs is the NULL-terminated string containing the PEM encoding
+ of the server root certificates. */
+ const char* pem_client_root_certs;
+ /* client_certificate_request, if set to non-zero will force the client to
+ authenticate with an SSL cert. Note that this option is ignored if
+ pem_client_root_certs is NULL or pem_client_roots_certs_size is 0. */
+ tsi_client_certificate_request_type client_certificate_request;
+ /* cipher_suites contains an optional list of the ciphers that the server
+ supports. The format of this string is described in:
+ https://www.openssl.org/docs/apps/ciphers.html.
+ This parameter can be set to NULL to use the default set of ciphers.
+ TODO(jboeuf): Revisit the format of this parameter. */
+ const char* cipher_suites;
+ /* alpn_protocols is an array containing the NULL terminated protocol names
+ that the handshakers created with this factory support. This parameter can
+ be NULL. */
+ const char** alpn_protocols;
+ /* num_alpn_protocols is the number of alpn protocols and associated lengths
+ specified. If this parameter is 0, the other alpn parameters must be
+ NULL. */
+ uint16_t num_alpn_protocols;
+ /* session_ticket_key is optional key for encrypting session keys. If paramter
+ is not specified it must be NULL. */
+ const char* session_ticket_key;
+ /* session_ticket_key_size is a size of session ticket encryption key. */
+ size_t session_ticket_key_size;
+} tsi_ssl_server_handshaker_options;
+
+/* Creates a server handshaker factory.
+ - options is the options used to create a factory.
+ - factory is the address of the factory pointer to be created.
+
+ - This method returns TSI_OK on success or TSI_INVALID_PARAMETER in the case
+ where a parameter is invalid. */
+tsi_result tsi_create_ssl_server_handshaker_factory_with_options(
+ const tsi_ssl_server_handshaker_options* options,
+ tsi_ssl_server_handshaker_factory** factory);
+
/* Creates a server handshaker.
- self is the factory from which the handshaker will be created.
- handshaker is the address of the handshaker pointer to be created.
diff --git a/src/cpp/common/channel_filter.h b/src/cpp/common/channel_filter.h
index 60eefcb0d1..bd0ec969b4 100644
--- a/src/cpp/common/channel_filter.h
+++ b/src/cpp/common/channel_filter.h
@@ -182,20 +182,22 @@ class TransportStreamOpBatch {
op_->payload->recv_initial_metadata.recv_initial_metadata_ready = closure;
}
- grpc_byte_stream* send_message() const {
- return op_->send_message ? op_->payload->send_message.send_message
+ grpc_core::OrphanablePtr<grpc_core::ByteStream>* send_message() const {
+ return op_->send_message ? &op_->payload->send_message.send_message
: nullptr;
}
- void set_send_message(grpc_byte_stream* send_message) {
+ void set_send_message(
+ grpc_core::OrphanablePtr<grpc_core::ByteStream> send_message) {
op_->send_message = true;
- op_->payload->send_message.send_message = send_message;
+ op_->payload->send_message.send_message = std::move(send_message);
}
- grpc_byte_stream** recv_message() const {
+ grpc_core::OrphanablePtr<grpc_core::ByteStream>* recv_message() const {
return op_->recv_message ? op_->payload->recv_message.recv_message
: nullptr;
}
- void set_recv_message(grpc_byte_stream** recv_message) {
+ void set_recv_message(
+ grpc_core::OrphanablePtr<grpc_core::ByteStream>* recv_message) {
op_->recv_message = true;
op_->payload->recv_message.recv_message = recv_message;
}
diff --git a/src/cpp/server/server_cc.cc b/src/cpp/server/server_cc.cc
index 5638636e67..760aaa4b4d 100644
--- a/src/cpp/server/server_cc.cc
+++ b/src/cpp/server/server_cc.cc
@@ -382,11 +382,12 @@ Server::Server(
global_callbacks_ = g_callbacks;
global_callbacks_->UpdateArguments(args);
- for (auto it = sync_server_cqs_->begin(); it != sync_server_cqs_->end();
- it++) {
- sync_req_mgrs_.emplace_back(new SyncRequestThreadManager(
- this, (*it).get(), global_callbacks_, min_pollers, max_pollers,
- sync_cq_timeout_msec));
+ if (sync_server_cqs_ != nullptr) {
+ for (const auto& it : *sync_server_cqs_) {
+ sync_req_mgrs_.emplace_back(new SyncRequestThreadManager(
+ this, it.get(), global_callbacks_, min_pollers, max_pollers,
+ sync_cq_timeout_msec));
+ }
}
grpc_channel_args channel_args;
@@ -525,7 +526,7 @@ void Server::Start(ServerCompletionQueue** cqs, size_t num_cqs) {
// explicit one.
if (health_check_service_ == nullptr && !health_check_service_disabled_ &&
DefaultHealthCheckServiceEnabled()) {
- if (sync_server_cqs_->empty()) {
+ if (sync_server_cqs_ == nullptr || sync_server_cqs_->empty()) {
gpr_log(GPR_INFO,
"Default health check service disabled at async-only server.");
} else {
diff --git a/src/csharp/build_packages_dotnetcli.bat b/src/csharp/build_packages_dotnetcli.bat
index 4dd4947f00..76391738ff 100755
--- a/src/csharp/build_packages_dotnetcli.bat
+++ b/src/csharp/build_packages_dotnetcli.bat
@@ -19,17 +19,21 @@ set VERSION=1.11.0-dev
set NUGET=C:\nuget\nuget.exe
set DOTNET=dotnet
-set -ex
-
mkdir ..\..\artifacts
@rem Collect the artifacts built by the previous build step if running on Jenkins
mkdir nativelibs
+@rem Jenkins flow (deprecated)
powershell -Command "cp -r ..\..\platform=*\artifacts\csharp_ext_* nativelibs"
+@rem Kokoro flow
+powershell -Command "cp -r ..\..\input_artifacts\csharp_ext_* nativelibs"
@rem Collect protoc artifacts built by the previous build step
mkdir protoc_plugins
+@rem Jenkins flow (deprecated)
powershell -Command "cp -r ..\..\platform=*\artifacts\protoc_* protoc_plugins"
+@rem Kokoro flow
+powershell -Command "cp -r ..\..\input_artifacts\protoc_* protoc_plugins"
%DOTNET% restore Grpc.sln || goto :error
diff --git a/src/csharp/build_packages_dotnetcli.sh b/src/csharp/build_packages_dotnetcli.sh
index e3f8463ee8..1b73614b91 100755
--- a/src/csharp/build_packages_dotnetcli.sh
+++ b/src/csharp/build_packages_dotnetcli.sh
@@ -21,11 +21,17 @@ mkdir -p ../../artifacts/
# Collect the artifacts built by the previous build step
mkdir -p nativelibs
+# Jenkins flow (deprecated)
cp -r $EXTERNAL_GIT_ROOT/platform={windows,linux,macos}/artifacts/csharp_ext_* nativelibs || true
+# Kokoro flow
+cp -r $EXTERNAL_GIT_ROOT/input_artifacts/csharp_ext_* nativelibs || true
# Collect protoc artifacts built by the previous build step
mkdir -p protoc_plugins
+# Jenkins flow (deprecated)
cp -r $EXTERNAL_GIT_ROOT/platform={windows,linux,macos}/artifacts/protoc_* protoc_plugins || true
+# Kokoro flow
+cp -r $EXTERNAL_GIT_ROOT/input_artifacts/protoc_* protoc_plugins || true
dotnet restore Grpc.sln
diff --git a/src/objective-c/tests/Podfile b/src/objective-c/tests/Podfile
index 9e9db1fe6c..6e17d9a7cb 100644
--- a/src/objective-c/tests/Podfile
+++ b/src/objective-c/tests/Podfile
@@ -8,7 +8,6 @@ GRPC_LOCAL_SRC = '../../..'
# Install the dependencies in the main target plus all test targets.
%w(
- Tests
AllTests
RxLibraryUnitTests
InteropTestsRemote
@@ -44,10 +43,8 @@ end
target target_name do
pod 'BoringSSL', :podspec => "#{GRPC_LOCAL_SRC}/src/objective-c", :inhibit_warnings => true
pod 'CronetFramework', :podspec => "#{GRPC_LOCAL_SRC}/src/objective-c"
- pod 'gRPC-Core', :path => GRPC_LOCAL_SRC
- pod 'gRPC-Core/Cronet-Interface', :path => GRPC_LOCAL_SRC
pod 'gRPC-Core/Cronet-Implementation', :path => GRPC_LOCAL_SRC
- pod 'gRPC-Core/Tests', :path => GRPC_LOCAL_SRC
+ pod 'gRPC-Core/Cronet-Tests', :path => GRPC_LOCAL_SRC
end
end
diff --git a/src/objective-c/tests/analyze_link_map.py b/src/objective-c/tests/analyze_link_map.py
new file mode 100755
index 0000000000..48e3441087
--- /dev/null
+++ b/src/objective-c/tests/analyze_link_map.py
@@ -0,0 +1,78 @@
+#!/usr/bin/python
+# Copyright 2018 gRPC authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# This script analyzes link map file generated by Xcode. It calculates and
+# prints out the sizes of each dependent library and the total sizes of the
+# symbols.
+# The script takes one parameter, which is the path to the link map file.
+
+import sys
+import re
+
+table_tag = {}
+state = "start"
+
+table_stats_symbol = {}
+table_stats_dead = {}
+section_total_size = 0
+symbol_total_size = 0
+
+
+file_import = sys.argv[1]
+lines = list(open(file_import))
+for line in lines:
+ line_stripped = line[:-1]
+ if "# Object files:" == line_stripped:
+ state = "object"
+ continue
+ elif "# Sections:" == line_stripped:
+ state = "section"
+ continue
+ elif "# Symbols:" == line_stripped:
+ state = "symbol"
+ continue
+ elif "# Dead Stripped Symbols:" == line_stripped:
+ state = "dead"
+ continue
+
+ if state == "object":
+ segs = re.search('(\[ *[0-9]*\]) (.*)', line_stripped)
+ table_tag[segs.group(1)] = segs.group(2)
+
+ if state == "section":
+ if len(line_stripped) == 0 or line_stripped[0] == '#':
+ continue
+ segs = re.search('^(.+?)\s+(.+?)\s+.*', line_stripped)
+ section_total_size += int(segs.group(2), 16)
+
+ if state == "symbol":
+ if len(line_stripped) == 0 or line_stripped[0] == '#':
+ continue
+ segs = re.search('^.+?\s+(.+?)\s+(\[.+?\]).*', line_stripped)
+ target = table_tag[segs.group(2)]
+ target_stripped = re.search('^(.*?)(\(.+?\))?$', target).group(1)
+ size = int(segs.group(1), 16)
+ if not target_stripped in table_stats_symbol:
+ table_stats_symbol[target_stripped] = 0
+ table_stats_symbol[target_stripped] += size
+
+print("Sections total size: %d" % section_total_size)
+
+for target in table_stats_symbol:
+ print(target)
+ print(table_stats_symbol[target])
+ symbol_total_size += table_stats_symbol[target]
+
+print("Symbols total size: %d" % symbol_total_size)
diff --git a/src/php/ext/grpc/call_credentials.c b/src/php/ext/grpc/call_credentials.c
index 41c488a79c..d96dc7f3b7 100644
--- a/src/php/ext/grpc/call_credentials.c
+++ b/src/php/ext/grpc/call_credentials.c
@@ -35,6 +35,7 @@
#include <grpc/grpc.h>
#include <grpc/grpc_security.h>
+#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
zend_class_entry *grpc_ce_call_credentials;
@@ -178,8 +179,10 @@ int plugin_get_metadata(
PHP_GRPC_DELREF(arg);
+ gpr_log(GPR_INFO, "GRPC_PHP: call credentials plugin function - begin");
/* call the user callback function */
zend_call_function(state->fci, state->fci_cache TSRMLS_CC);
+ gpr_log(GPR_INFO, "GRPC_PHP: call credentials plugin function - end");
*num_creds_md = 0;
*status = GRPC_STATUS_OK;
diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py
index 5c9107cf2a..43c96b5837 100644
--- a/src/python/grpcio/grpc_core_dependencies.py
+++ b/src/python/grpcio/grpc_core_dependencies.py
@@ -97,6 +97,8 @@ CORE_SOURCE_FILES = [
'src/core/lib/iomgr/gethostname_sysconf.cc',
'src/core/lib/iomgr/iocp_windows.cc',
'src/core/lib/iomgr/iomgr.cc',
+ 'src/core/lib/iomgr/iomgr_custom.cc',
+ 'src/core/lib/iomgr/iomgr_internal.cc',
'src/core/lib/iomgr/iomgr_posix.cc',
'src/core/lib/iomgr/iomgr_uv.cc',
'src/core/lib/iomgr/iomgr_windows.cc',
@@ -105,12 +107,16 @@ CORE_SOURCE_FILES = [
'src/core/lib/iomgr/lockfree_event.cc',
'src/core/lib/iomgr/network_status_tracker.cc',
'src/core/lib/iomgr/polling_entity.cc',
- 'src/core/lib/iomgr/pollset_set_uv.cc',
+ 'src/core/lib/iomgr/pollset.cc',
+ 'src/core/lib/iomgr/pollset_custom.cc',
+ 'src/core/lib/iomgr/pollset_set.cc',
+ 'src/core/lib/iomgr/pollset_set_custom.cc',
'src/core/lib/iomgr/pollset_set_windows.cc',
'src/core/lib/iomgr/pollset_uv.cc',
'src/core/lib/iomgr/pollset_windows.cc',
+ 'src/core/lib/iomgr/resolve_address.cc',
+ 'src/core/lib/iomgr/resolve_address_custom.cc',
'src/core/lib/iomgr/resolve_address_posix.cc',
- 'src/core/lib/iomgr/resolve_address_uv.cc',
'src/core/lib/iomgr/resolve_address_windows.cc',
'src/core/lib/iomgr/resource_quota.cc',
'src/core/lib/iomgr/sockaddr_utils.cc',
@@ -122,19 +128,24 @@ CORE_SOURCE_FILES = [
'src/core/lib/iomgr/socket_utils_uv.cc',
'src/core/lib/iomgr/socket_utils_windows.cc',
'src/core/lib/iomgr/socket_windows.cc',
+ 'src/core/lib/iomgr/tcp_client.cc',
+ 'src/core/lib/iomgr/tcp_client_custom.cc',
'src/core/lib/iomgr/tcp_client_posix.cc',
- 'src/core/lib/iomgr/tcp_client_uv.cc',
'src/core/lib/iomgr/tcp_client_windows.cc',
+ 'src/core/lib/iomgr/tcp_custom.cc',
'src/core/lib/iomgr/tcp_posix.cc',
+ 'src/core/lib/iomgr/tcp_server.cc',
+ 'src/core/lib/iomgr/tcp_server_custom.cc',
'src/core/lib/iomgr/tcp_server_posix.cc',
'src/core/lib/iomgr/tcp_server_utils_posix_common.cc',
'src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc',
'src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc',
- 'src/core/lib/iomgr/tcp_server_uv.cc',
'src/core/lib/iomgr/tcp_server_windows.cc',
'src/core/lib/iomgr/tcp_uv.cc',
'src/core/lib/iomgr/tcp_windows.cc',
'src/core/lib/iomgr/time_averaged_stats.cc',
+ 'src/core/lib/iomgr/timer.cc',
+ 'src/core/lib/iomgr/timer_custom.cc',
'src/core/lib/iomgr/timer_generic.cc',
'src/core/lib/iomgr/timer_heap.cc',
'src/core/lib/iomgr/timer_manager.cc',
@@ -308,6 +319,9 @@ CORE_SOURCE_FILES = [
'src/core/ext/filters/deadline/deadline_filter.cc',
'src/core/tsi/alts_transport_security.cc',
'src/core/tsi/fake_transport_security.cc',
+ 'src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc',
+ 'src/core/tsi/ssl/session_cache/ssl_session_cache.cc',
+ 'src/core/tsi/ssl/session_cache/ssl_session_openssl.cc',
'src/core/tsi/ssl_transport_security.cc',
'src/core/tsi/transport_security_grpc.cc',
'src/core/ext/transport/chttp2/server/chttp2_server.cc',
diff --git a/src/python/grpcio_reflection/README.rst b/src/python/grpcio_reflection/README.rst
new file mode 100644
index 0000000000..da99a44904
--- /dev/null
+++ b/src/python/grpcio_reflection/README.rst
@@ -0,0 +1,10 @@
+gRPC Python Reflection package
+==============================
+
+Reference package for reflection in GRPC Python.
+
+Dependencies
+------------
+
+Depends on the `grpcio` package, available from PyPI via `pip install grpcio`.
+
diff --git a/src/python/grpcio_tests/tests/tests.json b/src/python/grpcio_tests/tests/tests.json
index e033c1063f..bbbc3ea360 100644
--- a/src/python/grpcio_tests/tests/tests.json
+++ b/src/python/grpcio_tests/tests/tests.json
@@ -38,6 +38,168 @@
"unit._cython.cygrpc_test.InsecureServerInsecureClient",
"unit._cython.cygrpc_test.SecureServerSecureClient",
"unit._cython.cygrpc_test.TypeSmokeTest",
+ "unit._early_ok_test.ManyEmptyRequestsTwoReadManyEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.ManyEmptyRequestsTwoReadManyLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.ManyEmptyRequestsTwoReadManySmallResponsesEarlyOKTest",
+ "unit._early_ok_test.ManyEmptyRequestsTwoReadTwoEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.ManyEmptyRequestsTwoReadTwoLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.ManyEmptyRequestsTwoReadTwoSmallResponsesEarlyOKTest",
+ "unit._early_ok_test.ManyEmptyRequestsTwoReadZeroEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.ManyEmptyRequestsTwoReadZeroLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.ManyEmptyRequestsTwoReadZeroSmallResponsesEarlyOKTest",
+ "unit._early_ok_test.ManyEmptyRequestsZeroReadManyEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.ManyEmptyRequestsZeroReadManyLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.ManyEmptyRequestsZeroReadManySmallResponsesEarlyOKTest",
+ "unit._early_ok_test.ManyEmptyRequestsZeroReadTwoEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.ManyEmptyRequestsZeroReadTwoLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.ManyEmptyRequestsZeroReadTwoSmallResponsesEarlyOKTest",
+ "unit._early_ok_test.ManyEmptyRequestsZeroReadZeroEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.ManyEmptyRequestsZeroReadZeroLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.ManyEmptyRequestsZeroReadZeroSmallResponsesEarlyOKTest",
+ "unit._early_ok_test.ManyLargeRequestsTwoReadManyEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.ManyLargeRequestsTwoReadManyLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.ManyLargeRequestsTwoReadManySmallResponsesEarlyOKTest",
+ "unit._early_ok_test.ManyLargeRequestsTwoReadTwoEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.ManyLargeRequestsTwoReadTwoLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.ManyLargeRequestsTwoReadTwoSmallResponsesEarlyOKTest",
+ "unit._early_ok_test.ManyLargeRequestsTwoReadZeroEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.ManyLargeRequestsTwoReadZeroLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.ManyLargeRequestsTwoReadZeroSmallResponsesEarlyOKTest",
+ "unit._early_ok_test.ManyLargeRequestsZeroReadManyEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.ManyLargeRequestsZeroReadManyLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.ManyLargeRequestsZeroReadManySmallResponsesEarlyOKTest",
+ "unit._early_ok_test.ManyLargeRequestsZeroReadTwoEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.ManyLargeRequestsZeroReadTwoLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.ManyLargeRequestsZeroReadTwoSmallResponsesEarlyOKTest",
+ "unit._early_ok_test.ManyLargeRequestsZeroReadZeroEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.ManyLargeRequestsZeroReadZeroLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.ManyLargeRequestsZeroReadZeroSmallResponsesEarlyOKTest",
+ "unit._early_ok_test.ManySmallRequestsTwoReadManyEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.ManySmallRequestsTwoReadManyLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.ManySmallRequestsTwoReadManySmallResponsesEarlyOKTest",
+ "unit._early_ok_test.ManySmallRequestsTwoReadTwoEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.ManySmallRequestsTwoReadTwoLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.ManySmallRequestsTwoReadTwoSmallResponsesEarlyOKTest",
+ "unit._early_ok_test.ManySmallRequestsTwoReadZeroEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.ManySmallRequestsTwoReadZeroLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.ManySmallRequestsTwoReadZeroSmallResponsesEarlyOKTest",
+ "unit._early_ok_test.ManySmallRequestsZeroReadManyEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.ManySmallRequestsZeroReadManyLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.ManySmallRequestsZeroReadManySmallResponsesEarlyOKTest",
+ "unit._early_ok_test.ManySmallRequestsZeroReadTwoEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.ManySmallRequestsZeroReadTwoLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.ManySmallRequestsZeroReadTwoSmallResponsesEarlyOKTest",
+ "unit._early_ok_test.ManySmallRequestsZeroReadZeroEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.ManySmallRequestsZeroReadZeroLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.ManySmallRequestsZeroReadZeroSmallResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoEmptyRequestsTwoReadManyEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoEmptyRequestsTwoReadManyLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoEmptyRequestsTwoReadManySmallResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoEmptyRequestsTwoReadTwoEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoEmptyRequestsTwoReadTwoLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoEmptyRequestsTwoReadTwoSmallResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoEmptyRequestsTwoReadZeroEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoEmptyRequestsTwoReadZeroLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoEmptyRequestsTwoReadZeroSmallResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoEmptyRequestsZeroReadManyEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoEmptyRequestsZeroReadManyLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoEmptyRequestsZeroReadManySmallResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoEmptyRequestsZeroReadTwoEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoEmptyRequestsZeroReadTwoLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoEmptyRequestsZeroReadTwoSmallResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoEmptyRequestsZeroReadZeroEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoEmptyRequestsZeroReadZeroLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoEmptyRequestsZeroReadZeroSmallResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoLargeRequestsTwoReadManyEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoLargeRequestsTwoReadManyLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoLargeRequestsTwoReadManySmallResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoLargeRequestsTwoReadTwoEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoLargeRequestsTwoReadTwoLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoLargeRequestsTwoReadTwoSmallResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoLargeRequestsTwoReadZeroEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoLargeRequestsTwoReadZeroLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoLargeRequestsTwoReadZeroSmallResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoLargeRequestsZeroReadManyEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoLargeRequestsZeroReadManyLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoLargeRequestsZeroReadManySmallResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoLargeRequestsZeroReadTwoEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoLargeRequestsZeroReadTwoLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoLargeRequestsZeroReadTwoSmallResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoLargeRequestsZeroReadZeroEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoLargeRequestsZeroReadZeroLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoLargeRequestsZeroReadZeroSmallResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoSmallRequestsTwoReadManyEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoSmallRequestsTwoReadManyLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoSmallRequestsTwoReadManySmallResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoSmallRequestsTwoReadTwoEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoSmallRequestsTwoReadTwoLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoSmallRequestsTwoReadTwoSmallResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoSmallRequestsTwoReadZeroEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoSmallRequestsTwoReadZeroLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoSmallRequestsTwoReadZeroSmallResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoSmallRequestsZeroReadManyEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoSmallRequestsZeroReadManyLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoSmallRequestsZeroReadManySmallResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoSmallRequestsZeroReadTwoEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoSmallRequestsZeroReadTwoLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoSmallRequestsZeroReadTwoSmallResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoSmallRequestsZeroReadZeroEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoSmallRequestsZeroReadZeroLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.TwoSmallRequestsZeroReadZeroSmallResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroEmptyRequestsTwoReadManyEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroEmptyRequestsTwoReadManyLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroEmptyRequestsTwoReadManySmallResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroEmptyRequestsTwoReadTwoEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroEmptyRequestsTwoReadTwoLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroEmptyRequestsTwoReadTwoSmallResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroEmptyRequestsTwoReadZeroEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroEmptyRequestsTwoReadZeroLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroEmptyRequestsTwoReadZeroSmallResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroEmptyRequestsZeroReadManyEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroEmptyRequestsZeroReadManyLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroEmptyRequestsZeroReadManySmallResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroEmptyRequestsZeroReadTwoEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroEmptyRequestsZeroReadTwoLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroEmptyRequestsZeroReadTwoSmallResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroEmptyRequestsZeroReadZeroEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroEmptyRequestsZeroReadZeroLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroEmptyRequestsZeroReadZeroSmallResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroLargeRequestsTwoReadManyEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroLargeRequestsTwoReadManyLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroLargeRequestsTwoReadManySmallResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroLargeRequestsTwoReadTwoEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroLargeRequestsTwoReadTwoLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroLargeRequestsTwoReadTwoSmallResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroLargeRequestsTwoReadZeroEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroLargeRequestsTwoReadZeroLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroLargeRequestsTwoReadZeroSmallResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroLargeRequestsZeroReadManyEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroLargeRequestsZeroReadManyLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroLargeRequestsZeroReadManySmallResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroLargeRequestsZeroReadTwoEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroLargeRequestsZeroReadTwoLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroLargeRequestsZeroReadTwoSmallResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroLargeRequestsZeroReadZeroEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroLargeRequestsZeroReadZeroLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroLargeRequestsZeroReadZeroSmallResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroSmallRequestsTwoReadManyEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroSmallRequestsTwoReadManyLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroSmallRequestsTwoReadManySmallResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroSmallRequestsTwoReadTwoEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroSmallRequestsTwoReadTwoLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroSmallRequestsTwoReadTwoSmallResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroSmallRequestsTwoReadZeroEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroSmallRequestsTwoReadZeroLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroSmallRequestsTwoReadZeroSmallResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroSmallRequestsZeroReadManyEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroSmallRequestsZeroReadManyLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroSmallRequestsZeroReadManySmallResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroSmallRequestsZeroReadTwoEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroSmallRequestsZeroReadTwoLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroSmallRequestsZeroReadTwoSmallResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroSmallRequestsZeroReadZeroEmptyResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroSmallRequestsZeroReadZeroLargeResponsesEarlyOKTest",
+ "unit._early_ok_test.ZeroSmallRequestsZeroReadZeroSmallResponsesEarlyOKTest",
"unit._empty_message_test.EmptyMessageTest",
"unit._exit_test.ExitTest",
"unit._interceptor_test.InterceptorTest",
@@ -56,12 +218,6 @@
"unit.beta._beta_features_test.BetaFeaturesTest",
"unit.beta._beta_features_test.ContextManagementAndLifecycleTest",
"unit.beta._connectivity_channel_test.ConnectivityStatesTest",
- "unit.beta._face_interface_test.DynamicInvokerBlockingInvocationInlineServiceTest",
- "unit.beta._face_interface_test.DynamicInvokerFutureInvocationAsynchronousEventServiceTest",
- "unit.beta._face_interface_test.GenericInvokerBlockingInvocationInlineServiceTest",
- "unit.beta._face_interface_test.GenericInvokerFutureInvocationAsynchronousEventServiceTest",
- "unit.beta._face_interface_test.MultiCallableInvokerBlockingInvocationInlineServiceTest",
- "unit.beta._face_interface_test.MultiCallableInvokerFutureInvocationAsynchronousEventServiceTest",
"unit.beta._implementations_test.CallCredentialsTest",
"unit.beta._implementations_test.ChannelCredentialsTest",
"unit.beta._not_found_test.NotFoundTest",
diff --git a/src/python/grpcio_tests/tests/unit/_auth_context_test.py b/src/python/grpcio_tests/tests/unit/_auth_context_test.py
index 468869a03e..8c1a30e032 100644
--- a/src/python/grpcio_tests/tests/unit/_auth_context_test.py
+++ b/src/python/grpcio_tests/tests/unit/_auth_context_test.py
@@ -102,7 +102,8 @@ class AuthContextTest(unittest.TestCase):
self.assertIsNone(auth_data[_ID])
self.assertIsNone(auth_data[_ID_KEY])
self.assertDictEqual({
- 'transport_security_type': [b'ssl']
+ 'transport_security_type': [b'ssl'],
+ 'ssl_session_reused': [b'false'],
}, auth_data[_AUTH_CTX])
def testSecureClientCert(self):
diff --git a/src/python/grpcio_tests/tests/unit/_compression_test.py b/src/python/grpcio_tests/tests/unit/_compression_test.py
index 7550cd39ba..da1996b1d1 100644
--- a/src/python/grpcio_tests/tests/unit/_compression_test.py
+++ b/src/python/grpcio_tests/tests/unit/_compression_test.py
@@ -32,12 +32,10 @@ def handle_unary(request, servicer_context):
def handle_stream(request_iterator, servicer_context):
- # TODO(issue:#6891) We should be able to remove this loop,
- # and replace with return; yield
servicer_context.send_initial_metadata([('grpc-internal-encoding-request',
'gzip')])
- for request in request_iterator:
- yield request
+ return
+ yield
class _MethodHandler(grpc.RpcMethodHandler):
diff --git a/src/python/grpcio_tests/tests/unit/_early_ok_test.py b/src/python/grpcio_tests/tests/unit/_early_ok_test.py
new file mode 100644
index 0000000000..041532c661
--- /dev/null
+++ b/src/python/grpcio_tests/tests/unit/_early_ok_test.py
@@ -0,0 +1,206 @@
+# Copyright 2018 gRPC authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+"""Tests servicers sending OK status without having read all requests.
+
+This is a regression test of https://github.com/grpc/grpc/issues/6891.
+"""
+
+import enum
+import unittest
+
+import six
+
+import grpc
+
+from tests.unit import test_common
+from tests.unit.framework.common import test_constants
+
+_RPC_METHOD = '/serffice/Meffod'
+
+
+@enum.unique
+class _MessageCount(enum.Enum):
+
+ ZERO = (
+ 0,
+ 'Zero',
+ )
+ TWO = (
+ 1,
+ 'Two',
+ )
+ MANY = (
+ test_constants.STREAM_LENGTH,
+ 'Many',
+ )
+
+
+@enum.unique
+class _MessageSize(enum.Enum):
+ EMPTY = (
+ 0,
+ 'Empty',
+ )
+ SMALL = (
+ 32,
+ 'Small',
+ ) # Smaller than any flow control window.
+ LARGE = (
+ 3 * 1024 * 1024,
+ 'Large',
+ ) # Larger than any flow control window.
+
+
+_ZERO_MESSAGE = b''
+_SMALL_MESSAGE = b'\x07' * _MessageSize.SMALL.value[0]
+_LARGE_MESSAGE = b'abc' * (_MessageSize.LARGE.value[0] // 3)
+
+
+@enum.unique
+class _ReadRequests(enum.Enum):
+
+ ZERO = (
+ 0,
+ 'Zero',
+ )
+ TWO = (
+ 2,
+ 'Two',
+ )
+
+
+class _Case(object):
+
+ def __init__(self, request_count, request_size, request_reading,
+ response_count, response_size):
+ self.request_count = request_count
+ self.request_size = request_size
+ self.request_reading = request_reading
+ self.response_count = response_count
+ self.response_size = response_size
+
+ def create_test_case_name(self):
+ return '{}{}Requests{}Read{}{}ResponsesEarlyOKTest'.format(
+ self.request_count.value[1], self.request_size.value[1],
+ self.request_reading.value[1], self.response_count.value[1],
+ self.response_size.value[1])
+
+
+def _message(message_size):
+ if message_size is _MessageSize.EMPTY:
+ return _ZERO_MESSAGE
+ elif message_size is _MessageSize.SMALL:
+ return _SMALL_MESSAGE
+ elif message_size is _MessageSize.LARGE:
+ return _LARGE_MESSAGE
+
+
+def _messages_to_send(count, size):
+ for _ in range(count.value[0]):
+ yield _message(size)
+
+
+def _draw_requests(case, request_iterator):
+ for _ in range(
+ min(case.request_count.value[0], case.request_reading.value[0])):
+ next(request_iterator)
+
+
+def _draw_responses(case, response_iterator):
+ for _ in range(case.response_count.value[0]):
+ next(response_iterator)
+
+
+class _MethodHandler(grpc.RpcMethodHandler):
+
+ def __init__(self, case):
+ self.request_streaming = True
+ self.response_streaming = True
+ self.request_deserializer = None
+ self.response_serializer = None
+ self.unary_unary = None
+ self.unary_stream = None
+ self.stream_unary = None
+ self._case = case
+
+ def stream_stream(self, request_iterator, servicer_context):
+ _draw_requests(self._case, request_iterator)
+
+ for response in _messages_to_send(self._case.response_count,
+ self._case.response_size):
+ yield response
+
+
+class _GenericHandler(grpc.GenericRpcHandler):
+
+ def __init__(self, case):
+ self._case = case
+
+ def service(self, handler_call_details):
+ return _MethodHandler(self._case)
+
+
+class _EarlyOkTest(unittest.TestCase):
+
+ def setUp(self):
+ self._server = test_common.test_server()
+ port = self._server.add_insecure_port('[::]:0')
+ self._server.add_generic_rpc_handlers((_GenericHandler(self.case),))
+ self._server.start()
+
+ self._channel = grpc.insecure_channel('localhost:%d' % port)
+ self._multi_callable = self._channel.stream_stream(_RPC_METHOD)
+
+ def tearDown(self):
+ self._server.stop(None)
+
+ def test_early_ok(self):
+ requests = _messages_to_send(self.case.request_count,
+ self.case.request_size)
+
+ response_iterator_call = self._multi_callable(requests)
+
+ _draw_responses(self.case, response_iterator_call)
+
+ self.assertIs(grpc.StatusCode.OK, response_iterator_call.code())
+
+
+def _cases():
+ for request_count in _MessageCount:
+ for request_size in _MessageSize:
+ for request_reading in _ReadRequests:
+ for response_count in _MessageCount:
+ for response_size in _MessageSize:
+ yield _Case(request_count, request_size,
+ request_reading, response_count,
+ response_size)
+
+
+def _test_case_classes():
+ for case in _cases():
+ yield type(case.create_test_case_name(), (_EarlyOkTest,), {
+ 'case': case,
+ '__module__': _EarlyOkTest.__module__,
+ })
+
+
+def load_tests(loader, tests, pattern):
+ return unittest.TestSuite(
+ tests=tuple(
+ loader.loadTestsFromTestCase(test_case_class)
+ for test_case_class in _test_case_classes()))
+
+
+if __name__ == '__main__':
+ unittest.main(verbosity=2)
diff --git a/src/python/grpcio_tests/tests/unit/_metadata_code_details_test.py b/src/python/grpcio_tests/tests/unit/_metadata_code_details_test.py
index ca10bd4dab..a6cdf32e5b 100644
--- a/src/python/grpcio_tests/tests/unit/_metadata_code_details_test.py
+++ b/src/python/grpcio_tests/tests/unit/_metadata_code_details_test.py
@@ -107,9 +107,6 @@ class _Servicer(object):
self._received_client_metadata = context.invocation_metadata()
context.send_initial_metadata(_SERVER_INITIAL_METADATA)
context.set_trailing_metadata(_SERVER_TRAILING_METADATA)
- # TODO(https://github.com/grpc/grpc/issues/6891): just ignore the
- # request iterator.
- list(request_iterator)
if self._abort_call:
context.abort(self._code, self._details)
else:
@@ -127,9 +124,6 @@ class _Servicer(object):
self._received_client_metadata = context.invocation_metadata()
context.send_initial_metadata(_SERVER_INITIAL_METADATA)
context.set_trailing_metadata(_SERVER_TRAILING_METADATA)
- # TODO(https://github.com/grpc/grpc/issues/6891): just ignore the
- # request iterator.
- list(request_iterator)
if self._abort_call:
context.abort(self._code, self._details)
else:
diff --git a/src/python/grpcio_tests/tests/unit/_metadata_test.py b/src/python/grpcio_tests/tests/unit/_metadata_test.py
index 5908421011..2309eeb733 100644
--- a/src/python/grpcio_tests/tests/unit/_metadata_test.py
+++ b/src/python/grpcio_tests/tests/unit/_metadata_test.py
@@ -117,9 +117,6 @@ def handle_stream_unary(test, request_iterator, servicer_context):
validate_client_metadata(test, servicer_context)
servicer_context.send_initial_metadata(_INITIAL_METADATA)
servicer_context.set_trailing_metadata(_TRAILING_METADATA)
- # TODO(issue:#6891) We should be able to remove this loop
- for request in request_iterator:
- pass
return _RESPONSE
@@ -127,10 +124,8 @@ def handle_stream_stream(test, request_iterator, servicer_context):
validate_client_metadata(test, servicer_context)
servicer_context.send_initial_metadata(_INITIAL_METADATA)
servicer_context.set_trailing_metadata(_TRAILING_METADATA)
- # TODO(issue:#6891) We should be able to remove this loop,
- # and replace with return; yield
- for request in request_iterator:
- yield _RESPONSE
+ return
+ yield
class _MethodHandler(grpc.RpcMethodHandler):
diff --git a/src/python/grpcio_tests/tests/unit/_resource_exhausted_test.py b/src/python/grpcio_tests/tests/unit/_resource_exhausted_test.py
index df4b129018..e35f8f10d4 100644
--- a/src/python/grpcio_tests/tests/unit/_resource_exhausted_test.py
+++ b/src/python/grpcio_tests/tests/unit/_resource_exhausted_test.py
@@ -77,18 +77,13 @@ def handle_unary_stream(trigger, request, servicer_context):
def handle_stream_unary(trigger, request_iterator, servicer_context):
trigger.await_trigger()
- # TODO(issue:#6891) We should be able to remove this loop
- for request in request_iterator:
- pass
return _RESPONSE
def handle_stream_stream(trigger, request_iterator, servicer_context):
trigger.await_trigger()
- # TODO(issue:#6891) We should be able to remove this loop,
- # and replace with return; yield
- for request in request_iterator:
- yield _RESPONSE
+ return
+ yield
class _MethodHandler(grpc.RpcMethodHandler):
diff --git a/src/python/grpcio_tests/tests/unit/beta/_face_interface_test.py b/src/python/grpcio_tests/tests/unit/beta/_face_interface_test.py
deleted file mode 100644
index c99738e085..0000000000
--- a/src/python/grpcio_tests/tests/unit/beta/_face_interface_test.py
+++ /dev/null
@@ -1,132 +0,0 @@
-# Copyright 2015 gRPC authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-"""Tests Face interface compliance of the gRPC Python Beta API."""
-
-import collections
-import unittest
-
-import six
-
-from grpc.beta import implementations
-from grpc.beta import interfaces
-from tests.unit import resources
-from tests.unit import test_common as grpc_test_common
-from tests.unit.beta import test_utilities
-from tests.unit.framework.common import test_constants
-from tests.unit.framework.interfaces.face import test_cases
-from tests.unit.framework.interfaces.face import test_interfaces
-
-_SERVER_HOST_OVERRIDE = 'foo.test.google.fr'
-
-
-class _SerializationBehaviors(
- collections.namedtuple('_SerializationBehaviors', (
- 'request_serializers',
- 'request_deserializers',
- 'response_serializers',
- 'response_deserializers',
- ))):
- pass
-
-
-def _serialization_behaviors_from_test_methods(test_methods):
- request_serializers = {}
- request_deserializers = {}
- response_serializers = {}
- response_deserializers = {}
- for (group, method), test_method in six.iteritems(test_methods):
- request_serializers[group, method] = test_method.serialize_request
- request_deserializers[group, method] = test_method.deserialize_request
- response_serializers[group, method] = test_method.serialize_response
- response_deserializers[group, method] = test_method.deserialize_response
- return _SerializationBehaviors(request_serializers, request_deserializers,
- response_serializers, response_deserializers)
-
-
-class _Implementation(test_interfaces.Implementation):
-
- def instantiate(self, methods, method_implementations,
- multi_method_implementation):
- serialization_behaviors = _serialization_behaviors_from_test_methods(
- methods)
- # TODO(nathaniel): Add a "groups" attribute to _digest.TestServiceDigest.
- service = next(iter(methods))[0]
- # TODO(nathaniel): Add a "cardinalities_by_group" attribute to
- # _digest.TestServiceDigest.
- cardinalities = {
- method: method_object.cardinality()
- for (group, method), method_object in six.iteritems(methods)
- }
-
- server_options = implementations.server_options(
- request_deserializers=serialization_behaviors.request_deserializers,
- response_serializers=serialization_behaviors.response_serializers,
- thread_pool_size=test_constants.POOL_SIZE)
- server = implementations.server(
- method_implementations, options=server_options)
- server_credentials = implementations.ssl_server_credentials([
- (
- resources.private_key(),
- resources.certificate_chain(),
- ),
- ])
- port = server.add_secure_port('[::]:0', server_credentials)
- server.start()
- channel_credentials = implementations.ssl_channel_credentials(
- resources.test_root_certificates())
- channel = test_utilities.not_really_secure_channel(
- 'localhost', port, channel_credentials, _SERVER_HOST_OVERRIDE)
- stub_options = implementations.stub_options(
- request_serializers=serialization_behaviors.request_serializers,
- response_deserializers=serialization_behaviors.
- response_deserializers,
- thread_pool_size=test_constants.POOL_SIZE)
- generic_stub = implementations.generic_stub(
- channel, options=stub_options)
- dynamic_stub = implementations.dynamic_stub(
- channel, service, cardinalities, options=stub_options)
- return generic_stub, {service: dynamic_stub}, server
-
- def destantiate(self, memo):
- memo.stop(test_constants.SHORT_TIMEOUT).wait()
-
- def invocation_metadata(self):
- return grpc_test_common.INVOCATION_INITIAL_METADATA
-
- def initial_metadata(self):
- return grpc_test_common.SERVICE_INITIAL_METADATA
-
- def terminal_metadata(self):
- return grpc_test_common.SERVICE_TERMINAL_METADATA
-
- def code(self):
- return interfaces.StatusCode.OK
-
- def details(self):
- return grpc_test_common.DETAILS
-
- def metadata_transmitted(self, original_metadata, transmitted_metadata):
- return original_metadata is None or grpc_test_common.metadata_transmitted(
- original_metadata, transmitted_metadata)
-
-
-def load_tests(loader, tests, pattern):
- return unittest.TestSuite(
- tests=tuple(
- loader.loadTestsFromTestCase(test_case_class)
- for test_case_class in test_cases.test_cases(_Implementation())))
-
-
-if __name__ == '__main__':
- unittest.main(verbosity=2)
diff --git a/src/python/grpcio_tests/tests/unit/framework/interfaces/__init__.py b/src/python/grpcio_tests/tests/unit/framework/interfaces/__init__.py
deleted file mode 100644
index 5fb4f3c3cf..0000000000
--- a/src/python/grpcio_tests/tests/unit/framework/interfaces/__init__.py
+++ /dev/null
@@ -1,13 +0,0 @@
-# Copyright 2015 gRPC authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
diff --git a/src/python/grpcio_tests/tests/unit/framework/interfaces/face/__init__.py b/src/python/grpcio_tests/tests/unit/framework/interfaces/face/__init__.py
deleted file mode 100644
index 5fb4f3c3cf..0000000000
--- a/src/python/grpcio_tests/tests/unit/framework/interfaces/face/__init__.py
+++ /dev/null
@@ -1,13 +0,0 @@
-# Copyright 2015 gRPC authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
diff --git a/src/python/grpcio_tests/tests/unit/framework/interfaces/face/_blocking_invocation_inline_service.py b/src/python/grpcio_tests/tests/unit/framework/interfaces/face/_blocking_invocation_inline_service.py
deleted file mode 100644
index 5d8679aa62..0000000000
--- a/src/python/grpcio_tests/tests/unit/framework/interfaces/face/_blocking_invocation_inline_service.py
+++ /dev/null
@@ -1,287 +0,0 @@
-# Copyright 2015 gRPC authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-"""Test code for the Face layer of RPC Framework."""
-
-from __future__ import division
-
-import abc
-import itertools
-import unittest
-from concurrent import futures
-
-import six
-
-# test_interfaces is referenced from specification in this module.
-from grpc.framework.foundation import logging_pool
-from grpc.framework.interfaces.face import face
-from tests.unit.framework.common import test_constants
-from tests.unit.framework.common import test_control
-from tests.unit.framework.common import test_coverage
-from tests.unit.framework.interfaces.face import _3069_test_constant
-from tests.unit.framework.interfaces.face import _digest
-from tests.unit.framework.interfaces.face import _stock_service
-from tests.unit.framework.interfaces.face import test_interfaces # pylint: disable=unused-import
-
-
-class TestCase(
- six.with_metaclass(abc.ABCMeta, test_coverage.Coverage,
- unittest.TestCase)):
- """A test of the Face layer of RPC Framework.
-
- Concrete subclasses must have an "implementation" attribute of type
- test_interfaces.Implementation and an "invoker_constructor" attribute of type
- _invocation.InvokerConstructor.
- """
-
- NAME = 'BlockingInvocationInlineServiceTest'
-
- def setUp(self):
- """See unittest.TestCase.setUp for full specification.
-
- Overriding implementations must call this implementation.
- """
- self._control = test_control.PauseFailControl()
- self._digest = _digest.digest(_stock_service.STOCK_TEST_SERVICE,
- self._control, None)
-
- generic_stub, dynamic_stubs, self._memo = self.implementation.instantiate(
- self._digest.methods, self._digest.inline_method_implementations,
- None)
- self._invoker = self.invoker_constructor.construct_invoker(
- generic_stub, dynamic_stubs, self._digest.methods)
-
- def tearDown(self):
- """See unittest.TestCase.tearDown for full specification.
-
- Overriding implementations must call this implementation.
- """
- self._invoker = None
- self.implementation.destantiate(self._memo)
-
- def testSuccessfulUnaryRequestUnaryResponse(self):
- for (group, method), test_messages_sequence in (six.iteritems(
- self._digest.unary_unary_messages_sequences)):
- for test_messages in test_messages_sequence:
- request = test_messages.request()
-
- response, call = self._invoker.blocking(group, method)(
- request, test_constants.LONG_TIMEOUT, with_call=True)
-
- test_messages.verify(request, response, self)
-
- def testSuccessfulUnaryRequestStreamResponse(self):
- for (group, method), test_messages_sequence in (six.iteritems(
- self._digest.unary_stream_messages_sequences)):
- for test_messages in test_messages_sequence:
- request = test_messages.request()
-
- response_iterator = self._invoker.blocking(group, method)(
- request, test_constants.LONG_TIMEOUT)
- responses = list(response_iterator)
-
- test_messages.verify(request, responses, self)
-
- def testSuccessfulStreamRequestUnaryResponse(self):
- for (group, method), test_messages_sequence in (six.iteritems(
- self._digest.stream_unary_messages_sequences)):
- for test_messages in test_messages_sequence:
- requests = test_messages.requests()
-
- response, call = self._invoker.blocking(group, method)(
- iter(requests), test_constants.LONG_TIMEOUT, with_call=True)
-
- test_messages.verify(requests, response, self)
-
- def testSuccessfulStreamRequestStreamResponse(self):
- for (group, method), test_messages_sequence in (six.iteritems(
- self._digest.stream_stream_messages_sequences)):
- for test_messages in test_messages_sequence:
- requests = test_messages.requests()
-
- response_iterator = self._invoker.blocking(group, method)(
- iter(requests), test_constants.LONG_TIMEOUT)
- responses = list(response_iterator)
-
- test_messages.verify(requests, responses, self)
-
- def testSequentialInvocations(self):
- for (group, method), test_messages_sequence in (six.iteritems(
- self._digest.unary_unary_messages_sequences)):
- for test_messages in test_messages_sequence:
- first_request = test_messages.request()
- second_request = test_messages.request()
-
- first_response = self._invoker.blocking(group, method)(
- first_request, test_constants.LONG_TIMEOUT)
-
- test_messages.verify(first_request, first_response, self)
-
- second_response = self._invoker.blocking(group, method)(
- second_request, test_constants.LONG_TIMEOUT)
-
- test_messages.verify(second_request, second_response, self)
-
- def testParallelInvocations(self):
- pool = logging_pool.pool(test_constants.THREAD_CONCURRENCY)
- for (group, method), test_messages_sequence in (six.iteritems(
- self._digest.unary_unary_messages_sequences)):
- for test_messages in test_messages_sequence:
- requests = []
- response_futures = []
- for _ in range(test_constants.THREAD_CONCURRENCY):
- request = test_messages.request()
- response_future = pool.submit(
- self._invoker.blocking(group, method), request,
- test_constants.LONG_TIMEOUT)
- requests.append(request)
- response_futures.append(response_future)
-
- responses = [
- response_future.result()
- for response_future in response_futures
- ]
-
- for request, response in zip(requests, responses):
- test_messages.verify(request, response, self)
- pool.shutdown(wait=True)
-
- def testWaitingForSomeButNotAllParallelInvocations(self):
- pool = logging_pool.pool(test_constants.THREAD_CONCURRENCY)
- for (group, method), test_messages_sequence in (six.iteritems(
- self._digest.unary_unary_messages_sequences)):
- for test_messages in test_messages_sequence:
- requests = []
- response_futures_to_indices = {}
- for index in range(test_constants.THREAD_CONCURRENCY):
- request = test_messages.request()
- response_future = pool.submit(
- self._invoker.blocking(group, method), request,
- test_constants.LONG_TIMEOUT)
- requests.append(request)
- response_futures_to_indices[response_future] = index
-
- some_completed_response_futures_iterator = itertools.islice(
- futures.as_completed(response_futures_to_indices),
- test_constants.THREAD_CONCURRENCY // 2)
- for response_future in some_completed_response_futures_iterator:
- index = response_futures_to_indices[response_future]
- test_messages.verify(requests[index],
- response_future.result(), self)
- pool.shutdown(wait=True)
-
- @unittest.skip('Cancellation impossible with blocking control flow!')
- def testCancelledUnaryRequestUnaryResponse(self):
- raise NotImplementedError()
-
- @unittest.skip('Cancellation impossible with blocking control flow!')
- def testCancelledUnaryRequestStreamResponse(self):
- raise NotImplementedError()
-
- @unittest.skip('Cancellation impossible with blocking control flow!')
- def testCancelledStreamRequestUnaryResponse(self):
- raise NotImplementedError()
-
- @unittest.skip('Cancellation impossible with blocking control flow!')
- def testCancelledStreamRequestStreamResponse(self):
- raise NotImplementedError()
-
- def testExpiredUnaryRequestUnaryResponse(self):
- for (group, method), test_messages_sequence in (six.iteritems(
- self._digest.unary_unary_messages_sequences)):
- for test_messages in test_messages_sequence:
- request = test_messages.request()
-
- with self._control.pause(), self.assertRaises(
- face.ExpirationError):
- self._invoker.blocking(group, method)(
- request, _3069_test_constant.REALLY_SHORT_TIMEOUT)
-
- def testExpiredUnaryRequestStreamResponse(self):
- for (group, method), test_messages_sequence in (six.iteritems(
- self._digest.unary_stream_messages_sequences)):
- for test_messages in test_messages_sequence:
- request = test_messages.request()
-
- with self._control.pause(), self.assertRaises(
- face.ExpirationError):
- response_iterator = self._invoker.blocking(group, method)(
- request, _3069_test_constant.REALLY_SHORT_TIMEOUT)
- list(response_iterator)
-
- def testExpiredStreamRequestUnaryResponse(self):
- for (group, method), test_messages_sequence in (six.iteritems(
- self._digest.stream_unary_messages_sequences)):
- for test_messages in test_messages_sequence:
- requests = test_messages.requests()
-
- with self._control.pause(), self.assertRaises(
- face.ExpirationError):
- self._invoker.blocking(
- group, method)(iter(requests),
- _3069_test_constant.REALLY_SHORT_TIMEOUT)
-
- def testExpiredStreamRequestStreamResponse(self):
- for (group, method), test_messages_sequence in (six.iteritems(
- self._digest.stream_stream_messages_sequences)):
- for test_messages in test_messages_sequence:
- requests = test_messages.requests()
-
- with self._control.pause(), self.assertRaises(
- face.ExpirationError):
- response_iterator = self._invoker.blocking(
- group, method)(iter(requests),
- _3069_test_constant.REALLY_SHORT_TIMEOUT)
- list(response_iterator)
-
- def testFailedUnaryRequestUnaryResponse(self):
- for (group, method), test_messages_sequence in (six.iteritems(
- self._digest.unary_unary_messages_sequences)):
- for test_messages in test_messages_sequence:
- request = test_messages.request()
-
- with self._control.fail(), self.assertRaises(face.RemoteError):
- self._invoker.blocking(group, method)(
- request, test_constants.LONG_TIMEOUT)
-
- def testFailedUnaryRequestStreamResponse(self):
- for (group, method), test_messages_sequence in (six.iteritems(
- self._digest.unary_stream_messages_sequences)):
- for test_messages in test_messages_sequence:
- request = test_messages.request()
-
- with self._control.fail(), self.assertRaises(face.RemoteError):
- response_iterator = self._invoker.blocking(group, method)(
- request, test_constants.LONG_TIMEOUT)
- list(response_iterator)
-
- def testFailedStreamRequestUnaryResponse(self):
- for (group, method), test_messages_sequence in (six.iteritems(
- self._digest.stream_unary_messages_sequences)):
- for test_messages in test_messages_sequence:
- requests = test_messages.requests()
-
- with self._control.fail(), self.assertRaises(face.RemoteError):
- self._invoker.blocking(group, method)(
- iter(requests), test_constants.LONG_TIMEOUT)
-
- def testFailedStreamRequestStreamResponse(self):
- for (group, method), test_messages_sequence in (six.iteritems(
- self._digest.stream_stream_messages_sequences)):
- for test_messages in test_messages_sequence:
- requests = test_messages.requests()
-
- with self._control.fail(), self.assertRaises(face.RemoteError):
- response_iterator = self._invoker.blocking(group, method)(
- iter(requests), test_constants.LONG_TIMEOUT)
- list(response_iterator)
diff --git a/src/python/grpcio_tests/tests/unit/framework/interfaces/face/_digest.py b/src/python/grpcio_tests/tests/unit/framework/interfaces/face/_digest.py
deleted file mode 100644
index b1c33da43a..0000000000
--- a/src/python/grpcio_tests/tests/unit/framework/interfaces/face/_digest.py
+++ /dev/null
@@ -1,432 +0,0 @@
-# Copyright 2015 gRPC authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-"""Code for making a service.TestService more amenable to use in tests."""
-
-import collections
-import threading
-
-import six
-
-# test_control, _service, and test_interfaces are referenced from specification
-# in this module.
-from grpc.framework.common import cardinality
-from grpc.framework.common import style
-from grpc.framework.foundation import stream
-from grpc.framework.foundation import stream_util
-from grpc.framework.interfaces.face import face
-from tests.unit.framework.common import test_control # pylint: disable=unused-import
-from tests.unit.framework.interfaces.face import _service # pylint: disable=unused-import
-from tests.unit.framework.interfaces.face import test_interfaces # pylint: disable=unused-import
-
-_IDENTITY = lambda x: x
-
-
-class TestServiceDigest(
- collections.namedtuple('TestServiceDigest', (
- 'methods',
- 'inline_method_implementations',
- 'event_method_implementations',
- 'multi_method_implementation',
- 'unary_unary_messages_sequences',
- 'unary_stream_messages_sequences',
- 'stream_unary_messages_sequences',
- 'stream_stream_messages_sequences',
- ))):
- """A transformation of a service.TestService.
-
- Attributes:
- methods: A dict from method group-name pair to test_interfaces.Method object
- describing the RPC methods that may be called during the test.
- inline_method_implementations: A dict from method group-name pair to
- face.MethodImplementation object to be used in tests of in-line calls to
- behaviors under test.
- event_method_implementations: A dict from method group-name pair to
- face.MethodImplementation object to be used in tests of event-driven calls
- to behaviors under test.
- multi_method_implementation: A face.MultiMethodImplementation to be used in
- tests of generic calls to behaviors under test.
- unary_unary_messages_sequences: A dict from method group-name pair to
- sequence of service.UnaryUnaryTestMessages objects to be used to test the
- identified method.
- unary_stream_messages_sequences: A dict from method group-name pair to
- sequence of service.UnaryStreamTestMessages objects to be used to test the
- identified method.
- stream_unary_messages_sequences: A dict from method group-name pair to
- sequence of service.StreamUnaryTestMessages objects to be used to test the
- identified method.
- stream_stream_messages_sequences: A dict from method group-name pair to
- sequence of service.StreamStreamTestMessages objects to be used to test
- the identified method.
- """
-
-
-class _BufferingConsumer(stream.Consumer):
- """A trivial Consumer that dumps what it consumes in a user-mutable buffer."""
-
- def __init__(self):
- self.consumed = []
- self.terminated = False
-
- def consume(self, value):
- self.consumed.append(value)
-
- def terminate(self):
- self.terminated = True
-
- def consume_and_terminate(self, value):
- self.consumed.append(value)
- self.terminated = True
-
-
-class _InlineUnaryUnaryMethod(face.MethodImplementation):
-
- def __init__(self, unary_unary_test_method, control):
- self._test_method = unary_unary_test_method
- self._control = control
-
- self.cardinality = cardinality.Cardinality.UNARY_UNARY
- self.style = style.Service.INLINE
-
- def unary_unary_inline(self, request, context):
- response_list = []
- self._test_method.service(request, response_list.append, context,
- self._control)
- return response_list.pop(0)
-
-
-class _EventUnaryUnaryMethod(face.MethodImplementation):
-
- def __init__(self, unary_unary_test_method, control, pool):
- self._test_method = unary_unary_test_method
- self._control = control
- self._pool = pool
-
- self.cardinality = cardinality.Cardinality.UNARY_UNARY
- self.style = style.Service.EVENT
-
- def unary_unary_event(self, request, response_callback, context):
- if self._pool is None:
- self._test_method.service(request, response_callback, context,
- self._control)
- else:
- self._pool.submit(self._test_method.service, request,
- response_callback, context, self._control)
-
-
-class _InlineUnaryStreamMethod(face.MethodImplementation):
-
- def __init__(self, unary_stream_test_method, control):
- self._test_method = unary_stream_test_method
- self._control = control
-
- self.cardinality = cardinality.Cardinality.UNARY_STREAM
- self.style = style.Service.INLINE
-
- def unary_stream_inline(self, request, context):
- response_consumer = _BufferingConsumer()
- self._test_method.service(request, response_consumer, context,
- self._control)
- for response in response_consumer.consumed:
- yield response
-
-
-class _EventUnaryStreamMethod(face.MethodImplementation):
-
- def __init__(self, unary_stream_test_method, control, pool):
- self._test_method = unary_stream_test_method
- self._control = control
- self._pool = pool
-
- self.cardinality = cardinality.Cardinality.UNARY_STREAM
- self.style = style.Service.EVENT
-
- def unary_stream_event(self, request, response_consumer, context):
- if self._pool is None:
- self._test_method.service(request, response_consumer, context,
- self._control)
- else:
- self._pool.submit(self._test_method.service, request,
- response_consumer, context, self._control)
-
-
-class _InlineStreamUnaryMethod(face.MethodImplementation):
-
- def __init__(self, stream_unary_test_method, control):
- self._test_method = stream_unary_test_method
- self._control = control
-
- self.cardinality = cardinality.Cardinality.STREAM_UNARY
- self.style = style.Service.INLINE
-
- def stream_unary_inline(self, request_iterator, context):
- response_list = []
- request_consumer = self._test_method.service(response_list.append,
- context, self._control)
- for request in request_iterator:
- request_consumer.consume(request)
- request_consumer.terminate()
- return response_list.pop(0)
-
-
-class _EventStreamUnaryMethod(face.MethodImplementation):
-
- def __init__(self, stream_unary_test_method, control, pool):
- self._test_method = stream_unary_test_method
- self._control = control
- self._pool = pool
-
- self.cardinality = cardinality.Cardinality.STREAM_UNARY
- self.style = style.Service.EVENT
-
- def stream_unary_event(self, response_callback, context):
- request_consumer = self._test_method.service(response_callback, context,
- self._control)
- if self._pool is None:
- return request_consumer
- else:
- return stream_util.ThreadSwitchingConsumer(request_consumer,
- self._pool)
-
-
-class _InlineStreamStreamMethod(face.MethodImplementation):
-
- def __init__(self, stream_stream_test_method, control):
- self._test_method = stream_stream_test_method
- self._control = control
-
- self.cardinality = cardinality.Cardinality.STREAM_STREAM
- self.style = style.Service.INLINE
-
- def stream_stream_inline(self, request_iterator, context):
- response_consumer = _BufferingConsumer()
- request_consumer = self._test_method.service(response_consumer, context,
- self._control)
-
- for request in request_iterator:
- request_consumer.consume(request)
- while response_consumer.consumed:
- yield response_consumer.consumed.pop(0)
- response_consumer.terminate()
-
-
-class _EventStreamStreamMethod(face.MethodImplementation):
-
- def __init__(self, stream_stream_test_method, control, pool):
- self._test_method = stream_stream_test_method
- self._control = control
- self._pool = pool
-
- self.cardinality = cardinality.Cardinality.STREAM_STREAM
- self.style = style.Service.EVENT
-
- def stream_stream_event(self, response_consumer, context):
- request_consumer = self._test_method.service(response_consumer, context,
- self._control)
- if self._pool is None:
- return request_consumer
- else:
- return stream_util.ThreadSwitchingConsumer(request_consumer,
- self._pool)
-
-
-class _UnaryConsumer(stream.Consumer):
- """A Consumer that only allows consumption of exactly one value."""
-
- def __init__(self, action):
- self._lock = threading.Lock()
- self._action = action
- self._consumed = False
- self._terminated = False
-
- def consume(self, value):
- with self._lock:
- if self._consumed:
- raise ValueError('Unary consumer already consumed!')
- elif self._terminated:
- raise ValueError('Unary consumer already terminated!')
- else:
- self._consumed = True
-
- self._action(value)
-
- def terminate(self):
- with self._lock:
- if not self._consumed:
- raise ValueError('Unary consumer hasn\'t yet consumed!')
- elif self._terminated:
- raise ValueError('Unary consumer already terminated!')
- else:
- self._terminated = True
-
- def consume_and_terminate(self, value):
- with self._lock:
- if self._consumed:
- raise ValueError('Unary consumer already consumed!')
- elif self._terminated:
- raise ValueError('Unary consumer already terminated!')
- else:
- self._consumed = True
- self._terminated = True
-
- self._action(value)
-
-
-class _UnaryUnaryAdaptation(object):
-
- def __init__(self, unary_unary_test_method):
- self._method = unary_unary_test_method
-
- def service(self, response_consumer, context, control):
-
- def action(request):
- self._method.service(request,
- response_consumer.consume_and_terminate,
- context, control)
-
- return _UnaryConsumer(action)
-
-
-class _UnaryStreamAdaptation(object):
-
- def __init__(self, unary_stream_test_method):
- self._method = unary_stream_test_method
-
- def service(self, response_consumer, context, control):
-
- def action(request):
- self._method.service(request, response_consumer, context, control)
-
- return _UnaryConsumer(action)
-
-
-class _StreamUnaryAdaptation(object):
-
- def __init__(self, stream_unary_test_method):
- self._method = stream_unary_test_method
-
- def service(self, response_consumer, context, control):
- return self._method.service(response_consumer.consume_and_terminate,
- context, control)
-
-
-class _MultiMethodImplementation(face.MultiMethodImplementation):
-
- def __init__(self, methods, control, pool):
- self._methods = methods
- self._control = control
- self._pool = pool
-
- def service(self, group, name, response_consumer, context):
- method = self._methods.get(group, name, None)
- if method is None:
- raise face.NoSuchMethodError(group, name)
- elif self._pool is None:
- return method(response_consumer, context, self._control)
- else:
- request_consumer = method(response_consumer, context, self._control)
- return stream_util.ThreadSwitchingConsumer(request_consumer,
- self._pool)
-
-
-class _Assembly(
- collections.namedtuple(
- '_Assembly',
- ['methods', 'inlines', 'events', 'adaptations', 'messages'])):
- """An intermediate structure created when creating a TestServiceDigest."""
-
-
-def _assemble(scenarios, identifiers, inline_method_constructor,
- event_method_constructor, adapter, control, pool):
- """Creates an _Assembly from the given scenarios."""
- methods = {}
- inlines = {}
- events = {}
- adaptations = {}
- messages = {}
- for identifier, scenario in six.iteritems(scenarios):
- if identifier in identifiers:
- raise ValueError('Repeated identifier "(%s, %s)"!' % identifier)
-
- test_method = scenario[0]
- inline_method = inline_method_constructor(test_method, control)
- event_method = event_method_constructor(test_method, control, pool)
- adaptation = adapter(test_method)
-
- methods[identifier] = test_method
- inlines[identifier] = inline_method
- events[identifier] = event_method
- adaptations[identifier] = adaptation
- messages[identifier] = scenario[1]
-
- return _Assembly(methods, inlines, events, adaptations, messages)
-
-
-def digest(service, control, pool):
- """Creates a TestServiceDigest from a TestService.
-
- Args:
- service: A _service.TestService.
- control: A test_control.Control.
- pool: If RPC methods should be serviced in a separate thread, a thread pool.
- None if RPC methods should be serviced in the thread belonging to the
- run-time that calls for their service.
-
- Returns:
- A TestServiceDigest synthesized from the given service.TestService.
- """
- identifiers = set()
-
- unary_unary = _assemble(service.unary_unary_scenarios(), identifiers,
- _InlineUnaryUnaryMethod, _EventUnaryUnaryMethod,
- _UnaryUnaryAdaptation, control, pool)
- identifiers.update(unary_unary.inlines)
-
- unary_stream = _assemble(service.unary_stream_scenarios(), identifiers,
- _InlineUnaryStreamMethod, _EventUnaryStreamMethod,
- _UnaryStreamAdaptation, control, pool)
- identifiers.update(unary_stream.inlines)
-
- stream_unary = _assemble(service.stream_unary_scenarios(), identifiers,
- _InlineStreamUnaryMethod, _EventStreamUnaryMethod,
- _StreamUnaryAdaptation, control, pool)
- identifiers.update(stream_unary.inlines)
-
- stream_stream = _assemble(service.stream_stream_scenarios(), identifiers,
- _InlineStreamStreamMethod,
- _EventStreamStreamMethod, _IDENTITY, control,
- pool)
- identifiers.update(stream_stream.inlines)
-
- methods = dict(unary_unary.methods)
- methods.update(unary_stream.methods)
- methods.update(stream_unary.methods)
- methods.update(stream_stream.methods)
- adaptations = dict(unary_unary.adaptations)
- adaptations.update(unary_stream.adaptations)
- adaptations.update(stream_unary.adaptations)
- adaptations.update(stream_stream.adaptations)
- inlines = dict(unary_unary.inlines)
- inlines.update(unary_stream.inlines)
- inlines.update(stream_unary.inlines)
- inlines.update(stream_stream.inlines)
- events = dict(unary_unary.events)
- events.update(unary_stream.events)
- events.update(stream_unary.events)
- events.update(stream_stream.events)
-
- return TestServiceDigest(methods, inlines, events,
- _MultiMethodImplementation(adaptations, control,
- pool),
- unary_unary.messages, unary_stream.messages,
- stream_unary.messages, stream_stream.messages)
diff --git a/src/python/grpcio_tests/tests/unit/framework/interfaces/face/_future_invocation_asynchronous_event_service.py b/src/python/grpcio_tests/tests/unit/framework/interfaces/face/_future_invocation_asynchronous_event_service.py
deleted file mode 100644
index 3d9b2816aa..0000000000
--- a/src/python/grpcio_tests/tests/unit/framework/interfaces/face/_future_invocation_asynchronous_event_service.py
+++ /dev/null
@@ -1,508 +0,0 @@
-# Copyright 2015 gRPC authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-"""Test code for the Face layer of RPC Framework."""
-
-from __future__ import division
-
-import abc
-import contextlib
-import itertools
-import threading
-import unittest
-from concurrent import futures
-
-import six
-
-# test_interfaces is referenced from specification in this module.
-from grpc.framework.foundation import future
-from grpc.framework.foundation import logging_pool
-from grpc.framework.interfaces.face import face
-from tests.unit.framework.common import test_constants
-from tests.unit.framework.common import test_control
-from tests.unit.framework.common import test_coverage
-from tests.unit.framework.interfaces.face import _3069_test_constant
-from tests.unit.framework.interfaces.face import _digest
-from tests.unit.framework.interfaces.face import _stock_service
-from tests.unit.framework.interfaces.face import test_interfaces # pylint: disable=unused-import
-
-
-class _PauseableIterator(object):
-
- def __init__(self, upstream):
- self._upstream = upstream
- self._condition = threading.Condition()
- self._paused = False
-
- @contextlib.contextmanager
- def pause(self):
- with self._condition:
- self._paused = True
- yield
- with self._condition:
- self._paused = False
- self._condition.notify_all()
-
- def __iter__(self):
- return self
-
- def __next__(self):
- return self.next()
-
- def next(self):
- with self._condition:
- while self._paused:
- self._condition.wait()
- return next(self._upstream)
-
-
-class _Callback(object):
-
- def __init__(self):
- self._condition = threading.Condition()
- self._called = False
- self._passed_future = None
- self._passed_other_stuff = None
-
- def __call__(self, *args, **kwargs):
- with self._condition:
- self._called = True
- if args:
- self._passed_future = args[0]
- if 1 < len(args) or kwargs:
- self._passed_other_stuff = tuple(args[1:]), dict(kwargs)
- self._condition.notify_all()
-
- def future(self):
- with self._condition:
- while True:
- if self._passed_other_stuff is not None:
- raise ValueError(
- 'Test callback passed unexpected values: %s',
- self._passed_other_stuff)
- elif self._called:
- return self._passed_future
- else:
- self._condition.wait()
-
-
-class TestCase(
- six.with_metaclass(abc.ABCMeta, test_coverage.Coverage,
- unittest.TestCase)):
- """A test of the Face layer of RPC Framework.
-
- Concrete subclasses must have an "implementation" attribute of type
- test_interfaces.Implementation and an "invoker_constructor" attribute of type
- _invocation.InvokerConstructor.
- """
-
- NAME = 'FutureInvocationAsynchronousEventServiceTest'
-
- def setUp(self):
- """See unittest.TestCase.setUp for full specification.
-
- Overriding implementations must call this implementation.
- """
- self._control = test_control.PauseFailControl()
- self._digest_pool = logging_pool.pool(test_constants.POOL_SIZE)
- self._digest = _digest.digest(_stock_service.STOCK_TEST_SERVICE,
- self._control, self._digest_pool)
-
- generic_stub, dynamic_stubs, self._memo = self.implementation.instantiate(
- self._digest.methods, self._digest.event_method_implementations,
- None)
- self._invoker = self.invoker_constructor.construct_invoker(
- generic_stub, dynamic_stubs, self._digest.methods)
-
- def tearDown(self):
- """See unittest.TestCase.tearDown for full specification.
-
- Overriding implementations must call this implementation.
- """
- self._invoker = None
- self.implementation.destantiate(self._memo)
- self._digest_pool.shutdown(wait=True)
-
- def testSuccessfulUnaryRequestUnaryResponse(self):
- for (group, method), test_messages_sequence in (six.iteritems(
- self._digest.unary_unary_messages_sequences)):
- for test_messages in test_messages_sequence:
- request = test_messages.request()
- callback = _Callback()
-
- response_future = self._invoker.future(group, method)(
- request, test_constants.LONG_TIMEOUT)
- response_future.add_done_callback(callback)
- response = response_future.result()
-
- test_messages.verify(request, response, self)
- self.assertIs(callback.future(), response_future)
- self.assertIsNone(response_future.exception())
- self.assertIsNone(response_future.traceback())
-
- def testSuccessfulUnaryRequestStreamResponse(self):
- for (group, method), test_messages_sequence in (six.iteritems(
- self._digest.unary_stream_messages_sequences)):
- for test_messages in test_messages_sequence:
- request = test_messages.request()
-
- response_iterator = self._invoker.future(group, method)(
- request, test_constants.LONG_TIMEOUT)
- responses = list(response_iterator)
-
- test_messages.verify(request, responses, self)
-
- def testSuccessfulStreamRequestUnaryResponse(self):
- for (group, method), test_messages_sequence in (six.iteritems(
- self._digest.stream_unary_messages_sequences)):
- for test_messages in test_messages_sequence:
- requests = test_messages.requests()
- request_iterator = _PauseableIterator(iter(requests))
- callback = _Callback()
-
- # Use of a paused iterator of requests allows us to test that control is
- # returned to calling code before the iterator yields any requests.
- with request_iterator.pause():
- response_future = self._invoker.future(group, method)(
- request_iterator, test_constants.LONG_TIMEOUT)
- response_future.add_done_callback(callback)
- future_passed_to_callback = callback.future()
- response = future_passed_to_callback.result()
-
- test_messages.verify(requests, response, self)
- self.assertIs(future_passed_to_callback, response_future)
- self.assertIsNone(response_future.exception())
- self.assertIsNone(response_future.traceback())
-
- def testSuccessfulStreamRequestStreamResponse(self):
- for (group, method), test_messages_sequence in (six.iteritems(
- self._digest.stream_stream_messages_sequences)):
- for test_messages in test_messages_sequence:
- requests = test_messages.requests()
- request_iterator = _PauseableIterator(iter(requests))
-
- # Use of a paused iterator of requests allows us to test that control is
- # returned to calling code before the iterator yields any requests.
- with request_iterator.pause():
- response_iterator = self._invoker.future(group, method)(
- request_iterator, test_constants.LONG_TIMEOUT)
- responses = list(response_iterator)
-
- test_messages.verify(requests, responses, self)
-
- def testSequentialInvocations(self):
- for (group, method), test_messages_sequence in (six.iteritems(
- self._digest.unary_unary_messages_sequences)):
- for test_messages in test_messages_sequence:
- first_request = test_messages.request()
- second_request = test_messages.request()
-
- first_response_future = self._invoker.future(group, method)(
- first_request, test_constants.LONG_TIMEOUT)
- first_response = first_response_future.result()
-
- test_messages.verify(first_request, first_response, self)
-
- second_response_future = self._invoker.future(group, method)(
- second_request, test_constants.LONG_TIMEOUT)
- second_response = second_response_future.result()
-
- test_messages.verify(second_request, second_response, self)
-
- def testParallelInvocations(self):
- for (group, method), test_messages_sequence in (six.iteritems(
- self._digest.unary_unary_messages_sequences)):
- for test_messages in test_messages_sequence:
- first_request = test_messages.request()
- second_request = test_messages.request()
-
- first_response_future = self._invoker.future(group, method)(
- first_request, test_constants.LONG_TIMEOUT)
- second_response_future = self._invoker.future(group, method)(
- second_request, test_constants.LONG_TIMEOUT)
- first_response = first_response_future.result()
- second_response = second_response_future.result()
-
- test_messages.verify(first_request, first_response, self)
- test_messages.verify(second_request, second_response, self)
-
- for (group, method), test_messages_sequence in (six.iteritems(
- self._digest.unary_unary_messages_sequences)):
- for test_messages in test_messages_sequence:
- requests = []
- response_futures = []
- for _ in range(test_constants.THREAD_CONCURRENCY):
- request = test_messages.request()
- response_future = self._invoker.future(group, method)(
- request, test_constants.LONG_TIMEOUT)
- requests.append(request)
- response_futures.append(response_future)
-
- responses = [
- response_future.result()
- for response_future in response_futures
- ]
-
- for request, response in zip(requests, responses):
- test_messages.verify(request, response, self)
-
- def testWaitingForSomeButNotAllParallelInvocations(self):
- pool = logging_pool.pool(test_constants.THREAD_CONCURRENCY)
- for (group, method), test_messages_sequence in (six.iteritems(
- self._digest.unary_unary_messages_sequences)):
- for test_messages in test_messages_sequence:
- requests = []
- response_futures_to_indices = {}
- for index in range(test_constants.THREAD_CONCURRENCY):
- request = test_messages.request()
- inner_response_future = self._invoker.future(group, method)(
- request, test_constants.LONG_TIMEOUT)
- outer_response_future = pool.submit(
- inner_response_future.result)
- requests.append(request)
- response_futures_to_indices[outer_response_future] = index
-
- some_completed_response_futures_iterator = itertools.islice(
- futures.as_completed(response_futures_to_indices),
- test_constants.THREAD_CONCURRENCY // 2)
- for response_future in some_completed_response_futures_iterator:
- index = response_futures_to_indices[response_future]
- test_messages.verify(requests[index],
- response_future.result(), self)
- pool.shutdown(wait=True)
-
- def testCancelledUnaryRequestUnaryResponse(self):
- for (group, method), test_messages_sequence in (six.iteritems(
- self._digest.unary_unary_messages_sequences)):
- for test_messages in test_messages_sequence:
- request = test_messages.request()
- callback = _Callback()
-
- with self._control.pause():
- response_future = self._invoker.future(group, method)(
- request, test_constants.LONG_TIMEOUT)
- response_future.add_done_callback(callback)
- cancel_method_return_value = response_future.cancel()
-
- self.assertIs(callback.future(), response_future)
- self.assertFalse(cancel_method_return_value)
- self.assertTrue(response_future.cancelled())
- with self.assertRaises(future.CancelledError):
- response_future.result()
- with self.assertRaises(future.CancelledError):
- response_future.exception()
- with self.assertRaises(future.CancelledError):
- response_future.traceback()
-
- def testCancelledUnaryRequestStreamResponse(self):
- for (group, method), test_messages_sequence in (six.iteritems(
- self._digest.unary_stream_messages_sequences)):
- for test_messages in test_messages_sequence:
- request = test_messages.request()
-
- with self._control.pause():
- response_iterator = self._invoker.future(group, method)(
- request, test_constants.LONG_TIMEOUT)
- response_iterator.cancel()
-
- with self.assertRaises(face.CancellationError):
- next(response_iterator)
-
- def testCancelledStreamRequestUnaryResponse(self):
- for (group, method), test_messages_sequence in (six.iteritems(
- self._digest.stream_unary_messages_sequences)):
- for test_messages in test_messages_sequence:
- requests = test_messages.requests()
- callback = _Callback()
-
- with self._control.pause():
- response_future = self._invoker.future(group, method)(
- iter(requests), test_constants.LONG_TIMEOUT)
- response_future.add_done_callback(callback)
- cancel_method_return_value = response_future.cancel()
-
- self.assertIs(callback.future(), response_future)
- self.assertFalse(cancel_method_return_value)
- self.assertTrue(response_future.cancelled())
- with self.assertRaises(future.CancelledError):
- response_future.result()
- with self.assertRaises(future.CancelledError):
- response_future.exception()
- with self.assertRaises(future.CancelledError):
- response_future.traceback()
-
- def testCancelledStreamRequestStreamResponse(self):
- for (group, method), test_messages_sequence in (six.iteritems(
- self._digest.stream_stream_messages_sequences)):
- for test_messages in test_messages_sequence:
- requests = test_messages.requests()
-
- with self._control.pause():
- response_iterator = self._invoker.future(group, method)(
- iter(requests), test_constants.LONG_TIMEOUT)
- response_iterator.cancel()
-
- with self.assertRaises(face.CancellationError):
- next(response_iterator)
-
- def testExpiredUnaryRequestUnaryResponse(self):
- for (group, method), test_messages_sequence in (six.iteritems(
- self._digest.unary_unary_messages_sequences)):
- for test_messages in test_messages_sequence:
- request = test_messages.request()
- callback = _Callback()
-
- with self._control.pause():
- response_future = self._invoker.future(group, method)(
- request, _3069_test_constant.REALLY_SHORT_TIMEOUT)
- response_future.add_done_callback(callback)
- self.assertIs(callback.future(), response_future)
- self.assertIsInstance(response_future.exception(),
- face.ExpirationError)
- with self.assertRaises(face.ExpirationError):
- response_future.result()
- self.assertIsInstance(response_future.exception(),
- face.AbortionError)
- self.assertIsNotNone(response_future.traceback())
-
- def testExpiredUnaryRequestStreamResponse(self):
- for (group, method), test_messages_sequence in (six.iteritems(
- self._digest.unary_stream_messages_sequences)):
- for test_messages in test_messages_sequence:
- request = test_messages.request()
-
- with self._control.pause():
- response_iterator = self._invoker.future(group, method)(
- request, _3069_test_constant.REALLY_SHORT_TIMEOUT)
- with self.assertRaises(face.ExpirationError):
- list(response_iterator)
-
- def testExpiredStreamRequestUnaryResponse(self):
- for (group, method), test_messages_sequence in (six.iteritems(
- self._digest.stream_unary_messages_sequences)):
- for test_messages in test_messages_sequence:
- requests = test_messages.requests()
- callback = _Callback()
-
- with self._control.pause():
- response_future = self._invoker.future(
- group, method)(iter(requests),
- _3069_test_constant.REALLY_SHORT_TIMEOUT)
- response_future.add_done_callback(callback)
- self.assertIs(callback.future(), response_future)
- self.assertIsInstance(response_future.exception(),
- face.ExpirationError)
- with self.assertRaises(face.ExpirationError):
- response_future.result()
- self.assertIsInstance(response_future.exception(),
- face.AbortionError)
- self.assertIsNotNone(response_future.traceback())
-
- def testExpiredStreamRequestStreamResponse(self):
- for (group, method), test_messages_sequence in (six.iteritems(
- self._digest.stream_stream_messages_sequences)):
- for test_messages in test_messages_sequence:
- requests = test_messages.requests()
-
- with self._control.pause():
- response_iterator = self._invoker.future(
- group, method)(iter(requests),
- _3069_test_constant.REALLY_SHORT_TIMEOUT)
- with self.assertRaises(face.ExpirationError):
- list(response_iterator)
-
- def testFailedUnaryRequestUnaryResponse(self):
- for (group, method), test_messages_sequence in (six.iteritems(
- self._digest.unary_unary_messages_sequences)):
- for test_messages in test_messages_sequence:
- request = test_messages.request()
- callback = _Callback()
- abortion_callback = _Callback()
-
- with self._control.fail():
- response_future = self._invoker.future(group, method)(
- request, _3069_test_constant.REALLY_SHORT_TIMEOUT)
- response_future.add_done_callback(callback)
- response_future.add_abortion_callback(abortion_callback)
-
- self.assertIs(callback.future(), response_future)
- # Because the servicer fails outside of the thread from which the
- # servicer-side runtime called into it its failure is
- # indistinguishable from simply not having called its
- # response_callback before the expiration of the RPC.
- self.assertIsInstance(response_future.exception(),
- face.ExpirationError)
- with self.assertRaises(face.ExpirationError):
- response_future.result()
- self.assertIsNotNone(response_future.traceback())
- self.assertIsNotNone(abortion_callback.future())
-
- def testFailedUnaryRequestStreamResponse(self):
- for (group, method), test_messages_sequence in (six.iteritems(
- self._digest.unary_stream_messages_sequences)):
- for test_messages in test_messages_sequence:
- request = test_messages.request()
-
- # Because the servicer fails outside of the thread from which the
- # servicer-side runtime called into it its failure is indistinguishable
- # from simply not having called its response_consumer before the
- # expiration of the RPC.
- with self._control.fail(), self.assertRaises(
- face.ExpirationError):
- response_iterator = self._invoker.future(group, method)(
- request, _3069_test_constant.REALLY_SHORT_TIMEOUT)
- list(response_iterator)
-
- def testFailedStreamRequestUnaryResponse(self):
- for (group, method), test_messages_sequence in (six.iteritems(
- self._digest.stream_unary_messages_sequences)):
- for test_messages in test_messages_sequence:
- requests = test_messages.requests()
- callback = _Callback()
- abortion_callback = _Callback()
-
- with self._control.fail():
- response_future = self._invoker.future(
- group, method)(iter(requests),
- _3069_test_constant.REALLY_SHORT_TIMEOUT)
- response_future.add_done_callback(callback)
- response_future.add_abortion_callback(abortion_callback)
-
- self.assertIs(callback.future(), response_future)
- # Because the servicer fails outside of the thread from which the
- # servicer-side runtime called into it its failure is
- # indistinguishable from simply not having called its
- # response_callback before the expiration of the RPC.
- self.assertIsInstance(response_future.exception(),
- face.ExpirationError)
- with self.assertRaises(face.ExpirationError):
- response_future.result()
- self.assertIsNotNone(response_future.traceback())
- self.assertIsNotNone(abortion_callback.future())
-
- def testFailedStreamRequestStreamResponse(self):
- for (group, method), test_messages_sequence in (six.iteritems(
- self._digest.stream_stream_messages_sequences)):
- for test_messages in test_messages_sequence:
- requests = test_messages.requests()
-
- # Because the servicer fails outside of the thread from which the
- # servicer-side runtime called into it its failure is indistinguishable
- # from simply not having called its response_consumer before the
- # expiration of the RPC.
- with self._control.fail(), self.assertRaises(
- face.ExpirationError):
- response_iterator = self._invoker.future(
- group, method)(iter(requests),
- _3069_test_constant.REALLY_SHORT_TIMEOUT)
- list(response_iterator)
diff --git a/src/python/grpcio_tests/tests/unit/framework/interfaces/face/_invocation.py b/src/python/grpcio_tests/tests/unit/framework/interfaces/face/_invocation.py
deleted file mode 100644
index efc93d56b0..0000000000
--- a/src/python/grpcio_tests/tests/unit/framework/interfaces/face/_invocation.py
+++ /dev/null
@@ -1,198 +0,0 @@
-# Copyright 2015 gRPC authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-"""Coverage across the Face layer's generic-to-dynamic range for invocation."""
-
-import abc
-
-import six
-
-from grpc.framework.common import cardinality
-
-_CARDINALITY_TO_GENERIC_BLOCKING_BEHAVIOR = {
- cardinality.Cardinality.UNARY_UNARY: 'blocking_unary_unary',
- cardinality.Cardinality.UNARY_STREAM: 'inline_unary_stream',
- cardinality.Cardinality.STREAM_UNARY: 'blocking_stream_unary',
- cardinality.Cardinality.STREAM_STREAM: 'inline_stream_stream',
-}
-
-_CARDINALITY_TO_GENERIC_FUTURE_BEHAVIOR = {
- cardinality.Cardinality.UNARY_UNARY: 'future_unary_unary',
- cardinality.Cardinality.UNARY_STREAM: 'inline_unary_stream',
- cardinality.Cardinality.STREAM_UNARY: 'future_stream_unary',
- cardinality.Cardinality.STREAM_STREAM: 'inline_stream_stream',
-}
-
-_CARDINALITY_TO_GENERIC_EVENT_BEHAVIOR = {
- cardinality.Cardinality.UNARY_UNARY: 'event_unary_unary',
- cardinality.Cardinality.UNARY_STREAM: 'event_unary_stream',
- cardinality.Cardinality.STREAM_UNARY: 'event_stream_unary',
- cardinality.Cardinality.STREAM_STREAM: 'event_stream_stream',
-}
-
-_CARDINALITY_TO_MULTI_CALLABLE_ATTRIBUTE = {
- cardinality.Cardinality.UNARY_UNARY: 'unary_unary',
- cardinality.Cardinality.UNARY_STREAM: 'unary_stream',
- cardinality.Cardinality.STREAM_UNARY: 'stream_unary',
- cardinality.Cardinality.STREAM_STREAM: 'stream_stream',
-}
-
-
-class Invoker(six.with_metaclass(abc.ABCMeta)):
- """A type used to invoke test RPCs."""
-
- @abc.abstractmethod
- def blocking(self, group, name):
- """Invokes an RPC with blocking control flow."""
- raise NotImplementedError()
-
- @abc.abstractmethod
- def future(self, group, name):
- """Invokes an RPC with future control flow."""
- raise NotImplementedError()
-
- @abc.abstractmethod
- def event(self, group, name):
- """Invokes an RPC with event control flow."""
- raise NotImplementedError()
-
-
-class InvokerConstructor(six.with_metaclass(abc.ABCMeta)):
- """A type used to create Invokers."""
-
- @abc.abstractmethod
- def name(self):
- """Specifies the name of the Invoker constructed by this object."""
- raise NotImplementedError()
-
- @abc.abstractmethod
- def construct_invoker(self, generic_stub, dynamic_stubs, methods):
- """Constructs an Invoker for the given stubs and methods."""
- raise NotImplementedError()
-
-
-class _GenericInvoker(Invoker):
-
- def __init__(self, generic_stub, methods):
- self._stub = generic_stub
- self._methods = methods
-
- def _behavior(self, group, name, cardinality_to_generic_method):
- method_cardinality = self._methods[group, name].cardinality()
- behavior = getattr(self._stub,
- cardinality_to_generic_method[method_cardinality])
- return lambda *args, **kwargs: behavior(group, name, *args, **kwargs)
-
- def blocking(self, group, name):
- return self._behavior(group, name,
- _CARDINALITY_TO_GENERIC_BLOCKING_BEHAVIOR)
-
- def future(self, group, name):
- return self._behavior(group, name,
- _CARDINALITY_TO_GENERIC_FUTURE_BEHAVIOR)
-
- def event(self, group, name):
- return self._behavior(group, name,
- _CARDINALITY_TO_GENERIC_EVENT_BEHAVIOR)
-
-
-class _GenericInvokerConstructor(InvokerConstructor):
-
- def name(self):
- return 'GenericInvoker'
-
- def construct_invoker(self, generic_stub, dynamic_stub, methods):
- return _GenericInvoker(generic_stub, methods)
-
-
-class _MultiCallableInvoker(Invoker):
-
- def __init__(self, generic_stub, methods):
- self._stub = generic_stub
- self._methods = methods
-
- def _multi_callable(self, group, name):
- method_cardinality = self._methods[group, name].cardinality()
- behavior = getattr(
- self._stub,
- _CARDINALITY_TO_MULTI_CALLABLE_ATTRIBUTE[method_cardinality])
- return behavior(group, name)
-
- def blocking(self, group, name):
- return self._multi_callable(group, name)
-
- def future(self, group, name):
- method_cardinality = self._methods[group, name].cardinality()
- behavior = getattr(
- self._stub,
- _CARDINALITY_TO_MULTI_CALLABLE_ATTRIBUTE[method_cardinality])
- if method_cardinality in (cardinality.Cardinality.UNARY_UNARY,
- cardinality.Cardinality.STREAM_UNARY):
- return behavior(group, name).future
- else:
- return behavior(group, name)
-
- def event(self, group, name):
- return self._multi_callable(group, name).event
-
-
-class _MultiCallableInvokerConstructor(InvokerConstructor):
-
- def name(self):
- return 'MultiCallableInvoker'
-
- def construct_invoker(self, generic_stub, dynamic_stub, methods):
- return _MultiCallableInvoker(generic_stub, methods)
-
-
-class _DynamicInvoker(Invoker):
-
- def __init__(self, dynamic_stubs, methods):
- self._stubs = dynamic_stubs
- self._methods = methods
-
- def blocking(self, group, name):
- return getattr(self._stubs[group], name)
-
- def future(self, group, name):
- if self._methods[group, name].cardinality() in (
- cardinality.Cardinality.UNARY_UNARY,
- cardinality.Cardinality.STREAM_UNARY):
- return getattr(self._stubs[group], name).future
- else:
- return getattr(self._stubs[group], name)
-
- def event(self, group, name):
- return getattr(self._stubs[group], name).event
-
-
-class _DynamicInvokerConstructor(InvokerConstructor):
-
- def name(self):
- return 'DynamicInvoker'
-
- def construct_invoker(self, generic_stub, dynamic_stubs, methods):
- return _DynamicInvoker(dynamic_stubs, methods)
-
-
-def invoker_constructors():
- """Creates a sequence of InvokerConstructors to use in tests of RPCs.
-
- Returns:
- A sequence of InvokerConstructors.
- """
- return (
- _GenericInvokerConstructor(),
- _MultiCallableInvokerConstructor(),
- _DynamicInvokerConstructor(),
- )
diff --git a/src/python/grpcio_tests/tests/unit/framework/interfaces/face/_service.py b/src/python/grpcio_tests/tests/unit/framework/interfaces/face/_service.py
deleted file mode 100644
index f1c96b6dc5..0000000000
--- a/src/python/grpcio_tests/tests/unit/framework/interfaces/face/_service.py
+++ /dev/null
@@ -1,304 +0,0 @@
-# Copyright 2015 gRPC authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-"""Private interfaces implemented by data sets used in Face-layer tests."""
-
-import abc
-
-import six
-
-# face is referenced from specification in this module.
-from grpc.framework.interfaces.face import face # pylint: disable=unused-import
-from tests.unit.framework.interfaces.face import test_interfaces
-
-
-class UnaryUnaryTestMethodImplementation(
- six.with_metaclass(abc.ABCMeta, test_interfaces.Method)):
- """A controllable implementation of a unary-unary method."""
-
- @abc.abstractmethod
- def service(self, request, response_callback, context, control):
- """Services an RPC that accepts one message and produces one message.
-
- Args:
- request: The single request message for the RPC.
- response_callback: A callback to be called to accept the response message
- of the RPC.
- context: An face.ServicerContext object.
- control: A test_control.Control to control execution of this method.
-
- Raises:
- abandonment.Abandoned: May or may not be raised when the RPC has been
- aborted.
- """
- raise NotImplementedError()
-
-
-class UnaryUnaryTestMessages(six.with_metaclass(abc.ABCMeta)):
- """A type for unary-request-unary-response message pairings."""
-
- @abc.abstractmethod
- def request(self):
- """Affords a request message.
-
- Implementations of this method should return a different message with each
- call so that multiple test executions of the test method may be made with
- different inputs.
-
- Returns:
- A request message.
- """
- raise NotImplementedError()
-
- @abc.abstractmethod
- def verify(self, request, response, test_case):
- """Verifies that the computed response matches the given request.
-
- Args:
- request: A request message.
- response: A response message.
- test_case: A unittest.TestCase object affording useful assertion methods.
-
- Raises:
- AssertionError: If the request and response do not match, indicating that
- there was some problem executing the RPC under test.
- """
- raise NotImplementedError()
-
-
-class UnaryStreamTestMethodImplementation(
- six.with_metaclass(abc.ABCMeta, test_interfaces.Method)):
- """A controllable implementation of a unary-stream method."""
-
- @abc.abstractmethod
- def service(self, request, response_consumer, context, control):
- """Services an RPC that takes one message and produces a stream of messages.
-
- Args:
- request: The single request message for the RPC.
- response_consumer: A stream.Consumer to be called to accept the response
- messages of the RPC.
- context: A face.ServicerContext object.
- control: A test_control.Control to control execution of this method.
-
- Raises:
- abandonment.Abandoned: May or may not be raised when the RPC has been
- aborted.
- """
- raise NotImplementedError()
-
-
-class UnaryStreamTestMessages(six.with_metaclass(abc.ABCMeta)):
- """A type for unary-request-stream-response message pairings."""
-
- @abc.abstractmethod
- def request(self):
- """Affords a request message.
-
- Implementations of this method should return a different message with each
- call so that multiple test executions of the test method may be made with
- different inputs.
-
- Returns:
- A request message.
- """
- raise NotImplementedError()
-
- @abc.abstractmethod
- def verify(self, request, responses, test_case):
- """Verifies that the computed responses match the given request.
-
- Args:
- request: A request message.
- responses: A sequence of response messages.
- test_case: A unittest.TestCase object affording useful assertion methods.
-
- Raises:
- AssertionError: If the request and responses do not match, indicating that
- there was some problem executing the RPC under test.
- """
- raise NotImplementedError()
-
-
-class StreamUnaryTestMethodImplementation(
- six.with_metaclass(abc.ABCMeta, test_interfaces.Method)):
- """A controllable implementation of a stream-unary method."""
-
- @abc.abstractmethod
- def service(self, response_callback, context, control):
- """Services an RPC that takes a stream of messages and produces one message.
-
- Args:
- response_callback: A callback to be called to accept the response message
- of the RPC.
- context: A face.ServicerContext object.
- control: A test_control.Control to control execution of this method.
-
- Returns:
- A stream.Consumer with which to accept the request messages of the RPC.
- The consumer returned from this method may or may not be invoked to
- completion: in the case of RPC abortion, RPC Framework will simply stop
- passing messages to this object. Implementations must not assume that
- this object will be called to completion of the request stream or even
- called at all.
-
- Raises:
- abandonment.Abandoned: May or may not be raised when the RPC has been
- aborted.
- """
- raise NotImplementedError()
-
-
-class StreamUnaryTestMessages(six.with_metaclass(abc.ABCMeta)):
- """A type for stream-request-unary-response message pairings."""
-
- @abc.abstractmethod
- def requests(self):
- """Affords a sequence of request messages.
-
- Implementations of this method should return a different sequences with each
- call so that multiple test executions of the test method may be made with
- different inputs.
-
- Returns:
- A sequence of request messages.
- """
- raise NotImplementedError()
-
- @abc.abstractmethod
- def verify(self, requests, response, test_case):
- """Verifies that the computed response matches the given requests.
-
- Args:
- requests: A sequence of request messages.
- response: A response message.
- test_case: A unittest.TestCase object affording useful assertion methods.
-
- Raises:
- AssertionError: If the requests and response do not match, indicating that
- there was some problem executing the RPC under test.
- """
- raise NotImplementedError()
-
-
-class StreamStreamTestMethodImplementation(
- six.with_metaclass(abc.ABCMeta, test_interfaces.Method)):
- """A controllable implementation of a stream-stream method."""
-
- @abc.abstractmethod
- def service(self, response_consumer, context, control):
- """Services an RPC that accepts and produces streams of messages.
-
- Args:
- response_consumer: A stream.Consumer to be called to accept the response
- messages of the RPC.
- context: A face.ServicerContext object.
- control: A test_control.Control to control execution of this method.
-
- Returns:
- A stream.Consumer with which to accept the request messages of the RPC.
- The consumer returned from this method may or may not be invoked to
- completion: in the case of RPC abortion, RPC Framework will simply stop
- passing messages to this object. Implementations must not assume that
- this object will be called to completion of the request stream or even
- called at all.
-
- Raises:
- abandonment.Abandoned: May or may not be raised when the RPC has been
- aborted.
- """
- raise NotImplementedError()
-
-
-class StreamStreamTestMessages(six.with_metaclass(abc.ABCMeta)):
- """A type for stream-request-stream-response message pairings."""
-
- @abc.abstractmethod
- def requests(self):
- """Affords a sequence of request messages.
-
- Implementations of this method should return a different sequences with each
- call so that multiple test executions of the test method may be made with
- different inputs.
-
- Returns:
- A sequence of request messages.
- """
- raise NotImplementedError()
-
- @abc.abstractmethod
- def verify(self, requests, responses, test_case):
- """Verifies that the computed response matches the given requests.
-
- Args:
- requests: A sequence of request messages.
- responses: A sequence of response messages.
- test_case: A unittest.TestCase object affording useful assertion methods.
-
- Raises:
- AssertionError: If the requests and responses do not match, indicating
- that there was some problem executing the RPC under test.
- """
- raise NotImplementedError()
-
-
-class TestService(six.with_metaclass(abc.ABCMeta)):
- """A specification of implemented methods to use in tests."""
-
- @abc.abstractmethod
- def unary_unary_scenarios(self):
- """Affords unary-request-unary-response test methods and their messages.
-
- Returns:
- A dict from method group-name pair to implementation/messages pair. The
- first element of the pair is a UnaryUnaryTestMethodImplementation object
- and the second element is a sequence of UnaryUnaryTestMethodMessages
- objects.
- """
- raise NotImplementedError()
-
- @abc.abstractmethod
- def unary_stream_scenarios(self):
- """Affords unary-request-stream-response test methods and their messages.
-
- Returns:
- A dict from method group-name pair to implementation/messages pair. The
- first element of the pair is a UnaryStreamTestMethodImplementation
- object and the second element is a sequence of
- UnaryStreamTestMethodMessages objects.
- """
- raise NotImplementedError()
-
- @abc.abstractmethod
- def stream_unary_scenarios(self):
- """Affords stream-request-unary-response test methods and their messages.
-
- Returns:
- A dict from method group-name pair to implementation/messages pair. The
- first element of the pair is a StreamUnaryTestMethodImplementation
- object and the second element is a sequence of
- StreamUnaryTestMethodMessages objects.
- """
- raise NotImplementedError()
-
- @abc.abstractmethod
- def stream_stream_scenarios(self):
- """Affords stream-request-stream-response test methods and their messages.
-
- Returns:
- A dict from method group-name pair to implementation/messages pair. The
- first element of the pair is a StreamStreamTestMethodImplementation
- object and the second element is a sequence of
- StreamStreamTestMethodMessages objects.
- """
- raise NotImplementedError()
diff --git a/src/python/grpcio_tests/tests/unit/framework/interfaces/face/_stock_service.py b/src/python/grpcio_tests/tests/unit/framework/interfaces/face/_stock_service.py
deleted file mode 100644
index a84e02a79a..0000000000
--- a/src/python/grpcio_tests/tests/unit/framework/interfaces/face/_stock_service.py
+++ /dev/null
@@ -1,390 +0,0 @@
-# Copyright 2015 gRPC authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-"""Examples of Python implementations of the stock.proto Stock service."""
-
-from grpc.framework.common import cardinality
-from grpc.framework.foundation import abandonment
-from grpc.framework.foundation import stream
-from tests.unit.framework.common import test_constants
-from tests.unit.framework.interfaces.face import _service
-from tests.unit._junkdrawer import stock_pb2
-
-_STOCK_GROUP_NAME = 'Stock'
-_SYMBOL_FORMAT = 'test symbol:%03d'
-
-# A test-appropriate security-pricing function. :-P
-_price = lambda symbol_name: float(hash(symbol_name) % 4096)
-
-
-def _get_last_trade_price(stock_request, stock_reply_callback, control, active):
- """A unary-request, unary-response test method."""
- control.control()
- if active():
- stock_reply_callback(
- stock_pb2.StockReply(
- symbol=stock_request.symbol,
- price=_price(stock_request.symbol)))
- else:
- raise abandonment.Abandoned()
-
-
-def _get_last_trade_price_multiple(stock_reply_consumer, control, active):
- """A stream-request, stream-response test method."""
-
- def stock_reply_for_stock_request(stock_request):
- control.control()
- if active():
- return stock_pb2.StockReply(
- symbol=stock_request.symbol, price=_price(stock_request.symbol))
- else:
- raise abandonment.Abandoned()
-
- class StockRequestConsumer(stream.Consumer):
-
- def consume(self, stock_request):
- stock_reply_consumer.consume(
- stock_reply_for_stock_request(stock_request))
-
- def terminate(self):
- control.control()
- stock_reply_consumer.terminate()
-
- def consume_and_terminate(self, stock_request):
- stock_reply_consumer.consume_and_terminate(
- stock_reply_for_stock_request(stock_request))
-
- return StockRequestConsumer()
-
-
-def _watch_future_trades(stock_request, stock_reply_consumer, control, active):
- """A unary-request, stream-response test method."""
- base_price = _price(stock_request.symbol)
- for index in range(stock_request.num_trades_to_watch):
- control.control()
- if active():
- stock_reply_consumer.consume(
- stock_pb2.StockReply(
- symbol=stock_request.symbol, price=base_price + index))
- else:
- raise abandonment.Abandoned()
- stock_reply_consumer.terminate()
-
-
-def _get_highest_trade_price(stock_reply_callback, control, active):
- """A stream-request, unary-response test method."""
-
- class StockRequestConsumer(stream.Consumer):
- """Keeps an ongoing record of the most valuable symbol yet consumed."""
-
- def __init__(self):
- self._symbol = None
- self._price = None
-
- def consume(self, stock_request):
- control.control()
- if active():
- if self._price is None:
- self._symbol = stock_request.symbol
- self._price = _price(stock_request.symbol)
- else:
- candidate_price = _price(stock_request.symbol)
- if self._price < candidate_price:
- self._symbol = stock_request.symbol
- self._price = candidate_price
-
- def terminate(self):
- control.control()
- if active():
- if self._symbol is None:
- raise ValueError()
- else:
- stock_reply_callback(
- stock_pb2.StockReply(
- symbol=self._symbol, price=self._price))
- self._symbol = None
- self._price = None
-
- def consume_and_terminate(self, stock_request):
- control.control()
- if active():
- if self._price is None:
- stock_reply_callback(
- stock_pb2.StockReply(
- symbol=stock_request.symbol,
- price=_price(stock_request.symbol)))
- else:
- candidate_price = _price(stock_request.symbol)
- if self._price < candidate_price:
- stock_reply_callback(
- stock_pb2.StockReply(
- symbol=stock_request.symbol,
- price=candidate_price))
- else:
- stock_reply_callback(
- stock_pb2.StockReply(
- symbol=self._symbol, price=self._price))
-
- self._symbol = None
- self._price = None
-
- return StockRequestConsumer()
-
-
-class GetLastTradePrice(_service.UnaryUnaryTestMethodImplementation):
- """GetLastTradePrice for use in tests."""
-
- def group(self):
- return _STOCK_GROUP_NAME
-
- def name(self):
- return 'GetLastTradePrice'
-
- def cardinality(self):
- return cardinality.Cardinality.UNARY_UNARY
-
- def request_class(self):
- return stock_pb2.StockRequest
-
- def response_class(self):
- return stock_pb2.StockReply
-
- def serialize_request(self, request):
- return request.SerializeToString()
-
- def deserialize_request(self, serialized_request):
- return stock_pb2.StockRequest.FromString(serialized_request)
-
- def serialize_response(self, response):
- return response.SerializeToString()
-
- def deserialize_response(self, serialized_response):
- return stock_pb2.StockReply.FromString(serialized_response)
-
- def service(self, request, response_callback, context, control):
- _get_last_trade_price(request, response_callback, control,
- context.is_active)
-
-
-class GetLastTradePriceMessages(_service.UnaryUnaryTestMessages):
-
- def __init__(self):
- self._index = 0
-
- def request(self):
- symbol = _SYMBOL_FORMAT % self._index
- self._index += 1
- return stock_pb2.StockRequest(symbol=symbol)
-
- def verify(self, request, response, test_case):
- test_case.assertEqual(request.symbol, response.symbol)
- test_case.assertEqual(_price(request.symbol), response.price)
-
-
-class GetLastTradePriceMultiple(_service.StreamStreamTestMethodImplementation):
- """GetLastTradePriceMultiple for use in tests."""
-
- def group(self):
- return _STOCK_GROUP_NAME
-
- def name(self):
- return 'GetLastTradePriceMultiple'
-
- def cardinality(self):
- return cardinality.Cardinality.STREAM_STREAM
-
- def request_class(self):
- return stock_pb2.StockRequest
-
- def response_class(self):
- return stock_pb2.StockReply
-
- def serialize_request(self, request):
- return request.SerializeToString()
-
- def deserialize_request(self, serialized_request):
- return stock_pb2.StockRequest.FromString(serialized_request)
-
- def serialize_response(self, response):
- return response.SerializeToString()
-
- def deserialize_response(self, serialized_response):
- return stock_pb2.StockReply.FromString(serialized_response)
-
- def service(self, response_consumer, context, control):
- return _get_last_trade_price_multiple(response_consumer, control,
- context.is_active)
-
-
-class GetLastTradePriceMultipleMessages(_service.StreamStreamTestMessages):
- """Pairs of message streams for use with GetLastTradePriceMultiple."""
-
- def __init__(self):
- self._index = 0
-
- def requests(self):
- base_index = self._index
- self._index += 1
- return [
- stock_pb2.StockRequest(symbol=_SYMBOL_FORMAT % (base_index + index))
- for index in range(test_constants.STREAM_LENGTH)
- ]
-
- def verify(self, requests, responses, test_case):
- test_case.assertEqual(len(requests), len(responses))
- for stock_request, stock_reply in zip(requests, responses):
- test_case.assertEqual(stock_request.symbol, stock_reply.symbol)
- test_case.assertEqual(
- _price(stock_request.symbol), stock_reply.price)
-
-
-class WatchFutureTrades(_service.UnaryStreamTestMethodImplementation):
- """WatchFutureTrades for use in tests."""
-
- def group(self):
- return _STOCK_GROUP_NAME
-
- def name(self):
- return 'WatchFutureTrades'
-
- def cardinality(self):
- return cardinality.Cardinality.UNARY_STREAM
-
- def request_class(self):
- return stock_pb2.StockRequest
-
- def response_class(self):
- return stock_pb2.StockReply
-
- def serialize_request(self, request):
- return request.SerializeToString()
-
- def deserialize_request(self, serialized_request):
- return stock_pb2.StockRequest.FromString(serialized_request)
-
- def serialize_response(self, response):
- return response.SerializeToString()
-
- def deserialize_response(self, serialized_response):
- return stock_pb2.StockReply.FromString(serialized_response)
-
- def service(self, request, response_consumer, context, control):
- _watch_future_trades(request, response_consumer, control,
- context.is_active)
-
-
-class WatchFutureTradesMessages(_service.UnaryStreamTestMessages):
- """Pairs of a single request message and a sequence of response messages."""
-
- def __init__(self):
- self._index = 0
-
- def request(self):
- symbol = _SYMBOL_FORMAT % self._index
- self._index += 1
- return stock_pb2.StockRequest(
- symbol=symbol, num_trades_to_watch=test_constants.STREAM_LENGTH)
-
- def verify(self, request, responses, test_case):
- test_case.assertEqual(test_constants.STREAM_LENGTH, len(responses))
- base_price = _price(request.symbol)
- for index, response in enumerate(responses):
- test_case.assertEqual(base_price + index, response.price)
-
-
-class GetHighestTradePrice(_service.StreamUnaryTestMethodImplementation):
- """GetHighestTradePrice for use in tests."""
-
- def group(self):
- return _STOCK_GROUP_NAME
-
- def name(self):
- return 'GetHighestTradePrice'
-
- def cardinality(self):
- return cardinality.Cardinality.STREAM_UNARY
-
- def request_class(self):
- return stock_pb2.StockRequest
-
- def response_class(self):
- return stock_pb2.StockReply
-
- def serialize_request(self, request):
- return request.SerializeToString()
-
- def deserialize_request(self, serialized_request):
- return stock_pb2.StockRequest.FromString(serialized_request)
-
- def serialize_response(self, response):
- return response.SerializeToString()
-
- def deserialize_response(self, serialized_response):
- return stock_pb2.StockReply.FromString(serialized_response)
-
- def service(self, response_callback, context, control):
- return _get_highest_trade_price(response_callback, control,
- context.is_active)
-
-
-class GetHighestTradePriceMessages(_service.StreamUnaryTestMessages):
-
- def requests(self):
- return [
- stock_pb2.StockRequest(symbol=_SYMBOL_FORMAT % index)
- for index in range(test_constants.STREAM_LENGTH)
- ]
-
- def verify(self, requests, response, test_case):
- price = None
- symbol = None
- for stock_request in requests:
- current_symbol = stock_request.symbol
- current_price = _price(current_symbol)
- if price is None or price < current_price:
- price = current_price
- symbol = current_symbol
- test_case.assertEqual(price, response.price)
- test_case.assertEqual(symbol, response.symbol)
-
-
-class StockTestService(_service.TestService):
- """A corpus of test data with one method of each RPC cardinality."""
-
- def unary_unary_scenarios(self):
- return {
- (_STOCK_GROUP_NAME, 'GetLastTradePrice'):
- (GetLastTradePrice(), [GetLastTradePriceMessages()]),
- }
-
- def unary_stream_scenarios(self):
- return {
- (_STOCK_GROUP_NAME, 'WatchFutureTrades'):
- (WatchFutureTrades(), [WatchFutureTradesMessages()]),
- }
-
- def stream_unary_scenarios(self):
- return {
- (_STOCK_GROUP_NAME, 'GetHighestTradePrice'):
- (GetHighestTradePrice(), [GetHighestTradePriceMessages()])
- }
-
- def stream_stream_scenarios(self):
- return {
- (_STOCK_GROUP_NAME, 'GetLastTradePriceMultiple'):
- (GetLastTradePriceMultiple(),
- [GetLastTradePriceMultipleMessages()]),
- }
-
-
-STOCK_TEST_SERVICE = StockTestService()
diff --git a/src/python/grpcio_tests/tests/unit/framework/interfaces/face/test_cases.py b/src/python/grpcio_tests/tests/unit/framework/interfaces/face/test_cases.py
deleted file mode 100644
index cff4b7cdea..0000000000
--- a/src/python/grpcio_tests/tests/unit/framework/interfaces/face/test_cases.py
+++ /dev/null
@@ -1,53 +0,0 @@
-# Copyright 2015 gRPC authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-"""Tools for creating tests of implementations of the Face layer."""
-
-# unittest is referenced from specification in this module.
-import unittest # pylint: disable=unused-import
-
-# test_interfaces is referenced from specification in this module.
-from tests.unit.framework.interfaces.face import _blocking_invocation_inline_service
-from tests.unit.framework.interfaces.face import _future_invocation_asynchronous_event_service
-from tests.unit.framework.interfaces.face import _invocation
-from tests.unit.framework.interfaces.face import test_interfaces # pylint: disable=unused-import
-
-_TEST_CASE_SUPERCLASSES = (
- _blocking_invocation_inline_service.TestCase,
- _future_invocation_asynchronous_event_service.TestCase,
-)
-
-
-def test_cases(implementation):
- """Creates unittest.TestCase classes for a given Face layer implementation.
-
- Args:
- implementation: A test_interfaces.Implementation specifying creation and
- destruction of a given Face layer implementation.
-
- Returns:
- A sequence of subclasses of unittest.TestCase defining tests of the
- specified Face layer implementation.
- """
- test_case_classes = []
- for invoker_constructor in _invocation.invoker_constructors():
- for super_class in _TEST_CASE_SUPERCLASSES:
- test_case_classes.append(
- type(
- invoker_constructor.name() + super_class.NAME,
- (super_class,), {
- 'implementation': implementation,
- 'invoker_constructor': invoker_constructor,
- '__module__': implementation.__module__,
- }))
- return test_case_classes
diff --git a/src/python/grpcio_tests/tests/unit/framework/interfaces/face/test_interfaces.py b/src/python/grpcio_tests/tests/unit/framework/interfaces/face/test_interfaces.py
deleted file mode 100644
index d0de8e1c54..0000000000
--- a/src/python/grpcio_tests/tests/unit/framework/interfaces/face/test_interfaces.py
+++ /dev/null
@@ -1,212 +0,0 @@
-# Copyright 2015 gRPC authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-"""Interfaces used in tests of implementations of the Face layer."""
-
-import abc
-
-import six
-
-from grpc.framework.common import cardinality # pylint: disable=unused-import
-from grpc.framework.interfaces.face import face # pylint: disable=unused-import
-
-
-class Method(six.with_metaclass(abc.ABCMeta)):
- """Specifies a method to be used in tests."""
-
- @abc.abstractmethod
- def group(self):
- """Identify the group of the method.
-
- Returns:
- The group of the method.
- """
- raise NotImplementedError()
-
- @abc.abstractmethod
- def name(self):
- """Identify the name of the method.
-
- Returns:
- The name of the method.
- """
- raise NotImplementedError()
-
- @abc.abstractmethod
- def cardinality(self):
- """Identify the cardinality of the method.
-
- Returns:
- A cardinality.Cardinality value describing the streaming semantics of the
- method.
- """
- raise NotImplementedError()
-
- @abc.abstractmethod
- def request_class(self):
- """Identify the class used for the method's request objects.
-
- Returns:
- The class object of the class to which the method's request objects
- belong.
- """
- raise NotImplementedError()
-
- @abc.abstractmethod
- def response_class(self):
- """Identify the class used for the method's response objects.
-
- Returns:
- The class object of the class to which the method's response objects
- belong.
- """
- raise NotImplementedError()
-
- @abc.abstractmethod
- def serialize_request(self, request):
- """Serialize the given request object.
-
- Args:
- request: A request object appropriate for this method.
- """
- raise NotImplementedError()
-
- @abc.abstractmethod
- def deserialize_request(self, serialized_request):
- """Synthesize a request object from a given bytestring.
-
- Args:
- serialized_request: A bytestring deserializable into a request object
- appropriate for this method.
- """
- raise NotImplementedError()
-
- @abc.abstractmethod
- def serialize_response(self, response):
- """Serialize the given response object.
-
- Args:
- response: A response object appropriate for this method.
- """
- raise NotImplementedError()
-
- @abc.abstractmethod
- def deserialize_response(self, serialized_response):
- """Synthesize a response object from a given bytestring.
-
- Args:
- serialized_response: A bytestring deserializable into a response object
- appropriate for this method.
- """
- raise NotImplementedError()
-
-
-class Implementation(six.with_metaclass(abc.ABCMeta)):
- """Specifies an implementation of the Face layer."""
-
- @abc.abstractmethod
- def instantiate(self, methods, method_implementations,
- multi_method_implementation):
- """Instantiates the Face layer implementation to be used in a test.
-
- Args:
- methods: A sequence of Method objects describing the methods available to
- be called during the test.
- method_implementations: A dictionary from group-name pair to
- face.MethodImplementation object specifying implementation of a method.
- multi_method_implementation: A face.MultiMethodImplementation or None.
-
- Returns:
- A sequence of length three the first element of which is a
- face.GenericStub, the second element of which is dictionary from groups
- to face.DynamicStubs affording invocation of the group's methods, and
- the third element of which is an arbitrary memo object to be kept and
- passed to destantiate at the conclusion of the test. The returned stubs
- must be backed by the provided implementations.
- """
- raise NotImplementedError()
-
- @abc.abstractmethod
- def destantiate(self, memo):
- """Destroys the Face layer implementation under test.
-
- Args:
- memo: The object from the third position of the return value of a call to
- instantiate.
- """
- raise NotImplementedError()
-
- @abc.abstractmethod
- def invocation_metadata(self):
- """Provides the metadata to be used when invoking a test RPC.
-
- Returns:
- An object to use as the supplied-at-invocation-time metadata in a test
- RPC.
- """
- raise NotImplementedError()
-
- @abc.abstractmethod
- def initial_metadata(self):
- """Provides the metadata for use as a test RPC's first servicer metadata.
-
- Returns:
- An object to use as the from-the-servicer-before-responses metadata in a
- test RPC.
- """
- raise NotImplementedError()
-
- @abc.abstractmethod
- def terminal_metadata(self):
- """Provides the metadata for use as a test RPC's second servicer metadata.
-
- Returns:
- An object to use as the from-the-servicer-after-all-responses metadata in
- a test RPC.
- """
- raise NotImplementedError()
-
- @abc.abstractmethod
- def code(self):
- """Provides the value for use as a test RPC's code.
-
- Returns:
- An object to use as the from-the-servicer code in a test RPC.
- """
- raise NotImplementedError()
-
- @abc.abstractmethod
- def details(self):
- """Provides the value for use as a test RPC's details.
-
- Returns:
- An object to use as the from-the-servicer details in a test RPC.
- """
- raise NotImplementedError()
-
- @abc.abstractmethod
- def metadata_transmitted(self, original_metadata, transmitted_metadata):
- """Identifies whether or not metadata was properly transmitted.
-
- Args:
- original_metadata: A metadata value passed to the Face interface
- implementation under test.
- transmitted_metadata: The same metadata value after having been
- transmitted via an RPC performed by the Face interface implementation
- under test.
-
- Returns:
- Whether or not the metadata was properly transmitted by the Face interface
- implementation under test.
- """
- raise NotImplementedError()
diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.c b/src/ruby/ext/grpc/rb_grpc_imports.generated.c
index c045480ff4..7009bd80f6 100644
--- a/src/ruby/ext/grpc/rb_grpc_imports.generated.c
+++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.c
@@ -106,6 +106,9 @@ grpc_auth_context_release_type grpc_auth_context_release_import;
grpc_auth_context_add_property_type grpc_auth_context_add_property_import;
grpc_auth_context_add_cstring_property_type grpc_auth_context_add_cstring_property_import;
grpc_auth_context_set_peer_identity_property_name_type grpc_auth_context_set_peer_identity_property_name_import;
+grpc_ssl_session_cache_create_lru_type grpc_ssl_session_cache_create_lru_import;
+grpc_ssl_session_cache_destroy_type grpc_ssl_session_cache_destroy_import;
+grpc_ssl_session_cache_create_channel_arg_type grpc_ssl_session_cache_create_channel_arg_import;
grpc_channel_credentials_release_type grpc_channel_credentials_release_import;
grpc_google_default_credentials_create_type grpc_google_default_credentials_create_import;
grpc_set_ssl_roots_override_callback_type grpc_set_ssl_roots_override_callback_import;
@@ -342,6 +345,9 @@ void grpc_rb_load_imports(HMODULE library) {
grpc_auth_context_add_property_import = (grpc_auth_context_add_property_type) GetProcAddress(library, "grpc_auth_context_add_property");
grpc_auth_context_add_cstring_property_import = (grpc_auth_context_add_cstring_property_type) GetProcAddress(library, "grpc_auth_context_add_cstring_property");
grpc_auth_context_set_peer_identity_property_name_import = (grpc_auth_context_set_peer_identity_property_name_type) GetProcAddress(library, "grpc_auth_context_set_peer_identity_property_name");
+ grpc_ssl_session_cache_create_lru_import = (grpc_ssl_session_cache_create_lru_type) GetProcAddress(library, "grpc_ssl_session_cache_create_lru");
+ grpc_ssl_session_cache_destroy_import = (grpc_ssl_session_cache_destroy_type) GetProcAddress(library, "grpc_ssl_session_cache_destroy");
+ grpc_ssl_session_cache_create_channel_arg_import = (grpc_ssl_session_cache_create_channel_arg_type) GetProcAddress(library, "grpc_ssl_session_cache_create_channel_arg");
grpc_channel_credentials_release_import = (grpc_channel_credentials_release_type) GetProcAddress(library, "grpc_channel_credentials_release");
grpc_google_default_credentials_create_import = (grpc_google_default_credentials_create_type) GetProcAddress(library, "grpc_google_default_credentials_create");
grpc_set_ssl_roots_override_callback_import = (grpc_set_ssl_roots_override_callback_type) GetProcAddress(library, "grpc_set_ssl_roots_override_callback");
diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h
index 4f07452c68..244976c9c5 100644
--- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h
+++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h
@@ -293,6 +293,15 @@ extern grpc_auth_context_add_cstring_property_type grpc_auth_context_add_cstring
typedef int(*grpc_auth_context_set_peer_identity_property_name_type)(grpc_auth_context* ctx, const char* name);
extern grpc_auth_context_set_peer_identity_property_name_type grpc_auth_context_set_peer_identity_property_name_import;
#define grpc_auth_context_set_peer_identity_property_name grpc_auth_context_set_peer_identity_property_name_import
+typedef grpc_ssl_session_cache*(*grpc_ssl_session_cache_create_lru_type)(size_t capacity);
+extern grpc_ssl_session_cache_create_lru_type grpc_ssl_session_cache_create_lru_import;
+#define grpc_ssl_session_cache_create_lru grpc_ssl_session_cache_create_lru_import
+typedef void(*grpc_ssl_session_cache_destroy_type)(grpc_ssl_session_cache* cache);
+extern grpc_ssl_session_cache_destroy_type grpc_ssl_session_cache_destroy_import;
+#define grpc_ssl_session_cache_destroy grpc_ssl_session_cache_destroy_import
+typedef grpc_arg(*grpc_ssl_session_cache_create_channel_arg_type)(grpc_ssl_session_cache* cache);
+extern grpc_ssl_session_cache_create_channel_arg_type grpc_ssl_session_cache_create_channel_arg_import;
+#define grpc_ssl_session_cache_create_channel_arg grpc_ssl_session_cache_create_channel_arg_import
typedef void(*grpc_channel_credentials_release_type)(grpc_channel_credentials* creds);
extern grpc_channel_credentials_release_type grpc_channel_credentials_release_import;
#define grpc_channel_credentials_release grpc_channel_credentials_release_import
diff --git a/src/ruby/lib/grpc/core/time_consts.rb b/src/ruby/lib/grpc/core/time_consts.rb
index 92cd323fa8..896b720780 100644
--- a/src/ruby/lib/grpc/core/time_consts.rb
+++ b/src/ruby/lib/grpc/core/time_consts.rb
@@ -32,7 +32,7 @@ module GRPC
# * timish == 0 => TimeConsts.ZERO
#
# @param timeish [Number|TimeSpec]
- # @return timeish [Number|TimeSpec]
+ # @return [Number|TimeSpec]
def from_relative_time(timeish)
if timeish.is_a? TimeSpec
timeish
diff --git a/src/ruby/lib/grpc/generic/bidi_call.rb b/src/ruby/lib/grpc/generic/bidi_call.rb
index 3bdcc0062e..086455db0b 100644
--- a/src/ruby/lib/grpc/generic/bidi_call.rb
+++ b/src/ruby/lib/grpc/generic/bidi_call.rb
@@ -64,7 +64,7 @@ module GRPC
# @param requests the Enumerable of requests to send
# @param set_input_stream_done [Proc] called back when we're done
# reading the input stream
- # @param set_input_stream_done [Proc] called back when we're done
+ # @param set_output_stream_done [Proc] called back when we're done
# sending data on the output stream
# @return an Enumerator of requests to yield
def run_on_client(requests,
diff --git a/src/ruby/lib/grpc/generic/client_stub.rb b/src/ruby/lib/grpc/generic/client_stub.rb
index 9a50f8a99d..b193f5c4e1 100644
--- a/src/ruby/lib/grpc/generic/client_stub.rb
+++ b/src/ruby/lib/grpc/generic/client_stub.rb
@@ -58,8 +58,8 @@ module GRPC
# Minimally, a stub is created with the just the host of the gRPC service
# it wishes to access, e.g.,
#
- # my_stub = ClientStub.new(example.host.com:50505,
- # :this_channel_is_insecure)
+ # my_stub = ClientStub.new(example.host.com:50505,
+ # :this_channel_is_insecure)
#
# If a channel_override argument is passed, it will be used as the
# underlying channel. Otherwise, the channel_args argument will be used
@@ -376,7 +376,7 @@ module GRPC
# This is a blocking call.
#
# * the call completes when the next call to provided block returns
- # * [False]
+ # false
#
# * the execution block parameters are two objects for sending and
# receiving responses, each of which blocks waiting for flow control.
@@ -398,13 +398,9 @@ module GRPC
# responses by throwing StopIteration, but can only happen either
# if bidi_call#writes_done is called.
#
- # To terminate the RPC correctly the block:
- #
- # * must call bidi#writes_done and then
- #
- # * either return false as soon as there is no need for other responses
- #
- # * loop on responses#next until no further responses are available
+ # To properly terminate the RPC, the responses should be completely iterated
+ # through; one way to do this is to loop on responses#next until no further
+ # responses are available.
#
# == Errors ==
# An RuntimeError is raised if
diff --git a/src/ruby/lib/grpc/generic/interceptors.rb b/src/ruby/lib/grpc/generic/interceptors.rb
index 24482f3451..56d3cecaad 100644
--- a/src/ruby/lib/grpc/generic/interceptors.rb
+++ b/src/ruby/lib/grpc/generic/interceptors.rb
@@ -153,7 +153,7 @@ module GRPC
#
class InterceptionContext
##
- # @param [Array<GRPC::Interceptor>]
+ # @param interceptors [Array<GRPC::Interceptor>]
#
def initialize(interceptors = [])
@interceptors = interceptors.dup
diff --git a/src/ruby/lib/grpc/generic/rpc_server.rb b/src/ruby/lib/grpc/generic/rpc_server.rb
index d96e677f20..31ab6a302b 100644
--- a/src/ruby/lib/grpc/generic/rpc_server.rb
+++ b/src/ruby/lib/grpc/generic/rpc_server.rb
@@ -204,7 +204,7 @@ module GRPC
# * connect_md_proc:
# when non-nil is a proc for determining metadata to to send back the client
# on receiving an invocation req. The proc signature is:
- # {key: val, ..} func(method_name, {key: val, ...})
+ # {key: val, ..} func(method_name, {key: val, ...})
#
# * server_args:
# A server arguments hash to be passed down to the underlying core server
@@ -283,7 +283,7 @@ module GRPC
# If run has not been called, this returns immediately.
#
# @param timeout [Numeric] number of seconds to wait
- # @result [true, false] true if the server is running, false otherwise
+ # @return [true, false] true if the server is running, false otherwise
def wait_till_running(timeout = nil)
@run_mutex.synchronize do
@run_cond.wait(@run_mutex, timeout) if @running_state == :not_started
diff --git a/summerofcode/ideas.md b/summerofcode/ideas.md
index de59be82c2..405297236a 100644
--- a/summerofcode/ideas.md
+++ b/summerofcode/ideas.md
@@ -17,10 +17,6 @@ of gRPC's ten languages on at least one of Linux, macOS, and Windows.
gRPC Core:
-1. Implement ["early OK" semantics](https://github.com/grpc/grpc/issues/7032). The gRPC wire protocol allows servers to complete an RPC with OK status without having processed all requests ever sent to the client; it's the gRPC Core that currently restricts applications from so behaving. This behavioral gap in the gRPC Core should be filled in.
- * **Required skills:** C programming language, C++ programming language.
- * **Likely mentors:** [Nathaniel Manista](https://github.com/nathanielmanistaatgoogle), [Nicolas Noble](https://github.com/nicolasnoble).
-
1. [Make channel-connectivity-watching cancellable](https://github.com/grpc/grpc/issues/3064). Anything worth waiting for is worth cancelling. The fact that channel connectivity is currently poll-based means that clean shutdown of gRPC channels can take as long as the poll interval. No one should have to wait two hundred milliseconds to garbage-collect an object.
* **Required skills:** C programming language, C++ programming language, Python programming language.
* **Likely mentors:** [Nathaniel Manista](https://github.com/nathanielmanistaatgoogle), [Vijay Pai](https://github.com/vjpai).
diff --git a/templates/gRPC-Core.podspec.template b/templates/gRPC-Core.podspec.template
index 3e80d602e1..33a8a8b374 100644
--- a/templates/gRPC-Core.podspec.template
+++ b/templates/gRPC-Core.podspec.template
@@ -42,21 +42,21 @@
out = grpc_lib_files(libs, ("grpc", "gpr"), ("headers",))
return [file for file in out if not file.startswith("third_party/nanopb/")]
- def grpc_cronet_files(libs):
- out = grpc_lib_files(libs, ("grpc_cronet",), ("src", "headers"))
- excl = grpc_private_files(libs)
- excl += [
- # We do not need cronet dedicated plugin registry
- "src/core/plugin_registry/grpc_cronet_plugin_registry.cc",
- # We do not need dummy cronet API for ObjC
+ def grpc_cronet_private_files(libs):
+ out = grpc_lib_files(libs, ("grpc_cronet", "gpr"), ("headers", "src"))
+ excl = [
+ # We do not want dummy cronet API for ObjC
"src/core/ext/transport/cronet/transport/cronet_api_dummy.cc",
]
return [file for file in out if not file in excl]
def grpc_cronet_public_headers(libs):
- out = grpc_lib_files(libs, ("grpc_cronet",), ("public_headers",))
- excl = grpc_public_headers(libs)
- return [file for file in out if not file in excl]
+ out = grpc_lib_files(libs, ("grpc_cronet", "gpr"), ("public_headers",))
+ return out
+
+ def grpc_cronet_private_headers(libs):
+ out = grpc_lib_files(libs, ("grpc_cronet", "gpr"), ("headers",))
+ return out
def grpc_test_util_files(libs):
out = grpc_lib_files(libs, ("grpc_test_util", "gpr_test_util"), ("src", "headers"))
@@ -169,7 +169,6 @@
ss.dependency 'BoringSSL', '~> 10.0'
ss.dependency 'nanopb', '~> 0.3'
- # To save you from scrolling, this is the last part of the podspec.
ss.source_files = ${ruby_multiline_list(grpc_private_files(libs), 22)}
ss.private_header_files = ${ruby_multiline_list(grpc_private_headers(libs), 30)}
@@ -182,19 +181,21 @@
s.subspec 'Cronet-Implementation' do |ss|
ss.header_mappings_dir = '.'
-
- ss.dependency "#{s.name}/Interface", version
- ss.dependency "#{s.name}/Implementation", version
+ ss.libraries = 'z'
ss.dependency "#{s.name}/Cronet-Interface", version
+ ss.dependency 'BoringSSL', '~> 10.0'
+ ss.dependency 'nanopb', '~> 0.3'
- ss.source_files = ${ruby_multiline_list(grpc_cronet_files(libs), 22)}
+ ss.source_files = ${ruby_multiline_list(grpc_cronet_private_files(libs), 22)}
+
+ ss.private_header_files = ${ruby_multiline_list(grpc_cronet_private_headers(libs), 30)}
end
- s.subspec 'Tests' do |ss|
+ s.subspec 'Cronet-Tests' do |ss|
ss.header_mappings_dir = '.'
- ss.dependency "#{s.name}/Interface", version
- ss.dependency "#{s.name}/Implementation", version
+ ss.dependency "#{s.name}/Cronet-Interface", version
+ ss.dependency "#{s.name}/Cronet-Implementation", version
ss.source_files = ${ruby_multiline_list(grpc_test_util_files(libs), 22)},
${ruby_multiline_list(end2end_tests_files(libs), 22)}
@@ -202,6 +203,6 @@
# TODO (mxyan): Instead of this hack, add include path "third_party" to C core's include path?
s.prepare_command = <<-END_OF_COMMAND
- find src/core/ -type f -exec sed -E -i'.back' 's;#include "third_party/nanopb/(.*)";#include <nanopb/\\1>;g' {} \\\;
+ find src/core/ -type f ! -path '*.back*' -exec sed -E -i'.back' 's;#include "third_party/nanopb/(.*)";#include <nanopb/\\1>;g' {} \\\;
END_OF_COMMAND
end
diff --git a/templates/src/csharp/build_packages_dotnetcli.bat.template b/templates/src/csharp/build_packages_dotnetcli.bat.template
index 6671991ad2..1bf78c4d23 100755
--- a/templates/src/csharp/build_packages_dotnetcli.bat.template
+++ b/templates/src/csharp/build_packages_dotnetcli.bat.template
@@ -21,17 +21,21 @@
set NUGET=C:\nuget\nuget.exe
set DOTNET=dotnet
- set -ex
-
mkdir ..\..\artifacts
@rem Collect the artifacts built by the previous build step if running on Jenkins
mkdir nativelibs
+ @rem Jenkins flow (deprecated)
powershell -Command "cp -r ..\..\platform=*\artifacts\csharp_ext_* nativelibs"
+ @rem Kokoro flow
+ powershell -Command "cp -r ..\..\input_artifacts\csharp_ext_* nativelibs"
@rem Collect protoc artifacts built by the previous build step
mkdir protoc_plugins
+ @rem Jenkins flow (deprecated)
powershell -Command "cp -r ..\..\platform=*\artifacts\protoc_* protoc_plugins"
+ @rem Kokoro flow
+ powershell -Command "cp -r ..\..\input_artifacts\protoc_* protoc_plugins"
%%DOTNET% restore Grpc.sln || goto :error
diff --git a/templates/src/csharp/build_packages_dotnetcli.sh.template b/templates/src/csharp/build_packages_dotnetcli.sh.template
index be52b4631c..ddfea74744 100755
--- a/templates/src/csharp/build_packages_dotnetcli.sh.template
+++ b/templates/src/csharp/build_packages_dotnetcli.sh.template
@@ -23,11 +23,17 @@
# Collect the artifacts built by the previous build step
mkdir -p nativelibs
+ # Jenkins flow (deprecated)
cp -r $EXTERNAL_GIT_ROOT/platform={windows,linux,macos}/artifacts/csharp_ext_* nativelibs || true
+ # Kokoro flow
+ cp -r $EXTERNAL_GIT_ROOT/input_artifacts/csharp_ext_* nativelibs || true
# Collect protoc artifacts built by the previous build step
mkdir -p protoc_plugins
+ # Jenkins flow (deprecated)
cp -r $EXTERNAL_GIT_ROOT/platform={windows,linux,macos}/artifacts/protoc_* protoc_plugins || true
+ # Kokoro flow
+ cp -r $EXTERNAL_GIT_ROOT/input_artifacts/protoc_* protoc_plugins || true
dotnet restore Grpc.sln
diff --git a/templates/test/cpp/naming/resolver_component_tests_defs.include b/templates/test/cpp/naming/resolver_component_tests_defs.include
index 4589ced8c9..01e1860545 100644
--- a/templates/test/cpp/naming/resolver_component_tests_defs.include
+++ b/templates/test/cpp/naming/resolver_component_tests_defs.include
@@ -18,12 +18,12 @@
set -ex
# all command args required in this set order
-FLAGS_test_bin_path=$(echo "$1" | grep '\--test_bin_path=' | cut -d "=" -f 2)
-FLAGS_dns_server_bin_path=$(echo "$2" | grep '\--dns_server_bin_path=' | cut -d "=" -f 2)
-FLAGS_records_config_path=$(echo "$3" | grep '\--records_config_path=' | cut -d "=" -f 2)
-FLAGS_dns_server_port=$(echo "$4" | grep '\--dns_server_port=' | cut -d "=" -f 2)
-FLAGS_dns_resolver_bin_path=$(echo "$5" | grep '\--dns_resolver_bin_path=' | cut -d "=" -f 2)
-FLAGS_tcp_connect_bin_path=$(echo "$6" | grep '\--tcp_connect_bin_path=' | cut -d "=" -f 2)
+FLAGS_test_bin_path=$(echo "$1" | grep '\--test_bin_path=' | sed 's/^--test_bin_path=//')
+FLAGS_dns_server_bin_path=$(echo "$2" | grep '\--dns_server_bin_path=' | sed 's/^--dns_server_bin_path=//')
+FLAGS_records_config_path=$(echo "$3" | grep '\--records_config_path=' | sed 's/^--records_config_path=//')
+FLAGS_dns_server_port=$(echo "$4" | grep '\--dns_server_port=' | sed 's/^--dns_server_port=//')
+FLAGS_dns_resolver_bin_path=$(echo "$5" | grep '\--dns_resolver_bin_path=' | sed 's/^--dns_resolver_bin_path=//')
+FLAGS_tcp_connect_bin_path=$(echo "$6" | grep '\--tcp_connect_bin_path=' | sed 's/^--tcp_connect_bin_path=//')
for cmd_arg in "$FLAGS_test_bin_path" "$FLAGS_dns_server_bin_path" "$FLAGS_records_config_path" "$FLAGS_dns_server_port" "$FLAGS_dns_resolver_bin_path" "$FLAGS_tcp_connect_bin_path"; do
if [[ "$cmd_arg" == "" ]]; then
diff --git a/templates/tools/dockerfile/interoptest/grpc_interop_nodepurejs/Dockerfile.template b/templates/tools/dockerfile/interoptest/grpc_interop_nodepurejs/Dockerfile.template
new file mode 100644
index 0000000000..e53d863c92
--- /dev/null
+++ b/templates/tools/dockerfile/interoptest/grpc_interop_nodepurejs/Dockerfile.template
@@ -0,0 +1,23 @@
+%YAML 1.2
+--- |
+ # Copyright 2015 gRPC authors.
+ #
+ # Licensed under the Apache License, Version 2.0 (the "License");
+ # you may not use this file except in compliance with the License.
+ # You may obtain a copy of the License at
+ #
+ # http://www.apache.org/licenses/LICENSE-2.0
+ #
+ # Unless required by applicable law or agreed to in writing, software
+ # distributed under the License is distributed on an "AS IS" BASIS,
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+
+ FROM debian:jessie
+
+ <%include file="../../apt_get_basic.include"/>
+ <%include file="../../node_deps.include"/>
+ <%include file="../../run_tests_addons.include"/>
+ # Define the default command.
+ CMD ["bash"]
diff --git a/templates/tools/dockerfile/node_deps.include b/templates/tools/dockerfile/node_deps.include
index 2f7d0d3abb..bee3087b3f 100644
--- a/templates/tools/dockerfile/node_deps.include
+++ b/templates/tools/dockerfile/node_deps.include
@@ -9,4 +9,5 @@ RUN /bin/bash -l -c "nvm install 4 && npm config set cache /tmp/npm-cache && npm
RUN /bin/bash -l -c "nvm install 5 && npm config set cache /tmp/npm-cache && npm install -g npm"
RUN /bin/bash -l -c "nvm install 6 && npm config set cache /tmp/npm-cache && npm install -g npm"
RUN /bin/bash -l -c "nvm install 8 && npm config set cache /tmp/npm-cache && npm install -g npm"
-RUN /bin/bash -l -c "nvm alias default 8" \ No newline at end of file
+RUN /bin/bash -l -c "nvm install 9 && npm config set cache /tmp/npm-cache && npm install -g npm"
+RUN /bin/bash -l -c "nvm alias default 9" \ No newline at end of file
diff --git a/test/core/client_channel/parse_address_test.cc b/test/core/client_channel/parse_address_test.cc
index 373ed76cbe..ae157fbb8b 100644
--- a/test/core/client_channel/parse_address_test.cc
+++ b/test/core/client_channel/parse_address_test.cc
@@ -18,6 +18,7 @@
#include "src/core/ext/filters/client_channel/parse_address.h"
#include "src/core/lib/iomgr/sockaddr.h"
+#include "src/core/lib/iomgr/socket_utils.h"
#include <string.h>
#ifdef GRPC_HAVE_UNIX_SOCKET
@@ -58,16 +59,15 @@ static void test_grpc_parse_ipv4(const char* uri_text, const char* host,
grpc_core::ExecCtx exec_ctx;
grpc_uri* uri = grpc_uri_parse(uri_text, 0);
grpc_resolved_address addr;
- char ntop_buf[INET_ADDRSTRLEN];
+ char ntop_buf[GRPC_INET_ADDRSTRLEN];
GPR_ASSERT(1 == grpc_parse_ipv4(uri, &addr));
- struct sockaddr_in* addr_in =
- reinterpret_cast<struct sockaddr_in*>(addr.addr);
- GPR_ASSERT(AF_INET == addr_in->sin_family);
- GPR_ASSERT(nullptr != grpc_inet_ntop(AF_INET, &addr_in->sin_addr, ntop_buf,
- sizeof(ntop_buf)));
+ grpc_sockaddr_in* addr_in = reinterpret_cast<grpc_sockaddr_in*>(addr.addr);
+ GPR_ASSERT(GRPC_AF_INET == addr_in->sin_family);
+ GPR_ASSERT(nullptr != grpc_inet_ntop(GRPC_AF_INET, &addr_in->sin_addr,
+ ntop_buf, sizeof(ntop_buf)));
GPR_ASSERT(0 == strcmp(ntop_buf, host));
- GPR_ASSERT(ntohs(addr_in->sin_port) == port);
+ GPR_ASSERT(grpc_ntohs(addr_in->sin_port) == port);
grpc_uri_destroy(uri);
}
@@ -77,16 +77,15 @@ static void test_grpc_parse_ipv6(const char* uri_text, const char* host,
grpc_core::ExecCtx exec_ctx;
grpc_uri* uri = grpc_uri_parse(uri_text, 0);
grpc_resolved_address addr;
- char ntop_buf[INET6_ADDRSTRLEN];
+ char ntop_buf[GRPC_INET6_ADDRSTRLEN];
GPR_ASSERT(1 == grpc_parse_ipv6(uri, &addr));
- struct sockaddr_in6* addr_in6 =
- reinterpret_cast<struct sockaddr_in6*>(addr.addr);
- GPR_ASSERT(AF_INET6 == addr_in6->sin6_family);
- GPR_ASSERT(nullptr != grpc_inet_ntop(AF_INET6, &addr_in6->sin6_addr, ntop_buf,
- sizeof(ntop_buf)));
+ grpc_sockaddr_in6* addr_in6 = reinterpret_cast<grpc_sockaddr_in6*>(addr.addr);
+ GPR_ASSERT(GRPC_AF_INET6 == addr_in6->sin6_family);
+ GPR_ASSERT(nullptr != grpc_inet_ntop(GRPC_AF_INET6, &addr_in6->sin6_addr,
+ ntop_buf, sizeof(ntop_buf)));
GPR_ASSERT(0 == strcmp(ntop_buf, host));
- GPR_ASSERT(ntohs(addr_in6->sin6_port) == port);
+ GPR_ASSERT(grpc_ntohs(addr_in6->sin6_port) == port);
GPR_ASSERT(addr_in6->sin6_scope_id == scope_id);
grpc_uri_destroy(uri);
diff --git a/test/core/client_channel/resolvers/dns_resolver_connectivity_test.cc b/test/core/client_channel/resolvers/dns_resolver_connectivity_test.cc
index 966fb1d14b..e34aa2e676 100644
--- a/test/core/client_channel/resolvers/dns_resolver_connectivity_test.cc
+++ b/test/core/client_channel/resolvers/dns_resolver_connectivity_test.cc
@@ -57,6 +57,9 @@ static void my_resolve_address(const char* addr, const char* default_port,
GRPC_CLOSURE_SCHED(on_done, error);
}
+static grpc_address_resolver_vtable test_resolver = {my_resolve_address,
+ nullptr};
+
static grpc_ares_request* my_dns_lookup_ares(
const char* dns_server, const char* addr, const char* default_port,
grpc_pollset_set* interested_parties, grpc_closure* on_done,
@@ -143,7 +146,7 @@ int main(int argc, char** argv) {
grpc_init();
gpr_mu_init(&g_mu);
g_combiner = grpc_combiner_create();
- grpc_resolve_address = my_resolve_address;
+ grpc_set_resolver_impl(&test_resolver);
grpc_dns_lookup_ares = my_dns_lookup_ares;
grpc_channel_args* result = (grpc_channel_args*)1;
diff --git a/test/core/client_channel/resolvers/dns_resolver_cooldown_test.cc b/test/core/client_channel/resolvers/dns_resolver_cooldown_test.cc
index 9402a605b3..01c61a9f18 100644
--- a/test/core/client_channel/resolvers/dns_resolver_cooldown_test.cc
+++ b/test/core/client_channel/resolvers/dns_resolver_cooldown_test.cc
@@ -28,12 +28,10 @@
#include "src/core/lib/iomgr/sockaddr_utils.h"
#include "test/core/util/test_config.h"
-static grpc_combiner* g_combiner;
+extern grpc_address_resolver_vtable* grpc_resolve_address_impl;
+static grpc_address_resolver_vtable* default_resolve_address;
-static void (*g_default_grpc_resolve_address)(
- const char* name, const char* default_port,
- grpc_pollset_set* interested_parties, grpc_closure* on_done,
- grpc_resolved_addresses** addrs);
+static grpc_combiner* g_combiner;
grpc_ares_request* (*g_default_dns_lookup_ares)(
const char* dns_server, const char* name, const char* default_port,
@@ -52,18 +50,28 @@ struct iomgr_args {
grpc_pollset_set* pollset_set;
} g_iomgr_args;
-// Wrapper around g_default_grpc_resolve_address in order to count the number of
+// Wrapper around default resolve_address in order to count the number of
// times we incur in a system-level name resolution.
static void test_resolve_address_impl(const char* name,
const char* default_port,
grpc_pollset_set* interested_parties,
grpc_closure* on_done,
grpc_resolved_addresses** addrs) {
- g_default_grpc_resolve_address(name, default_port, g_iomgr_args.pollset_set,
- on_done, addrs);
+ default_resolve_address->resolve_address(
+ name, default_port, g_iomgr_args.pollset_set, on_done, addrs);
++g_resolution_count;
}
+static grpc_error* test_blocking_resolve_address_impl(
+ const char* name, const char* default_port,
+ grpc_resolved_addresses** addresses) {
+ return default_resolve_address->blocking_resolve_address(name, default_port,
+ addresses);
+}
+
+static grpc_address_resolver_vtable test_resolver = {
+ test_resolve_address_impl, test_blocking_resolve_address_impl};
+
grpc_ares_request* test_dns_lookup_ares(
const char* dns_server, const char* name, const char* default_port,
grpc_pollset_set* interested_parties, grpc_closure* on_done,
@@ -285,11 +293,14 @@ int main(int argc, char** argv) {
g_combiner = grpc_combiner_create();
- const bool using_cares = (grpc_resolve_address == grpc_resolve_address_ares);
- g_default_grpc_resolve_address = grpc_resolve_address;
+ bool using_cares = false;
+#if GRPC_ARES == 1
+ using_cares = true;
+#endif
g_default_dns_lookup_ares = grpc_dns_lookup_ares;
grpc_dns_lookup_ares = test_dns_lookup_ares;
- grpc_resolve_address = test_resolve_address_impl;
+ default_resolve_address = grpc_resolve_address_impl;
+ grpc_set_resolver_impl(&test_resolver);
test_cooldown(using_cares);
diff --git a/test/core/compression/algorithm_test.cc b/test/core/compression/algorithm_test.cc
index 3dcddf3e67..8989a41989 100644
--- a/test/core/compression/algorithm_test.cc
+++ b/test/core/compression/algorithm_test.cc
@@ -24,6 +24,7 @@
#include <grpc/grpc.h>
#include <grpc/support/log.h>
+#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/lib/transport/static_metadata.h"
#include "test/core/util/test_config.h"
diff --git a/test/core/debug/stats_test.cc b/test/core/debug/stats_test.cc
index e60e54b2fd..949a88f8f0 100644
--- a/test/core/debug/stats_test.cc
+++ b/test/core/debug/stats_test.cc
@@ -47,22 +47,22 @@ class Snapshot {
TEST(StatsTest, IncCounters) {
for (int i = 0; i < GRPC_STATS_COUNTER_COUNT; i++) {
- Snapshot snapshot;
+ std::unique_ptr<Snapshot> snapshot(new Snapshot);
grpc_core::ExecCtx exec_ctx;
GRPC_STATS_INC_COUNTER((grpc_stats_counters)i);
- EXPECT_EQ(snapshot.delta().counters[i], 1);
+ EXPECT_EQ(snapshot->delta().counters[i], 1);
}
}
TEST(StatsTest, IncSpecificCounter) {
- Snapshot snapshot;
+ std::unique_ptr<Snapshot> snapshot(new Snapshot);
grpc_core::ExecCtx exec_ctx;
GRPC_STATS_INC_SYSCALL_POLL();
- EXPECT_EQ(snapshot.delta().counters[GRPC_STATS_COUNTER_SYSCALL_POLL], 1);
+ EXPECT_EQ(snapshot->delta().counters[GRPC_STATS_COUNTER_SYSCALL_POLL], 1);
}
static int FindExpectedBucket(int i, int j) {
@@ -90,12 +90,12 @@ TEST_P(HistogramTest, IncHistogram) {
gpr_log(GPR_DEBUG, "expected_bucket:%d nvalues=%" PRIdPTR, expected_bucket,
test_values.size());
for (auto j : test_values) {
- Snapshot snapshot;
+ std::unique_ptr<Snapshot> snapshot(new Snapshot);
grpc_core::ExecCtx exec_ctx;
grpc_stats_inc_histogram[kHistogram](j);
- auto delta = snapshot.delta();
+ auto delta = snapshot->delta();
EXPECT_EQ(
delta
diff --git a/test/core/end2end/BUILD b/test/core/end2end/BUILD
index 952f3505fb..dd16694204 100644
--- a/test/core/end2end/BUILD
+++ b/test/core/end2end/BUILD
@@ -163,3 +163,20 @@ grpc_cc_test(
)
grpc_end2end_tests()
+
+grpc_cc_test(
+ name = "h2_ssl_session_reuse_test",
+ srcs = ["h2_ssl_session_reuse_test.cc"],
+ external_deps = [
+ "gtest",
+ ],
+ language = "C++",
+ deps = [
+ ':end2end_tests',
+ '//:gpr',
+ '//:grpc',
+ '//:tsi',
+ '//test/core/util:gpr_test_util',
+ '//test/core/util:grpc_test_util',
+ ],
+)
diff --git a/test/core/end2end/connection_refused_test.cc b/test/core/end2end/connection_refused_test.cc
index ff830b47cd..33812ec8e5 100644
--- a/test/core/end2end/connection_refused_test.cc
+++ b/test/core/end2end/connection_refused_test.cc
@@ -25,6 +25,7 @@
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/gpr/host_port.h"
+#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/lib/transport/metadata.h"
#include "src/core/lib/transport/service_config.h"
diff --git a/test/core/end2end/cq_verifier.cc b/test/core/end2end/cq_verifier.cc
index c3a3f43fe1..f7e64effcd 100644
--- a/test/core/end2end/cq_verifier.cc
+++ b/test/core/end2end/cq_verifier.cc
@@ -18,6 +18,7 @@
#include "test/core/end2end/cq_verifier.h"
+#include <inttypes.h>
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
diff --git a/test/core/end2end/fixtures/http_proxy_fixture.cc b/test/core/end2end/fixtures/http_proxy_fixture.cc
index 58353376f3..f02fa9d998 100644
--- a/test/core/end2end/fixtures/http_proxy_fixture.cc
+++ b/test/core/end2end/fixtures/http_proxy_fixture.cc
@@ -535,10 +535,10 @@ grpc_end2end_http_proxy* grpc_end2end_http_proxy_create(
GPR_ASSERT(error == GRPC_ERROR_NONE);
// Bind to port.
grpc_resolved_address resolved_addr;
- struct sockaddr_in* addr =
- reinterpret_cast<struct sockaddr_in*>(resolved_addr.addr);
+ grpc_sockaddr_in* addr =
+ reinterpret_cast<grpc_sockaddr_in*>(resolved_addr.addr);
memset(&resolved_addr, 0, sizeof(resolved_addr));
- addr->sin_family = AF_INET;
+ addr->sin_family = GRPC_AF_INET;
grpc_sockaddr_set_port(&resolved_addr, proxy_port);
int port;
error = grpc_tcp_server_add_port(proxy->server, &resolved_addr, &port);
diff --git a/test/core/end2end/fuzzers/api_fuzzer.cc b/test/core/end2end/fuzzers/api_fuzzer.cc
index b6347fb1db..9ace7d04aa 100644
--- a/test/core/end2end/fuzzers/api_fuzzer.cc
+++ b/test/core/end2end/fuzzers/api_fuzzer.cc
@@ -426,6 +426,9 @@ void my_resolve_address(const char* addr, const char* default_port,
GRPC_CLOSURE_CREATE(finish_resolve, r, grpc_schedule_on_exec_ctx));
}
+static grpc_address_resolver_vtable fuzzer_resolver = {my_resolve_address,
+ nullptr};
+
grpc_ares_request* my_dns_lookup_ares(const char* dns_server, const char* addr,
const char* default_port,
grpc_pollset_set* interested_parties,
@@ -447,12 +450,6 @@ grpc_ares_request* my_dns_lookup_ares(const char* dns_server, const char* addr,
////////////////////////////////////////////////////////////////////////////////
// client connection
-// defined in tcp_client_posix.c
-extern void (*grpc_tcp_client_connect_impl)(
- grpc_closure* closure, grpc_endpoint** ep,
- grpc_pollset_set* interested_parties, const grpc_channel_args* channel_args,
- const grpc_resolved_address* addr, grpc_millis deadline);
-
static void sched_connect(grpc_closure* closure, grpc_endpoint** ep,
gpr_timespec deadline);
@@ -513,6 +510,8 @@ static void my_tcp_client_connect(grpc_closure* closure, grpc_endpoint** ep,
grpc_millis_to_timespec(deadline, GPR_CLOCK_MONOTONIC));
}
+grpc_tcp_client_vtable fuzz_tcp_client_vtable = {my_tcp_client_connect};
+
////////////////////////////////////////////////////////////////////////////////
// test driver
@@ -753,7 +752,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
if (squelch && grpc_trace_fuzzer == nullptr) gpr_set_log_function(dont_log);
gpr_free(grpc_trace_fuzzer);
input_stream inp = {data, data + size};
- grpc_tcp_client_connect_impl = my_tcp_client_connect;
+ grpc_set_tcp_client_impl(&fuzz_tcp_client_vtable);
gpr_now_impl = now_impl;
grpc_init();
grpc_timer_manager_set_threading(false);
@@ -761,7 +760,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
grpc_core::ExecCtx exec_ctx;
grpc_executor_set_threading(false);
}
- grpc_resolve_address = my_resolve_address;
+ grpc_set_resolver_impl(&fuzzer_resolver);
grpc_dns_lookup_ares = my_dns_lookup_ares;
GPR_ASSERT(g_channel == nullptr);
diff --git a/test/core/end2end/goaway_server_test.cc b/test/core/end2end/goaway_server_test.cc
index 09f0301c44..0188698f17 100644
--- a/test/core/end2end/goaway_server_test.cc
+++ b/test/core/end2end/goaway_server_test.cc
@@ -21,6 +21,7 @@
including windows.h on Windows, uv.h must be included before other system
headers. Therefore, sockaddr.h must always be included first */
#include "src/core/lib/iomgr/sockaddr.h"
+#include "src/core/lib/iomgr/socket_utils.h"
#include <grpc/grpc.h>
#include <grpc/support/alloc.h>
@@ -35,14 +36,13 @@
#include "test/core/util/port.h"
#include "test/core/util/test_config.h"
+extern grpc_address_resolver_vtable* grpc_resolve_address_impl;
+static grpc_address_resolver_vtable* default_resolver;
+
static void* tag(intptr_t i) { return (void*)i; }
static gpr_mu g_mu;
static int g_resolve_port = -1;
-static void (*iomgr_resolve_address)(const char* addr, const char* default_port,
- grpc_pollset_set* interested_parties,
- grpc_closure* on_done,
- grpc_resolved_addresses** addresses);
static grpc_ares_request* (*iomgr_dns_lookup_ares)(
const char* dns_server, const char* addr, const char* default_port,
@@ -61,8 +61,8 @@ static void my_resolve_address(const char* addr, const char* default_port,
grpc_closure* on_done,
grpc_resolved_addresses** addrs) {
if (0 != strcmp(addr, "test")) {
- iomgr_resolve_address(addr, default_port, interested_parties, on_done,
- addrs);
+ default_resolver->resolve_address(addr, default_port, interested_parties,
+ on_done, addrs);
return;
}
@@ -77,17 +77,27 @@ static void my_resolve_address(const char* addr, const char* default_port,
(*addrs)->addrs = static_cast<grpc_resolved_address*>(
gpr_malloc(sizeof(*(*addrs)->addrs)));
memset((*addrs)->addrs, 0, sizeof(*(*addrs)->addrs));
- struct sockaddr_in* sa =
- reinterpret_cast<struct sockaddr_in*>((*addrs)->addrs[0].addr);
- sa->sin_family = AF_INET;
- sa->sin_addr.s_addr = htonl(0x7f000001);
- sa->sin_port = htons(static_cast<uint16_t>(g_resolve_port));
- (*addrs)->addrs[0].len = sizeof(*sa);
+ grpc_sockaddr_in* sa =
+ reinterpret_cast<grpc_sockaddr_in*>((*addrs)->addrs[0].addr);
+ sa->sin_family = GRPC_AF_INET;
+ sa->sin_addr.s_addr = 0x100007f;
+ sa->sin_port = grpc_htons(static_cast<uint16_t>(g_resolve_port));
+ (*addrs)->addrs[0].len = static_cast<socklen_t>(sizeof(*sa));
gpr_mu_unlock(&g_mu);
}
GRPC_CLOSURE_SCHED(on_done, error);
}
+static grpc_error* my_blocking_resolve_address(
+ const char* name, const char* default_port,
+ grpc_resolved_addresses** addresses) {
+ return default_resolver->blocking_resolve_address(name, default_port,
+ addresses);
+}
+
+static grpc_address_resolver_vtable test_resolver = {
+ my_resolve_address, my_blocking_resolve_address};
+
static grpc_ares_request* my_dns_lookup_ares(
const char* dns_server, const char* addr, const char* default_port,
grpc_pollset_set* interested_parties, grpc_closure* on_done,
@@ -106,11 +116,11 @@ static grpc_ares_request* my_dns_lookup_ares(
error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Forced Failure");
} else {
*lb_addrs = grpc_lb_addresses_create(1, nullptr);
- struct sockaddr_in* sa = static_cast<struct sockaddr_in*>(
- gpr_zalloc(sizeof(struct sockaddr_in)));
- sa->sin_family = AF_INET;
- sa->sin_addr.s_addr = htonl(0x7f000001);
- sa->sin_port = htons(static_cast<uint16_t>(g_resolve_port));
+ grpc_sockaddr_in* sa =
+ static_cast<grpc_sockaddr_in*>(gpr_zalloc(sizeof(grpc_sockaddr_in)));
+ sa->sin_family = GRPC_AF_INET;
+ sa->sin_addr.s_addr = 0x100007f;
+ sa->sin_port = grpc_htons(static_cast<uint16_t>(g_resolve_port));
grpc_lb_addresses_set_address(*lb_addrs, 0, sa, sizeof(*sa), false, nullptr,
nullptr);
gpr_free(sa);
@@ -130,9 +140,9 @@ int main(int argc, char** argv) {
gpr_mu_init(&g_mu);
grpc_init();
- iomgr_resolve_address = grpc_resolve_address;
+ default_resolver = grpc_resolve_address_impl;
+ grpc_set_resolver_impl(&test_resolver);
iomgr_dns_lookup_ares = grpc_dns_lookup_ares;
- grpc_resolve_address = my_resolve_address;
grpc_dns_lookup_ares = my_dns_lookup_ares;
int was_cancelled1;
diff --git a/test/core/end2end/h2_ssl_session_reuse_test.cc b/test/core/end2end/h2_ssl_session_reuse_test.cc
new file mode 100644
index 0000000000..d5984be93f
--- /dev/null
+++ b/test/core/end2end/h2_ssl_session_reuse_test.cc
@@ -0,0 +1,280 @@
+/*
+ *
+ * Copyright 2018 gRPC authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include "test/core/end2end/end2end_tests.h"
+
+#include <stdio.h>
+#include <string.h>
+
+#include <grpc/support/alloc.h>
+#include <grpc/support/log.h>
+
+#include "src/core/lib/channel/channel_args.h"
+#include "src/core/lib/gpr/env.h"
+#include "src/core/lib/gpr/host_port.h"
+#include "src/core/lib/gpr/string.h"
+#include "src/core/lib/gpr/tmpfile.h"
+#include "src/core/lib/security/credentials/credentials.h"
+#include "test/core/end2end/cq_verifier.h"
+#include "test/core/end2end/data/ssl_test_data.h"
+#include "test/core/util/port.h"
+#include "test/core/util/test_config.h"
+
+#include <gtest/gtest.h>
+
+namespace grpc {
+namespace testing {
+namespace {
+
+void* tag(intptr_t t) { return (void*)t; }
+
+gpr_timespec five_seconds_time() { return grpc_timeout_seconds_to_deadline(5); }
+
+grpc_server* server_create(grpc_completion_queue* cq, char* server_addr) {
+ grpc_ssl_pem_key_cert_pair pem_cert_key_pair = {test_server1_key,
+ test_server1_cert};
+ grpc_server_credentials* server_creds = grpc_ssl_server_credentials_create_ex(
+ test_root_cert, &pem_cert_key_pair, 1,
+ GRPC_SSL_REQUEST_CLIENT_CERTIFICATE_AND_VERIFY, nullptr);
+
+ grpc_server* server = grpc_server_create(nullptr, nullptr);
+ grpc_server_register_completion_queue(server, cq, nullptr);
+ GPR_ASSERT(
+ grpc_server_add_secure_http2_port(server, server_addr, server_creds));
+ grpc_server_credentials_release(server_creds);
+ grpc_server_start(server);
+
+ return server;
+}
+
+grpc_channel* client_create(char* server_addr, grpc_ssl_session_cache* cache) {
+ grpc_ssl_pem_key_cert_pair signed_client_key_cert_pair = {
+ test_signed_client_key, test_signed_client_cert};
+ grpc_channel_credentials* client_creds = grpc_ssl_credentials_create(
+ test_root_cert, &signed_client_key_cert_pair, nullptr);
+
+ grpc_arg args[] = {
+ grpc_channel_arg_string_create(
+ const_cast<char*>(GRPC_SSL_TARGET_NAME_OVERRIDE_ARG),
+ const_cast<char*>("waterzooi.test.google.be")),
+ grpc_ssl_session_cache_create_channel_arg(cache),
+ };
+
+ grpc_channel_args* client_args =
+ grpc_channel_args_copy_and_add(nullptr, args, GPR_ARRAY_SIZE(args));
+
+ grpc_channel* client = grpc_secure_channel_create(client_creds, server_addr,
+ client_args, nullptr);
+ GPR_ASSERT(client != nullptr);
+ grpc_channel_credentials_release(client_creds);
+
+ {
+ grpc_core::ExecCtx exec_ctx;
+ grpc_channel_args_destroy(client_args);
+ }
+
+ return client;
+}
+
+void do_round_trip(grpc_completion_queue* cq, grpc_server* server,
+ char* server_addr, grpc_ssl_session_cache* cache,
+ bool expect_session_reuse) {
+ grpc_channel* client = client_create(server_addr, cache);
+
+ cq_verifier* cqv = cq_verifier_create(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;
+ grpc_slice details;
+ int was_cancelled = 2;
+
+ gpr_timespec deadline = grpc_timeout_seconds_to_deadline(60);
+ grpc_call* c = grpc_channel_create_call(
+ client, nullptr, GRPC_PROPAGATE_DEFAULTS, cq,
+ grpc_slice_from_static_string("/foo"), nullptr, deadline, nullptr);
+ 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 = 0;
+ op->flags = 0;
+ op->reserved = nullptr;
+ op++;
+ op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT;
+ op->flags = 0;
+ op->reserved = nullptr;
+ op++;
+ op->op = GRPC_OP_RECV_INITIAL_METADATA;
+ op->data.recv_initial_metadata.recv_initial_metadata = &initial_metadata_recv;
+ op->flags = 0;
+ op->reserved = nullptr;
+ 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->flags = 0;
+ op->reserved = nullptr;
+ op++;
+ error = grpc_call_start_batch(c, ops, static_cast<size_t>(op - ops), tag(1),
+ nullptr);
+ GPR_ASSERT(GRPC_CALL_OK == error);
+
+ grpc_call* s;
+ 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_verify(cqv);
+
+ grpc_auth_context* auth = grpc_call_auth_context(s);
+ grpc_auth_property_iterator it = grpc_auth_context_find_properties_by_name(
+ auth, GRPC_SSL_SESSION_REUSED_PROPERTY);
+ const grpc_auth_property* property = grpc_auth_property_iterator_next(&it);
+ GPR_ASSERT(property != nullptr);
+
+ if (expect_session_reuse) {
+ GPR_ASSERT(strcmp(property->value, "true") == 0);
+ } else {
+ GPR_ASSERT(strcmp(property->value, "false") == 0);
+ }
+ grpc_auth_context_release(auth);
+
+ 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 = nullptr;
+ op++;
+ op->op = GRPC_OP_RECV_CLOSE_ON_SERVER;
+ op->data.recv_close_on_server.cancelled = &was_cancelled;
+ op->flags = 0;
+ op->reserved = nullptr;
+ 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->flags = 0;
+ op->reserved = nullptr;
+ op++;
+ error = grpc_call_start_batch(s, ops, static_cast<size_t>(op - ops), tag(103),
+ nullptr);
+ GPR_ASSERT(GRPC_CALL_OK == error);
+
+ CQ_EXPECT_COMPLETION(cqv, tag(103), 1);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
+ cq_verify(cqv);
+
+ 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_unref(c);
+ grpc_call_unref(s);
+
+ cq_verifier_destroy(cqv);
+
+ grpc_channel_destroy(client);
+}
+
+void drain_cq(grpc_completion_queue* cq) {
+ grpc_event ev;
+ do {
+ ev = grpc_completion_queue_next(cq, five_seconds_time(), nullptr);
+ } while (ev.type != GRPC_QUEUE_SHUTDOWN);
+}
+
+TEST(H2SessionReuseTest, SingleReuse) {
+ int port = grpc_pick_unused_port_or_die();
+
+ char* server_addr;
+ gpr_join_host_port(&server_addr, "localhost", port);
+
+ grpc_completion_queue* cq = grpc_completion_queue_create_for_next(nullptr);
+ grpc_ssl_session_cache* cache = grpc_ssl_session_cache_create_lru(16);
+
+ grpc_server* server = server_create(cq, server_addr);
+
+ do_round_trip(cq, server, server_addr, cache, false);
+ do_round_trip(cq, server, server_addr, cache, true);
+ do_round_trip(cq, server, server_addr, cache, true);
+
+ gpr_free(server_addr);
+ grpc_ssl_session_cache_destroy(cache);
+
+ GPR_ASSERT(grpc_completion_queue_next(
+ cq, grpc_timeout_milliseconds_to_deadline(100), nullptr)
+ .type == GRPC_QUEUE_TIMEOUT);
+
+ grpc_completion_queue* shutdown_cq =
+ grpc_completion_queue_create_for_pluck(nullptr);
+ grpc_server_shutdown_and_notify(server, shutdown_cq, tag(1000));
+ GPR_ASSERT(grpc_completion_queue_pluck(shutdown_cq, tag(1000),
+ grpc_timeout_seconds_to_deadline(5),
+ nullptr)
+ .type == GRPC_OP_COMPLETE);
+ grpc_server_destroy(server);
+ grpc_completion_queue_destroy(shutdown_cq);
+
+ grpc_completion_queue_shutdown(cq);
+ drain_cq(cq);
+ grpc_completion_queue_destroy(cq);
+}
+
+} // namespace
+} // namespace testing
+} // namespace grpc
+
+int main(int argc, char** argv) {
+ FILE* roots_file;
+ size_t roots_size = strlen(test_root_cert);
+ char* roots_filename;
+
+ grpc_test_init(argc, argv);
+ /* Set the SSL roots env var. */
+ roots_file = gpr_tmpfile("chttp2_ssl_session_reuse_test", &roots_filename);
+ GPR_ASSERT(roots_filename != nullptr);
+ GPR_ASSERT(roots_file != nullptr);
+ GPR_ASSERT(fwrite(test_root_cert, 1, roots_size, roots_file) == roots_size);
+ fclose(roots_file);
+ gpr_setenv(GRPC_DEFAULT_SSL_ROOTS_FILE_PATH_ENV_VAR, roots_filename);
+
+ grpc_init();
+ ::testing::InitGoogleTest(&argc, argv);
+ int ret = RUN_ALL_TESTS();
+ grpc_shutdown();
+
+ /* Cleanup. */
+ remove(roots_filename);
+ gpr_free(roots_filename);
+
+ return ret;
+}
diff --git a/test/core/end2end/tests/cancel_after_accept.cc b/test/core/end2end/tests/cancel_after_accept.cc
index ee1a0bbccc..e94ea51a75 100644
--- a/test/core/end2end/tests/cancel_after_accept.cc
+++ b/test/core/end2end/tests/cancel_after_accept.cc
@@ -27,6 +27,7 @@
#include <grpc/support/time.h>
#include "src/core/lib/channel/channel_args.h"
+#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/lib/transport/metadata.h"
#include "src/core/lib/transport/service_config.h"
diff --git a/test/core/end2end/tests/cancel_after_invoke.cc b/test/core/end2end/tests/cancel_after_invoke.cc
index a3e36e0e3f..72f724281e 100644
--- a/test/core/end2end/tests/cancel_after_invoke.cc
+++ b/test/core/end2end/tests/cancel_after_invoke.cc
@@ -18,6 +18,7 @@
#include "test/core/end2end/end2end_tests.h"
+#include <inttypes.h>
#include <stdio.h>
#include <string.h>
diff --git a/test/core/end2end/tests/cancel_after_round_trip.cc b/test/core/end2end/tests/cancel_after_round_trip.cc
index bf3be1c8b7..4890b3013f 100644
--- a/test/core/end2end/tests/cancel_after_round_trip.cc
+++ b/test/core/end2end/tests/cancel_after_round_trip.cc
@@ -27,6 +27,7 @@
#include <grpc/support/time.h>
#include "src/core/lib/channel/channel_args.h"
+#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/lib/transport/metadata.h"
#include "src/core/lib/transport/service_config.h"
diff --git a/test/core/end2end/tests/cancel_before_invoke.cc b/test/core/end2end/tests/cancel_before_invoke.cc
index e9fa0466fb..c7d3ed5a4f 100644
--- a/test/core/end2end/tests/cancel_before_invoke.cc
+++ b/test/core/end2end/tests/cancel_before_invoke.cc
@@ -18,6 +18,7 @@
#include "test/core/end2end/end2end_tests.h"
+#include <inttypes.h>
#include <stdio.h>
#include <string.h>
diff --git a/test/core/end2end/tests/cancel_with_status.cc b/test/core/end2end/tests/cancel_with_status.cc
index 6820ba5a2f..887da85939 100644
--- a/test/core/end2end/tests/cancel_with_status.cc
+++ b/test/core/end2end/tests/cancel_with_status.cc
@@ -18,6 +18,7 @@
#include "test/core/end2end/end2end_tests.h"
+#include <inttypes.h>
#include <stdio.h>
#include <string.h>
diff --git a/test/core/end2end/tests/max_message_length.cc b/test/core/end2end/tests/max_message_length.cc
index 3dd1737793..fa5b3b6e9b 100644
--- a/test/core/end2end/tests/max_message_length.cc
+++ b/test/core/end2end/tests/max_message_length.cc
@@ -27,6 +27,7 @@
#include <grpc/support/time.h>
#include "src/core/lib/channel/channel_args.h"
+#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/lib/transport/metadata.h"
#include "src/core/lib/transport/service_config.h"
diff --git a/test/core/end2end/tests/negative_deadline.cc b/test/core/end2end/tests/negative_deadline.cc
index b28bee0fb2..dce3a02d25 100644
--- a/test/core/end2end/tests/negative_deadline.cc
+++ b/test/core/end2end/tests/negative_deadline.cc
@@ -18,6 +18,7 @@
#include "test/core/end2end/end2end_tests.h"
+#include <inttypes.h>
#include <stdio.h>
#include <string.h>
diff --git a/test/core/end2end/tests/request_with_flags.cc b/test/core/end2end/tests/request_with_flags.cc
index 4a54318d0f..c52482470e 100644
--- a/test/core/end2end/tests/request_with_flags.cc
+++ b/test/core/end2end/tests/request_with_flags.cc
@@ -48,14 +48,12 @@ static gpr_timespec n_seconds_from_now(int n) {
return grpc_timeout_seconds_to_deadline(n);
}
-static gpr_timespec five_seconds_from_now(void) {
- return n_seconds_from_now(5);
-}
+static gpr_timespec one_second_from_now(void) { return n_seconds_from_now(1); }
static void drain_cq(grpc_completion_queue* cq) {
grpc_event ev;
do {
- ev = grpc_completion_queue_next(cq, five_seconds_from_now(), nullptr);
+ ev = grpc_completion_queue_next(cq, one_second_from_now(), nullptr);
} while (ev.type != GRPC_QUEUE_SHUTDOWN);
}
@@ -109,7 +107,7 @@ static void test_invoke_request_with_flags(
grpc_slice details;
grpc_call_error expectation;
- gpr_timespec deadline = five_seconds_from_now();
+ gpr_timespec deadline = one_second_from_now();
c = grpc_channel_create_call(
f.client, nullptr, GRPC_PROPAGATE_DEFAULTS, f.cq,
grpc_slice_from_static_string("/foo"),
diff --git a/test/core/gpr/mpscq_test.cc b/test/core/gpr/mpscq_test.cc
index 8c0873941f..f51bdf8c50 100644
--- a/test/core/gpr/mpscq_test.cc
+++ b/test/core/gpr/mpscq_test.cc
@@ -18,6 +18,7 @@
#include "src/core/lib/gpr/mpscq.h"
+#include <inttypes.h>
#include <stdlib.h>
#include <grpc/support/alloc.h>
diff --git a/test/core/gpr/time_test.cc b/test/core/gpr/time_test.cc
index c80aac649d..6f070f58df 100644
--- a/test/core/gpr/time_test.cc
+++ b/test/core/gpr/time_test.cc
@@ -21,6 +21,7 @@
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
#include <grpc/support/time.h>
+#include <inttypes.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/test/core/http/httpcli_test.cc b/test/core/http/httpcli_test.cc
index 346568fcf2..16448d9e14 100644
--- a/test/core/http/httpcli_test.cc
+++ b/test/core/http/httpcli_test.cc
@@ -47,6 +47,7 @@ static void on_finish(void* arg, grpc_error* error) {
"<body><p>This is a test</p></body></html>";
grpc_http_response* response = static_cast<grpc_http_response*>(arg);
GPR_ASSERT(response);
+ gpr_log(GPR_INFO, "response status %d", response->status);
GPR_ASSERT(response->status == 200);
GPR_ASSERT(response->body_length == strlen(expect));
GPR_ASSERT(0 == memcmp(expect, response->body, response->body_length));
diff --git a/test/core/http/httpscli_test.cc b/test/core/http/httpscli_test.cc
index a38f306ef3..b8f2e438a4 100644
--- a/test/core/http/httpscli_test.cc
+++ b/test/core/http/httpscli_test.cc
@@ -49,6 +49,7 @@ static void on_finish(void* arg, grpc_error* error) {
"<body><p>This is a test</p></body></html>";
grpc_http_response* response = static_cast<grpc_http_response*>(arg);
GPR_ASSERT(response);
+ gpr_log(GPR_INFO, "response status %d", response->status);
GPR_ASSERT(response->status == 200);
GPR_ASSERT(response->body_length == strlen(expect));
GPR_ASSERT(0 == memcmp(expect, response->body, response->body_length));
diff --git a/test/core/iomgr/resource_quota_test.cc b/test/core/iomgr/resource_quota_test.cc
index 921a24ebf2..059ff7b5f8 100644
--- a/test/core/iomgr/resource_quota_test.cc
+++ b/test/core/iomgr/resource_quota_test.cc
@@ -21,6 +21,7 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
+#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/slice/slice_internal.h"
#include "test/core/util/test_config.h"
diff --git a/test/core/iomgr/sockaddr_utils_test.cc b/test/core/iomgr/sockaddr_utils_test.cc
index 32d2a384bd..3783f968b7 100644
--- a/test/core/iomgr/sockaddr_utils_test.cc
+++ b/test/core/iomgr/sockaddr_utils_test.cc
@@ -22,6 +22,7 @@
headers. Therefore, sockaddr.h must always be included first */
#include "src/core/lib/iomgr/sockaddr_utils.h"
#include "src/core/lib/iomgr/sockaddr.h"
+#include "src/core/lib/iomgr/socket_utils.h"
#include <errno.h>
#include <string.h>
@@ -33,34 +34,33 @@
static grpc_resolved_address make_addr4(const uint8_t* data, size_t data_len) {
grpc_resolved_address resolved_addr4;
- struct sockaddr_in* addr4 =
- reinterpret_cast<struct sockaddr_in*>(resolved_addr4.addr);
+ grpc_sockaddr_in* addr4 =
+ reinterpret_cast<grpc_sockaddr_in*>(resolved_addr4.addr);
memset(&resolved_addr4, 0, sizeof(resolved_addr4));
- addr4->sin_family = AF_INET;
+ addr4->sin_family = GRPC_AF_INET;
GPR_ASSERT(data_len == sizeof(addr4->sin_addr.s_addr));
memcpy(&addr4->sin_addr.s_addr, data, data_len);
- addr4->sin_port = htons(12345);
- resolved_addr4.len = sizeof(struct sockaddr_in);
+ addr4->sin_port = grpc_htons(12345);
+ resolved_addr4.len = static_cast<socklen_t>(sizeof(grpc_sockaddr_in));
return resolved_addr4;
}
static grpc_resolved_address make_addr6(const uint8_t* data, size_t data_len) {
grpc_resolved_address resolved_addr6;
- struct sockaddr_in6* addr6 =
- reinterpret_cast<struct sockaddr_in6*>(resolved_addr6.addr);
+ grpc_sockaddr_in6* addr6 =
+ reinterpret_cast<grpc_sockaddr_in6*>(resolved_addr6.addr);
memset(&resolved_addr6, 0, sizeof(resolved_addr6));
- addr6->sin6_family = AF_INET6;
+ addr6->sin6_family = GRPC_AF_INET6;
GPR_ASSERT(data_len == sizeof(addr6->sin6_addr.s6_addr));
memcpy(&addr6->sin6_addr.s6_addr, data, data_len);
- addr6->sin6_port = htons(12345);
- resolved_addr6.len = sizeof(struct sockaddr_in6);
+ addr6->sin6_port = grpc_htons(12345);
+ resolved_addr6.len = static_cast<socklen_t>(sizeof(grpc_sockaddr_in6));
return resolved_addr6;
}
static void set_addr6_scope_id(grpc_resolved_address* addr, uint32_t scope_id) {
- struct sockaddr_in6* addr6 =
- reinterpret_cast<struct sockaddr_in6*>(addr->addr);
- GPR_ASSERT(addr6->sin6_family == AF_INET6);
+ grpc_sockaddr_in6* addr6 = reinterpret_cast<grpc_sockaddr_in6*>(addr->addr);
+ GPR_ASSERT(addr6->sin6_family == GRPC_AF_INET6);
addr6->sin6_scope_id = scope_id;
}
@@ -131,9 +131,9 @@ static void test_sockaddr_is_wildcard(void) {
grpc_resolved_address wild6;
grpc_resolved_address wild_mapped;
grpc_resolved_address dummy;
- struct sockaddr_in* wild4_addr;
- struct sockaddr_in6* wild6_addr;
- struct sockaddr_in6* wild_mapped_addr;
+ grpc_sockaddr_in* wild4_addr;
+ grpc_sockaddr_in6* wild6_addr;
+ grpc_sockaddr_in6* wild_mapped_addr;
int port;
gpr_log(GPR_INFO, "%s", "test_sockaddr_is_wildcard");
@@ -146,7 +146,7 @@ static void test_sockaddr_is_wildcard(void) {
port = -1;
GPR_ASSERT(grpc_sockaddr_is_wildcard(&wild4, &port));
GPR_ASSERT(port == 555);
- wild4_addr = reinterpret_cast<struct sockaddr_in*>(&wild4.addr);
+ wild4_addr = reinterpret_cast<grpc_sockaddr_in*>(&wild4.addr);
memset(&wild4_addr->sin_addr.s_addr, 0xbd, 1);
GPR_ASSERT(!grpc_sockaddr_is_wildcard(&wild4, &port));
@@ -154,7 +154,7 @@ static void test_sockaddr_is_wildcard(void) {
port = -1;
GPR_ASSERT(grpc_sockaddr_is_wildcard(&wild6, &port));
GPR_ASSERT(port == 555);
- wild6_addr = reinterpret_cast<struct sockaddr_in6*>(&wild6.addr);
+ wild6_addr = reinterpret_cast<grpc_sockaddr_in6*>(&wild6.addr);
memset(&wild6_addr->sin6_addr.s6_addr, 0xbd, 1);
GPR_ASSERT(!grpc_sockaddr_is_wildcard(&wild6, &port));
@@ -162,7 +162,7 @@ static void test_sockaddr_is_wildcard(void) {
port = -1;
GPR_ASSERT(grpc_sockaddr_is_wildcard(&wild_mapped, &port));
GPR_ASSERT(port == 555);
- wild_mapped_addr = reinterpret_cast<struct sockaddr_in6*>(&wild_mapped.addr);
+ wild_mapped_addr = reinterpret_cast<grpc_sockaddr_in6*>(&wild_mapped.addr);
memset(&wild_mapped_addr->sin6_addr.s6_addr, 0xbd, 1);
GPR_ASSERT(!grpc_sockaddr_is_wildcard(&wild_mapped, &port));
@@ -200,7 +200,7 @@ static void test_sockaddr_to_string(void) {
grpc_resolved_address input4;
grpc_resolved_address input6;
grpc_resolved_address dummy;
- struct sockaddr* dummy_addr;
+ grpc_sockaddr* dummy_addr;
gpr_log(GPR_INFO, "%s", "test_sockaddr_to_string");
@@ -237,7 +237,7 @@ static void test_sockaddr_to_string(void) {
expect_sockaddr_uri("ipv6:[::fffe:c000:263]:12345", &input6);
memset(&dummy, 0, sizeof(dummy));
- dummy_addr = reinterpret_cast<struct sockaddr*>(dummy.addr);
+ dummy_addr = reinterpret_cast<grpc_sockaddr*>(dummy.addr);
dummy_addr->sa_family = 123;
expect_sockaddr_str("(sockaddr family=123)", &dummy, 0);
expect_sockaddr_str("(sockaddr family=123)", &dummy, 1);
@@ -248,7 +248,7 @@ static void test_sockaddr_set_get_port(void) {
grpc_resolved_address input4;
grpc_resolved_address input6;
grpc_resolved_address dummy;
- struct sockaddr* dummy_addr;
+ grpc_sockaddr* dummy_addr;
gpr_log(GPR_DEBUG, "test_sockaddr_set_get_port");
@@ -263,7 +263,7 @@ static void test_sockaddr_set_get_port(void) {
GPR_ASSERT(grpc_sockaddr_get_port(&input6) == 54321);
memset(&dummy, 0, sizeof(dummy));
- dummy_addr = reinterpret_cast<struct sockaddr*>(dummy.addr);
+ dummy_addr = reinterpret_cast<grpc_sockaddr*>(dummy.addr);
dummy_addr->sa_family = 123;
GPR_ASSERT(grpc_sockaddr_get_port(&dummy) == 0);
GPR_ASSERT(grpc_sockaddr_set_port(&dummy, 1234) == 0);
diff --git a/test/core/iomgr/tcp_client_posix_test.cc b/test/core/iomgr/tcp_client_posix_test.cc
index 8a43170043..a4c38af86f 100644
--- a/test/core/iomgr/tcp_client_posix_test.cc
+++ b/test/core/iomgr/tcp_client_posix_test.cc
@@ -89,7 +89,7 @@ void test_succeeds(void) {
gpr_log(GPR_DEBUG, "test_succeeds");
memset(&resolved_addr, 0, sizeof(resolved_addr));
- resolved_addr.len = sizeof(struct sockaddr_in);
+ resolved_addr.len = static_cast<socklen_t>(sizeof(struct sockaddr_in));
addr->sin_family = AF_INET;
/* create a dummy server */
@@ -112,7 +112,7 @@ void test_succeeds(void) {
/* await the connection */
do {
- resolved_addr.len = sizeof(addr);
+ resolved_addr.len = static_cast<socklen_t>(sizeof(addr));
r = accept(svr_fd, reinterpret_cast<struct sockaddr*>(addr),
reinterpret_cast<socklen_t*>(&resolved_addr.len));
} while (r == -1 && errno == EINTR);
@@ -147,7 +147,7 @@ void test_fails(void) {
gpr_log(GPR_DEBUG, "test_fails");
memset(&resolved_addr, 0, sizeof(resolved_addr));
- resolved_addr.len = sizeof(struct sockaddr_in);
+ resolved_addr.len = static_cast<socklen_t>(sizeof(struct sockaddr_in));
addr->sin_family = AF_INET;
gpr_mu_lock(g_mu);
diff --git a/test/core/iomgr/tcp_server_posix_test.cc b/test/core/iomgr/tcp_server_posix_test.cc
index dde77da547..d646df1dae 100644
--- a/test/core/iomgr/tcp_server_posix_test.cc
+++ b/test/core/iomgr/tcp_server_posix_test.cc
@@ -188,7 +188,7 @@ static void test_no_op_with_port(void) {
LOG_TEST("test_no_op_with_port");
memset(&resolved_addr, 0, sizeof(resolved_addr));
- resolved_addr.len = sizeof(struct sockaddr_in);
+ resolved_addr.len = static_cast<socklen_t>(sizeof(struct sockaddr_in));
addr->sin_family = AF_INET;
int port = -1;
GPR_ASSERT(grpc_tcp_server_add_port(s, &resolved_addr, &port) ==
@@ -209,7 +209,7 @@ static void test_no_op_with_port_and_start(void) {
int port = -1;
memset(&resolved_addr, 0, sizeof(resolved_addr));
- resolved_addr.len = sizeof(struct sockaddr_in);
+ resolved_addr.len = static_cast<socklen_t>(sizeof(struct sockaddr_in));
addr->sin_family = AF_INET;
GPR_ASSERT(grpc_tcp_server_add_port(s, &resolved_addr, &port) ==
GRPC_ERROR_NONE &&
@@ -314,8 +314,8 @@ static void test_connect(size_t num_connects,
dst_addrs != nullptr ? "<specific>" : "::", test_dst_addrs);
memset(&resolved_addr, 0, sizeof(resolved_addr));
memset(&resolved_addr1, 0, sizeof(resolved_addr1));
- resolved_addr.len = sizeof(struct sockaddr_storage);
- resolved_addr1.len = sizeof(struct sockaddr_storage);
+ resolved_addr.len = static_cast<socklen_t>(sizeof(struct sockaddr_storage));
+ resolved_addr1.len = static_cast<socklen_t>(sizeof(struct sockaddr_storage));
addr->ss_family = addr1->ss_family = AF_INET;
GPR_ASSERT(GRPC_LOG_IF_ERROR(
"grpc_tcp_server_add_port",
@@ -387,7 +387,7 @@ static void test_connect(size_t num_connects,
size_t connect_num;
test_addr dst;
GPR_ASSERT(fd >= 0);
- dst.addr.len = sizeof(dst.addr.addr);
+ dst.addr.len = static_cast<socklen_t>(sizeof(dst.addr.addr));
GPR_ASSERT(getsockname(fd, (struct sockaddr*)dst.addr.addr,
(socklen_t*)&dst.addr.len) == 0);
GPR_ASSERT(dst.addr.len <= sizeof(dst.addr.addr));
@@ -460,10 +460,10 @@ int main(int argc, char** argv) {
continue;
} else if (ifa_it->ifa_addr->sa_family == AF_INET) {
dst_addrs->addrs[dst_addrs->naddrs].addr.len =
- sizeof(struct sockaddr_in);
+ static_cast<socklen_t>(sizeof(struct sockaddr_in));
} else if (ifa_it->ifa_addr->sa_family == AF_INET6) {
dst_addrs->addrs[dst_addrs->naddrs].addr.len =
- sizeof(struct sockaddr_in6);
+ static_cast<socklen_t>(sizeof(struct sockaddr_in6));
} else {
continue;
}
diff --git a/test/core/iomgr/timer_heap_test.cc b/test/core/iomgr/timer_heap_test.cc
index 08f5d632e3..ebe5e32f3a 100644
--- a/test/core/iomgr/timer_heap_test.cc
+++ b/test/core/iomgr/timer_heap_test.cc
@@ -18,9 +18,6 @@
#include "src/core/lib/iomgr/port.h"
-// This test only works with the generic timer implementation
-#ifdef GRPC_TIMER_USE_GENERIC
-
#include "src/core/lib/iomgr/timer_heap.h"
#include <stdlib.h>
@@ -299,9 +296,3 @@ int main(int argc, char** argv) {
return 0;
}
-
-#else /* GRPC_TIMER_USE_GENERIC */
-
-int main(int argc, char** argv) { return 1; }
-
-#endif /* GRPC_TIMER_USE_GENERIC */
diff --git a/test/core/iomgr/timer_list_test.cc b/test/core/iomgr/timer_list_test.cc
index deb8c4d87e..b1d919b292 100644
--- a/test/core/iomgr/timer_list_test.cc
+++ b/test/core/iomgr/timer_list_test.cc
@@ -19,8 +19,9 @@
#include "src/core/lib/iomgr/port.h"
// This test only works with the generic timer implementation
-#ifdef GRPC_TIMER_USE_GENERIC
+#ifndef GRPC_CUSTOM_SOCKET
+#include "src/core/lib/iomgr/iomgr_internal.h"
#include "src/core/lib/iomgr/timer.h"
#include <string.h>
@@ -153,15 +154,19 @@ void destruction_test(void) {
int main(int argc, char** argv) {
grpc_test_init(argc, argv);
grpc_core::ExecCtx::GlobalInit();
+ grpc_core::ExecCtx exec_ctx;
+ grpc_determine_iomgr_platform();
+ grpc_iomgr_platform_init();
gpr_set_log_verbosity(GPR_LOG_SEVERITY_DEBUG);
add_test();
destruction_test();
+ grpc_iomgr_platform_shutdown();
grpc_core::ExecCtx::GlobalShutdown();
return 0;
}
-#else /* GRPC_TIMER_USE_GENERIC */
+#else /* GRPC_CUSTOM_SOCKET */
int main(int argc, char** argv) { return 1; }
-#endif /* GRPC_TIMER_USE_GENERIC */
+#endif /* GRPC_CUSTOM_SOCKET */
diff --git a/test/core/iomgr/udp_server_test.cc b/test/core/iomgr/udp_server_test.cc
index 60f293972e..3058e87bea 100644
--- a/test/core/iomgr/udp_server_test.cc
+++ b/test/core/iomgr/udp_server_test.cc
@@ -210,7 +210,7 @@ static void test_no_op_with_port(void) {
LOG_TEST("test_no_op_with_port");
memset(&resolved_addr, 0, sizeof(resolved_addr));
- resolved_addr.len = sizeof(struct sockaddr_in);
+ resolved_addr.len = static_cast<socklen_t>(sizeof(struct sockaddr_in));
addr->sin_family = AF_INET;
GPR_ASSERT(grpc_udp_server_add_port(s, &resolved_addr, rcv_buf_size,
snd_buf_size, &handler_factory));
@@ -241,7 +241,7 @@ static void test_no_op_with_port_and_socket_factory(void) {
LOG_TEST("test_no_op_with_port_and_socket_factory");
memset(&resolved_addr, 0, sizeof(resolved_addr));
- resolved_addr.len = sizeof(struct sockaddr_in);
+ resolved_addr.len = static_cast<socklen_t>(sizeof(struct sockaddr_in));
addr->sin_family = AF_INET;
GPR_ASSERT(grpc_udp_server_add_port(s, &resolved_addr, rcv_buf_size,
snd_buf_size, &handler_factory));
@@ -268,7 +268,7 @@ static void test_no_op_with_port_and_start(void) {
LOG_TEST("test_no_op_with_port_and_start");
memset(&resolved_addr, 0, sizeof(resolved_addr));
- resolved_addr.len = sizeof(struct sockaddr_in);
+ resolved_addr.len = static_cast<socklen_t>(sizeof(struct sockaddr_in));
addr->sin_family = AF_INET;
GPR_ASSERT(grpc_udp_server_add_port(s, &resolved_addr, rcv_buf_size,
snd_buf_size, &handler_factory));
@@ -301,7 +301,7 @@ static void test_receive(int number_of_clients) {
g_number_of_orphan_calls = 0;
memset(&resolved_addr, 0, sizeof(resolved_addr));
- resolved_addr.len = sizeof(struct sockaddr_storage);
+ resolved_addr.len = static_cast<socklen_t>(sizeof(struct sockaddr_storage));
addr->ss_family = AF_INET;
GPR_ASSERT(grpc_udp_server_add_port(s, &resolved_addr, rcv_buf_size,
snd_buf_size, &handler_factory));
diff --git a/test/core/iomgr/wakeup_fd_cv_test.cc b/test/core/iomgr/wakeup_fd_cv_test.cc
index 9bd7c6e47e..f297a569d2 100644
--- a/test/core/iomgr/wakeup_fd_cv_test.cc
+++ b/test/core/iomgr/wakeup_fd_cv_test.cc
@@ -225,7 +225,7 @@ int main(int argc, char** argv) {
grpc_poll_function = &mock_poll;
gpr_mu_init(&poll_mu);
gpr_cv_init(&poll_cv);
-
+ grpc_determine_iomgr_platform();
grpc_iomgr_platform_init();
test_many_fds();
grpc_iomgr_platform_shutdown();
diff --git a/test/core/slice/slice_hash_table_test.cc b/test/core/slice/slice_hash_table_test.cc
index 279b543098..43ddfe9bf2 100644
--- a/test/core/slice/slice_hash_table_test.cc
+++ b/test/core/slice/slice_hash_table_test.cc
@@ -28,6 +28,7 @@
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
+#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/slice/slice_internal.h"
#include "test/core/util/test_config.h"
diff --git a/test/core/slice/slice_test.cc b/test/core/slice/slice_test.cc
index 5a49793a9e..e683c41f31 100644
--- a/test/core/slice/slice_test.cc
+++ b/test/core/slice/slice_test.cc
@@ -16,8 +16,11 @@
*
*/
+#include <grpc/support/port_platform.h>
+
#include <grpc/slice.h>
+#include <inttypes.h>
#include <string.h>
#include <grpc/grpc.h>
diff --git a/test/core/slice/slice_weak_hash_table_test.cc b/test/core/slice/slice_weak_hash_table_test.cc
index 4711d2fd26..b0a243d572 100644
--- a/test/core/slice/slice_weak_hash_table_test.cc
+++ b/test/core/slice/slice_weak_hash_table_test.cc
@@ -28,6 +28,7 @@
#include <grpc/support/string_util.h>
#include "src/core/lib/gpr/useful.h"
+#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/slice/slice_internal.h"
#include "test/core/util/test_config.h"
diff --git a/test/core/surface/concurrent_connectivity_test.cc b/test/core/surface/concurrent_connectivity_test.cc
index c1298b6636..fbc5ec4c54 100644
--- a/test/core/surface/concurrent_connectivity_test.cc
+++ b/test/core/surface/concurrent_connectivity_test.cc
@@ -124,14 +124,13 @@ void bad_server_thread(void* vargs) {
grpc_core::ExecCtx exec_ctx;
grpc_resolved_address resolved_addr;
- struct sockaddr_storage* addr =
- reinterpret_cast<struct sockaddr_storage*>(resolved_addr.addr);
+ grpc_sockaddr* addr = reinterpret_cast<grpc_sockaddr*>(resolved_addr.addr);
int port;
grpc_tcp_server* s;
grpc_error* error = grpc_tcp_server_create(nullptr, nullptr, &s);
GPR_ASSERT(error == GRPC_ERROR_NONE);
memset(&resolved_addr, 0, sizeof(resolved_addr));
- addr->ss_family = AF_INET;
+ addr->sa_family = GRPC_AF_INET;
error = grpc_tcp_server_add_port(s, &resolved_addr, &port);
GPR_ASSERT(GRPC_LOG_IF_ERROR("grpc_tcp_server_add_port", error));
GPR_ASSERT(port > 0);
diff --git a/test/core/surface/public_headers_must_be_c89.c b/test/core/surface/public_headers_must_be_c89.c
index bd4dc0b60e..38a7d7e709 100644
--- a/test/core/surface/public_headers_must_be_c89.c
+++ b/test/core/surface/public_headers_must_be_c89.c
@@ -141,6 +141,9 @@ int main(int argc, char **argv) {
printf("%lx", (unsigned long) grpc_auth_context_add_property);
printf("%lx", (unsigned long) grpc_auth_context_add_cstring_property);
printf("%lx", (unsigned long) grpc_auth_context_set_peer_identity_property_name);
+ printf("%lx", (unsigned long) grpc_ssl_session_cache_create_lru);
+ printf("%lx", (unsigned long) grpc_ssl_session_cache_destroy);
+ printf("%lx", (unsigned long) grpc_ssl_session_cache_create_channel_arg);
printf("%lx", (unsigned long) grpc_channel_credentials_release);
printf("%lx", (unsigned long) grpc_google_default_credentials_create);
printf("%lx", (unsigned long) grpc_set_ssl_roots_override_callback);
diff --git a/test/core/transport/BUILD b/test/core/transport/BUILD
index 2c2d05b9ae..84fb3a1421 100644
--- a/test/core/transport/BUILD
+++ b/test/core/transport/BUILD
@@ -43,6 +43,9 @@ grpc_cc_test(
"//test/core/util:gpr_test_util",
"//test/core/util:grpc_test_util",
],
+ external_deps = [
+ "gtest",
+ ],
)
grpc_cc_test(
diff --git a/test/core/transport/byte_stream_test.cc b/test/core/transport/byte_stream_test.cc
index 6947d50976..df09637249 100644
--- a/test/core/transport/byte_stream_test.cc
+++ b/test/core/transport/byte_stream_test.cc
@@ -23,20 +23,23 @@
#include <grpc/support/log.h>
#include "src/core/lib/gpr/useful.h"
+#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/slice/slice_internal.h"
#include "test/core/util/test_config.h"
+#include <gtest/gtest.h>
+
+namespace grpc_core {
+namespace {
+
//
-// grpc_slice_buffer_stream tests
+// SliceBufferByteStream tests
//
-static void not_called_closure(void* arg, grpc_error* error) {
- GPR_ASSERT(false);
-}
+void NotCalledClosure(void* arg, grpc_error* error) { GPR_ASSERT(false); }
-static void test_slice_buffer_stream_basic(void) {
- gpr_log(GPR_DEBUG, "test_slice_buffer_stream_basic");
+TEST(SliceBufferByteStream, Basic) {
grpc_core::ExecCtx exec_ctx;
// Create and populate slice buffer.
grpc_slice_buffer buffer;
@@ -49,28 +52,26 @@ static void test_slice_buffer_stream_basic(void) {
grpc_slice_buffer_add(&buffer, input[i]);
}
// Create byte stream.
- grpc_slice_buffer_stream stream;
- grpc_slice_buffer_stream_init(&stream, &buffer, 0);
- GPR_ASSERT(stream.base.length == 6);
+ SliceBufferByteStream stream(&buffer, 0);
+ grpc_slice_buffer_destroy_internal(&buffer);
+ EXPECT_EQ(6U, stream.length());
grpc_closure closure;
- GRPC_CLOSURE_INIT(&closure, not_called_closure, nullptr,
+ GRPC_CLOSURE_INIT(&closure, NotCalledClosure, nullptr,
grpc_schedule_on_exec_ctx);
- // Read each slice. Note that next() always returns synchronously.
+ // Read each slice. Note that Next() always returns synchronously.
for (size_t i = 0; i < GPR_ARRAY_SIZE(input); ++i) {
- GPR_ASSERT(grpc_byte_stream_next(&stream.base, ~(size_t)0, &closure));
+ ASSERT_TRUE(stream.Next(~(size_t)0, &closure));
grpc_slice output;
- grpc_error* error = grpc_byte_stream_pull(&stream.base, &output);
- GPR_ASSERT(error == GRPC_ERROR_NONE);
- GPR_ASSERT(grpc_slice_eq(input[i], output));
+ grpc_error* error = stream.Pull(&output);
+ EXPECT_TRUE(error == GRPC_ERROR_NONE);
+ EXPECT_TRUE(grpc_slice_eq(input[i], output));
grpc_slice_unref_internal(output);
}
// Clean up.
- grpc_byte_stream_destroy(&stream.base);
- grpc_slice_buffer_destroy_internal(&buffer);
+ stream.Orphan();
}
-static void test_slice_buffer_stream_shutdown(void) {
- gpr_log(GPR_DEBUG, "test_slice_buffer_stream_shutdown");
+TEST(SliceBufferByteStream, Shutdown) {
grpc_core::ExecCtx exec_ctx;
// Create and populate slice buffer.
grpc_slice_buffer buffer;
@@ -83,40 +84,38 @@ static void test_slice_buffer_stream_shutdown(void) {
grpc_slice_buffer_add(&buffer, input[i]);
}
// Create byte stream.
- grpc_slice_buffer_stream stream;
- grpc_slice_buffer_stream_init(&stream, &buffer, 0);
- GPR_ASSERT(stream.base.length == 6);
+ SliceBufferByteStream stream(&buffer, 0);
+ grpc_slice_buffer_destroy_internal(&buffer);
+ EXPECT_EQ(6U, stream.length());
grpc_closure closure;
- GRPC_CLOSURE_INIT(&closure, not_called_closure, nullptr,
+ GRPC_CLOSURE_INIT(&closure, NotCalledClosure, nullptr,
grpc_schedule_on_exec_ctx);
// Read the first slice.
- GPR_ASSERT(grpc_byte_stream_next(&stream.base, ~(size_t)0, &closure));
+ ASSERT_TRUE(stream.Next(~(size_t)0, &closure));
grpc_slice output;
- grpc_error* error = grpc_byte_stream_pull(&stream.base, &output);
- GPR_ASSERT(error == GRPC_ERROR_NONE);
- GPR_ASSERT(grpc_slice_eq(input[0], output));
+ grpc_error* error = stream.Pull(&output);
+ EXPECT_TRUE(error == GRPC_ERROR_NONE);
+ EXPECT_TRUE(grpc_slice_eq(input[0], output));
grpc_slice_unref_internal(output);
// Now shutdown.
grpc_error* shutdown_error =
GRPC_ERROR_CREATE_FROM_STATIC_STRING("shutdown error");
- grpc_byte_stream_shutdown(&stream.base, GRPC_ERROR_REF(shutdown_error));
+ stream.Shutdown(GRPC_ERROR_REF(shutdown_error));
// After shutdown, the next pull() should return the error.
- GPR_ASSERT(grpc_byte_stream_next(&stream.base, ~(size_t)0, &closure));
- error = grpc_byte_stream_pull(&stream.base, &output);
- GPR_ASSERT(error == shutdown_error);
+ ASSERT_TRUE(stream.Next(~(size_t)0, &closure));
+ error = stream.Pull(&output);
+ EXPECT_TRUE(error == shutdown_error);
GRPC_ERROR_UNREF(error);
GRPC_ERROR_UNREF(shutdown_error);
// Clean up.
- grpc_byte_stream_destroy(&stream.base);
- grpc_slice_buffer_destroy_internal(&buffer);
+ stream.Orphan();
}
//
-// grpc_caching_byte_stream tests
+// CachingByteStream tests
//
-static void test_caching_byte_stream_basic(void) {
- gpr_log(GPR_DEBUG, "test_caching_byte_stream_basic");
+TEST(CachingByteStream, Basic) {
grpc_core::ExecCtx exec_ctx;
// Create and populate slice buffer byte stream.
grpc_slice_buffer buffer;
@@ -128,34 +127,30 @@ static void test_caching_byte_stream_basic(void) {
for (size_t i = 0; i < GPR_ARRAY_SIZE(input); ++i) {
grpc_slice_buffer_add(&buffer, input[i]);
}
- grpc_slice_buffer_stream underlying_stream;
- grpc_slice_buffer_stream_init(&underlying_stream, &buffer, 0);
+ SliceBufferByteStream underlying_stream(&buffer, 0);
+ grpc_slice_buffer_destroy_internal(&buffer);
// Create cache and caching stream.
- grpc_byte_stream_cache cache;
- grpc_byte_stream_cache_init(&cache, &underlying_stream.base);
- grpc_caching_byte_stream stream;
- grpc_caching_byte_stream_init(&stream, &cache);
+ ByteStreamCache cache((OrphanablePtr<ByteStream>(&underlying_stream)));
+ ByteStreamCache::CachingByteStream stream(&cache);
grpc_closure closure;
- GRPC_CLOSURE_INIT(&closure, not_called_closure, nullptr,
+ GRPC_CLOSURE_INIT(&closure, NotCalledClosure, nullptr,
grpc_schedule_on_exec_ctx);
// Read each slice. Note that next() always returns synchronously,
// because the underlying byte stream always does.
for (size_t i = 0; i < GPR_ARRAY_SIZE(input); ++i) {
- GPR_ASSERT(grpc_byte_stream_next(&stream.base, ~(size_t)0, &closure));
+ ASSERT_TRUE(stream.Next(~(size_t)0, &closure));
grpc_slice output;
- grpc_error* error = grpc_byte_stream_pull(&stream.base, &output);
- GPR_ASSERT(error == GRPC_ERROR_NONE);
- GPR_ASSERT(grpc_slice_eq(input[i], output));
+ grpc_error* error = stream.Pull(&output);
+ EXPECT_TRUE(error == GRPC_ERROR_NONE);
+ EXPECT_TRUE(grpc_slice_eq(input[i], output));
grpc_slice_unref_internal(output);
}
// Clean up.
- grpc_byte_stream_destroy(&stream.base);
- grpc_byte_stream_cache_destroy(&cache);
- grpc_slice_buffer_destroy_internal(&buffer);
+ stream.Orphan();
+ cache.Destroy();
}
-static void test_caching_byte_stream_reset(void) {
- gpr_log(GPR_DEBUG, "test_caching_byte_stream_reset");
+TEST(CachingByteStream, Reset) {
grpc_core::ExecCtx exec_ctx;
// Create and populate slice buffer byte stream.
grpc_slice_buffer buffer;
@@ -167,41 +162,37 @@ static void test_caching_byte_stream_reset(void) {
for (size_t i = 0; i < GPR_ARRAY_SIZE(input); ++i) {
grpc_slice_buffer_add(&buffer, input[i]);
}
- grpc_slice_buffer_stream underlying_stream;
- grpc_slice_buffer_stream_init(&underlying_stream, &buffer, 0);
+ SliceBufferByteStream underlying_stream(&buffer, 0);
+ grpc_slice_buffer_destroy_internal(&buffer);
// Create cache and caching stream.
- grpc_byte_stream_cache cache;
- grpc_byte_stream_cache_init(&cache, &underlying_stream.base);
- grpc_caching_byte_stream stream;
- grpc_caching_byte_stream_init(&stream, &cache);
+ ByteStreamCache cache((OrphanablePtr<ByteStream>(&underlying_stream)));
+ ByteStreamCache::CachingByteStream stream(&cache);
grpc_closure closure;
- GRPC_CLOSURE_INIT(&closure, not_called_closure, nullptr,
+ GRPC_CLOSURE_INIT(&closure, NotCalledClosure, nullptr,
grpc_schedule_on_exec_ctx);
// Read one slice.
- GPR_ASSERT(grpc_byte_stream_next(&stream.base, ~(size_t)0, &closure));
+ ASSERT_TRUE(stream.Next(~(size_t)0, &closure));
grpc_slice output;
- grpc_error* error = grpc_byte_stream_pull(&stream.base, &output);
- GPR_ASSERT(error == GRPC_ERROR_NONE);
- GPR_ASSERT(grpc_slice_eq(input[0], output));
+ grpc_error* error = stream.Pull(&output);
+ EXPECT_TRUE(error == GRPC_ERROR_NONE);
+ EXPECT_TRUE(grpc_slice_eq(input[0], output));
grpc_slice_unref_internal(output);
// Reset the caching stream. The reads should start over from the
// first slice.
- grpc_caching_byte_stream_reset(&stream);
+ stream.Reset();
for (size_t i = 0; i < GPR_ARRAY_SIZE(input); ++i) {
- GPR_ASSERT(grpc_byte_stream_next(&stream.base, ~(size_t)0, &closure));
- error = grpc_byte_stream_pull(&stream.base, &output);
- GPR_ASSERT(error == GRPC_ERROR_NONE);
- GPR_ASSERT(grpc_slice_eq(input[i], output));
+ ASSERT_TRUE(stream.Next(~(size_t)0, &closure));
+ error = stream.Pull(&output);
+ EXPECT_TRUE(error == GRPC_ERROR_NONE);
+ EXPECT_TRUE(grpc_slice_eq(input[i], output));
grpc_slice_unref_internal(output);
}
// Clean up.
- grpc_byte_stream_destroy(&stream.base);
- grpc_byte_stream_cache_destroy(&cache);
- grpc_slice_buffer_destroy_internal(&buffer);
+ stream.Orphan();
+ cache.Destroy();
}
-static void test_caching_byte_stream_shared_cache(void) {
- gpr_log(GPR_DEBUG, "test_caching_byte_stream_shared_cache");
+TEST(CachingByteStream, SharedCache) {
grpc_core::ExecCtx exec_ctx;
// Create and populate slice buffer byte stream.
grpc_slice_buffer buffer;
@@ -213,54 +204,50 @@ static void test_caching_byte_stream_shared_cache(void) {
for (size_t i = 0; i < GPR_ARRAY_SIZE(input); ++i) {
grpc_slice_buffer_add(&buffer, input[i]);
}
- grpc_slice_buffer_stream underlying_stream;
- grpc_slice_buffer_stream_init(&underlying_stream, &buffer, 0);
+ SliceBufferByteStream underlying_stream(&buffer, 0);
+ grpc_slice_buffer_destroy_internal(&buffer);
// Create cache and two caching streams.
- grpc_byte_stream_cache cache;
- grpc_byte_stream_cache_init(&cache, &underlying_stream.base);
- grpc_caching_byte_stream stream1;
- grpc_caching_byte_stream_init(&stream1, &cache);
- grpc_caching_byte_stream stream2;
- grpc_caching_byte_stream_init(&stream2, &cache);
+ ByteStreamCache cache((OrphanablePtr<ByteStream>(&underlying_stream)));
+ ByteStreamCache::CachingByteStream stream1(&cache);
+ ByteStreamCache::CachingByteStream stream2(&cache);
grpc_closure closure;
- GRPC_CLOSURE_INIT(&closure, not_called_closure, nullptr,
+ GRPC_CLOSURE_INIT(&closure, NotCalledClosure, nullptr,
grpc_schedule_on_exec_ctx);
// Read one slice from stream1.
- GPR_ASSERT(grpc_byte_stream_next(&stream1.base, ~(size_t)0, &closure));
+ EXPECT_TRUE(stream1.Next(~(size_t)0, &closure));
grpc_slice output;
- grpc_error* error = grpc_byte_stream_pull(&stream1.base, &output);
- GPR_ASSERT(error == GRPC_ERROR_NONE);
- GPR_ASSERT(grpc_slice_eq(input[0], output));
+ grpc_error* error = stream1.Pull(&output);
+ EXPECT_TRUE(error == GRPC_ERROR_NONE);
+ EXPECT_TRUE(grpc_slice_eq(input[0], output));
grpc_slice_unref_internal(output);
// Read all slices from stream2.
for (size_t i = 0; i < GPR_ARRAY_SIZE(input); ++i) {
- GPR_ASSERT(grpc_byte_stream_next(&stream2.base, ~(size_t)0, &closure));
- error = grpc_byte_stream_pull(&stream2.base, &output);
- GPR_ASSERT(error == GRPC_ERROR_NONE);
- GPR_ASSERT(grpc_slice_eq(input[i], output));
+ EXPECT_TRUE(stream2.Next(~(size_t)0, &closure));
+ error = stream2.Pull(&output);
+ EXPECT_TRUE(error == GRPC_ERROR_NONE);
+ EXPECT_TRUE(grpc_slice_eq(input[i], output));
grpc_slice_unref_internal(output);
}
// Now read the second slice from stream1.
- GPR_ASSERT(grpc_byte_stream_next(&stream1.base, ~(size_t)0, &closure));
- error = grpc_byte_stream_pull(&stream1.base, &output);
- GPR_ASSERT(error == GRPC_ERROR_NONE);
- GPR_ASSERT(grpc_slice_eq(input[1], output));
+ EXPECT_TRUE(stream1.Next(~(size_t)0, &closure));
+ error = stream1.Pull(&output);
+ EXPECT_TRUE(error == GRPC_ERROR_NONE);
+ EXPECT_TRUE(grpc_slice_eq(input[1], output));
grpc_slice_unref_internal(output);
// Clean up.
- grpc_byte_stream_destroy(&stream1.base);
- grpc_byte_stream_destroy(&stream2.base);
- grpc_byte_stream_cache_destroy(&cache);
- grpc_slice_buffer_destroy_internal(&buffer);
+ stream1.Orphan();
+ stream2.Orphan();
+ cache.Destroy();
}
+} // namespace
+} // namespace grpc_core
+
int main(int argc, char** argv) {
grpc_init();
grpc_test_init(argc, argv);
- test_slice_buffer_stream_basic();
- test_slice_buffer_stream_shutdown();
- test_caching_byte_stream_basic();
- test_caching_byte_stream_reset();
- test_caching_byte_stream_shared_cache();
+ ::testing::InitGoogleTest(&argc, argv);
+ int retval = RUN_ALL_TESTS();
grpc_shutdown();
- return 0;
+ return retval;
}
diff --git a/test/core/transport/chttp2/bin_decoder_test.cc b/test/core/transport/chttp2/bin_decoder_test.cc
index 751dd90c8c..b4b07986a3 100644
--- a/test/core/transport/chttp2/bin_decoder_test.cc
+++ b/test/core/transport/chttp2/bin_decoder_test.cc
@@ -25,6 +25,7 @@
#include <grpc/support/log.h>
#include "src/core/ext/transport/chttp2/transport/bin_encoder.h"
#include "src/core/lib/gpr/string.h"
+#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/lib/slice/slice_string_helpers.h"
diff --git a/test/core/transport/chttp2/hpack_parser_fuzzer_test.cc b/test/core/transport/chttp2/hpack_parser_fuzzer_test.cc
index 9a195daee0..a8eec1eefd 100644
--- a/test/core/transport/chttp2/hpack_parser_fuzzer_test.cc
+++ b/test/core/transport/chttp2/hpack_parser_fuzzer_test.cc
@@ -24,6 +24,7 @@
#include <grpc/support/log.h>
#include "src/core/ext/transport/chttp2/transport/hpack_parser.h"
+#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/slice/slice_internal.h"
bool squelch = true;
diff --git a/test/core/transport/chttp2/hpack_parser_test.cc b/test/core/transport/chttp2/hpack_parser_test.cc
index 9d3456a873..43b6c79e8a 100644
--- a/test/core/transport/chttp2/hpack_parser_test.cc
+++ b/test/core/transport/chttp2/hpack_parser_test.cc
@@ -24,6 +24,8 @@
#include <grpc/slice.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
+
+#include "src/core/lib/iomgr/exec_ctx.h"
#include "test/core/util/parse_hexstring.h"
#include "test/core/util/slice_splitter.h"
#include "test/core/util/test_config.h"
diff --git a/test/core/transport/chttp2/hpack_table_test.cc b/test/core/transport/chttp2/hpack_table_test.cc
index e316cf63a0..3ab463b631 100644
--- a/test/core/transport/chttp2/hpack_table_test.cc
+++ b/test/core/transport/chttp2/hpack_table_test.cc
@@ -27,6 +27,7 @@
#include <grpc/support/string_util.h>
#include "src/core/lib/gpr/string.h"
+#include "src/core/lib/iomgr/exec_ctx.h"
#include "test/core/util/test_config.h"
#define LOG_TEST(x) gpr_log(GPR_INFO, "%s", x)
diff --git a/test/core/transport/connectivity_state_test.cc b/test/core/transport/connectivity_state_test.cc
index f5894599e5..cbd6318f52 100644
--- a/test/core/transport/connectivity_state_test.cc
+++ b/test/core/transport/connectivity_state_test.cc
@@ -22,6 +22,7 @@
#include <grpc/support/log.h>
+#include "src/core/lib/iomgr/exec_ctx.h"
#include "test/core/util/test_config.h"
#include "test/core/util/tracer_util.h"
diff --git a/test/core/transport/metadata_test.cc b/test/core/transport/metadata_test.cc
index 786df97285..4be34f72d9 100644
--- a/test/core/transport/metadata_test.cc
+++ b/test/core/transport/metadata_test.cc
@@ -28,6 +28,7 @@
#include "src/core/ext/transport/chttp2/transport/bin_encoder.h"
#include "src/core/lib/gpr/string.h"
+#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/lib/transport/static_metadata.h"
#include "test/core/util/test_config.h"
diff --git a/test/core/tsi/BUILD b/test/core/tsi/BUILD
index 8ac3e7687c..ae6e8fdc32 100644
--- a/test/core/tsi/BUILD
+++ b/test/core/tsi/BUILD
@@ -41,6 +41,20 @@ grpc_cc_test(
],
)
+grpc_cc_test(
+ name = "ssl_session_cache_test",
+ srcs = ["ssl_session_cache_test.cc"],
+ language = "C++",
+ external_deps = [
+ "gtest",
+ ],
+ deps = [
+ "//:grpc",
+ "//:gpr",
+ "//:tsi",
+ "//test/core/util:gpr_test_util",
+ ],
+)
grpc_cc_test(
name = "ssl_transport_security_test",
diff --git a/test/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_test.cc b/test/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_test.cc
index fbbea71cb7..b763f19d50 100644
--- a/test/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_test.cc
+++ b/test/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_test.cc
@@ -19,6 +19,7 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
+#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_integrity_only_record_protocol.h"
#include "src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_privacy_integrity_record_protocol.h"
diff --git a/test/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector_test.cc b/test/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector_test.cc
index 2388be95cd..32159e22f2 100644
--- a/test/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector_test.cc
+++ b/test/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector_test.cc
@@ -20,6 +20,7 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
+#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/tsi/alts/crypt/gsec.h"
#include "src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.h"
diff --git a/test/core/tsi/ssl_session_cache_test.cc b/test/core/tsi/ssl_session_cache_test.cc
new file mode 100644
index 0000000000..72df0e545c
--- /dev/null
+++ b/test/core/tsi/ssl_session_cache_test.cc
@@ -0,0 +1,154 @@
+/*
+ *
+ * Copyright 2018 gRPC authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <string>
+#include <unordered_set>
+
+#include "src/core/tsi/ssl/session_cache/ssl_session_cache.h"
+#include "test/core/util/test_config.h"
+
+#include <grpc/grpc.h>
+#include <grpc/support/log.h>
+#include <gtest/gtest.h>
+
+namespace grpc_core {
+
+namespace {
+
+class SessionTracker;
+
+struct SessionExDataId {
+ SessionTracker* tracker;
+ long id;
+};
+
+class SessionTracker {
+ public:
+ SessionTracker() { ssl_context_ = SSL_CTX_new(TLSv1_2_method()); }
+
+ ~SessionTracker() { SSL_CTX_free(ssl_context_); }
+
+ tsi::SslSessionPtr NewSession(long id) {
+ static int ex_data_id = SSL_SESSION_get_ex_new_index(
+ 0, nullptr, nullptr, nullptr, DestroyExData);
+ GPR_ASSERT(ex_data_id != -1);
+ // OpenSSL and different version of BoringSSL don't agree on API
+ // so try both.
+ tsi::SslSessionPtr session = NewSessionInternal(SSL_SESSION_new);
+ SessionExDataId* data = new SessionExDataId{this, id};
+ int result = SSL_SESSION_set_ex_data(session.get(), ex_data_id, data);
+ EXPECT_EQ(result, 1);
+ alive_sessions_.insert(id);
+ return session;
+ }
+
+ bool IsAlive(long id) const {
+ return alive_sessions_.find(id) != alive_sessions_.end();
+ }
+
+ size_t AliveCount() const { return alive_sessions_.size(); }
+
+ private:
+ tsi::SslSessionPtr NewSessionInternal(SSL_SESSION* (*cb)()) {
+ return tsi::SslSessionPtr(cb());
+ }
+
+ tsi::SslSessionPtr NewSessionInternal(SSL_SESSION* (*cb)(const SSL_CTX*)) {
+ return tsi::SslSessionPtr(cb(ssl_context_));
+ }
+
+ static void DestroyExData(void* parent, void* ptr, CRYPTO_EX_DATA* ad,
+ int index, long argl, void* argp) {
+ SessionExDataId* data = static_cast<SessionExDataId*>(ptr);
+ data->tracker->alive_sessions_.erase(data->id);
+ delete data;
+ }
+
+ SSL_CTX* ssl_context_;
+ std::unordered_set<long> alive_sessions_;
+};
+
+TEST(SslSessionCacheTest, InitialState) {
+ SessionTracker tracker;
+ // Verify session initial state.
+ {
+ tsi::SslSessionPtr tmp_sess = tracker.NewSession(1);
+ EXPECT_EQ(tmp_sess->references, 1);
+ EXPECT_TRUE(tracker.IsAlive(1));
+ EXPECT_EQ(tracker.AliveCount(), 1);
+ }
+ EXPECT_FALSE(tracker.IsAlive(1));
+ EXPECT_EQ(tracker.AliveCount(), 0);
+}
+
+TEST(SslSessionCacheTest, LruCache) {
+ SessionTracker tracker;
+ {
+ RefCountedPtr<tsi::SslSessionLRUCache> cache =
+ tsi::SslSessionLRUCache::Create(3);
+ tsi::SslSessionPtr sess2 = tracker.NewSession(2);
+ SSL_SESSION* sess2_ptr = sess2.get();
+ cache->Put("first.dropbox.com", std::move(sess2));
+ EXPECT_EQ(cache->Get("first.dropbox.com").get(), sess2_ptr);
+ EXPECT_TRUE(tracker.IsAlive(2));
+ EXPECT_EQ(tracker.AliveCount(), 1);
+ // Putting element with the same key destroys old session.
+ tsi::SslSessionPtr sess3 = tracker.NewSession(3);
+ SSL_SESSION* sess3_ptr = sess3.get();
+ cache->Put("first.dropbox.com", std::move(sess3));
+ EXPECT_FALSE(tracker.IsAlive(2));
+ EXPECT_EQ(cache->Get("first.dropbox.com").get(), sess3_ptr);
+ EXPECT_TRUE(tracker.IsAlive(3));
+ EXPECT_EQ(tracker.AliveCount(), 1);
+ // Putting three more elements discards current one.
+ for (long id = 4; id < 7; id++) {
+ EXPECT_TRUE(tracker.IsAlive(3));
+ std::string domain = std::to_string(id) + ".random.domain";
+ cache->Put(domain.c_str(), tracker.NewSession(id));
+ }
+ EXPECT_EQ(cache->Size(), 3);
+ EXPECT_FALSE(tracker.IsAlive(3));
+ EXPECT_EQ(tracker.AliveCount(), 3);
+ // Accessing element moves it into front of the queue.
+ EXPECT_TRUE(cache->Get("4.random.domain"));
+ EXPECT_TRUE(tracker.IsAlive(4));
+ EXPECT_TRUE(tracker.IsAlive(5));
+ EXPECT_TRUE(tracker.IsAlive(6));
+ // One element has to be evicted from cache->
+ cache->Put("7.random.domain", tracker.NewSession(7));
+ EXPECT_TRUE(tracker.IsAlive(4));
+ EXPECT_FALSE(tracker.IsAlive(5));
+ EXPECT_TRUE(tracker.IsAlive(6));
+ EXPECT_TRUE(tracker.IsAlive(7));
+ EXPECT_EQ(tracker.AliveCount(), 3);
+ }
+ // Cache destructor destroys all sessions.
+ EXPECT_EQ(tracker.AliveCount(), 0);
+}
+
+} // namespace
+} // namespace grpc_core
+
+int main(int argc, char** argv) {
+ ::testing::InitGoogleTest(&argc, argv);
+ grpc_test_init(argc, argv);
+ grpc_init();
+ int ret = RUN_ALL_TESTS();
+ grpc_shutdown();
+ return ret;
+}
diff --git a/test/core/tsi/ssl_transport_security_test.cc b/test/core/tsi/ssl_transport_security_test.cc
index d9eb7470d5..0878c57931 100644
--- a/test/core/tsi/ssl_transport_security_test.cc
+++ b/test/core/tsi/ssl_transport_security_test.cc
@@ -52,8 +52,8 @@ typedef enum AlpnMode {
typedef struct ssl_alpn_lib {
AlpnMode alpn_mode;
- char** server_alpn_protocols;
- char** client_alpn_protocols;
+ const char** server_alpn_protocols;
+ const char** client_alpn_protocols;
uint16_t num_server_alpn_protocols;
uint16_t num_client_alpn_protocols;
} ssl_alpn_lib;
@@ -76,6 +76,10 @@ typedef struct ssl_tsi_test_fixture {
ssl_alpn_lib* alpn_lib;
bool force_client_auth;
char* server_name_indication;
+ tsi_ssl_session_cache* session_cache;
+ bool session_reused;
+ const char* session_ticket_key;
+ size_t session_ticket_key_size;
tsi_ssl_server_handshaker_factory* server_handshaker_factory;
tsi_ssl_client_handshaker_factory* client_handshaker_factory;
} ssl_tsi_test_fixture;
@@ -89,47 +93,60 @@ static void ssl_test_setup_handshakers(tsi_test_fixture* fixture) {
ssl_key_cert_lib* key_cert_lib = ssl_fixture->key_cert_lib;
ssl_alpn_lib* alpn_lib = ssl_fixture->alpn_lib;
/* Create client handshaker factory. */
- tsi_ssl_pem_key_cert_pair* client_key_cert_pair = nullptr;
+ tsi_ssl_client_handshaker_options client_options;
+ memset(&client_options, 0, sizeof(client_options));
+ client_options.pem_root_certs = key_cert_lib->root_cert;
if (ssl_fixture->force_client_auth) {
- client_key_cert_pair = key_cert_lib->use_bad_client_cert
- ? &key_cert_lib->bad_client_pem_key_cert_pair
- : &key_cert_lib->client_pem_key_cert_pair;
+ client_options.pem_key_cert_pair =
+ key_cert_lib->use_bad_client_cert
+ ? &key_cert_lib->bad_client_pem_key_cert_pair
+ : &key_cert_lib->client_pem_key_cert_pair;
}
- char** client_alpn_protocols = nullptr;
- uint16_t num_client_alpn_protocols = 0;
if (alpn_lib->alpn_mode == ALPN_CLIENT_NO_SERVER ||
alpn_lib->alpn_mode == ALPN_CLIENT_SERVER_OK ||
alpn_lib->alpn_mode == ALPN_CLIENT_SERVER_MISMATCH) {
- client_alpn_protocols = alpn_lib->client_alpn_protocols;
- num_client_alpn_protocols = alpn_lib->num_client_alpn_protocols;
+ client_options.alpn_protocols = alpn_lib->client_alpn_protocols;
+ client_options.num_alpn_protocols = alpn_lib->num_client_alpn_protocols;
}
- GPR_ASSERT(tsi_create_ssl_client_handshaker_factory(
- client_key_cert_pair, key_cert_lib->root_cert, nullptr,
- (const char**)client_alpn_protocols, num_client_alpn_protocols,
- &ssl_fixture->client_handshaker_factory) == TSI_OK);
+ if (ssl_fixture->session_cache != nullptr) {
+ client_options.session_cache = ssl_fixture->session_cache;
+ }
+ GPR_ASSERT(tsi_create_ssl_client_handshaker_factory_with_options(
+ &client_options, &ssl_fixture->client_handshaker_factory) ==
+ TSI_OK);
/* Create server handshaker factory. */
- char** server_alpn_protocols = nullptr;
- uint16_t num_server_alpn_protocols = 0;
+ tsi_ssl_server_handshaker_options server_options;
+ memset(&server_options, 0, sizeof(server_options));
if (alpn_lib->alpn_mode == ALPN_SERVER_NO_CLIENT ||
alpn_lib->alpn_mode == ALPN_CLIENT_SERVER_OK ||
alpn_lib->alpn_mode == ALPN_CLIENT_SERVER_MISMATCH) {
- server_alpn_protocols = alpn_lib->server_alpn_protocols;
- num_server_alpn_protocols = alpn_lib->num_server_alpn_protocols;
+ server_options.alpn_protocols = alpn_lib->server_alpn_protocols;
+ server_options.num_alpn_protocols = alpn_lib->num_server_alpn_protocols;
if (alpn_lib->alpn_mode == ALPN_CLIENT_SERVER_MISMATCH) {
- num_server_alpn_protocols--;
+ server_options.num_alpn_protocols--;
}
}
- GPR_ASSERT(tsi_create_ssl_server_handshaker_factory(
- key_cert_lib->use_bad_server_cert
- ? key_cert_lib->bad_server_pem_key_cert_pairs
- : key_cert_lib->server_pem_key_cert_pairs,
- key_cert_lib->use_bad_server_cert
- ? key_cert_lib->bad_server_num_key_cert_pairs
- : key_cert_lib->server_num_key_cert_pairs,
- key_cert_lib->root_cert, ssl_fixture->force_client_auth,
- nullptr, (const char**)server_alpn_protocols,
- num_server_alpn_protocols,
- &ssl_fixture->server_handshaker_factory) == TSI_OK);
+ server_options.pem_key_cert_pairs =
+ key_cert_lib->use_bad_server_cert
+ ? key_cert_lib->bad_server_pem_key_cert_pairs
+ : key_cert_lib->server_pem_key_cert_pairs;
+ server_options.num_key_cert_pairs =
+ key_cert_lib->use_bad_server_cert
+ ? key_cert_lib->bad_server_num_key_cert_pairs
+ : key_cert_lib->server_num_key_cert_pairs;
+ server_options.pem_client_root_certs = key_cert_lib->root_cert;
+ if (ssl_fixture->force_client_auth) {
+ server_options.client_certificate_request =
+ TSI_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY;
+ } else {
+ server_options.client_certificate_request =
+ TSI_DONT_REQUEST_CLIENT_CERTIFICATE;
+ }
+ server_options.session_ticket_key = ssl_fixture->session_ticket_key;
+ server_options.session_ticket_key_size = ssl_fixture->session_ticket_key_size;
+ GPR_ASSERT(tsi_create_ssl_server_handshaker_factory_with_options(
+ &server_options, &ssl_fixture->server_handshaker_factory) ==
+ TSI_OK);
/* Create server and client handshakers. */
tsi_handshaker* client_handshaker = nullptr;
GPR_ASSERT(tsi_ssl_client_handshaker_factory_create_handshaker(
@@ -176,6 +193,18 @@ check_basic_authenticated_peer_and_get_common_name(const tsi_peer* peer) {
return property;
}
+static void check_session_reusage(ssl_tsi_test_fixture* ssl_fixture,
+ tsi_peer* peer) {
+ const tsi_peer_property* session_reused =
+ tsi_peer_get_property_by_name(peer, TSI_SSL_SESSION_REUSED_PEER_PROPERTY);
+ GPR_ASSERT(session_reused != nullptr);
+ if (ssl_fixture->session_reused) {
+ GPR_ASSERT(strcmp(session_reused->value.data, "true") == 0);
+ } else {
+ GPR_ASSERT(strcmp(session_reused->value.data, "false") == 0);
+ }
+}
+
void check_server0_peer(tsi_peer* peer) {
const tsi_peer_property* property =
check_basic_authenticated_peer_and_get_common_name(peer);
@@ -233,7 +262,7 @@ static void check_client_peer(ssl_tsi_test_fixture* ssl_fixture,
ssl_alpn_lib* alpn_lib = ssl_fixture->alpn_lib;
if (!ssl_fixture->force_client_auth) {
GPR_ASSERT(peer->property_count ==
- (alpn_lib->alpn_mode == ALPN_CLIENT_SERVER_OK ? 1 : 0));
+ (alpn_lib->alpn_mode == ALPN_CLIENT_SERVER_OK ? 2 : 1));
} else {
const tsi_peer_property* property =
check_basic_authenticated_peer_and_get_common_name(peer);
@@ -257,8 +286,8 @@ static void ssl_test_check_handshaker_peers(tsi_test_fixture* fixture) {
if (expect_success) {
GPR_ASSERT(tsi_handshaker_result_extract_peer(
ssl_fixture->base.client_result, &peer) == TSI_OK);
+ check_session_reusage(ssl_fixture, &peer);
check_alpn(ssl_fixture, &peer);
-
if (ssl_fixture->server_name_indication != nullptr) {
check_server1_peer(&peer);
} else {
@@ -270,6 +299,7 @@ static void ssl_test_check_handshaker_peers(tsi_test_fixture* fixture) {
if (expect_success) {
GPR_ASSERT(tsi_handshaker_result_extract_peer(
ssl_fixture->base.server_result, &peer) == TSI_OK);
+ check_session_reusage(ssl_fixture, &peer);
check_alpn(ssl_fixture, &peer);
check_client_peer(ssl_fixture, &peer);
} else {
@@ -291,11 +321,11 @@ static void ssl_test_destruct(tsi_test_fixture* fixture) {
/* Destroy ssl_alpn_lib. */
ssl_alpn_lib* alpn_lib = ssl_fixture->alpn_lib;
for (size_t i = 0; i < alpn_lib->num_server_alpn_protocols; i++) {
- gpr_free(alpn_lib->server_alpn_protocols[i]);
+ gpr_free(const_cast<char*>(alpn_lib->server_alpn_protocols[i]));
}
gpr_free(alpn_lib->server_alpn_protocols);
for (size_t i = 0; i < alpn_lib->num_client_alpn_protocols; i++) {
- gpr_free(alpn_lib->client_alpn_protocols[i]);
+ gpr_free(const_cast<char*>(alpn_lib->client_alpn_protocols[i]));
}
gpr_free(alpn_lib->client_alpn_protocols);
gpr_free(alpn_lib);
@@ -316,6 +346,9 @@ static void ssl_test_destruct(tsi_test_fixture* fixture) {
key_cert_lib->bad_client_pem_key_cert_pair);
gpr_free(key_cert_lib->root_cert);
gpr_free(key_cert_lib);
+ if (ssl_fixture->session_cache != nullptr) {
+ tsi_ssl_session_cache_unref(ssl_fixture->session_cache);
+ }
/* Unreference others. */
tsi_ssl_server_handshaker_factory_unref(
ssl_fixture->server_handshaker_factory);
@@ -388,10 +421,10 @@ static tsi_test_fixture* ssl_tsi_test_fixture_create() {
/* Create ssl_alpn_lib. */
ssl_alpn_lib* alpn_lib =
static_cast<ssl_alpn_lib*>(gpr_zalloc(sizeof(*alpn_lib)));
- alpn_lib->server_alpn_protocols =
- static_cast<char**>(gpr_zalloc(sizeof(char*) * SSL_TSI_TEST_ALPN_NUM));
- alpn_lib->client_alpn_protocols =
- static_cast<char**>(gpr_zalloc(sizeof(char*) * SSL_TSI_TEST_ALPN_NUM));
+ alpn_lib->server_alpn_protocols = static_cast<const char**>(
+ gpr_zalloc(sizeof(char*) * SSL_TSI_TEST_ALPN_NUM));
+ alpn_lib->client_alpn_protocols = static_cast<const char**>(
+ gpr_zalloc(sizeof(char*) * SSL_TSI_TEST_ALPN_NUM));
alpn_lib->server_alpn_protocols[0] = gpr_strdup(SSL_TSI_TEST_ALPN1);
alpn_lib->server_alpn_protocols[1] = gpr_strdup(SSL_TSI_TEST_ALPN3);
alpn_lib->client_alpn_protocols[0] = gpr_strdup(SSL_TSI_TEST_ALPN2);
@@ -402,6 +435,9 @@ static tsi_test_fixture* ssl_tsi_test_fixture_create() {
ssl_fixture->alpn_lib = alpn_lib;
ssl_fixture->base.vtable = &vtable;
ssl_fixture->server_name_indication = nullptr;
+ ssl_fixture->session_reused = false;
+ ssl_fixture->session_ticket_key = nullptr;
+ ssl_fixture->session_ticket_key_size = 0;
ssl_fixture->force_client_auth = false;
return &ssl_fixture->base;
}
@@ -558,6 +594,38 @@ void ssl_tsi_test_do_round_trip_odd_buffer_size() {
}
}
+void ssl_tsi_test_do_handshake_session_cache() {
+ tsi_ssl_session_cache* session_cache = tsi_ssl_session_cache_create_lru(16);
+ char session_ticket_key[48];
+ auto do_handshake = [&session_ticket_key,
+ &session_cache](bool session_reused) {
+ tsi_test_fixture* fixture = ssl_tsi_test_fixture_create();
+ ssl_tsi_test_fixture* ssl_fixture =
+ reinterpret_cast<ssl_tsi_test_fixture*>(fixture);
+ ssl_fixture->server_name_indication =
+ const_cast<char*>("waterzooi.test.google.be");
+ ssl_fixture->session_ticket_key = session_ticket_key;
+ ssl_fixture->session_ticket_key_size = 48;
+ tsi_ssl_session_cache_ref(session_cache);
+ ssl_fixture->session_cache = session_cache;
+ ssl_fixture->session_reused = session_reused;
+ tsi_test_do_round_trip(&ssl_fixture->base);
+ tsi_test_fixture_destroy(fixture);
+ };
+ memset(session_ticket_key, 'a', 48);
+ do_handshake(false);
+ do_handshake(true);
+ do_handshake(true);
+ // Changing session_ticket_key on server invalidates ticket.
+ memset(session_ticket_key, 'b', 48);
+ do_handshake(false);
+ do_handshake(true);
+ memset(session_ticket_key, 'c', 48);
+ do_handshake(false);
+ do_handshake(true);
+ tsi_ssl_session_cache_unref(session_cache);
+}
+
static const tsi_ssl_handshaker_factory_vtable* original_vtable;
static bool handshaker_factory_destructor_called;
@@ -575,13 +643,14 @@ static tsi_ssl_handshaker_factory_vtable test_handshaker_factory_vtable = {
void test_tsi_ssl_client_handshaker_factory_refcounting() {
int i;
- const char* cert_chain =
- load_file(SSL_TSI_TEST_CREDENTIALS_DIR, "client.pem");
+ char* cert_chain = load_file(SSL_TSI_TEST_CREDENTIALS_DIR, "client.pem");
+ tsi_ssl_client_handshaker_options options;
+ memset(&options, 0, sizeof(options));
+ options.pem_root_certs = cert_chain;
tsi_ssl_client_handshaker_factory* client_handshaker_factory;
- GPR_ASSERT(tsi_create_ssl_client_handshaker_factory(
- nullptr, cert_chain, nullptr, nullptr, 0,
- &client_handshaker_factory) == TSI_OK);
+ GPR_ASSERT(tsi_create_ssl_client_handshaker_factory_with_options(
+ &options, &client_handshaker_factory) == TSI_OK);
handshaker_factory_destructor_called = false;
original_vtable = tsi_ssl_handshaker_factory_swap_vtable(
@@ -608,7 +677,7 @@ void test_tsi_ssl_client_handshaker_factory_refcounting() {
tsi_handshaker_destroy(handshaker[2]);
GPR_ASSERT(handshaker_factory_destructor_called);
- gpr_free((void*)cert_chain);
+ gpr_free(cert_chain);
}
void test_tsi_ssl_server_handshaker_factory_refcounting() {
@@ -673,6 +742,7 @@ void ssl_tsi_test_handshaker_factory_internals() {
int main(int argc, char** argv) {
grpc_test_init(argc, argv);
grpc_init();
+
ssl_tsi_test_do_handshake_tiny_handshake_buffer();
ssl_tsi_test_do_handshake_small_handshake_buffer();
ssl_tsi_test_do_handshake();
@@ -688,6 +758,7 @@ int main(int argc, char** argv) {
#endif
ssl_tsi_test_do_handshake_alpn_server_no_client();
ssl_tsi_test_do_handshake_alpn_client_server_ok();
+ ssl_tsi_test_do_handshake_session_cache();
ssl_tsi_test_do_round_trip_for_all_configs();
ssl_tsi_test_do_round_trip_odd_buffer_size();
ssl_tsi_test_handshaker_factory_internals();
diff --git a/test/core/util/test_config.cc b/test/core/util/test_config.cc
index 53a6297d6e..6a0d444a73 100644
--- a/test/core/util/test_config.cc
+++ b/test/core/util/test_config.cc
@@ -18,6 +18,7 @@
#include "test/core/util/test_config.h"
+#include <inttypes.h>
#include <signal.h>
#include <stdbool.h>
#include <stdio.h>
diff --git a/test/core/util/test_tcp_server.cc b/test/core/util/test_tcp_server.cc
index cb2bc701fa..610a9918ce 100644
--- a/test/core/util/test_tcp_server.cc
+++ b/test/core/util/test_tcp_server.cc
@@ -17,6 +17,7 @@
*/
#include "src/core/lib/iomgr/sockaddr.h"
+#include "src/core/lib/iomgr/socket_utils.h"
#include "test/core/util/test_tcp_server.h"
@@ -54,13 +55,13 @@ void test_tcp_server_init(test_tcp_server* server,
void test_tcp_server_start(test_tcp_server* server, int port) {
grpc_resolved_address resolved_addr;
- struct sockaddr_in* addr =
- reinterpret_cast<struct sockaddr_in*>(resolved_addr.addr);
+ grpc_sockaddr_in* addr =
+ reinterpret_cast<grpc_sockaddr_in*>(resolved_addr.addr);
int port_added;
grpc_core::ExecCtx exec_ctx;
- addr->sin_family = AF_INET;
- addr->sin_port = htons(static_cast<uint16_t>(port));
+ addr->sin_family = GRPC_AF_INET;
+ addr->sin_port = grpc_htons(static_cast<uint16_t>(port));
memset(&addr->sin_addr, 0, sizeof(addr->sin_addr));
grpc_error* error = grpc_tcp_server_create(&server->shutdown_complete,
diff --git a/test/cpp/end2end/async_end2end_test.cc b/test/cpp/end2end/async_end2end_test.cc
index dd777d10c2..d22793e23c 100644
--- a/test/cpp/end2end/async_end2end_test.cc
+++ b/test/cpp/end2end/async_end2end_test.cc
@@ -319,12 +319,13 @@ class AsyncEnd2endTest : public ::testing::TestWithParam<TestScenario> {
service_->RequestEcho(&srv_ctx, &recv_request, &response_writer,
cq_.get(), cq_.get(), tag(2));
+ response_reader->Finish(&recv_response, &recv_status, tag(4));
+
Verifier().Expect(2, true).Verify(cq_.get());
EXPECT_EQ(send_request.message(), recv_request.message());
send_response.set_message(recv_request.message());
response_writer.Finish(send_response, Status::OK, tag(3));
- response_reader->Finish(&recv_response, &recv_status, tag(4));
Verifier().Expect(3, true).Expect(4, true).Verify(cq_.get());
EXPECT_EQ(send_response.message(), recv_response.message());
@@ -434,13 +435,13 @@ TEST_P(AsyncEnd2endTest, AsyncNextRpc) {
service_->RequestEcho(&srv_ctx, &recv_request, &response_writer, cq_.get(),
cq_.get(), tag(2));
+ response_reader->Finish(&recv_response, &recv_status, tag(4));
Verifier().Expect(2, true).Verify(cq_.get(), time_limit);
EXPECT_EQ(send_request.message(), recv_request.message());
send_response.set_message(recv_request.message());
response_writer.Finish(send_response, Status::OK, tag(3));
- response_reader->Finish(&recv_response, &recv_status, tag(4));
Verifier().Expect(3, true).Expect(4, true).Verify(
cq_.get(), std::chrono::system_clock::time_point::max());
@@ -475,21 +476,18 @@ TEST_P(AsyncEnd2endTest, DoThenAsyncNextRpc) {
auto resp_writer_ptr = &response_writer;
auto lambda_2 = [&, this, resp_writer_ptr]() {
- gpr_log(GPR_ERROR, "CALLED");
service_->RequestEcho(&srv_ctx, &recv_request, resp_writer_ptr, cq_.get(),
cq_.get(), tag(2));
};
+ response_reader->Finish(&recv_response, &recv_status, tag(4));
Verifier().Expect(2, true).Verify(cq_.get(), time_limit, lambda_2);
EXPECT_EQ(send_request.message(), recv_request.message());
- auto recv_resp_ptr = &recv_response;
- auto status_ptr = &recv_status;
send_response.set_message(recv_request.message());
auto lambda_3 = [&, this, resp_writer_ptr, send_response]() {
resp_writer_ptr->Finish(send_response, Status::OK, tag(3));
};
- response_reader->Finish(recv_resp_ptr, status_ptr, tag(4));
Verifier().Expect(3, true).Expect(4, true).Verify(
cq_.get(), std::chrono::system_clock::time_point::max(), lambda_3);
@@ -887,6 +885,7 @@ TEST_P(AsyncEnd2endTest, ClientInitialMetadataRpc) {
std::unique_ptr<ClientAsyncResponseReader<EchoResponse>> response_reader(
stub_->AsyncEcho(&cli_ctx, send_request, cq_.get()));
+ response_reader->Finish(&recv_response, &recv_status, tag(4));
service_->RequestEcho(&srv_ctx, &recv_request, &response_writer, cq_.get(),
cq_.get(), tag(2));
@@ -903,7 +902,6 @@ TEST_P(AsyncEnd2endTest, ClientInitialMetadataRpc) {
send_response.set_message(recv_request.message());
response_writer.Finish(send_response, Status::OK, tag(3));
- response_reader->Finish(&recv_response, &recv_status, tag(4));
Verifier().Expect(3, true).Expect(4, true).Verify(cq_.get());
EXPECT_EQ(send_response.message(), recv_response.message());
@@ -929,6 +927,7 @@ TEST_P(AsyncEnd2endTest, ServerInitialMetadataRpc) {
std::unique_ptr<ClientAsyncResponseReader<EchoResponse>> response_reader(
stub_->AsyncEcho(&cli_ctx, send_request, cq_.get()));
+ response_reader->ReadInitialMetadata(tag(4));
service_->RequestEcho(&srv_ctx, &recv_request, &response_writer, cq_.get(),
cq_.get(), tag(2));
@@ -937,10 +936,7 @@ TEST_P(AsyncEnd2endTest, ServerInitialMetadataRpc) {
srv_ctx.AddInitialMetadata(meta1.first, meta1.second);
srv_ctx.AddInitialMetadata(meta2.first, meta2.second);
response_writer.SendInitialMetadata(tag(3));
- Verifier().Expect(3, true).Verify(cq_.get());
-
- response_reader->ReadInitialMetadata(tag(4));
- Verifier().Expect(4, true).Verify(cq_.get());
+ Verifier().Expect(3, true).Expect(4, true).Verify(cq_.get());
auto server_initial_metadata = cli_ctx.GetServerInitialMetadata();
EXPECT_EQ(meta1.second,
ToString(server_initial_metadata.find(meta1.first)->second));
@@ -976,6 +972,7 @@ TEST_P(AsyncEnd2endTest, ServerTrailingMetadataRpc) {
std::unique_ptr<ClientAsyncResponseReader<EchoResponse>> response_reader(
stub_->AsyncEcho(&cli_ctx, send_request, cq_.get()));
+ response_reader->Finish(&recv_response, &recv_status, tag(5));
service_->RequestEcho(&srv_ctx, &recv_request, &response_writer, cq_.get(),
cq_.get(), tag(2));
@@ -988,7 +985,6 @@ TEST_P(AsyncEnd2endTest, ServerTrailingMetadataRpc) {
srv_ctx.AddTrailingMetadata(meta1.first, meta1.second);
srv_ctx.AddTrailingMetadata(meta2.first, meta2.second);
response_writer.Finish(send_response, Status::OK, tag(4));
- response_reader->Finish(&recv_response, &recv_status, tag(5));
Verifier().Expect(4, true).Expect(5, true).Verify(cq_.get());
@@ -1036,6 +1032,7 @@ TEST_P(AsyncEnd2endTest, MetadataRpc) {
std::unique_ptr<ClientAsyncResponseReader<EchoResponse>> response_reader(
stub_->AsyncEcho(&cli_ctx, send_request, cq_.get()));
+ response_reader->ReadInitialMetadata(tag(4));
service_->RequestEcho(&srv_ctx, &recv_request, &response_writer, cq_.get(),
cq_.get(), tag(2));
@@ -1051,9 +1048,7 @@ TEST_P(AsyncEnd2endTest, MetadataRpc) {
srv_ctx.AddInitialMetadata(meta3.first, meta3.second);
srv_ctx.AddInitialMetadata(meta4.first, meta4.second);
response_writer.SendInitialMetadata(tag(3));
- Verifier().Expect(3, true).Verify(cq_.get());
- response_reader->ReadInitialMetadata(tag(4));
- Verifier().Expect(4, true).Verify(cq_.get());
+ Verifier().Expect(3, true).Expect(4, true).Verify(cq_.get());
auto server_initial_metadata = cli_ctx.GetServerInitialMetadata();
EXPECT_EQ(meta3.second,
ToString(server_initial_metadata.find(meta3.first)->second));
@@ -1096,6 +1091,7 @@ TEST_P(AsyncEnd2endTest, ServerCheckCancellation) {
send_request.set_message(GetParam().message_content);
std::unique_ptr<ClientAsyncResponseReader<EchoResponse>> response_reader(
stub_->AsyncEcho(&cli_ctx, send_request, cq_.get()));
+ response_reader->Finish(&recv_response, &recv_status, tag(4));
srv_ctx.AsyncNotifyWhenDone(tag(5));
service_->RequestEcho(&srv_ctx, &recv_request, &response_writer, cq_.get(),
@@ -1105,12 +1101,9 @@ TEST_P(AsyncEnd2endTest, ServerCheckCancellation) {
EXPECT_EQ(send_request.message(), recv_request.message());
cli_ctx.TryCancel();
- Verifier().Expect(5, true).Verify(cq_.get());
+ Verifier().Expect(5, true).Expect(4, true).Verify(cq_.get());
EXPECT_TRUE(srv_ctx.IsCancelled());
- response_reader->Finish(&recv_response, &recv_status, tag(4));
- Verifier().Expect(4, true).Verify(cq_.get());
-
EXPECT_EQ(StatusCode::CANCELLED, recv_status.error_code());
}
@@ -1131,6 +1124,7 @@ TEST_P(AsyncEnd2endTest, ServerCheckDone) {
send_request.set_message(GetParam().message_content);
std::unique_ptr<ClientAsyncResponseReader<EchoResponse>> response_reader(
stub_->AsyncEcho(&cli_ctx, send_request, cq_.get()));
+ response_reader->Finish(&recv_response, &recv_status, tag(4));
srv_ctx.AsyncNotifyWhenDone(tag(5));
service_->RequestEcho(&srv_ctx, &recv_request, &response_writer, cq_.get(),
@@ -1141,7 +1135,6 @@ TEST_P(AsyncEnd2endTest, ServerCheckDone) {
send_response.set_message(recv_request.message());
response_writer.Finish(send_response, Status::OK, tag(3));
- response_reader->Finish(&recv_response, &recv_status, tag(4));
Verifier().Expect(3, true).Expect(4, true).Expect(5, true).Verify(cq_.get());
EXPECT_FALSE(srv_ctx.IsCancelled());
diff --git a/test/cpp/end2end/client_lb_end2end_test.cc b/test/cpp/end2end/client_lb_end2end_test.cc
index 455eaceb59..a39e443cf0 100644
--- a/test/cpp/end2end/client_lb_end2end_test.cc
+++ b/test/cpp/end2end/client_lb_end2end_test.cc
@@ -40,6 +40,7 @@
#include "src/core/lib/gpr/env.h"
#include "src/core/lib/gprpp/debug_location.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
+#include "src/core/lib/iomgr/tcp_client.h"
#include "src/proto/grpc/testing/echo.grpc.pb.h"
#include "test/core/util/port.h"
@@ -52,13 +53,10 @@ using grpc::testing::EchoRequest;
using grpc::testing::EchoResponse;
using std::chrono::system_clock;
-// defined in tcp_client_posix.c
-extern void (*grpc_tcp_client_connect_impl)(
- grpc_closure* closure, grpc_endpoint** ep,
- grpc_pollset_set* interested_parties, const grpc_channel_args* channel_args,
- const grpc_resolved_address* addr, grpc_millis deadline);
+// defined in tcp_client.cc
+extern grpc_tcp_client_vtable* grpc_tcp_client_impl;
-const auto original_tcp_connect_fn = grpc_tcp_client_connect_impl;
+static grpc_tcp_client_vtable* default_client_impl;
namespace grpc {
namespace testing {
@@ -75,10 +73,12 @@ void tcp_client_connect_with_delay(grpc_closure* closure, grpc_endpoint** ep,
if (delay_ms > 0) {
gpr_sleep_until(grpc_timeout_milliseconds_to_deadline(delay_ms));
}
- original_tcp_connect_fn(closure, ep, interested_parties, channel_args, addr,
- deadline + delay_ms);
+ default_client_impl->connect(closure, ep, interested_parties, channel_args,
+ addr, deadline + delay_ms);
}
+grpc_tcp_client_vtable delayed_connect = {tcp_client_connect_with_delay};
+
// Subclass of TestServiceImpl that increments a request counter for
// every call to the Echo RPC.
class MyTestServiceImpl : public TestServiceImpl {
@@ -384,7 +384,8 @@ TEST_F(ClientLbEnd2endTest, PickFirstBackOffMinReconnect) {
// Make connection delay a 10% longer than it's willing to in order to make
// sure we are hitting the codepath that waits for the min reconnect backoff.
gpr_atm_rel_store(&g_connection_delay_ms, kMinReconnectBackOffMs * 1.10);
- grpc_tcp_client_connect_impl = tcp_client_connect_with_delay;
+ default_client_impl = grpc_tcp_client_impl;
+ grpc_set_tcp_client_impl(&delayed_connect);
const gpr_timespec t0 = gpr_now(GPR_CLOCK_MONOTONIC);
channel->WaitForConnected(
grpc_timeout_milliseconds_to_deadline(kMinReconnectBackOffMs * 2));
diff --git a/test/cpp/end2end/grpclb_end2end_test.cc b/test/cpp/end2end/grpclb_end2end_test.cc
index 9c3de3f550..557845618e 100644
--- a/test/cpp/end2end/grpclb_end2end_test.cc
+++ b/test/cpp/end2end/grpclb_end2end_test.cc
@@ -61,8 +61,6 @@
// - Test handling of creation of faulty RR instance by having the LB return a
// serverlist with non-existent backends after having initially returned a
// valid one.
-// - test using secure credentials and make sure we don't send call
-// credentials to the balancer
//
// Findings from end to end testing to be covered here:
// - Handling of LB servers restart, including reconnection after backing-off
@@ -126,12 +124,22 @@ class CountedService : public ServiceType {
using BackendService = CountedService<TestServiceImpl>;
using BalancerService = CountedService<LoadBalancer::Service>;
+const char g_kCallCredsMdKey[] = "Balancer should not ...";
+const char g_kCallCredsMdValue[] = "... receive me";
+
class BackendServiceImpl : public BackendService {
public:
BackendServiceImpl() {}
Status Echo(ServerContext* context, const EchoRequest* request,
EchoResponse* response) override {
+ // Backend should receive the call credentials metadata.
+ auto call_credentials_entry =
+ context->client_metadata().find(g_kCallCredsMdKey);
+ EXPECT_NE(call_credentials_entry, context->client_metadata().end());
+ if (call_credentials_entry != context->client_metadata().end()) {
+ EXPECT_EQ(call_credentials_entry->second, g_kCallCredsMdValue);
+ }
IncreaseRequestCount();
const auto status = TestServiceImpl::Echo(context, request, response);
IncreaseResponseCount();
@@ -190,6 +198,9 @@ class BalancerServiceImpl : public BalancerService {
shutdown_(false) {}
Status BalanceLoad(ServerContext* context, Stream* stream) override {
+ // Balancer shouldn't receive the call credentials metadata.
+ EXPECT_EQ(context->client_metadata().find(g_kCallCredsMdKey),
+ context->client_metadata().end());
gpr_log(GPR_INFO, "LB[%p]: BalanceLoad", this);
LoadBalanceRequest request;
std::vector<ResponseDelayPair> responses_and_delays;
@@ -394,8 +405,15 @@ class GrpclbEnd2endTest : public ::testing::Test {
uri << "fake:///" << kApplicationTargetName_;
// TODO(dgq): templatize tests to run everything using both secure and
// insecure channel credentials.
- std::shared_ptr<ChannelCredentials> creds(new SecureChannelCredentials(
- grpc_fake_transport_security_credentials_create()));
+ grpc_channel_credentials* channel_creds =
+ grpc_fake_transport_security_credentials_create();
+ grpc_call_credentials* call_creds = grpc_md_only_test_credentials_create(
+ g_kCallCredsMdKey, g_kCallCredsMdValue, false);
+ std::shared_ptr<ChannelCredentials> creds(
+ new SecureChannelCredentials(grpc_composite_channel_credentials_create(
+ channel_creds, call_creds, nullptr)));
+ grpc_call_credentials_unref(call_creds);
+ grpc_channel_credentials_unref(channel_creds);
channel_ = CreateCustomChannel(uri.str(), creds, args);
stub_ = grpc::testing::EchoTestService::NewStub(channel_);
}
diff --git a/test/cpp/end2end/nonblocking_test.cc b/test/cpp/end2end/nonblocking_test.cc
index cb75848337..d8337baca2 100644
--- a/test/cpp/end2end/nonblocking_test.cc
+++ b/test/cpp/end2end/nonblocking_test.cc
@@ -128,6 +128,7 @@ class NonblockingTest : public ::testing::Test {
stub_->PrepareAsyncEcho(&cli_ctx, send_request, cq_.get()));
response_reader->StartCall();
+ response_reader->Finish(&recv_response, &recv_status, tag(4));
service_->RequestEcho(&srv_ctx, &recv_request, &response_writer,
cq_.get(), cq_.get(), tag(2));
@@ -141,7 +142,6 @@ class NonblockingTest : public ::testing::Test {
send_response.set_message(recv_request.message());
response_writer.Finish(send_response, Status::OK, tag(3));
- response_reader->Finish(&recv_response, &recv_status, tag(4));
int tagsum = 0;
int tagprod = 1;
diff --git a/test/cpp/microbenchmarks/BUILD b/test/cpp/microbenchmarks/BUILD
index 0b69e9ba9a..67f7e440b0 100644
--- a/test/cpp/microbenchmarks/BUILD
+++ b/test/cpp/microbenchmarks/BUILD
@@ -143,3 +143,10 @@ grpc_cc_binary(
srcs = ["bm_metadata.cc"],
deps = [":helpers"],
)
+
+grpc_cc_binary(
+ name = "bm_chttp2_hpack",
+ testonly = 1,
+ srcs = ["bm_chttp2_hpack.cc"],
+ deps = [":helpers"],
+)
diff --git a/test/cpp/microbenchmarks/bm_chttp2_hpack.cc b/test/cpp/microbenchmarks/bm_chttp2_hpack.cc
index 07bb3c92ae..d0f3ec8e8b 100644
--- a/test/cpp/microbenchmarks/bm_chttp2_hpack.cc
+++ b/test/cpp/microbenchmarks/bm_chttp2_hpack.cc
@@ -18,9 +18,11 @@
/* Microbenchmarks around CHTTP2 HPACK operations */
+#include <benchmark/benchmark.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <string.h>
+#include <memory>
#include <sstream>
#include "src/core/ext/transport/chttp2/transport/hpack_encoder.h"
@@ -31,7 +33,6 @@
#include "src/core/lib/transport/timeout_encoding.h"
#include "test/cpp/microbenchmarks/helpers.h"
-#include "third_party/benchmark/include/benchmark/benchmark.h"
auto& force_library_initialization = Library::get();
@@ -51,10 +52,11 @@ static grpc_slice MakeSlice(std::vector<uint8_t> bytes) {
static void BM_HpackEncoderInitDestroy(benchmark::State& state) {
TrackCounters track_counters;
grpc_core::ExecCtx exec_ctx;
- grpc_chttp2_hpack_compressor c;
+ std::unique_ptr<grpc_chttp2_hpack_compressor> c(
+ new grpc_chttp2_hpack_compressor);
while (state.KeepRunning()) {
- grpc_chttp2_hpack_compressor_init(&c);
- grpc_chttp2_hpack_compressor_destroy(&c);
+ grpc_chttp2_hpack_compressor_init(c.get());
+ grpc_chttp2_hpack_compressor_destroy(c.get());
grpc_core::ExecCtx::Get()->Flush();
}
@@ -71,8 +73,9 @@ static void BM_HpackEncoderEncodeDeadline(benchmark::State& state) {
grpc_metadata_batch_init(&b);
b.deadline = saved_now + 30 * 1000;
- grpc_chttp2_hpack_compressor c;
- grpc_chttp2_hpack_compressor_init(&c);
+ std::unique_ptr<grpc_chttp2_hpack_compressor> c(
+ new grpc_chttp2_hpack_compressor);
+ grpc_chttp2_hpack_compressor_init(c.get());
grpc_transport_one_way_stats stats;
memset(&stats, 0, sizeof(stats));
grpc_slice_buffer outbuf;
@@ -85,12 +88,12 @@ static void BM_HpackEncoderEncodeDeadline(benchmark::State& state) {
static_cast<size_t>(1024),
&stats,
};
- grpc_chttp2_encode_header(&c, nullptr, 0, &b, &hopt, &outbuf);
+ grpc_chttp2_encode_header(c.get(), nullptr, 0, &b, &hopt, &outbuf);
grpc_slice_buffer_reset_and_unref_internal(&outbuf);
grpc_core::ExecCtx::Get()->Flush();
}
grpc_metadata_batch_destroy(&b);
- grpc_chttp2_hpack_compressor_destroy(&c);
+ grpc_chttp2_hpack_compressor_destroy(c.get());
grpc_slice_buffer_destroy_internal(&outbuf);
std::ostringstream label;
@@ -120,8 +123,9 @@ static void BM_HpackEncoderEncodeHeader(benchmark::State& state) {
"addmd", grpc_metadata_batch_add_tail(&b, &storage[i], elems[i])));
}
- grpc_chttp2_hpack_compressor c;
- grpc_chttp2_hpack_compressor_init(&c);
+ std::unique_ptr<grpc_chttp2_hpack_compressor> c(
+ new grpc_chttp2_hpack_compressor);
+ grpc_chttp2_hpack_compressor_init(c.get());
grpc_transport_one_way_stats stats;
memset(&stats, 0, sizeof(stats));
grpc_slice_buffer outbuf;
@@ -134,7 +138,7 @@ static void BM_HpackEncoderEncodeHeader(benchmark::State& state) {
static_cast<size_t>(state.range(1)),
&stats,
};
- grpc_chttp2_encode_header(&c, nullptr, 0, &b, &hopt, &outbuf);
+ grpc_chttp2_encode_header(c.get(), nullptr, 0, &b, &hopt, &outbuf);
if (!logged_representative_output && state.iterations() > 3) {
logged_representative_output = true;
for (size_t i = 0; i < outbuf.count; i++) {
@@ -147,7 +151,7 @@ static void BM_HpackEncoderEncodeHeader(benchmark::State& state) {
grpc_core::ExecCtx::Get()->Flush();
}
grpc_metadata_batch_destroy(&b);
- grpc_chttp2_hpack_compressor_destroy(&c);
+ grpc_chttp2_hpack_compressor_destroy(c.get());
grpc_slice_buffer_destroy_internal(&outbuf);
std::ostringstream label;
diff --git a/test/cpp/microbenchmarks/bm_chttp2_transport.cc b/test/cpp/microbenchmarks/bm_chttp2_transport.cc
index 259bef4fd1..d00c79b610 100644
--- a/test/cpp/microbenchmarks/bm_chttp2_transport.cc
+++ b/test/cpp/microbenchmarks/bm_chttp2_transport.cc
@@ -398,13 +398,13 @@ static void BM_TransportStreamSend(benchmark::State& state) {
memset(&op, 0, sizeof(op));
op.payload = &op_payload;
};
- grpc_slice_buffer_stream send_stream;
- grpc_slice_buffer send_buffer;
- grpc_slice_buffer_init(&send_buffer);
- grpc_slice_buffer_add(&send_buffer, gpr_slice_malloc(state.range(0)));
- memset(GRPC_SLICE_START_PTR(send_buffer.slices[0]), 0,
- GRPC_SLICE_LENGTH(send_buffer.slices[0]));
-
+ // Create the send_message payload slice.
+ // Note: We use grpc_slice_malloc_large() instead of grpc_slice_malloc()
+ // to force the slice to be refcounted, so that it remains alive when it
+ // is unreffed after each send_message op.
+ grpc_slice send_slice = grpc_slice_malloc_large(state.range(0));
+ memset(GRPC_SLICE_START_PTR(send_slice), 0, GRPC_SLICE_LENGTH(send_slice));
+ grpc_core::ManualConstructor<grpc_core::SliceBufferByteStream> send_stream;
grpc_metadata_batch b;
grpc_metadata_batch_init(&b);
b.deadline = GRPC_MILLIS_INF_FUTURE;
@@ -424,14 +424,18 @@ static void BM_TransportStreamSend(benchmark::State& state) {
gpr_event_set(bm_done, (void*)1);
return;
}
+ grpc_slice_buffer send_buffer;
+ grpc_slice_buffer_init(&send_buffer);
+ grpc_slice_buffer_add(&send_buffer, grpc_slice_ref(send_slice));
+ send_stream.Init(&send_buffer, 0);
+ grpc_slice_buffer_destroy(&send_buffer);
// force outgoing window to be yuge
s->chttp2_stream()->flow_control->TestOnlyForceHugeWindow();
f.chttp2_transport()->flow_control->TestOnlyForceHugeWindow();
- grpc_slice_buffer_stream_init(&send_stream, &send_buffer, 0);
reset_op();
op.on_complete = c.get();
op.send_message = true;
- op.payload->send_message.send_message = &send_stream.base;
+ op.payload->send_message.send_message.reset(send_stream.get());
s->Op(&op);
});
@@ -454,7 +458,7 @@ static void BM_TransportStreamSend(benchmark::State& state) {
s.reset();
track_counters.Finish(state);
grpc_metadata_batch_destroy(&b);
- grpc_slice_buffer_destroy(&send_buffer);
+ grpc_slice_unref(send_slice);
}
BENCHMARK(BM_TransportStreamSend)->Range(0, 128 * 1024 * 1024);
@@ -524,7 +528,7 @@ static void BM_TransportStreamRecv(benchmark::State& state) {
grpc_transport_stream_op_batch_payload op_payload;
memset(&op_payload, 0, sizeof(op_payload));
grpc_transport_stream_op_batch op;
- grpc_byte_stream* recv_stream;
+ grpc_core::OrphanablePtr<grpc_core::ByteStream> recv_stream;
grpc_slice incoming_data = CreateIncomingDataSlice(state.range(0), 16384);
auto reset_op = [&]() {
@@ -579,21 +583,20 @@ static void BM_TransportStreamRecv(benchmark::State& state) {
drain = MakeClosure([&](grpc_error* error) {
do {
- if (received == recv_stream->length) {
- grpc_byte_stream_destroy(recv_stream);
+ if (received == recv_stream->length()) {
+ recv_stream.reset();
GRPC_CLOSURE_SCHED(c.get(), GRPC_ERROR_NONE);
return;
}
- } while (grpc_byte_stream_next(recv_stream, recv_stream->length - received,
- drain_continue.get()) &&
- GRPC_ERROR_NONE ==
- grpc_byte_stream_pull(recv_stream, &recv_slice) &&
+ } while (recv_stream->Next(recv_stream->length() - received,
+ drain_continue.get()) &&
+ GRPC_ERROR_NONE == recv_stream->Pull(&recv_slice) &&
(received += GRPC_SLICE_LENGTH(recv_slice),
grpc_slice_unref_internal(recv_slice), true));
});
drain_continue = MakeClosure([&](grpc_error* error) {
- grpc_byte_stream_pull(recv_stream, &recv_slice);
+ recv_stream->Pull(&recv_slice);
received += GRPC_SLICE_LENGTH(recv_slice);
grpc_slice_unref_internal(recv_slice);
GRPC_CLOSURE_RUN(drain.get(), GRPC_ERROR_NONE);
diff --git a/test/cpp/microbenchmarks/bm_fullstack_trickle.cc b/test/cpp/microbenchmarks/bm_fullstack_trickle.cc
index 294f1feb80..3b21c4c278 100644
--- a/test/cpp/microbenchmarks/bm_fullstack_trickle.cc
+++ b/test/cpp/microbenchmarks/bm_fullstack_trickle.cc
@@ -394,13 +394,13 @@ static void BM_PumpUnbalancedUnary_Trickle(benchmark::State& state) {
stub->AsyncEcho(&cli_ctx, send_request, fixture->cq()));
void* t;
bool ok;
+ response_reader->Finish(&recv_response, &recv_status, tag(4));
TrickleCQNext(fixture.get(), &t, &ok, in_warmup ? -1 : state.iterations());
GPR_ASSERT(ok);
GPR_ASSERT(t == tag(0) || t == tag(1));
intptr_t slot = reinterpret_cast<intptr_t>(t);
ServerEnv* senv = server_env[slot];
senv->response_writer.Finish(send_response, Status::OK, tag(3));
- response_reader->Finish(&recv_response, &recv_status, tag(4));
for (int i = (1 << 3) | (1 << 4); i != 0;) {
TrickleCQNext(fixture.get(), &t, &ok,
in_warmup ? -1 : state.iterations());
diff --git a/test/cpp/microbenchmarks/fullstack_unary_ping_pong.h b/test/cpp/microbenchmarks/fullstack_unary_ping_pong.h
index a85c33c320..843c8e1486 100644
--- a/test/cpp/microbenchmarks/fullstack_unary_ping_pong.h
+++ b/test/cpp/microbenchmarks/fullstack_unary_ping_pong.h
@@ -78,6 +78,7 @@ static void BM_UnaryPingPong(benchmark::State& state) {
ClientContextMutator cli_ctx_mut(&cli_ctx);
std::unique_ptr<ClientAsyncResponseReader<EchoResponse>> response_reader(
stub->AsyncEcho(&cli_ctx, send_request, fixture->cq()));
+ response_reader->Finish(&recv_response, &recv_status, tag(4));
void* t;
bool ok;
GPR_ASSERT(fixture->cq()->Next(&t, &ok));
@@ -87,7 +88,6 @@ static void BM_UnaryPingPong(benchmark::State& state) {
ServerEnv* senv = server_env[slot];
ServerContextMutator svr_ctx_mut(&senv->ctx);
senv->response_writer.Finish(send_response, Status::OK, tag(3));
- response_reader->Finish(&recv_response, &recv_status, tag(4));
for (int i = (1 << 3) | (1 << 4); i != 0;) {
GPR_ASSERT(fixture->cq()->Next(&t, &ok));
GPR_ASSERT(ok);
diff --git a/test/cpp/naming/resolver_component_test.cc b/test/cpp/naming/resolver_component_test.cc
index f4be064305..bfdcd96238 100644
--- a/test/cpp/naming/resolver_component_test.cc
+++ b/test/cpp/naming/resolver_component_test.cc
@@ -65,6 +65,11 @@ DEFINE_string(expected_addrs, "",
"List of expected backend or balancer addresses in the form "
"'<ip0:port0>,<is_balancer0>;<ip1:port1>,<is_balancer1>;...'. "
"'is_balancer' should be bool, i.e. true or false.");
+DEFINE_bool(allow_extra_addrs, false,
+ "Permit extra resolved addresses in the final list of "
+ "resolved addresses. This is useful in certain integration "
+ "test environments in which DNS responses are not fully "
+ "deterministic.");
DEFINE_string(expected_chosen_service_config, "",
"Expected service config json string that gets chosen (no "
"whitespace). Empty for none.");
@@ -240,9 +245,11 @@ void CheckResolverResultLocked(void* argsp, grpc_error* err) {
GPR_ASSERT(channel_arg->type == GRPC_ARG_POINTER);
grpc_lb_addresses* addresses =
(grpc_lb_addresses*)channel_arg->value.pointer.p;
- gpr_log(GPR_INFO, "num addrs found: %" PRIdPTR ". expected %" PRIdPTR,
- addresses->num_addresses, args->expected_addrs.size());
- GPR_ASSERT(addresses->num_addresses == args->expected_addrs.size());
+ gpr_log(GPR_INFO,
+ "num addrs found: %" PRIdPTR ". expected %" PRIdPTR
+ ". Allow extra addresses:%d.",
+ addresses->num_addresses, args->expected_addrs.size(),
+ FLAGS_allow_extra_addrs);
std::vector<GrpcLBAddress> found_lb_addrs;
for (size_t i = 0; i < addresses->num_addresses; i++) {
grpc_lb_address addr = addresses->addresses[i];
@@ -254,13 +261,20 @@ void CheckResolverResultLocked(void* argsp, grpc_error* err) {
gpr_free(str);
}
if (args->expected_addrs.size() != found_lb_addrs.size()) {
- gpr_log(GPR_DEBUG,
- "found lb addrs size is: %" PRIdPTR
- ". expected addrs size is %" PRIdPTR,
- found_lb_addrs.size(), args->expected_addrs.size());
- abort();
+ // Permit extra resolved addresses if "--allow_extra_addrs" was set.
+ if (!(FLAGS_allow_extra_addrs &&
+ found_lb_addrs.size() > args->expected_addrs.size())) {
+ gpr_log(GPR_DEBUG,
+ "found lb addrs size is: %" PRIdPTR
+ ". expected addrs size is %" PRIdPTR ". --allow_extra_addrs=%d.",
+ found_lb_addrs.size(), args->expected_addrs.size(),
+ FLAGS_allow_extra_addrs);
+ abort();
+ }
+ }
+ for (size_t i = 0; i < args->expected_addrs.size(); i++) {
+ EXPECT_THAT(found_lb_addrs, ::testing::Contains(args->expected_addrs[i]));
}
- EXPECT_THAT(args->expected_addrs, UnorderedElementsAreArray(found_lb_addrs));
CheckServiceConfigResultLocked(channel_args, args);
if (args->expected_service_config_string == "") {
CheckLBPolicyResultLocked(channel_args, args);
diff --git a/test/cpp/naming/resolver_component_tests_runner.sh b/test/cpp/naming/resolver_component_tests_runner.sh
index 62231c5e16..18b56ab69b 100755
--- a/test/cpp/naming/resolver_component_tests_runner.sh
+++ b/test/cpp/naming/resolver_component_tests_runner.sh
@@ -18,12 +18,12 @@
set -ex
# all command args required in this set order
-FLAGS_test_bin_path=$(echo "$1" | grep '\--test_bin_path=' | cut -d "=" -f 2)
-FLAGS_dns_server_bin_path=$(echo "$2" | grep '\--dns_server_bin_path=' | cut -d "=" -f 2)
-FLAGS_records_config_path=$(echo "$3" | grep '\--records_config_path=' | cut -d "=" -f 2)
-FLAGS_dns_server_port=$(echo "$4" | grep '\--dns_server_port=' | cut -d "=" -f 2)
-FLAGS_dns_resolver_bin_path=$(echo "$5" | grep '\--dns_resolver_bin_path=' | cut -d "=" -f 2)
-FLAGS_tcp_connect_bin_path=$(echo "$6" | grep '\--tcp_connect_bin_path=' | cut -d "=" -f 2)
+FLAGS_test_bin_path=$(echo "$1" | grep '\--test_bin_path=' | sed 's/^--test_bin_path=//')
+FLAGS_dns_server_bin_path=$(echo "$2" | grep '\--dns_server_bin_path=' | sed 's/^--dns_server_bin_path=//')
+FLAGS_records_config_path=$(echo "$3" | grep '\--records_config_path=' | sed 's/^--records_config_path=//')
+FLAGS_dns_server_port=$(echo "$4" | grep '\--dns_server_port=' | sed 's/^--dns_server_port=//')
+FLAGS_dns_resolver_bin_path=$(echo "$5" | grep '\--dns_resolver_bin_path=' | sed 's/^--dns_resolver_bin_path=//')
+FLAGS_tcp_connect_bin_path=$(echo "$6" | grep '\--tcp_connect_bin_path=' | sed 's/^--tcp_connect_bin_path=//')
for cmd_arg in "$FLAGS_test_bin_path" "$FLAGS_dns_server_bin_path" "$FLAGS_records_config_path" "$FLAGS_dns_server_port" "$FLAGS_dns_resolver_bin_path" "$FLAGS_tcp_connect_bin_path"; do
if [[ "$cmd_arg" == "" ]]; then
diff --git a/test/cpp/performance/writes_per_rpc_test.cc b/test/cpp/performance/writes_per_rpc_test.cc
index 5faa7ba757..0ea3181f7e 100644
--- a/test/cpp/performance/writes_per_rpc_test.cc
+++ b/test/cpp/performance/writes_per_rpc_test.cc
@@ -207,13 +207,13 @@ static double UnaryPingPong(int request_size, int response_size) {
stub->AsyncEcho(&cli_ctx, send_request, fixture->cq()));
void* t;
bool ok;
+ response_reader->Finish(&recv_response, &recv_status, tag(4));
GPR_ASSERT(fixture->cq()->Next(&t, &ok));
GPR_ASSERT(ok);
GPR_ASSERT(t == tag(0) || t == tag(1));
intptr_t slot = reinterpret_cast<intptr_t>(t);
ServerEnv* senv = server_env[slot];
senv->response_writer.Finish(send_response, Status::OK, tag(3));
- response_reader->Finish(&recv_response, &recv_status, tag(4));
for (int i = (1 << 3) | (1 << 4); i != 0;) {
GPR_ASSERT(fixture->cq()->Next(&t, &ok));
GPR_ASSERT(ok);
diff --git a/test/cpp/thread_manager/thread_manager_test.cc b/test/cpp/thread_manager/thread_manager_test.cc
index fad52cf7fa..7a95a9f17d 100644
--- a/test/cpp/thread_manager/thread_manager_test.cc
+++ b/test/cpp/thread_manager/thread_manager_test.cc
@@ -16,6 +16,7 @@
*is % allowed in string
*/
+#include <inttypes.h>
#include <ctime>
#include <memory>
#include <string>
diff --git a/test/cpp/util/BUILD b/test/cpp/util/BUILD
index d092ba348e..4f84c73820 100644
--- a/test/cpp/util/BUILD
+++ b/test/cpp/util/BUILD
@@ -16,7 +16,10 @@ licenses(["notice"]) # Apache v2
load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_binary", "grpc_cc_test", "grpc_package")
-grpc_package(name = "test/cpp/util", visibility = "public")
+grpc_package(
+ name = "test/cpp/util",
+ visibility = "public",
+)
grpc_cc_library(
name = "test_config",
@@ -49,7 +52,7 @@ grpc_cc_library(
],
)
-GRPCXX_TESTUTIL_SRCS = [
+GRPCXX_TESTUTIL_SRCS = [
"byte_buffer_proto_helper.cc",
"string_ref_helper.cc",
"subprocess.cc",
@@ -71,27 +74,27 @@ grpc_cc_library(
"create_test_channel.h",
"test_credentials_provider.h",
],
+ external_deps = [
+ "protobuf",
+ ],
deps = [
"//:grpc++",
"//test/core/end2end:ssl_test_data",
"//test/core/util:grpc_test_util",
],
- external_deps = [
- "protobuf",
- ],
)
grpc_cc_library(
name = "test_util_unsecure",
srcs = GRPCXX_TESTUTIL_SRCS,
hdrs = GRPCXX_TESTUTIL_HDRS,
+ external_deps = [
+ "protobuf",
+ ],
deps = [
"//:grpc++_unsecure",
"//test/core/util:grpc_test_util",
],
- external_deps = [
- "protobuf",
- ],
)
grpc_cc_library(
@@ -111,16 +114,16 @@ grpc_cc_library(
"proto_file_parser.h",
"service_describer.h",
],
- deps = [
- "//:grpc++",
- "//src/proto/grpc/reflection/v1alpha:reflection_proto",
- ":grpc++_proto_reflection_desc_db",
- ],
external_deps = [
"gflags",
"protobuf",
"protobuf_clib",
],
+ deps = [
+ ":grpc++_proto_reflection_desc_db",
+ "//:grpc++",
+ "//src/proto/grpc/reflection/v1alpha:reflection_proto",
+ ],
)
grpc_cc_library(
@@ -132,8 +135,8 @@ grpc_cc_library(
"metrics_server.h",
],
deps = [
- "//src/proto/grpc/testing:metrics_proto",
"//:grpc++",
+ "//src/proto/grpc/testing:metrics_proto",
],
)
@@ -144,19 +147,19 @@ grpc_cc_test(
],
data = [
"//src/proto/grpc/testing:echo.proto",
- "//src/proto/grpc/testing:echo_messages.proto"
- ],
- deps = [
- ":grpc_cli_libs",
- ":test_util",
- "//:grpc++_reflection",
- "//src/proto/grpc/testing:echo_proto",
- "//src/proto/grpc/testing:echo_messages_proto",
- "//test/core/util:grpc_test_util",
+ "//src/proto/grpc/testing:echo_messages.proto",
],
external_deps = [
"gtest",
],
+ deps = [
+ ":grpc_cli_libs",
+ ":test_util",
+ "//:grpc++_reflection",
+ "//src/proto/grpc/testing:echo_messages_proto",
+ "//src/proto/grpc/testing:echo_proto",
+ "//test/core/util:grpc_test_util",
+ ],
)
grpc_cc_test(
@@ -164,12 +167,12 @@ grpc_cc_test(
srcs = [
"byte_buffer_test.cc",
],
- deps = [
- ":test_util",
- ],
external_deps = [
"gtest",
],
+ deps = [
+ ":test_util",
+ ],
)
grpc_cc_test(
@@ -177,12 +180,12 @@ grpc_cc_test(
srcs = [
"slice_test.cc",
],
- deps = [
- ":test_util",
- ],
external_deps = [
"gtest",
],
+ deps = [
+ ":test_util",
+ ],
)
grpc_cc_test(
@@ -190,12 +193,12 @@ grpc_cc_test(
srcs = [
"string_ref_test.cc",
],
- deps = [
- "//:grpc++",
- ],
external_deps = [
"gtest",
],
+ deps = [
+ "//:grpc++",
+ ],
)
grpc_cc_test(
@@ -203,24 +206,11 @@ grpc_cc_test(
srcs = [
"time_test.cc",
],
- deps = [
- ":test_util",
- ],
external_deps = [
"gtest",
],
-)
-
-grpc_cc_test(
- name = "status_test",
- srcs = [
- "status_test.cc",
- ],
deps = [
- ":test_util",
- ],
- external_deps = [
- "gtest",
+ ":test_util",
],
)
@@ -229,14 +219,14 @@ grpc_cc_test(
srcs = [
"cli_call_test.cc",
],
+ external_deps = [
+ "gtest",
+ ],
deps = [
":grpc_cli_libs",
- ":test_util",
+ ":test_util",
"//src/proto/grpc/testing:echo_proto",
- "//test/core/util:grpc_test_util",
- ],
- external_deps = [
- "gtest",
+ "//test/core/util:grpc_test_util",
],
)
@@ -245,13 +235,13 @@ grpc_cc_test(
srcs = [
"error_details_test.cc",
],
+ external_deps = [
+ "gtest",
+ ],
deps = [
"//:grpc++_error_details",
"//src/proto/grpc/testing:echo_messages_proto",
],
- external_deps = [
- "gtest",
- ],
)
grpc_cc_binary(
@@ -274,11 +264,11 @@ grpc_cc_binary(
"test_config.h",
"test_config_cc.cc",
],
+ external_deps = [
+ "gflags",
+ ],
deps = [
"//:grpc++",
"//src/proto/grpc/reflection/v1alpha:reflection_proto",
],
- external_deps = [
- "gflags",
- ],
)
diff --git a/test/cpp/util/status_test.cc b/test/cpp/util/status_test.cc
deleted file mode 100644
index 2188723db8..0000000000
--- a/test/cpp/util/status_test.cc
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- *
- * Copyright 2015 gRPC authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include <grpcpp/support/status.h>
-
-#include <grpc/status.h>
-#include <grpc/support/log.h>
-
-// Make sure the existing grpc_status_code match with grpc::Code.
-int main(int argc, char** argv) {
- GPR_ASSERT(grpc::StatusCode::OK ==
- static_cast<grpc::StatusCode>(GRPC_STATUS_OK));
- GPR_ASSERT(grpc::StatusCode::CANCELLED ==
- static_cast<grpc::StatusCode>(GRPC_STATUS_CANCELLED));
- GPR_ASSERT(grpc::StatusCode::UNKNOWN ==
- static_cast<grpc::StatusCode>(GRPC_STATUS_UNKNOWN));
- GPR_ASSERT(grpc::StatusCode::INVALID_ARGUMENT ==
- static_cast<grpc::StatusCode>(GRPC_STATUS_INVALID_ARGUMENT));
- GPR_ASSERT(grpc::StatusCode::DEADLINE_EXCEEDED ==
- static_cast<grpc::StatusCode>(GRPC_STATUS_DEADLINE_EXCEEDED));
- GPR_ASSERT(grpc::StatusCode::NOT_FOUND ==
- static_cast<grpc::StatusCode>(GRPC_STATUS_NOT_FOUND));
- GPR_ASSERT(grpc::StatusCode::ALREADY_EXISTS ==
- static_cast<grpc::StatusCode>(GRPC_STATUS_ALREADY_EXISTS));
- GPR_ASSERT(grpc::StatusCode::PERMISSION_DENIED ==
- static_cast<grpc::StatusCode>(GRPC_STATUS_PERMISSION_DENIED));
- GPR_ASSERT(grpc::StatusCode::UNAUTHENTICATED ==
- static_cast<grpc::StatusCode>(GRPC_STATUS_UNAUTHENTICATED));
- GPR_ASSERT(grpc::StatusCode::RESOURCE_EXHAUSTED ==
- static_cast<grpc::StatusCode>(GRPC_STATUS_RESOURCE_EXHAUSTED));
- GPR_ASSERT(grpc::StatusCode::FAILED_PRECONDITION ==
- static_cast<grpc::StatusCode>(GRPC_STATUS_FAILED_PRECONDITION));
- GPR_ASSERT(grpc::StatusCode::ABORTED ==
- static_cast<grpc::StatusCode>(GRPC_STATUS_ABORTED));
- GPR_ASSERT(grpc::StatusCode::OUT_OF_RANGE ==
- static_cast<grpc::StatusCode>(GRPC_STATUS_OUT_OF_RANGE));
- GPR_ASSERT(grpc::StatusCode::UNIMPLEMENTED ==
- static_cast<grpc::StatusCode>(GRPC_STATUS_UNIMPLEMENTED));
- GPR_ASSERT(grpc::StatusCode::INTERNAL ==
- static_cast<grpc::StatusCode>(GRPC_STATUS_INTERNAL));
- GPR_ASSERT(grpc::StatusCode::UNAVAILABLE ==
- static_cast<grpc::StatusCode>(GRPC_STATUS_UNAVAILABLE));
- GPR_ASSERT(grpc::StatusCode::DATA_LOSS ==
- static_cast<grpc::StatusCode>(GRPC_STATUS_DATA_LOSS));
-
- return 0;
-}
diff --git a/test/distrib/csharp/run_distrib_test.sh b/test/distrib/csharp/run_distrib_test.sh
index eee24d0e57..b96872725e 100755
--- a/test/distrib/csharp/run_distrib_test.sh
+++ b/test/distrib/csharp/run_distrib_test.sh
@@ -21,6 +21,11 @@ unzip -o "$EXTERNAL_GIT_ROOT/input_artifacts/csharp_nugets_windows_dotnetcli.zip
./update_version.sh auto
+# With a recent-enough version of mono, the "nuget restore" command would
+# restore packages based on project.json files, but we want to restore packages
+# based on the net45 legacy "packages.config" file instead.
+rm DistribTest/*project.json
+
nuget restore
xbuild DistribTest.sln
diff --git a/test/distrib/php/run_distrib_test.sh b/test/distrib/php/run_distrib_test.sh
index f781815840..a6102f6075 100755
--- a/test/distrib/php/run_distrib_test.sh
+++ b/test/distrib/php/run_distrib_test.sh
@@ -19,7 +19,7 @@ cd "$(dirname "$0")"
cp -r "$EXTERNAL_GIT_ROOT"/input_artifacts/grpc-*.tgz .
-find . -regextype sed -regex ".*/grpc-[0-9].*.tgz" | cut -b3- | \
+find . -regex ".*/grpc-[0-9].*.tgz" | cut -b3- | \
xargs pecl install
php -d extension=grpc.so -d max_execution_time=300 distribtest.php
diff --git a/tools/bazel.rc b/tools/bazel.rc
index 8af2fc981d..ed9169fc79 100644
--- a/tools/bazel.rc
+++ b/tools/bazel.rc
@@ -1,5 +1,6 @@
build --client_env=CC=clang
build --copt -DGRPC_BAZEL_BUILD
+build --copt -Wframe-larger-than=16384
build:asan --strip=never
build:asan --copt -fsanitize-coverage=edge
diff --git a/tools/buildgen/plugins/expand_version.py b/tools/buildgen/plugins/expand_version.py
index facf349b0c..a73446940d 100755
--- a/tools/buildgen/plugins/expand_version.py
+++ b/tools/buildgen/plugins/expand_version.py
@@ -24,6 +24,7 @@ LANGUAGES = [
'core',
'cpp',
'csharp',
+ 'node',
'objc',
'php',
'python',
diff --git a/tools/dockerfile/distribtest/csharp_ubuntu1504_x64/Dockerfile b/tools/dockerfile/distribtest/csharp_ubuntu1504_x64/Dockerfile
deleted file mode 100644
index 3e6273fe8c..0000000000
--- a/tools/dockerfile/distribtest/csharp_ubuntu1504_x64/Dockerfile
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright 2015 gRPC authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-FROM ubuntu:15.04
-
-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 \
- mono-devel \
- 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
deleted file mode 100644
index fb29f3ecc2..0000000000
--- a/tools/dockerfile/distribtest/csharp_ubuntu1510_x64/Dockerfile
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright 2015 gRPC authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-FROM ubuntu:15.10
-
-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 \
- mono-devel \
- 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/python_arch_x64/Dockerfile b/tools/dockerfile/distribtest/python_arch_x64/Dockerfile
index d8fb74d513..9e43d00b41 100644
--- a/tools/dockerfile/distribtest/python_arch_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/python_arch_x64/Dockerfile
@@ -18,4 +18,4 @@ RUN pacman --noconfirm -Syy
RUN pacman --noconfirm -S openssl
RUN pacman --noconfirm -S python2
RUN pacman --noconfirm -S python2-pip
-RUN pip install virtualenv
+RUN pip2 install virtualenv
diff --git a/tools/dockerfile/distribtest/python_ubuntu1204_x64/Dockerfile b/tools/dockerfile/distribtest/python_ubuntu1204_x64/Dockerfile
index 7476d5fa09..7dd499f8a0 100644
--- a/tools/dockerfile/distribtest/python_ubuntu1204_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/python_ubuntu1204_x64/Dockerfile
@@ -16,4 +16,6 @@ FROM ubuntu:12.04
RUN apt-get update -y && apt-get install -y python python-pip
-RUN pip install virtualenv
+# Use --index-url to workaround
+# https://stackoverflow.com/questions/21294997/pip-connection-failure-cannot-fetch-index-base-url-http-pypi-python-org-simpl
+RUN pip install --index-url=https://pypi.python.org/simple/ virtualenv
diff --git a/tools/dockerfile/distribtest/python_wheezy_x64/Dockerfile b/tools/dockerfile/distribtest/python_wheezy_x64/Dockerfile
index 0572cc1e6d..c17d7bcba2 100644
--- a/tools/dockerfile/distribtest/python_wheezy_x64/Dockerfile
+++ b/tools/dockerfile/distribtest/python_wheezy_x64/Dockerfile
@@ -16,4 +16,6 @@ FROM debian:wheezy
RUN apt-get update -y && apt-get install -y python python-pip
-RUN pip install virtualenv
+# Use --index-url to workaround
+# https://stackoverflow.com/questions/21294997/pip-connection-failure-cannot-fetch-index-base-url-http-pypi-python-org-simpl
+RUN pip install --index-url=https://pypi.python.org/simple/ virtualenv
diff --git a/tools/dockerfile/distribtest/ruby_ubuntu1504_x64/Dockerfile b/tools/dockerfile/distribtest/ruby_ubuntu1504_x64/Dockerfile
deleted file mode 100644
index 3300efd5bc..0000000000
--- a/tools/dockerfile/distribtest/ruby_ubuntu1504_x64/Dockerfile
+++ /dev/null
@@ -1,19 +0,0 @@
-# Copyright 2015 gRPC authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-FROM ubuntu:15.04
-
-RUN apt-get update -y && apt-get install -y ruby-full
-
-RUN gem install bundler
diff --git a/tools/dockerfile/distribtest/ruby_ubuntu1510_x64/Dockerfile b/tools/dockerfile/distribtest/ruby_ubuntu1510_x64/Dockerfile
deleted file mode 100644
index 1fc7820959..0000000000
--- a/tools/dockerfile/distribtest/ruby_ubuntu1510_x64/Dockerfile
+++ /dev/null
@@ -1,19 +0,0 @@
-# Copyright 2015 gRPC authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-FROM ubuntu:15.10
-
-RUN apt-get update -y && apt-get install -y ruby-full
-
-RUN gem install bundler
diff --git a/tools/dockerfile/interoptest/grpc_interop_node/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_node/Dockerfile
index 17671a384e..b480d31da2 100644
--- a/tools/dockerfile/interoptest/grpc_interop_node/Dockerfile
+++ b/tools/dockerfile/interoptest/grpc_interop_node/Dockerfile
@@ -75,7 +75,8 @@ RUN /bin/bash -l -c "nvm install 4 && npm config set cache /tmp/npm-cache && npm
RUN /bin/bash -l -c "nvm install 5 && npm config set cache /tmp/npm-cache && npm install -g npm"
RUN /bin/bash -l -c "nvm install 6 && npm config set cache /tmp/npm-cache && npm install -g npm"
RUN /bin/bash -l -c "nvm install 8 && npm config set cache /tmp/npm-cache && npm install -g npm"
-RUN /bin/bash -l -c "nvm alias default 8"
+RUN /bin/bash -l -c "nvm install 9 && npm config set cache /tmp/npm-cache && npm install -g npm"
+RUN /bin/bash -l -c "nvm alias default 9"
# Prepare ccache
RUN ln -s /usr/bin/ccache /usr/local/bin/gcc
RUN ln -s /usr/bin/ccache /usr/local/bin/g++
diff --git a/tools/dockerfile/interoptest/grpc_interop_nodepurejs/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_nodepurejs/Dockerfile
new file mode 100644
index 0000000000..7f3b20aea2
--- /dev/null
+++ b/tools/dockerfile/interoptest/grpc_interop_nodepurejs/Dockerfile
@@ -0,0 +1,77 @@
+# Copyright 2015 gRPC authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+FROM debian:jessie
+
+# Install Git and basic packages.
+RUN apt-get update && apt-get install -y \
+ autoconf \
+ autotools-dev \
+ build-essential \
+ bzip2 \
+ ccache \
+ curl \
+ dnsutils \
+ 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
+
+#==================
+# Node dependencies
+
+# Install nvm
+RUN touch .profile
+RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash
+# Install all versions of node that we want to test
+RUN /bin/bash -l -c "nvm install 4 && npm config set cache /tmp/npm-cache && npm install -g npm"
+RUN /bin/bash -l -c "nvm install 5 && npm config set cache /tmp/npm-cache && npm install -g npm"
+RUN /bin/bash -l -c "nvm install 6 && npm config set cache /tmp/npm-cache && npm install -g npm"
+RUN /bin/bash -l -c "nvm install 8 && npm config set cache /tmp/npm-cache && npm install -g npm"
+RUN /bin/bash -l -c "nvm install 9 && npm config set cache /tmp/npm-cache && npm install -g npm"
+RUN /bin/bash -l -c "nvm alias default 9"
+# 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_nodepurejs/build_interop.sh b/tools/dockerfile/interoptest/grpc_interop_nodepurejs/build_interop.sh
new file mode 100755
index 0000000000..d41ccacd2f
--- /dev/null
+++ b/tools/dockerfile/interoptest/grpc_interop_nodepurejs/build_interop.sh
@@ -0,0 +1,36 @@
+#!/bin/bash
+# Copyright 2015 gRPC authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# Builds Node interop server and client in a base image.
+set -e
+
+mkdir -p /var/local/git
+git clone /var/local/jenkins/grpc-node /var/local/git/grpc-node
+# clone gRPC submodules, use data from locally cloned submodules where possible
+(cd /var/local/jenkins/grpc-node/ && git submodule foreach 'cd /var/local/git/grpc-node \
+&& git submodule update --init --recursive --reference /var/local/jenkins/grpc-node/${name} \
+${name}')
+
+# copy service account keys if available
+cp -r /var/local/jenkins/service_account $HOME || true
+
+cd /var/local/git/grpc-node
+
+# build Node interop client & server
+npm install -g gulp
+npm install
+gulp js.core.install
+gulp protobuf.install
+gulp internal.test.install
diff --git a/tools/dockerfile/push_testing_images.sh b/tools/dockerfile/push_testing_images.sh
index b76ceea8f6..2831e8ad0c 100755
--- a/tools/dockerfile/push_testing_images.sh
+++ b/tools/dockerfile/push_testing_images.sh
@@ -29,7 +29,7 @@ cd -
DOCKERHUB_ORGANIZATION=grpctesting
-for DOCKERFILE_DIR in tools/dockerfile/test/* tools/dockerfile/grpc_artifact_* tools/dockerfile/interoptest/* tools/dockerfile/distribtest/cpp_jessie_x64 third_party/rake-compiler-dock
+for DOCKERFILE_DIR in tools/dockerfile/test/* tools/dockerfile/grpc_artifact_* tools/dockerfile/interoptest/* tools/dockerfile/distribtest/* third_party/rake-compiler-dock
do
# Generate image name based on Dockerfile checksum. That works well as long
# as can count on dockerfiles being written in a way that changing the logical
diff --git a/tools/dockerfile/test/multilang_jessie_x64/Dockerfile b/tools/dockerfile/test/multilang_jessie_x64/Dockerfile
index 362c061f6d..5818ff9fb4 100644
--- a/tools/dockerfile/test/multilang_jessie_x64/Dockerfile
+++ b/tools/dockerfile/test/multilang_jessie_x64/Dockerfile
@@ -104,7 +104,8 @@ RUN /bin/bash -l -c "nvm install 4 && npm config set cache /tmp/npm-cache && npm
RUN /bin/bash -l -c "nvm install 5 && npm config set cache /tmp/npm-cache && npm install -g npm"
RUN /bin/bash -l -c "nvm install 6 && npm config set cache /tmp/npm-cache && npm install -g npm"
RUN /bin/bash -l -c "nvm install 8 && npm config set cache /tmp/npm-cache && npm install -g npm"
-RUN /bin/bash -l -c "nvm alias default 8"
+RUN /bin/bash -l -c "nvm install 9 && npm config set cache /tmp/npm-cache && npm install -g npm"
+RUN /bin/bash -l -c "nvm alias default 9"
#=================
# PHP dependencies
diff --git a/tools/dockerfile/test/node_jessie_x64/Dockerfile b/tools/dockerfile/test/node_jessie_x64/Dockerfile
index 9f19e76bf5..05c8319495 100644
--- a/tools/dockerfile/test/node_jessie_x64/Dockerfile
+++ b/tools/dockerfile/test/node_jessie_x64/Dockerfile
@@ -90,7 +90,8 @@ RUN /bin/bash -l -c "nvm install 4 && npm config set cache /tmp/npm-cache && npm
RUN /bin/bash -l -c "nvm install 5 && npm config set cache /tmp/npm-cache && npm install -g npm"
RUN /bin/bash -l -c "nvm install 6 && npm config set cache /tmp/npm-cache && npm install -g npm"
RUN /bin/bash -l -c "nvm install 8 && npm config set cache /tmp/npm-cache && npm install -g npm"
-RUN /bin/bash -l -c "nvm alias default 8"
+RUN /bin/bash -l -c "nvm install 9 && npm config set cache /tmp/npm-cache && npm install -g npm"
+RUN /bin/bash -l -c "nvm alias default 9"
# Prepare ccache
RUN ln -s /usr/bin/ccache /usr/local/bin/gcc
RUN ln -s /usr/bin/ccache /usr/local/bin/g++
diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal
index ff5abc679d..c822d9b3cd 100644
--- a/tools/doxygen/Doxyfile.c++.internal
+++ b/tools/doxygen/Doxyfile.c++.internal
@@ -1070,9 +1070,9 @@ src/core/lib/iomgr/executor.h \
src/core/lib/iomgr/gethostname.h \
src/core/lib/iomgr/iocp_windows.h \
src/core/lib/iomgr/iomgr.h \
+src/core/lib/iomgr/iomgr_custom.h \
src/core/lib/iomgr/iomgr_internal.h \
src/core/lib/iomgr/iomgr_posix.h \
-src/core/lib/iomgr/iomgr_uv.h \
src/core/lib/iomgr/is_epollexclusive_available.h \
src/core/lib/iomgr/load_file.h \
src/core/lib/iomgr/lockfree_event.h \
@@ -1080,14 +1080,17 @@ src/core/lib/iomgr/nameser.h \
src/core/lib/iomgr/network_status_tracker.h \
src/core/lib/iomgr/polling_entity.h \
src/core/lib/iomgr/pollset.h \
+src/core/lib/iomgr/pollset_custom.h \
src/core/lib/iomgr/pollset_set.h \
+src/core/lib/iomgr/pollset_set_custom.h \
src/core/lib/iomgr/pollset_set_windows.h \
-src/core/lib/iomgr/pollset_uv.h \
src/core/lib/iomgr/pollset_windows.h \
src/core/lib/iomgr/port.h \
src/core/lib/iomgr/resolve_address.h \
+src/core/lib/iomgr/resolve_address_custom.h \
src/core/lib/iomgr/resource_quota.h \
src/core/lib/iomgr/sockaddr.h \
+src/core/lib/iomgr/sockaddr_custom.h \
src/core/lib/iomgr/sockaddr_posix.h \
src/core/lib/iomgr/sockaddr_utils.h \
src/core/lib/iomgr/sockaddr_windows.h \
@@ -1099,17 +1102,16 @@ src/core/lib/iomgr/socket_windows.h \
src/core/lib/iomgr/sys_epoll_wrapper.h \
src/core/lib/iomgr/tcp_client.h \
src/core/lib/iomgr/tcp_client_posix.h \
+src/core/lib/iomgr/tcp_custom.h \
src/core/lib/iomgr/tcp_posix.h \
src/core/lib/iomgr/tcp_server.h \
src/core/lib/iomgr/tcp_server_utils_posix.h \
-src/core/lib/iomgr/tcp_uv.h \
src/core/lib/iomgr/tcp_windows.h \
src/core/lib/iomgr/time_averaged_stats.h \
src/core/lib/iomgr/timer.h \
-src/core/lib/iomgr/timer_generic.h \
+src/core/lib/iomgr/timer_custom.h \
src/core/lib/iomgr/timer_heap.h \
src/core/lib/iomgr/timer_manager.h \
-src/core/lib/iomgr/timer_uv.h \
src/core/lib/iomgr/udp_server.h \
src/core/lib/iomgr/unix_sockets_posix.h \
src/core/lib/iomgr/wakeup_fd_cv.h \
diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal
index 68e808675e..cc63a47e0f 100644
--- a/tools/doxygen/Doxyfile.core.internal
+++ b/tools/doxygen/Doxyfile.core.internal
@@ -1178,11 +1178,13 @@ src/core/lib/iomgr/iocp_windows.cc \
src/core/lib/iomgr/iocp_windows.h \
src/core/lib/iomgr/iomgr.cc \
src/core/lib/iomgr/iomgr.h \
+src/core/lib/iomgr/iomgr_custom.cc \
+src/core/lib/iomgr/iomgr_custom.h \
+src/core/lib/iomgr/iomgr_internal.cc \
src/core/lib/iomgr/iomgr_internal.h \
src/core/lib/iomgr/iomgr_posix.cc \
src/core/lib/iomgr/iomgr_posix.h \
src/core/lib/iomgr/iomgr_uv.cc \
-src/core/lib/iomgr/iomgr_uv.h \
src/core/lib/iomgr/iomgr_windows.cc \
src/core/lib/iomgr/is_epollexclusive_available.cc \
src/core/lib/iomgr/is_epollexclusive_available.h \
@@ -1195,23 +1197,30 @@ src/core/lib/iomgr/network_status_tracker.cc \
src/core/lib/iomgr/network_status_tracker.h \
src/core/lib/iomgr/polling_entity.cc \
src/core/lib/iomgr/polling_entity.h \
+src/core/lib/iomgr/pollset.cc \
src/core/lib/iomgr/pollset.h \
+src/core/lib/iomgr/pollset_custom.cc \
+src/core/lib/iomgr/pollset_custom.h \
+src/core/lib/iomgr/pollset_set.cc \
src/core/lib/iomgr/pollset_set.h \
-src/core/lib/iomgr/pollset_set_uv.cc \
+src/core/lib/iomgr/pollset_set_custom.cc \
+src/core/lib/iomgr/pollset_set_custom.h \
src/core/lib/iomgr/pollset_set_windows.cc \
src/core/lib/iomgr/pollset_set_windows.h \
src/core/lib/iomgr/pollset_uv.cc \
-src/core/lib/iomgr/pollset_uv.h \
src/core/lib/iomgr/pollset_windows.cc \
src/core/lib/iomgr/pollset_windows.h \
src/core/lib/iomgr/port.h \
+src/core/lib/iomgr/resolve_address.cc \
src/core/lib/iomgr/resolve_address.h \
+src/core/lib/iomgr/resolve_address_custom.cc \
+src/core/lib/iomgr/resolve_address_custom.h \
src/core/lib/iomgr/resolve_address_posix.cc \
-src/core/lib/iomgr/resolve_address_uv.cc \
src/core/lib/iomgr/resolve_address_windows.cc \
src/core/lib/iomgr/resource_quota.cc \
src/core/lib/iomgr/resource_quota.h \
src/core/lib/iomgr/sockaddr.h \
+src/core/lib/iomgr/sockaddr_custom.h \
src/core/lib/iomgr/sockaddr_posix.h \
src/core/lib/iomgr/sockaddr_utils.cc \
src/core/lib/iomgr/sockaddr_utils.h \
@@ -1230,36 +1239,40 @@ src/core/lib/iomgr/socket_utils_windows.cc \
src/core/lib/iomgr/socket_windows.cc \
src/core/lib/iomgr/socket_windows.h \
src/core/lib/iomgr/sys_epoll_wrapper.h \
+src/core/lib/iomgr/tcp_client.cc \
src/core/lib/iomgr/tcp_client.h \
+src/core/lib/iomgr/tcp_client_custom.cc \
src/core/lib/iomgr/tcp_client_posix.cc \
src/core/lib/iomgr/tcp_client_posix.h \
-src/core/lib/iomgr/tcp_client_uv.cc \
src/core/lib/iomgr/tcp_client_windows.cc \
+src/core/lib/iomgr/tcp_custom.cc \
+src/core/lib/iomgr/tcp_custom.h \
src/core/lib/iomgr/tcp_posix.cc \
src/core/lib/iomgr/tcp_posix.h \
+src/core/lib/iomgr/tcp_server.cc \
src/core/lib/iomgr/tcp_server.h \
+src/core/lib/iomgr/tcp_server_custom.cc \
src/core/lib/iomgr/tcp_server_posix.cc \
src/core/lib/iomgr/tcp_server_utils_posix.h \
src/core/lib/iomgr/tcp_server_utils_posix_common.cc \
src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc \
src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc \
-src/core/lib/iomgr/tcp_server_uv.cc \
src/core/lib/iomgr/tcp_server_windows.cc \
src/core/lib/iomgr/tcp_uv.cc \
-src/core/lib/iomgr/tcp_uv.h \
src/core/lib/iomgr/tcp_windows.cc \
src/core/lib/iomgr/tcp_windows.h \
src/core/lib/iomgr/time_averaged_stats.cc \
src/core/lib/iomgr/time_averaged_stats.h \
+src/core/lib/iomgr/timer.cc \
src/core/lib/iomgr/timer.h \
+src/core/lib/iomgr/timer_custom.cc \
+src/core/lib/iomgr/timer_custom.h \
src/core/lib/iomgr/timer_generic.cc \
-src/core/lib/iomgr/timer_generic.h \
src/core/lib/iomgr/timer_heap.cc \
src/core/lib/iomgr/timer_heap.h \
src/core/lib/iomgr/timer_manager.cc \
src/core/lib/iomgr/timer_manager.h \
src/core/lib/iomgr/timer_uv.cc \
-src/core/lib/iomgr/timer_uv.h \
src/core/lib/iomgr/udp_server.cc \
src/core/lib/iomgr/udp_server.h \
src/core/lib/iomgr/unix_sockets_posix.cc \
@@ -1467,6 +1480,11 @@ src/core/tsi/alts_transport_security.cc \
src/core/tsi/alts_transport_security.h \
src/core/tsi/fake_transport_security.cc \
src/core/tsi/fake_transport_security.h \
+src/core/tsi/ssl/session_cache/ssl_session.h \
+src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc \
+src/core/tsi/ssl/session_cache/ssl_session_cache.cc \
+src/core/tsi/ssl/session_cache/ssl_session_cache.h \
+src/core/tsi/ssl/session_cache/ssl_session_openssl.cc \
src/core/tsi/ssl_transport_security.cc \
src/core/tsi/ssl_transport_security.h \
src/core/tsi/ssl_types.h \
diff --git a/tools/internal_ci/linux/grpc_bazel_on_foundry_base.sh b/tools/internal_ci/linux/grpc_bazel_on_foundry_base.sh
index 098d588e3b..a202aafb50 100755
--- a/tools/internal_ci/linux/grpc_bazel_on_foundry_base.sh
+++ b/tools/internal_ci/linux/grpc_bazel_on_foundry_base.sh
@@ -37,7 +37,7 @@ source tools/internal_ci/helper_scripts/prepare_build_linux_rc
# TODO(adelez): implement size for test targets and change test_timeout back
"${KOKORO_GFILE_DIR}/bazel_wrapper.py" \
--host_jvm_args=-Dbazel.DigestFunction=SHA256 \
- test --jobs="50" \
+ test --jobs="100" \
--test_timeout="3600,3600,3600,3600" \
--test_output=errors \
--verbose_failures=true \
diff --git a/tools/internal_ci/linux/grpc_build_artifacts_extra.cfg b/tools/internal_ci/linux/grpc_build_artifacts_extra.cfg
new file mode 100644
index 0000000000..619e3ea3a9
--- /dev/null
+++ b/tools/internal_ci/linux/grpc_build_artifacts_extra.cfg
@@ -0,0 +1,26 @@
+# Copyright 2017 gRPC authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Config file for the internal CI (in protobuf text format)
+
+# Location of the continuous shell script in repository.
+build_file: "grpc/tools/internal_ci/linux/grpc_build_artifacts_extra.sh"
+timeout_mins: 240
+action {
+ define_artifacts {
+ regex: "**/*sponge_log.xml"
+ regex: "github/grpc/reports/**"
+ regex: "github/grpc/artifacts/**"
+ }
+}
diff --git a/tools/dockerfile/distribtest/python_ubuntu1510_x64/Dockerfile b/tools/internal_ci/linux/grpc_build_artifacts_extra.sh
index 43db310b6d..718123d7da 100644..100755
--- a/tools/dockerfile/distribtest/python_ubuntu1510_x64/Dockerfile
+++ b/tools/internal_ci/linux/grpc_build_artifacts_extra.sh
@@ -1,4 +1,5 @@
-# Copyright 2015 gRPC authors.
+#!/bin/bash
+# Copyright 2017 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -12,8 +13,17 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-FROM ubuntu:15.10
+set -ex
-RUN apt-get update -y && apt-get install -y python python-pip
+# change to grpc repo root
+cd $(dirname $0)/../../..
-RUN pip install virtualenv
+source tools/internal_ci/helper_scripts/prepare_build_linux_rc
+
+set +ex
+[[ -s /etc/profile.d/rvm.sh ]] && . /etc/profile.d/rvm.sh
+set -e # rvm commands are very verbose
+rvm --default use ruby-2.4.1
+set -ex
+
+tools/run_tests/task_runner.py -f artifact linux_extra armv7 -j 6
diff --git a/tools/dockerfile/distribtest/node_ubuntu1504_x64/Dockerfile b/tools/internal_ci/linux/grpc_build_packages.cfg
index 399a43ab89..6a4a163dfc 100644
--- a/tools/dockerfile/distribtest/node_ubuntu1504_x64/Dockerfile
+++ b/tools/internal_ci/linux/grpc_build_packages.cfg
@@ -1,4 +1,4 @@
-# Copyright 2016 gRPC authors.
+# Copyright 2017 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -12,10 +12,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-FROM ubuntu:15.04
+# Config file for the internal CI (in protobuf text format)
-RUN apt-get update && apt-get install -y curl
-
-# Install nvm
-RUN touch .profile
-RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.2/install.sh | bash \ No newline at end of file
+# Location of the continuous shell script in repository.
+build_file: "grpc/tools/internal_ci/linux/grpc_build_packages.sh"
+timeout_mins: 120
+action {
+ define_artifacts {
+ regex: "**/*sponge_log.xml"
+ regex: "github/grpc/reports/**"
+ regex: "github/grpc/artifacts/**"
+ }
+}
diff --git a/tools/internal_ci/linux/grpc_build_packages.sh b/tools/internal_ci/linux/grpc_build_packages.sh
new file mode 100644
index 0000000000..9f65d8ed5f
--- /dev/null
+++ b/tools/internal_ci/linux/grpc_build_packages.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+# Copyright 2017 gRPC authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set -ex
+
+# change to grpc repo root
+cd $(dirname $0)/../../..
+
+source tools/internal_ci/helper_scripts/prepare_build_linux_rc
+
+set +ex
+[[ -s /etc/profile.d/rvm.sh ]] && . /etc/profile.d/rvm.sh
+set -e # rvm commands are very verbose
+rvm --default use ruby-2.4.1
+set -ex
+
+# Move artifacts generated by the previous step in the build chain to a place
+# where they can be accessed from within a docker container that builds
+# the packages
+mv ${KOKORO_GFILE_DIR}/github/grpc/artifacts input_artifacts || true
+ls -R input_artifacts || true
+
+tools/run_tests/task_runner.py -f package linux -j 6
diff --git a/src/python/grpcio_tests/tests/unit/framework/interfaces/face/_3069_test_constant.py b/tools/internal_ci/linux/grpc_distribtests.cfg
index 6eb7ba33f6..0f1d79355a 100644
--- a/src/python/grpcio_tests/tests/unit/framework/interfaces/face/_3069_test_constant.py
+++ b/tools/internal_ci/linux/grpc_distribtests.cfg
@@ -1,4 +1,4 @@
-# Copyright 2015 gRPC authors.
+# Copyright 2017 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -11,11 +11,16 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-"""A test constant working around issue 3069."""
-# test_constants is referenced from specification in this module.
-from tests.unit.framework.common import test_constants # pylint: disable=unused-import
+# Config file for the internal CI (in protobuf text format)
-# TODO(issue 3069): Replace uses of this constant with
-# test_constants.SHORT_TIMEOUT.
-REALLY_SHORT_TIMEOUT = 0.1
+# Location of the continuous shell script in repository.
+build_file: "grpc/tools/internal_ci/linux/grpc_distribtests.sh"
+timeout_mins: 120
+action {
+ define_artifacts {
+ regex: "**/*sponge_log.xml"
+ regex: "github/grpc/reports/**"
+ regex: "github/grpc/artifacts/**"
+ }
+}
diff --git a/tools/internal_ci/linux/grpc_distribtests.sh b/tools/internal_ci/linux/grpc_distribtests.sh
new file mode 100644
index 0000000000..47e4bf877a
--- /dev/null
+++ b/tools/internal_ci/linux/grpc_distribtests.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+# Copyright 2017 gRPC authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set -ex
+
+# change to grpc repo root
+cd $(dirname $0)/../../..
+
+source tools/internal_ci/helper_scripts/prepare_build_linux_rc
+
+set +ex
+[[ -s /etc/profile.d/rvm.sh ]] && . /etc/profile.d/rvm.sh
+set -e # rvm commands are very verbose
+rvm --default use ruby-2.4.1
+set -ex
+
+# Move packages generated by the previous step in the build chain to a place
+# where they can be accessed from within a docker container that run the
+# distribtests
+mv ${KOKORO_GFILE_DIR}/github/grpc/artifacts input_artifacts || true
+ls -R input_artifacts || true
+
+tools/run_tests/task_runner.py -f distribtest linux -j 6
diff --git a/tools/internal_ci/linux/grpc_msan_on_foundry.sh b/tools/internal_ci/linux/grpc_msan_on_foundry.sh
index 16586a2d0d..60b30ff4f6 100644
--- a/tools/internal_ci/linux/grpc_msan_on_foundry.sh
+++ b/tools/internal_ci/linux/grpc_msan_on_foundry.sh
@@ -37,7 +37,7 @@ source tools/internal_ci/helper_scripts/prepare_build_linux_rc
"${KOKORO_GFILE_DIR}/bazel_wrapper.py" \
--host_jvm_args=-Dbazel.DigestFunction=SHA256 \
- test --jobs="50" \
+ test --jobs="100" \
--test_timeout="3600,3600,3600,3600" \
--test_output=errors \
--verbose_failures=true \
diff --git a/tools/internal_ci/linux/grpc_ubsan_on_foundry.sh b/tools/internal_ci/linux/grpc_ubsan_on_foundry.sh
index cd1a340431..a87547d1b3 100644
--- a/tools/internal_ci/linux/grpc_ubsan_on_foundry.sh
+++ b/tools/internal_ci/linux/grpc_ubsan_on_foundry.sh
@@ -37,7 +37,7 @@ source tools/internal_ci/helper_scripts/prepare_build_linux_rc
"${KOKORO_GFILE_DIR}/bazel_wrapper.py" \
--host_jvm_args=-Dbazel.DigestFunction=SHA256 \
- test --jobs="50" \
+ test --jobs="100" \
--test_timeout="3600,3600,3600,3600" \
--test_output=errors \
--verbose_failures=true \
diff --git a/tools/internal_ci/macos/grpc_distribtests.cfg b/tools/internal_ci/macos/grpc_distribtests.cfg
new file mode 100644
index 0000000000..ae88f39b90
--- /dev/null
+++ b/tools/internal_ci/macos/grpc_distribtests.cfg
@@ -0,0 +1,27 @@
+# Copyright 2017 gRPC authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Config file for the internal CI (in protobuf text format)
+
+# Location of the continuous shell script in repository.
+build_file: "grpc/tools/internal_ci/macos/grpc_distribtests.sh"
+gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/GrpcTesting-d0eeee2db331.json"
+timeout_mins: 120
+action {
+ define_artifacts {
+ regex: "**/*sponge_log.xml"
+ regex: "github/grpc/reports/**"
+ regex: "github/grpc/artifacts/**"
+ }
+}
diff --git a/tools/internal_ci/macos/grpc_distribtests.sh b/tools/internal_ci/macos/grpc_distribtests.sh
new file mode 100644
index 0000000000..59ea833eec
--- /dev/null
+++ b/tools/internal_ci/macos/grpc_distribtests.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+# Copyright 2017 gRPC authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set -ex
+
+# change to grpc repo root
+cd $(dirname $0)/../../..
+
+source tools/internal_ci/helper_scripts/prepare_build_macos_rc
+
+# Move packages generated by the previous step in the build chain.
+mv ${KOKORO_GFILE_DIR}/github/grpc/artifacts input_artifacts || true
+ls -R input_artifacts || true
+
+tools/run_tests/task_runner.py -f distribtest macos
diff --git a/tools/internal_ci/windows/grpc_build_packages.bat b/tools/internal_ci/windows/grpc_build_packages.bat
new file mode 100644
index 0000000000..23ba365e40
--- /dev/null
+++ b/tools/internal_ci/windows/grpc_build_packages.bat
@@ -0,0 +1,35 @@
+@rem Copyright 2017 gRPC authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem http://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+
+@rem Move python installation from _32bit to _32bits where they are expected by python artifact builder
+@rem TODO(jtattermusch): get rid of this hack
+rename C:\Python27_32bit Python27_32bits
+rename C:\Python34_32bit Python34_32bits
+rename C:\Python35_32bit Python35_32bits
+rename C:\Python36_32bit Python36_32bits
+
+@rem enter repo root
+cd /d %~dp0\..\..\..
+
+call tools/internal_ci/helper_scripts/prepare_build_windows.bat
+
+@rem Move artifacts generated by the previous step in the build chain.
+powershell -Command "mv %KOKORO_GFILE_DIR%\github\grpc\artifacts input_artifacts"
+dir input_artifacts
+
+python tools/run_tests/task_runner.py -f package windows -j 4 || goto :error
+goto :EOF
+
+:error
+exit /b %errorlevel%
diff --git a/tools/dockerfile/distribtest/python_ubuntu1504_x64/Dockerfile b/tools/internal_ci/windows/grpc_build_packages.cfg
index 76941de80b..65a8b1eef3 100644
--- a/tools/dockerfile/distribtest/python_ubuntu1504_x64/Dockerfile
+++ b/tools/internal_ci/windows/grpc_build_packages.cfg
@@ -1,4 +1,4 @@
-# Copyright 2015 gRPC authors.
+# Copyright 2017 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -12,8 +12,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-FROM ubuntu:15.04
+# Config file for the internal CI (in protobuf text format)
-RUN apt-get update -y && apt-get install -y python python-pip
-
-RUN pip install virtualenv
+# Location of the continuous shell script in repository.
+build_file: "grpc/tools/internal_ci/windows/grpc_build_packages.bat"
+timeout_mins: 120
+action {
+ define_artifacts {
+ regex: "**/*sponge_log.xml"
+ regex: "github/grpc/reports/**"
+ regex: "github/grpc/artifacts/**"
+ }
+}
diff --git a/tools/internal_ci/windows/grpc_distribtests.bat b/tools/internal_ci/windows/grpc_distribtests.bat
new file mode 100644
index 0000000000..d6d50b684f
--- /dev/null
+++ b/tools/internal_ci/windows/grpc_distribtests.bat
@@ -0,0 +1,35 @@
+@rem Copyright 2017 gRPC authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem http://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+
+@rem Move python installation from _32bit to _32bits where they are expected by python artifact builder
+@rem TODO(jtattermusch): get rid of this hack
+rename C:\Python27_32bit Python27_32bits
+rename C:\Python34_32bit Python34_32bits
+rename C:\Python35_32bit Python35_32bits
+rename C:\Python36_32bit Python36_32bits
+
+@rem enter repo root
+cd /d %~dp0\..\..\..
+
+call tools/internal_ci/helper_scripts/prepare_build_windows.bat
+
+@rem Move packages generated by the previous step in the build chain.
+powershell -Command "mv %KOKORO_GFILE_DIR%\github\grpc\artifacts input_artifacts"
+dir input_artifacts
+
+python tools/run_tests/task_runner.py -f distribtest windows -j 4 || goto :error
+goto :EOF
+
+:error
+exit /b %errorlevel%
diff --git a/tools/dockerfile/distribtest/node_ubuntu1510_x64/Dockerfile b/tools/internal_ci/windows/grpc_distribtests.cfg
index 41752d3e70..1766e601e5 100644
--- a/tools/dockerfile/distribtest/node_ubuntu1510_x64/Dockerfile
+++ b/tools/internal_ci/windows/grpc_distribtests.cfg
@@ -1,4 +1,4 @@
-# Copyright 2016 gRPC authors.
+# Copyright 2017 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -12,10 +12,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-FROM ubuntu:15.10
+# Config file for the internal CI (in protobuf text format)
-RUN apt-get update && apt-get install -y curl
-
-# Install nvm
-RUN touch .profile
-RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.2/install.sh | bash \ No newline at end of file
+# Location of the continuous shell script in repository.
+build_file: "grpc/tools/internal_ci/windows/grpc_distribtests.bat"
+timeout_mins: 120
+action {
+ define_artifacts {
+ regex: "**/*sponge_log.xml"
+ regex: "github/grpc/reports/**"
+ regex: "github/grpc/artifacts/**"
+ }
+}
diff --git a/tools/interop_matrix/client_matrix.py b/tools/interop_matrix/client_matrix.py
index 83d75ec0eb..722cf8aea1 100644
--- a/tools/interop_matrix/client_matrix.py
+++ b/tools/interop_matrix/client_matrix.py
@@ -200,7 +200,16 @@ LANG_RELEASE_MATRIX = {
{
'v1.6.6': None
},
- #{'v1.7.1': None}, Failing tests
+ # TODO: https://github.com/grpc/grpc-node/issues/235.
+ #{
+ # 'v1.7.2': None
+ #},
+ {
+ 'v1.8.4': None
+ },
+ {
+ 'v1.9.1': None
+ }
],
'ruby': [
{
@@ -293,3 +302,21 @@ LANG_RELEASE_MATRIX = {
},
],
}
+
+# This matrix lists the version of testcases to use for a release. As new
+# releases come out, some older docker commands for running tests need to be
+# changed, hence the need for specifying which commands to use for a
+# particular version in some cases. If not specified, xxx__master file will be
+# used. For example, all java versions will run the commands in java__master.
+# The testcases files exist under the testcases directory.
+TESTCASES_VERSION_MATRIX = {
+ 'node_v1.0.1': 'node__v1.0.1',
+ 'node_v1.1.4': 'node__v1.1.4',
+ 'node_v1.2.5': 'node__v1.1.4',
+ 'node_v1.3.9': 'node__v1.1.4',
+ 'node_v1.4.2': 'node__v1.1.4',
+ 'node_v1.6.6': 'node__v1.1.4',
+ 'ruby_v1.0.1': 'ruby__v1.0.1',
+ 'csharp_v1.1.4': 'csharp__v1.1.4',
+ 'csharp_v1.2.5': 'csharp__v1.1.4',
+}
diff --git a/tools/interop_matrix/run_interop_matrix_tests.py b/tools/interop_matrix/run_interop_matrix_tests.py
index 3391ef51cc..57120d054e 100755
--- a/tools/interop_matrix/run_interop_matrix_tests.py
+++ b/tools/interop_matrix/run_interop_matrix_tests.py
@@ -59,7 +59,6 @@ argp.add_argument(
choices=['all', 'master'] + _RELEASES,
help='Release tags to test. When testing all '
'releases defined in client_matrix.py, use "all".')
-
argp.add_argument(
'-l',
'--language',
@@ -67,15 +66,12 @@ argp.add_argument(
nargs='+',
default=['all'],
help='Languages to test')
-
argp.add_argument(
'--keep',
action='store_true',
help='keep the created local images after finishing the tests.')
-
argp.add_argument(
'--report_file', default='report.xml', help='The result file to create.')
-
argp.add_argument(
'--allow_flakes',
default=False,
@@ -89,6 +85,12 @@ argp.add_argument(
type=str,
nargs='?',
help='Upload test results to a specified BQ table.')
+argp.add_argument(
+ '--server_host',
+ default='74.125.206.210',
+ type=str,
+ nargs='?',
+ help='The gateway to backend services.')
args = argp.parse_args()
@@ -145,14 +147,17 @@ def find_all_images_for_lang(lang):
# caches test cases (list of JobSpec) loaded from file. Keyed by lang and runtime.
def find_test_cases(lang, runtime, release, suite_name):
"""Returns the list of test cases from testcase files per lang/release."""
- file_tmpl = os.path.join(os.path.dirname(__file__), 'testcases/%s__%s')
- testcase_release = release
+ testcase_dir = os.path.join(os.path.dirname(__file__), 'testcases')
filename_prefix = lang
if lang == 'csharp':
filename_prefix = runtime
- if not os.path.exists(file_tmpl % (filename_prefix, release)):
- testcase_release = 'master'
- testcases = file_tmpl % (filename_prefix, testcase_release)
+ # Check to see if we need to use a particular version of test cases.
+ lang_version = '%s_%s' % (filename_prefix, release)
+ if lang_version in client_matrix.TESTCASES_VERSION_MATRIX:
+ testcases = os.path.join(
+ testcase_dir, client_matrix.TESTCASES_VERSION_MATRIX[lang_version])
+ else:
+ testcases = os.path.join(testcase_dir, '%s__master' % filename_prefix)
job_spec_list = []
try:
@@ -166,6 +171,20 @@ def find_test_cases(lang, runtime, release, suite_name):
'--server_host_override=(.*).sandbox.googleapis.com',
line)
server = m.group(1) if m else 'unknown_server'
+
+ # If server_host arg is not None, replace the original
+ # server_host with the one provided or append to the end of
+ # the command if server_host does not appear originally.
+ if args.server_host:
+ if line.find('--server_host=') > -1:
+ line = re.sub('--server_host=[^ ]*',
+ '--server_host=%s' % args.server_host,
+ line)
+ else:
+ line = '%s --server_host=%s"' % (line[:-1],
+ args.server_host)
+ print(line)
+
spec = jobset.JobSpec(
cmdline=line,
shortname='%s:%s:%s:%s' % (suite_name, lang, server,
diff --git a/tools/interop_matrix/testcases/csharp__master b/tools/interop_matrix/testcases/csharp__master
index 32f6b38041..c3cd6a48f8 100644
--- a/tools/interop_matrix/testcases/csharp__master
+++ b/tools/interop_matrix/testcases/csharp__master
@@ -1,20 +1,20 @@
#!/bin/bash
echo "Testing ${docker_image:=grpc_interop_csharp:a95229ca-d387-4127-ad48-69a7464e23b8}"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/net45 --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/net45 --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/net45 --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/net45 --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/net45 --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/net45 --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/net45 --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/net45 --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/net45 --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/net45 --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/net45 --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/net45 --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/net45 --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/net45 --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/net45 --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/net45 --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/net45 --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/net45 --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/net45 --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/net45 --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/net45 --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/net45 --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/net45 --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/net45 --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/net45 --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/net45 --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/net45 --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/net45 --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/net45 --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/net45 --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/net45 --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/net45 --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/net45 --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/net45 --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/net45 --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/net45 --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
diff --git a/tools/interop_matrix/testcases/csharp__v1.1.4 b/tools/interop_matrix/testcases/csharp__v1.1.4
index 19da788c12..f4a6fb1241 100644
--- a/tools/interop_matrix/testcases/csharp__v1.1.4
+++ b/tools/interop_matrix/testcases/csharp__v1.1.4
@@ -1,20 +1,20 @@
#!/bin/bash
echo "Testing ${docker_image:=grpc_interop_csharp:a95229ca-d387-4127-ad48-69a7464e23b8}"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
diff --git a/tools/interop_matrix/testcases/csharp__v1.2.5 b/tools/interop_matrix/testcases/csharp__v1.2.5
deleted file mode 100644
index 19da788c12..0000000000
--- a/tools/interop_matrix/testcases/csharp__v1.2.5
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/bash
-echo "Testing ${docker_image:=grpc_interop_csharp:a95229ca-d387-4127-ad48-69a7464e23b8}"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug --net=host $docker_image bash -c "mono Grpc.IntegrationTesting.Client.exe --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
diff --git a/tools/interop_matrix/testcases/csharpcoreclr__master b/tools/interop_matrix/testcases/csharpcoreclr__master
index 37e45989b2..aa8b9dd86d 100644
--- a/tools/interop_matrix/testcases/csharpcoreclr__master
+++ b/tools/interop_matrix/testcases/csharpcoreclr__master
@@ -1,20 +1,20 @@
#!/bin/bash
echo "Testing ${docker_image:=grpc_interop_csharpcoreclr:c7fbed09-e4c1-4aab-8dd9-1285b2c9598e}"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/netcoreapp1.0 --net=host $docker_image bash -c "dotnet exec Grpc.IntegrationTesting.Client.dll --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/netcoreapp1.0 --net=host $docker_image bash -c "dotnet exec Grpc.IntegrationTesting.Client.dll --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/netcoreapp1.0 --net=host $docker_image bash -c "dotnet exec Grpc.IntegrationTesting.Client.dll --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/netcoreapp1.0 --net=host $docker_image bash -c "dotnet exec Grpc.IntegrationTesting.Client.dll --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/netcoreapp1.0 --net=host $docker_image bash -c "dotnet exec Grpc.IntegrationTesting.Client.dll --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/netcoreapp1.0 --net=host $docker_image bash -c "dotnet exec Grpc.IntegrationTesting.Client.dll --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/netcoreapp1.0 --net=host $docker_image bash -c "dotnet exec Grpc.IntegrationTesting.Client.dll --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/netcoreapp1.0 --net=host $docker_image bash -c "dotnet exec Grpc.IntegrationTesting.Client.dll --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/netcoreapp1.0 --net=host $docker_image bash -c "dotnet exec Grpc.IntegrationTesting.Client.dll --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/netcoreapp1.0 --net=host $docker_image bash -c "dotnet exec Grpc.IntegrationTesting.Client.dll --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/netcoreapp1.0 --net=host $docker_image bash -c "dotnet exec Grpc.IntegrationTesting.Client.dll --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/netcoreapp1.0 --net=host $docker_image bash -c "dotnet exec Grpc.IntegrationTesting.Client.dll --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/netcoreapp1.0 --net=host $docker_image bash -c "dotnet exec Grpc.IntegrationTesting.Client.dll --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/netcoreapp1.0 --net=host $docker_image bash -c "dotnet exec Grpc.IntegrationTesting.Client.dll --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/netcoreapp1.0 --net=host $docker_image bash -c "dotnet exec Grpc.IntegrationTesting.Client.dll --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/netcoreapp1.0 --net=host $docker_image bash -c "dotnet exec Grpc.IntegrationTesting.Client.dll --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/netcoreapp1.0 --net=host $docker_image bash -c "dotnet exec Grpc.IntegrationTesting.Client.dll --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
-docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/netcoreapp1.0 --net=host $docker_image bash -c "dotnet exec Grpc.IntegrationTesting.Client.dll --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/netcoreapp1.0 --net=host $docker_image bash -c "dotnet exec Grpc.IntegrationTesting.Client.dll --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/netcoreapp1.0 --net=host $docker_image bash -c "dotnet exec Grpc.IntegrationTesting.Client.dll --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/netcoreapp1.0 --net=host $docker_image bash -c "dotnet exec Grpc.IntegrationTesting.Client.dll --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/netcoreapp1.0 --net=host $docker_image bash -c "dotnet exec Grpc.IntegrationTesting.Client.dll --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/netcoreapp1.0 --net=host $docker_image bash -c "dotnet exec Grpc.IntegrationTesting.Client.dll --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/netcoreapp1.0 --net=host $docker_image bash -c "dotnet exec Grpc.IntegrationTesting.Client.dll --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/netcoreapp1.0 --net=host $docker_image bash -c "dotnet exec Grpc.IntegrationTesting.Client.dll --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/netcoreapp1.0 --net=host $docker_image bash -c "dotnet exec Grpc.IntegrationTesting.Client.dll --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/netcoreapp1.0 --net=host $docker_image bash -c "dotnet exec Grpc.IntegrationTesting.Client.dll --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/netcoreapp1.0 --net=host $docker_image bash -c "dotnet exec Grpc.IntegrationTesting.Client.dll --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/netcoreapp1.0 --net=host $docker_image bash -c "dotnet exec Grpc.IntegrationTesting.Client.dll --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/netcoreapp1.0 --net=host $docker_image bash -c "dotnet exec Grpc.IntegrationTesting.Client.dll --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/netcoreapp1.0 --net=host $docker_image bash -c "dotnet exec Grpc.IntegrationTesting.Client.dll --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/netcoreapp1.0 --net=host $docker_image bash -c "dotnet exec Grpc.IntegrationTesting.Client.dll --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/netcoreapp1.0 --net=host $docker_image bash -c "dotnet exec Grpc.IntegrationTesting.Client.dll --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/netcoreapp1.0 --net=host $docker_image bash -c "dotnet exec Grpc.IntegrationTesting.Client.dll --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/netcoreapp1.0 --net=host $docker_image bash -c "dotnet exec Grpc.IntegrationTesting.Client.dll --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
+docker run -i --rm=true -w /var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Client/bin/Debug/netcoreapp1.0 --net=host $docker_image bash -c "dotnet exec Grpc.IntegrationTesting.Client.dll --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
diff --git a/tools/interop_matrix/testcases/cxx__master b/tools/interop_matrix/testcases/cxx__master
index e0fed53f08..629da1afd0 100755
--- a/tools/interop_matrix/testcases/cxx__master
+++ b/tools/interop_matrix/testcases/cxx__master
@@ -1,20 +1,20 @@
#!/bin/bash
echo "Testing ${docker_image:=grpc_interop_cxx:78de6f80-524d-4bc9-bfb2-f00c24ceafed}"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "bins/opt/interop_client --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "bins/opt/interop_client --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "bins/opt/interop_client --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "bins/opt/interop_client --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "bins/opt/interop_client --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "bins/opt/interop_client --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "bins/opt/interop_client --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "bins/opt/interop_client --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "bins/opt/interop_client --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "bins/opt/interop_client --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "bins/opt/interop_client --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "bins/opt/interop_client --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "bins/opt/interop_client --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "bins/opt/interop_client --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "bins/opt/interop_client --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "bins/opt/interop_client --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "bins/opt/interop_client --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "bins/opt/interop_client --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "bins/opt/interop_client --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "bins/opt/interop_client --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "bins/opt/interop_client --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "bins/opt/interop_client --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "bins/opt/interop_client --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "bins/opt/interop_client --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "bins/opt/interop_client --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "bins/opt/interop_client --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "bins/opt/interop_client --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "bins/opt/interop_client --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "bins/opt/interop_client --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "bins/opt/interop_client --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "bins/opt/interop_client --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "bins/opt/interop_client --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "bins/opt/interop_client --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "bins/opt/interop_client --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "bins/opt/interop_client --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "bins/opt/interop_client --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
diff --git a/tools/interop_matrix/testcases/go__master b/tools/interop_matrix/testcases/go__master
index 33b25d6a16..a7f83ae169 100755
--- a/tools/interop_matrix/testcases/go__master
+++ b/tools/interop_matrix/testcases/go__master
@@ -1,20 +1,20 @@
#!/bin/bash
echo "Testing ${docker_image:=grpc_interop_go:dd8fbf3a-4964-4387-9997-5dadeea09835}"
-docker run -i --rm=true -w /go/src/google.golang.org/grpc/interop/client --net=host $docker_image bash -c "go run client.go --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
-docker run -i --rm=true -w /go/src/google.golang.org/grpc/interop/client --net=host $docker_image bash -c "go run client.go --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
-docker run -i --rm=true -w /go/src/google.golang.org/grpc/interop/client --net=host $docker_image bash -c "go run client.go --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
-docker run -i --rm=true -w /go/src/google.golang.org/grpc/interop/client --net=host $docker_image bash -c "go run client.go --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
-docker run -i --rm=true -w /go/src/google.golang.org/grpc/interop/client --net=host $docker_image bash -c "go run client.go --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
-docker run -i --rm=true -w /go/src/google.golang.org/grpc/interop/client --net=host $docker_image bash -c "go run client.go --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
-docker run -i --rm=true -w /go/src/google.golang.org/grpc/interop/client --net=host $docker_image bash -c "go run client.go --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
-docker run -i --rm=true -w /go/src/google.golang.org/grpc/interop/client --net=host $docker_image bash -c "go run client.go --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
-docker run -i --rm=true -w /go/src/google.golang.org/grpc/interop/client --net=host $docker_image bash -c "go run client.go --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
-docker run -i --rm=true -w /go/src/google.golang.org/grpc/interop/client --net=host $docker_image bash -c "go run client.go --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
-docker run -i --rm=true -w /go/src/google.golang.org/grpc/interop/client --net=host $docker_image bash -c "go run client.go --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
-docker run -i --rm=true -w /go/src/google.golang.org/grpc/interop/client --net=host $docker_image bash -c "go run client.go --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
-docker run -i --rm=true -w /go/src/google.golang.org/grpc/interop/client --net=host $docker_image bash -c "go run client.go --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
-docker run -i --rm=true -w /go/src/google.golang.org/grpc/interop/client --net=host $docker_image bash -c "go run client.go --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
-docker run -i --rm=true -w /go/src/google.golang.org/grpc/interop/client --net=host $docker_image bash -c "go run client.go --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
-docker run -i --rm=true -w /go/src/google.golang.org/grpc/interop/client --net=host $docker_image bash -c "go run client.go --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
-docker run -i --rm=true -w /go/src/google.golang.org/grpc/interop/client --net=host $docker_image bash -c "go run client.go --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
-docker run -i --rm=true -w /go/src/google.golang.org/grpc/interop/client --net=host $docker_image bash -c "go run client.go --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
+docker run -i --rm=true -w /go/src/google.golang.org/grpc/interop/client --net=host $docker_image bash -c "go run client.go --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
+docker run -i --rm=true -w /go/src/google.golang.org/grpc/interop/client --net=host $docker_image bash -c "go run client.go --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
+docker run -i --rm=true -w /go/src/google.golang.org/grpc/interop/client --net=host $docker_image bash -c "go run client.go --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
+docker run -i --rm=true -w /go/src/google.golang.org/grpc/interop/client --net=host $docker_image bash -c "go run client.go --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
+docker run -i --rm=true -w /go/src/google.golang.org/grpc/interop/client --net=host $docker_image bash -c "go run client.go --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
+docker run -i --rm=true -w /go/src/google.golang.org/grpc/interop/client --net=host $docker_image bash -c "go run client.go --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
+docker run -i --rm=true -w /go/src/google.golang.org/grpc/interop/client --net=host $docker_image bash -c "go run client.go --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
+docker run -i --rm=true -w /go/src/google.golang.org/grpc/interop/client --net=host $docker_image bash -c "go run client.go --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
+docker run -i --rm=true -w /go/src/google.golang.org/grpc/interop/client --net=host $docker_image bash -c "go run client.go --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
+docker run -i --rm=true -w /go/src/google.golang.org/grpc/interop/client --net=host $docker_image bash -c "go run client.go --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
+docker run -i --rm=true -w /go/src/google.golang.org/grpc/interop/client --net=host $docker_image bash -c "go run client.go --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
+docker run -i --rm=true -w /go/src/google.golang.org/grpc/interop/client --net=host $docker_image bash -c "go run client.go --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
+docker run -i --rm=true -w /go/src/google.golang.org/grpc/interop/client --net=host $docker_image bash -c "go run client.go --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
+docker run -i --rm=true -w /go/src/google.golang.org/grpc/interop/client --net=host $docker_image bash -c "go run client.go --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
+docker run -i --rm=true -w /go/src/google.golang.org/grpc/interop/client --net=host $docker_image bash -c "go run client.go --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
+docker run -i --rm=true -w /go/src/google.golang.org/grpc/interop/client --net=host $docker_image bash -c "go run client.go --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
+docker run -i --rm=true -w /go/src/google.golang.org/grpc/interop/client --net=host $docker_image bash -c "go run client.go --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
+docker run -i --rm=true -w /go/src/google.golang.org/grpc/interop/client --net=host $docker_image bash -c "go run client.go --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
diff --git a/tools/interop_matrix/testcases/java__master b/tools/interop_matrix/testcases/java__master
index dbd87279a6..95a9c2834f 100755
--- a/tools/interop_matrix/testcases/java__master
+++ b/tools/interop_matrix/testcases/java__master
@@ -1,20 +1,20 @@
#!/bin/bash
echo "Testing ${docker_image:=grpc_interop_java:a764b50c-1788-4387-9b9e-5cfa93927006}"
-docker run -i --rm=true -w /var/local/git/grpc/../grpc-java --net=host $docker_image bash -c "./run-test-client.sh --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
-docker run -i --rm=true -w /var/local/git/grpc/../grpc-java --net=host $docker_image bash -c "./run-test-client.sh --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
-docker run -i --rm=true -w /var/local/git/grpc/../grpc-java --net=host $docker_image bash -c "./run-test-client.sh --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
-docker run -i --rm=true -w /var/local/git/grpc/../grpc-java --net=host $docker_image bash -c "./run-test-client.sh --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
-docker run -i --rm=true -w /var/local/git/grpc/../grpc-java --net=host $docker_image bash -c "./run-test-client.sh --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
-docker run -i --rm=true -w /var/local/git/grpc/../grpc-java --net=host $docker_image bash -c "./run-test-client.sh --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
-docker run -i --rm=true -w /var/local/git/grpc/../grpc-java --net=host $docker_image bash -c "./run-test-client.sh --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
-docker run -i --rm=true -w /var/local/git/grpc/../grpc-java --net=host $docker_image bash -c "./run-test-client.sh --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
-docker run -i --rm=true -w /var/local/git/grpc/../grpc-java --net=host $docker_image bash -c "./run-test-client.sh --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
-docker run -i --rm=true -w /var/local/git/grpc/../grpc-java --net=host $docker_image bash -c "./run-test-client.sh --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
-docker run -i --rm=true -w /var/local/git/grpc/../grpc-java --net=host $docker_image bash -c "./run-test-client.sh --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
-docker run -i --rm=true -w /var/local/git/grpc/../grpc-java --net=host $docker_image bash -c "./run-test-client.sh --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
-docker run -i --rm=true -w /var/local/git/grpc/../grpc-java --net=host $docker_image bash -c "./run-test-client.sh --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
-docker run -i --rm=true -w /var/local/git/grpc/../grpc-java --net=host $docker_image bash -c "./run-test-client.sh --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
-docker run -i --rm=true -w /var/local/git/grpc/../grpc-java --net=host $docker_image bash -c "./run-test-client.sh --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
-docker run -i --rm=true -w /var/local/git/grpc/../grpc-java --net=host $docker_image bash -c "./run-test-client.sh --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
-docker run -i --rm=true -w /var/local/git/grpc/../grpc-java --net=host $docker_image bash -c "./run-test-client.sh --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
-docker run -i --rm=true -w /var/local/git/grpc/../grpc-java --net=host $docker_image bash -c "./run-test-client.sh --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
+docker run -i --rm=true -w /var/local/git/grpc/../grpc-java --net=host $docker_image bash -c "./run-test-client.sh --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
+docker run -i --rm=true -w /var/local/git/grpc/../grpc-java --net=host $docker_image bash -c "./run-test-client.sh --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
+docker run -i --rm=true -w /var/local/git/grpc/../grpc-java --net=host $docker_image bash -c "./run-test-client.sh --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
+docker run -i --rm=true -w /var/local/git/grpc/../grpc-java --net=host $docker_image bash -c "./run-test-client.sh --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
+docker run -i --rm=true -w /var/local/git/grpc/../grpc-java --net=host $docker_image bash -c "./run-test-client.sh --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
+docker run -i --rm=true -w /var/local/git/grpc/../grpc-java --net=host $docker_image bash -c "./run-test-client.sh --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
+docker run -i --rm=true -w /var/local/git/grpc/../grpc-java --net=host $docker_image bash -c "./run-test-client.sh --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
+docker run -i --rm=true -w /var/local/git/grpc/../grpc-java --net=host $docker_image bash -c "./run-test-client.sh --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
+docker run -i --rm=true -w /var/local/git/grpc/../grpc-java --net=host $docker_image bash -c "./run-test-client.sh --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
+docker run -i --rm=true -w /var/local/git/grpc/../grpc-java --net=host $docker_image bash -c "./run-test-client.sh --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
+docker run -i --rm=true -w /var/local/git/grpc/../grpc-java --net=host $docker_image bash -c "./run-test-client.sh --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
+docker run -i --rm=true -w /var/local/git/grpc/../grpc-java --net=host $docker_image bash -c "./run-test-client.sh --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
+docker run -i --rm=true -w /var/local/git/grpc/../grpc-java --net=host $docker_image bash -c "./run-test-client.sh --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
+docker run -i --rm=true -w /var/local/git/grpc/../grpc-java --net=host $docker_image bash -c "./run-test-client.sh --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
+docker run -i --rm=true -w /var/local/git/grpc/../grpc-java --net=host $docker_image bash -c "./run-test-client.sh --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
+docker run -i --rm=true -w /var/local/git/grpc/../grpc-java --net=host $docker_image bash -c "./run-test-client.sh --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
+docker run -i --rm=true -w /var/local/git/grpc/../grpc-java --net=host $docker_image bash -c "./run-test-client.sh --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
+docker run -i --rm=true -w /var/local/git/grpc/../grpc-java --net=host $docker_image bash -c "./run-test-client.sh --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
diff --git a/tools/interop_matrix/testcases/node__master b/tools/interop_matrix/testcases/node__master
index 99ea2f0bc4..588ca95895 100755
--- a/tools/interop_matrix/testcases/node__master
+++ b/tools/interop_matrix/testcases/node__master
@@ -1,20 +1,20 @@
#!/bin/bash
echo "Testing ${docker_image:=grpc_interop_node:1415ecbf-5d0f-423e-8c2c-e0cb6d154e73}"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_nvm.sh node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_nvm.sh node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_nvm.sh node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_nvm.sh node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_nvm.sh node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_nvm.sh node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_nvm.sh node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_nvm.sh node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_nvm.sh node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_nvm.sh node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_nvm.sh node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_nvm.sh node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_nvm.sh node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_nvm.sh node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_nvm.sh node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_nvm.sh node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_nvm.sh node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_nvm.sh node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
+docker run -i --rm=true -w /var/local/git/grpc-node --net=host $docker_image bash -c "packages/grpc-native-core/deps/grpc/tools/run_tests/interop/with_nvm.sh node --require ./test/fixtures/native_native test/interop/interop_client.js --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
+docker run -i --rm=true -w /var/local/git/grpc-node --net=host $docker_image bash -c "packages/grpc-native-core/deps/grpc/tools/run_tests/interop/with_nvm.sh node --require ./test/fixtures/native_native test/interop/interop_client.js --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
+docker run -i --rm=true -w /var/local/git/grpc-node --net=host $docker_image bash -c "packages/grpc-native-core/deps/grpc/tools/run_tests/interop/with_nvm.sh node --require ./test/fixtures/native_native test/interop/interop_client.js --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
+docker run -i --rm=true -w /var/local/git/grpc-node --net=host $docker_image bash -c "packages/grpc-native-core/deps/grpc/tools/run_tests/interop/with_nvm.sh node --require ./test/fixtures/native_native test/interop/interop_client.js --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
+docker run -i --rm=true -w /var/local/git/grpc-node --net=host $docker_image bash -c "packages/grpc-native-core/deps/grpc/tools/run_tests/interop/with_nvm.sh node --require ./test/fixtures/native_native test/interop/interop_client.js --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
+docker run -i --rm=true -w /var/local/git/grpc-node --net=host $docker_image bash -c "packages/grpc-native-core/deps/grpc/tools/run_tests/interop/with_nvm.sh node --require ./test/fixtures/native_native test/interop/interop_client.js --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
+docker run -i --rm=true -w /var/local/git/grpc-node --net=host $docker_image bash -c "packages/grpc-native-core/deps/grpc/tools/run_tests/interop/with_nvm.sh node --require ./test/fixtures/native_native test/interop/interop_client.js --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
+docker run -i --rm=true -w /var/local/git/grpc-node --net=host $docker_image bash -c "packages/grpc-native-core/deps/grpc/tools/run_tests/interop/with_nvm.sh node --require ./test/fixtures/native_native test/interop/interop_client.js --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
+docker run -i --rm=true -w /var/local/git/grpc-node --net=host $docker_image bash -c "packages/grpc-native-core/deps/grpc/tools/run_tests/interop/with_nvm.sh node --require ./test/fixtures/native_native test/interop/interop_client.js --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
+docker run -i --rm=true -w /var/local/git/grpc-node --net=host $docker_image bash -c "packages/grpc-native-core/deps/grpc/tools/run_tests/interop/with_nvm.sh node --require ./test/fixtures/native_native test/interop/interop_client.js --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
+docker run -i --rm=true -w /var/local/git/grpc-node --net=host $docker_image bash -c "packages/grpc-native-core/deps/grpc/tools/run_tests/interop/with_nvm.sh node --require ./test/fixtures/native_native test/interop/interop_client.js --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
+docker run -i --rm=true -w /var/local/git/grpc-node --net=host $docker_image bash -c "packages/grpc-native-core/deps/grpc/tools/run_tests/interop/with_nvm.sh node --require ./test/fixtures/native_native test/interop/interop_client.js --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
+docker run -i --rm=true -w /var/local/git/grpc-node --net=host $docker_image bash -c "packages/grpc-native-core/deps/grpc/tools/run_tests/interop/with_nvm.sh node --require ./test/fixtures/native_native test/interop/interop_client.js --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
+docker run -i --rm=true -w /var/local/git/grpc-node --net=host $docker_image bash -c "packages/grpc-native-core/deps/grpc/tools/run_tests/interop/with_nvm.sh node --require ./test/fixtures/native_native test/interop/interop_client.js --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
+docker run -i --rm=true -w /var/local/git/grpc-node --net=host $docker_image bash -c "packages/grpc-native-core/deps/grpc/tools/run_tests/interop/with_nvm.sh node --require ./test/fixtures/native_native test/interop/interop_client.js --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
+docker run -i --rm=true -w /var/local/git/grpc-node --net=host $docker_image bash -c "packages/grpc-native-core/deps/grpc/tools/run_tests/interop/with_nvm.sh node --require ./test/fixtures/native_native test/interop/interop_client.js --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
+docker run -i --rm=true -w /var/local/git/grpc-node --net=host $docker_image bash -c "packages/grpc-native-core/deps/grpc/tools/run_tests/interop/with_nvm.sh node --require ./test/fixtures/native_native test/interop/interop_client.js --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
+docker run -i --rm=true -w /var/local/git/grpc-node --net=host $docker_image bash -c "packages/grpc-native-core/deps/grpc/tools/run_tests/interop/with_nvm.sh node --require ./test/fixtures/native_native test/interop/interop_client.js --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
diff --git a/tools/interop_matrix/testcases/node__v1.0.1 b/tools/interop_matrix/testcases/node__v1.0.1
index 6faf321391..fca9821544 100644
--- a/tools/interop_matrix/testcases/node__v1.0.1
+++ b/tools/interop_matrix/testcases/node__v1.0.1
@@ -1,21 +1,21 @@
#!/bin/bash
echo "Testing ${docker_image:=grpc_interop_node:a53aa5e3-b548-4566-b5a8-6d15c1315b32}"
-docker run -i --rm=true -w /var/local/git/grpc --net=host --name interop_client_node_00c688f2-57da-4023-89f3-46b1f7b5869f $docker_image bash -l -c "node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
-docker run -i --rm=true -w /var/local/git/grpc --net=host --name interop_client_node_d86705d8-14ea-4024-90b6-de74d6e8d19c $docker_image bash -l -c "node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
-docker run -i --rm=true -w /var/local/git/grpc --net=host --name interop_client_node_ebaafacd-1d82-4a75-bea1-a5c64e01fcaf $docker_image bash -l -c "node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
-docker run -i --rm=true -w /var/local/git/grpc --net=host --name interop_client_node_5125241a-fbf6-4c1c-895b-026a5a41f02f $docker_image bash -l -c "node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
-docker run -i --rm=true -w /var/local/git/grpc --net=host --name interop_client_node_3d5e5b82-7205-4eba-b775-8122f05a4760 $docker_image bash -l -c "node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
-docker run -i --rm=true -w /var/local/git/grpc --net=host --name interop_client_node_16fa0b49-2083-4932-8f26-79cfdffec940 $docker_image bash -l -c "node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
-docker run -i --rm=true -w /var/local/git/grpc --net=host --name interop_client_node_23cee670-2d8d-4f5c-8893-c3c43da8b03a $docker_image bash -l -c "node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
-docker run -i --rm=true -w /var/local/git/grpc --net=host --name interop_client_node_7b6a9454-e3b6-4993-b542-468e268930aa $docker_image bash -l -c "node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
-docker run -i --rm=true -w /var/local/git/grpc --net=host --name interop_client_node_5a7109ed-c065-4b62-98f4-b3ed8f385762 $docker_image bash -l -c "node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
-docker run -i --rm=true -w /var/local/git/grpc --net=host --name interop_client_node_1e0ba8dd-4dc1-431b-b202-529e7ace5d1d $docker_image bash -l -c "node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
-docker run -i --rm=true -w /var/local/git/grpc --net=host --name interop_client_node_649de56a-e722-4a59-b265-e9c0e871f068 $docker_image bash -l -c "node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
-docker run -i --rm=true -w /var/local/git/grpc --net=host --name interop_client_node_8be512a2-5e1c-4858-8cfc-82f99b678b76 $docker_image bash -l -c "node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
-docker run -i --rm=true -w /var/local/git/grpc --net=host --name interop_client_node_d19b6333-e528-48b5-8421-2ae3f7ce9dab $docker_image bash -l -c "node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
-docker run -i --rm=true -w /var/local/git/grpc --net=host --name interop_client_node_4749c80a-21c5-4d81-9df5-3c46ba6480cd $docker_image bash -l -c "node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
-docker run -i --rm=true -w /var/local/git/grpc --net=host --name interop_client_node_b7bee545-4857-4269-a1f2-9553dfc7e4b8 $docker_image bash -l -c "node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
-docker run -i --rm=true -w /var/local/git/grpc --net=host --name interop_client_node_4e96db87-6f48-426d-a7f0-97f3a5b6b3f4 $docker_image bash -l -c "node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
-docker run -i --rm=true -w /var/local/git/grpc --net=host --name interop_client_node_31a1d58c-f8bf-460a-af60-28969ecaaf80 $docker_image bash -l -c "node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
-docker run -i --rm=true -w /var/local/git/grpc --net=host --name interop_client_node_ce64b147-bcfa-44b2-a2f7-4a485380ce30 $docker_image bash -l -c "node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
+docker run -i --rm=true -w /var/local/git/grpc --net=host --name interop_client_node_00c688f2-57da-4023-89f3-46b1f7b5869f $docker_image bash -l -c "node src/node/interop/interop_client.js --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
+docker run -i --rm=true -w /var/local/git/grpc --net=host --name interop_client_node_d86705d8-14ea-4024-90b6-de74d6e8d19c $docker_image bash -l -c "node src/node/interop/interop_client.js --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
+docker run -i --rm=true -w /var/local/git/grpc --net=host --name interop_client_node_ebaafacd-1d82-4a75-bea1-a5c64e01fcaf $docker_image bash -l -c "node src/node/interop/interop_client.js --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
+docker run -i --rm=true -w /var/local/git/grpc --net=host --name interop_client_node_5125241a-fbf6-4c1c-895b-026a5a41f02f $docker_image bash -l -c "node src/node/interop/interop_client.js --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
+docker run -i --rm=true -w /var/local/git/grpc --net=host --name interop_client_node_3d5e5b82-7205-4eba-b775-8122f05a4760 $docker_image bash -l -c "node src/node/interop/interop_client.js --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
+docker run -i --rm=true -w /var/local/git/grpc --net=host --name interop_client_node_16fa0b49-2083-4932-8f26-79cfdffec940 $docker_image bash -l -c "node src/node/interop/interop_client.js --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
+docker run -i --rm=true -w /var/local/git/grpc --net=host --name interop_client_node_23cee670-2d8d-4f5c-8893-c3c43da8b03a $docker_image bash -l -c "node src/node/interop/interop_client.js --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
+docker run -i --rm=true -w /var/local/git/grpc --net=host --name interop_client_node_7b6a9454-e3b6-4993-b542-468e268930aa $docker_image bash -l -c "node src/node/interop/interop_client.js --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
+docker run -i --rm=true -w /var/local/git/grpc --net=host --name interop_client_node_5a7109ed-c065-4b62-98f4-b3ed8f385762 $docker_image bash -l -c "node src/node/interop/interop_client.js --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
+docker run -i --rm=true -w /var/local/git/grpc --net=host --name interop_client_node_1e0ba8dd-4dc1-431b-b202-529e7ace5d1d $docker_image bash -l -c "node src/node/interop/interop_client.js --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
+docker run -i --rm=true -w /var/local/git/grpc --net=host --name interop_client_node_649de56a-e722-4a59-b265-e9c0e871f068 $docker_image bash -l -c "node src/node/interop/interop_client.js --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
+docker run -i --rm=true -w /var/local/git/grpc --net=host --name interop_client_node_8be512a2-5e1c-4858-8cfc-82f99b678b76 $docker_image bash -l -c "node src/node/interop/interop_client.js --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
+docker run -i --rm=true -w /var/local/git/grpc --net=host --name interop_client_node_d19b6333-e528-48b5-8421-2ae3f7ce9dab $docker_image bash -l -c "node src/node/interop/interop_client.js --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
+docker run -i --rm=true -w /var/local/git/grpc --net=host --name interop_client_node_4749c80a-21c5-4d81-9df5-3c46ba6480cd $docker_image bash -l -c "node src/node/interop/interop_client.js --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
+docker run -i --rm=true -w /var/local/git/grpc --net=host --name interop_client_node_b7bee545-4857-4269-a1f2-9553dfc7e4b8 $docker_image bash -l -c "node src/node/interop/interop_client.js --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
+docker run -i --rm=true -w /var/local/git/grpc --net=host --name interop_client_node_4e96db87-6f48-426d-a7f0-97f3a5b6b3f4 $docker_image bash -l -c "node src/node/interop/interop_client.js --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
+docker run -i --rm=true -w /var/local/git/grpc --net=host --name interop_client_node_31a1d58c-f8bf-460a-af60-28969ecaaf80 $docker_image bash -l -c "node src/node/interop/interop_client.js --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
+docker run -i --rm=true -w /var/local/git/grpc --net=host --name interop_client_node_ce64b147-bcfa-44b2-a2f7-4a485380ce30 $docker_image bash -l -c "node src/node/interop/interop_client.js --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
diff --git a/tools/interop_matrix/testcases/node__v1.1.4 b/tools/interop_matrix/testcases/node__v1.1.4
new file mode 100644
index 0000000000..99ea2f0bc4
--- /dev/null
+++ b/tools/interop_matrix/testcases/node__v1.1.4
@@ -0,0 +1,20 @@
+#!/bin/bash
+echo "Testing ${docker_image:=grpc_interop_node:1415ecbf-5d0f-423e-8c2c-e0cb6d154e73}"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_nvm.sh node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_nvm.sh node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_nvm.sh node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_nvm.sh node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_nvm.sh node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_nvm.sh node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_nvm.sh node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_nvm.sh node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_nvm.sh node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_nvm.sh node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_nvm.sh node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_nvm.sh node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_nvm.sh node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_nvm.sh node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_nvm.sh node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_nvm.sh node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_nvm.sh node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_nvm.sh node src/node/interop/interop_client.js --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
diff --git a/tools/interop_matrix/testcases/php__master b/tools/interop_matrix/testcases/php__master
index bce1d30550..f99cb17621 100755
--- a/tools/interop_matrix/testcases/php__master
+++ b/tools/interop_matrix/testcases/php__master
@@ -1,20 +1,20 @@
#!/bin/bash
echo "Testing ${docker_image:=grpc_interop_php:b290f404-9940-4968-8fc2-19f5291c8eb7}"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "src/php/bin/interop_client.sh --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "src/php/bin/interop_client.sh --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "src/php/bin/interop_client.sh --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "src/php/bin/interop_client.sh --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "src/php/bin/interop_client.sh --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "src/php/bin/interop_client.sh --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "src/php/bin/interop_client.sh --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "src/php/bin/interop_client.sh --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "src/php/bin/interop_client.sh --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "src/php/bin/interop_client.sh --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "src/php/bin/interop_client.sh --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "src/php/bin/interop_client.sh --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "src/php/bin/interop_client.sh --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "src/php/bin/interop_client.sh --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "src/php/bin/interop_client.sh --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "src/php/bin/interop_client.sh --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "src/php/bin/interop_client.sh --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "src/php/bin/interop_client.sh --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "src/php/bin/interop_client.sh --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "src/php/bin/interop_client.sh --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "src/php/bin/interop_client.sh --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "src/php/bin/interop_client.sh --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "src/php/bin/interop_client.sh --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "src/php/bin/interop_client.sh --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "src/php/bin/interop_client.sh --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "src/php/bin/interop_client.sh --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "src/php/bin/interop_client.sh --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "src/php/bin/interop_client.sh --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "src/php/bin/interop_client.sh --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "src/php/bin/interop_client.sh --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "src/php/bin/interop_client.sh --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "src/php/bin/interop_client.sh --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "src/php/bin/interop_client.sh --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "src/php/bin/interop_client.sh --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "src/php/bin/interop_client.sh --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "src/php/bin/interop_client.sh --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
diff --git a/tools/interop_matrix/testcases/python__master b/tools/interop_matrix/testcases/python__master
index 4a63eae89d..71ba75e5d1 100755
--- a/tools/interop_matrix/testcases/python__master
+++ b/tools/interop_matrix/testcases/python__master
@@ -1,20 +1,20 @@
#!/bin/bash
echo "Testing ${docker_image:=grpc_interop_python:797ca293-94e8-48d4-92e9-a4d52fcfcca9}"
-docker run -i --rm=true -e PYTHONPATH=/var/local/git/grpc/src/python/gens -e LD_LIBRARY_PATH=/var/local/git/grpc/libs/opt -w /var/local/git/grpc --net=host $docker_image bash -c "py27/bin/python src/python/grpcio_tests/setup.py run_interop --client --args=\"--server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary\""
-docker run -i --rm=true -e PYTHONPATH=/var/local/git/grpc/src/python/gens -e LD_LIBRARY_PATH=/var/local/git/grpc/libs/opt -w /var/local/git/grpc --net=host $docker_image bash -c "py27/bin/python src/python/grpcio_tests/setup.py run_interop --client --args=\"--server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary\""
-docker run -i --rm=true -e PYTHONPATH=/var/local/git/grpc/src/python/gens -e LD_LIBRARY_PATH=/var/local/git/grpc/libs/opt -w /var/local/git/grpc --net=host $docker_image bash -c "py27/bin/python src/python/grpcio_tests/setup.py run_interop --client --args=\"--server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong\""
-docker run -i --rm=true -e PYTHONPATH=/var/local/git/grpc/src/python/gens -e LD_LIBRARY_PATH=/var/local/git/grpc/libs/opt -w /var/local/git/grpc --net=host $docker_image bash -c "py27/bin/python src/python/grpcio_tests/setup.py run_interop --client --args=\"--server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream\""
-docker run -i --rm=true -e PYTHONPATH=/var/local/git/grpc/src/python/gens -e LD_LIBRARY_PATH=/var/local/git/grpc/libs/opt -w /var/local/git/grpc --net=host $docker_image bash -c "py27/bin/python src/python/grpcio_tests/setup.py run_interop --client --args=\"--server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming\""
-docker run -i --rm=true -e PYTHONPATH=/var/local/git/grpc/src/python/gens -e LD_LIBRARY_PATH=/var/local/git/grpc/libs/opt -w /var/local/git/grpc --net=host $docker_image bash -c "py27/bin/python src/python/grpcio_tests/setup.py run_interop --client --args=\"--server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming\""
-docker run -i --rm=true -e PYTHONPATH=/var/local/git/grpc/src/python/gens -e LD_LIBRARY_PATH=/var/local/git/grpc/libs/opt -w /var/local/git/grpc --net=host $docker_image bash -c "py27/bin/python src/python/grpcio_tests/setup.py run_interop --client --args=\"--server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin\""
-docker run -i --rm=true -e PYTHONPATH=/var/local/git/grpc/src/python/gens -e LD_LIBRARY_PATH=/var/local/git/grpc/libs/opt -w /var/local/git/grpc --net=host $docker_image bash -c "py27/bin/python src/python/grpcio_tests/setup.py run_interop --client --args=\"--server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response\""
-docker run -i --rm=true -e PYTHONPATH=/var/local/git/grpc/src/python/gens -e LD_LIBRARY_PATH=/var/local/git/grpc/libs/opt -w /var/local/git/grpc --net=host $docker_image bash -c "py27/bin/python src/python/grpcio_tests/setup.py run_interop --client --args=\"--server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server\""
-docker run -i --rm=true -e PYTHONPATH=/var/local/git/grpc/src/python/gens -e LD_LIBRARY_PATH=/var/local/git/grpc/libs/opt -w /var/local/git/grpc --net=host $docker_image bash -c "py27/bin/python src/python/grpcio_tests/setup.py run_interop --client --args=\"--server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary\""
-docker run -i --rm=true -e PYTHONPATH=/var/local/git/grpc/src/python/gens -e LD_LIBRARY_PATH=/var/local/git/grpc/libs/opt -w /var/local/git/grpc --net=host $docker_image bash -c "py27/bin/python src/python/grpcio_tests/setup.py run_interop --client --args=\"--server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary\""
-docker run -i --rm=true -e PYTHONPATH=/var/local/git/grpc/src/python/gens -e LD_LIBRARY_PATH=/var/local/git/grpc/libs/opt -w /var/local/git/grpc --net=host $docker_image bash -c "py27/bin/python src/python/grpcio_tests/setup.py run_interop --client --args=\"--server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong\""
-docker run -i --rm=true -e PYTHONPATH=/var/local/git/grpc/src/python/gens -e LD_LIBRARY_PATH=/var/local/git/grpc/libs/opt -w /var/local/git/grpc --net=host $docker_image bash -c "py27/bin/python src/python/grpcio_tests/setup.py run_interop --client --args=\"--server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream\""
-docker run -i --rm=true -e PYTHONPATH=/var/local/git/grpc/src/python/gens -e LD_LIBRARY_PATH=/var/local/git/grpc/libs/opt -w /var/local/git/grpc --net=host $docker_image bash -c "py27/bin/python src/python/grpcio_tests/setup.py run_interop --client --args=\"--server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming\""
-docker run -i --rm=true -e PYTHONPATH=/var/local/git/grpc/src/python/gens -e LD_LIBRARY_PATH=/var/local/git/grpc/libs/opt -w /var/local/git/grpc --net=host $docker_image bash -c "py27/bin/python src/python/grpcio_tests/setup.py run_interop --client --args=\"--server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming\""
-docker run -i --rm=true -e PYTHONPATH=/var/local/git/grpc/src/python/gens -e LD_LIBRARY_PATH=/var/local/git/grpc/libs/opt -w /var/local/git/grpc --net=host $docker_image bash -c "py27/bin/python src/python/grpcio_tests/setup.py run_interop --client --args=\"--server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin\""
-docker run -i --rm=true -e PYTHONPATH=/var/local/git/grpc/src/python/gens -e LD_LIBRARY_PATH=/var/local/git/grpc/libs/opt -w /var/local/git/grpc --net=host $docker_image bash -c "py27/bin/python src/python/grpcio_tests/setup.py run_interop --client --args=\"--server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response\""
-docker run -i --rm=true -e PYTHONPATH=/var/local/git/grpc/src/python/gens -e LD_LIBRARY_PATH=/var/local/git/grpc/libs/opt -w /var/local/git/grpc --net=host $docker_image bash -c "py27/bin/python src/python/grpcio_tests/setup.py run_interop --client --args=\"--server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server\""
+docker run -i --rm=true -e PYTHONPATH=/var/local/git/grpc/src/python/gens -e LD_LIBRARY_PATH=/var/local/git/grpc/libs/opt -w /var/local/git/grpc --net=host $docker_image bash -c "py27/bin/python src/python/grpcio_tests/setup.py run_interop --client --args=\"--server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary\""
+docker run -i --rm=true -e PYTHONPATH=/var/local/git/grpc/src/python/gens -e LD_LIBRARY_PATH=/var/local/git/grpc/libs/opt -w /var/local/git/grpc --net=host $docker_image bash -c "py27/bin/python src/python/grpcio_tests/setup.py run_interop --client --args=\"--server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary\""
+docker run -i --rm=true -e PYTHONPATH=/var/local/git/grpc/src/python/gens -e LD_LIBRARY_PATH=/var/local/git/grpc/libs/opt -w /var/local/git/grpc --net=host $docker_image bash -c "py27/bin/python src/python/grpcio_tests/setup.py run_interop --client --args=\"--server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong\""
+docker run -i --rm=true -e PYTHONPATH=/var/local/git/grpc/src/python/gens -e LD_LIBRARY_PATH=/var/local/git/grpc/libs/opt -w /var/local/git/grpc --net=host $docker_image bash -c "py27/bin/python src/python/grpcio_tests/setup.py run_interop --client --args=\"--server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream\""
+docker run -i --rm=true -e PYTHONPATH=/var/local/git/grpc/src/python/gens -e LD_LIBRARY_PATH=/var/local/git/grpc/libs/opt -w /var/local/git/grpc --net=host $docker_image bash -c "py27/bin/python src/python/grpcio_tests/setup.py run_interop --client --args=\"--server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming\""
+docker run -i --rm=true -e PYTHONPATH=/var/local/git/grpc/src/python/gens -e LD_LIBRARY_PATH=/var/local/git/grpc/libs/opt -w /var/local/git/grpc --net=host $docker_image bash -c "py27/bin/python src/python/grpcio_tests/setup.py run_interop --client --args=\"--server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming\""
+docker run -i --rm=true -e PYTHONPATH=/var/local/git/grpc/src/python/gens -e LD_LIBRARY_PATH=/var/local/git/grpc/libs/opt -w /var/local/git/grpc --net=host $docker_image bash -c "py27/bin/python src/python/grpcio_tests/setup.py run_interop --client --args=\"--server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin\""
+docker run -i --rm=true -e PYTHONPATH=/var/local/git/grpc/src/python/gens -e LD_LIBRARY_PATH=/var/local/git/grpc/libs/opt -w /var/local/git/grpc --net=host $docker_image bash -c "py27/bin/python src/python/grpcio_tests/setup.py run_interop --client --args=\"--server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response\""
+docker run -i --rm=true -e PYTHONPATH=/var/local/git/grpc/src/python/gens -e LD_LIBRARY_PATH=/var/local/git/grpc/libs/opt -w /var/local/git/grpc --net=host $docker_image bash -c "py27/bin/python src/python/grpcio_tests/setup.py run_interop --client --args=\"--server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server\""
+docker run -i --rm=true -e PYTHONPATH=/var/local/git/grpc/src/python/gens -e LD_LIBRARY_PATH=/var/local/git/grpc/libs/opt -w /var/local/git/grpc --net=host $docker_image bash -c "py27/bin/python src/python/grpcio_tests/setup.py run_interop --client --args=\"--server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary\""
+docker run -i --rm=true -e PYTHONPATH=/var/local/git/grpc/src/python/gens -e LD_LIBRARY_PATH=/var/local/git/grpc/libs/opt -w /var/local/git/grpc --net=host $docker_image bash -c "py27/bin/python src/python/grpcio_tests/setup.py run_interop --client --args=\"--server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary\""
+docker run -i --rm=true -e PYTHONPATH=/var/local/git/grpc/src/python/gens -e LD_LIBRARY_PATH=/var/local/git/grpc/libs/opt -w /var/local/git/grpc --net=host $docker_image bash -c "py27/bin/python src/python/grpcio_tests/setup.py run_interop --client --args=\"--server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong\""
+docker run -i --rm=true -e PYTHONPATH=/var/local/git/grpc/src/python/gens -e LD_LIBRARY_PATH=/var/local/git/grpc/libs/opt -w /var/local/git/grpc --net=host $docker_image bash -c "py27/bin/python src/python/grpcio_tests/setup.py run_interop --client --args=\"--server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream\""
+docker run -i --rm=true -e PYTHONPATH=/var/local/git/grpc/src/python/gens -e LD_LIBRARY_PATH=/var/local/git/grpc/libs/opt -w /var/local/git/grpc --net=host $docker_image bash -c "py27/bin/python src/python/grpcio_tests/setup.py run_interop --client --args=\"--server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming\""
+docker run -i --rm=true -e PYTHONPATH=/var/local/git/grpc/src/python/gens -e LD_LIBRARY_PATH=/var/local/git/grpc/libs/opt -w /var/local/git/grpc --net=host $docker_image bash -c "py27/bin/python src/python/grpcio_tests/setup.py run_interop --client --args=\"--server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming\""
+docker run -i --rm=true -e PYTHONPATH=/var/local/git/grpc/src/python/gens -e LD_LIBRARY_PATH=/var/local/git/grpc/libs/opt -w /var/local/git/grpc --net=host $docker_image bash -c "py27/bin/python src/python/grpcio_tests/setup.py run_interop --client --args=\"--server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin\""
+docker run -i --rm=true -e PYTHONPATH=/var/local/git/grpc/src/python/gens -e LD_LIBRARY_PATH=/var/local/git/grpc/libs/opt -w /var/local/git/grpc --net=host $docker_image bash -c "py27/bin/python src/python/grpcio_tests/setup.py run_interop --client --args=\"--server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response\""
+docker run -i --rm=true -e PYTHONPATH=/var/local/git/grpc/src/python/gens -e LD_LIBRARY_PATH=/var/local/git/grpc/libs/opt -w /var/local/git/grpc --net=host $docker_image bash -c "py27/bin/python src/python/grpcio_tests/setup.py run_interop --client --args=\"--server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server\""
diff --git a/tools/interop_matrix/testcases/ruby__master b/tools/interop_matrix/testcases/ruby__master
index 07bfd05866..784ba689f6 100755
--- a/tools/interop_matrix/testcases/ruby__master
+++ b/tools/interop_matrix/testcases/ruby__master
@@ -1,20 +1,20 @@
#!/bin/bash
echo "Testing ${docker_image:=grpc_interop_ruby:6bd1f0eb-51a4-4ad8-861c-1cbd7a929f33}"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
diff --git a/tools/interop_matrix/testcases/ruby__v1.0.1 b/tools/interop_matrix/testcases/ruby__v1.0.1
index effbef1d18..99665297f0 100755
--- a/tools/interop_matrix/testcases/ruby__v1.0.1
+++ b/tools/interop_matrix/testcases/ruby__v1.0.1
@@ -1,20 +1,20 @@
#!/bin/bash
echo "Testing ${docker_image:=grpc_interop_ruby:6bd1f0eb-51a4-4ad8-861c-1cbd7a929f33}"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
-docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=grpc-test.sandbox.googleapis.com --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response"
+docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "source /usr/local/rvm/scripts/rvm && ruby src/ruby/pb/test/client.rb --server_host=grpc-test4.sandbox.googleapis.com --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
diff --git a/tools/run_tests/artifacts/artifact_targets.py b/tools/run_tests/artifacts/artifact_targets.py
index 53c7e178d8..ca25c2a78d 100644
--- a/tools/run_tests/artifacts/artifact_targets.py
+++ b/tools/run_tests/artifacts/artifact_targets.py
@@ -317,6 +317,7 @@ class ProtocArtifact:
self.name,
['tools/run_tests/artifacts/build_artifact_protoc.sh'],
environ=environ,
+ timeout_seconds=60 * 60,
use_workspace=True)
else:
generator = 'Visual Studio 14 2015 Win64' if self.arch == 'x64' else 'Visual Studio 14 2015'
diff --git a/tools/run_tests/artifacts/build_package_php.sh b/tools/run_tests/artifacts/build_package_php.sh
index 85e4dda40a..9a8f25a6f8 100755
--- a/tools/run_tests/artifacts/build_package_php.sh
+++ b/tools/run_tests/artifacts/build_package_php.sh
@@ -17,5 +17,10 @@ set -ex
cd "$(dirname "$0")/../../.."
+# All the PHP packages have been built in the artifact phase already
+# and we only collect them here to deliver them to the distribtest phase.
mkdir -p artifacts/
-cp -r "$EXTERNAL_GIT_ROOT"/platform={windows,linux,macos}/artifacts/php_*/* artifacts/ || true
+# Jenkins flow (deprecated)
+cp -r "${EXTERNAL_GIT_ROOT}"/platform={windows,linux,macos}/artifacts/php_*/* artifacts/ || true
+# Kokoro flow
+cp -r "${EXTERNAL_GIT_ROOT}"/input_artifacts/php_*/* artifacts/ || true
diff --git a/tools/run_tests/artifacts/build_package_python.sh b/tools/run_tests/artifacts/build_package_python.sh
index d596e35000..15627881e8 100755
--- a/tools/run_tests/artifacts/build_package_python.sh
+++ b/tools/run_tests/artifacts/build_package_python.sh
@@ -21,7 +21,10 @@ mkdir -p artifacts/
# All the python packages have been built in the artifact phase already
# and we only collect them here to deliver them to the distribtest phase.
-cp -r "$EXTERNAL_GIT_ROOT"/platform={windows,linux,macos}/artifacts/python_*/* artifacts/ || true
+# Jenkins flow (deprecated)
+cp -r "${EXTERNAL_GIT_ROOT}"/platform={windows,linux,macos}/artifacts/python_*/* artifacts/ || true
+# Kokoro flow
+cp -r "${EXTERNAL_GIT_ROOT}"/input_artifacts/python_*/* artifacts/ || true
# TODO: all the artifact builder configurations generate a grpcio-VERSION.tar.gz
# source distribution package, and only one of them will end up
diff --git a/tools/run_tests/artifacts/build_package_ruby.sh b/tools/run_tests/artifacts/build_package_ruby.sh
index 0283c43843..05eacd4d1e 100755
--- a/tools/run_tests/artifacts/build_package_ruby.sh
+++ b/tools/run_tests/artifacts/build_package_ruby.sh
@@ -23,7 +23,10 @@ mkdir -p artifacts/
# All the ruby packages have been built in the artifact phase already
# and we only collect them here to deliver them to the distribtest phase.
-cp -r "$EXTERNAL_GIT_ROOT"/platform={windows,linux,macos}/artifacts/ruby_native_gem_*/* artifacts/ || true
+# Jenkins flow (deprecated)
+cp -r "${EXTERNAL_GIT_ROOT}"/platform={windows,linux,macos}/artifacts/ruby_native_gem_*/* artifacts/ || true
+# Kokoro flow
+cp -r "${EXTERNAL_GIT_ROOT}"/input_artifacts/ruby_native_gem_*/* artifacts/ || true
well_known_protos=( any api compiler/plugin descriptor duration empty field_mask source_context struct timestamp type wrappers )
@@ -41,7 +44,12 @@ for arch in {x86,x64}; do
;;
esac
for plat in {windows,linux,macos}; do
- input_dir="$EXTERNAL_GIT_ROOT/platform=${plat}/artifacts/protoc_${plat}_${arch}"
+ if [ "${KOKORO_JOB_NAME}" != "" ]
+ then
+ input_dir="${EXTERNAL_GIT_ROOT}/input_artifacts/protoc_${plat}_${arch}"
+ else
+ input_dir="${EXTERNAL_GIT_ROOT}/platform=${plat}/artifacts/protoc_${plat}_${arch}"
+ fi
output_dir="$base/src/ruby/tools/bin/${ruby_arch}-${plat}"
mkdir -p "$output_dir"/google/protobuf
mkdir -p "$output_dir"/google/protobuf/compiler # needed for plugin.proto
diff --git a/tools/run_tests/artifacts/distribtest_targets.py b/tools/run_tests/artifacts/distribtest_targets.py
index fdf094cd01..2f2ab0f06c 100644
--- a/tools/run_tests/artifacts/distribtest_targets.py
+++ b/tools/run_tests/artifacts/distribtest_targets.py
@@ -293,8 +293,6 @@ def targets():
CSharpDistribTest('linux', 'x86', 'jessie'),
CSharpDistribTest('linux', 'x64', 'centos7'),
CSharpDistribTest('linux', 'x64', 'ubuntu1404'),
- CSharpDistribTest('linux', 'x64', 'ubuntu1504'),
- CSharpDistribTest('linux', 'x64', 'ubuntu1510'),
CSharpDistribTest('linux', 'x64', 'ubuntu1604'),
CSharpDistribTest('linux', 'x64', 'ubuntu1404', use_dotnet_cli=True),
CSharpDistribTest('macos', 'x86'),
@@ -313,8 +311,6 @@ def targets():
PythonDistribTest('linux', 'x64', 'arch'),
PythonDistribTest('linux', 'x64', 'ubuntu1204'),
PythonDistribTest('linux', 'x64', 'ubuntu1404'),
- PythonDistribTest('linux', 'x64', 'ubuntu1504'),
- PythonDistribTest('linux', 'x64', 'ubuntu1510'),
PythonDistribTest('linux', 'x64', 'ubuntu1604'),
RubyDistribTest('linux', 'x64', 'wheezy'),
RubyDistribTest('linux', 'x64', 'jessie'),
@@ -329,8 +325,6 @@ def targets():
RubyDistribTest('linux', 'x64', 'opensuse'),
RubyDistribTest('linux', 'x64', 'ubuntu1204'),
RubyDistribTest('linux', 'x64', 'ubuntu1404'),
- RubyDistribTest('linux', 'x64', 'ubuntu1504'),
- RubyDistribTest('linux', 'x64', 'ubuntu1510'),
RubyDistribTest('linux', 'x64', 'ubuntu1604'),
PHPDistribTest('linux', 'x64', 'jessie'),
PHPDistribTest('macos', 'x64'),
diff --git a/tools/run_tests/dockerize/build_and_run_docker.sh b/tools/run_tests/dockerize/build_and_run_docker.sh
index b8f0a55025..3ea3ca3c0b 100755
--- a/tools/run_tests/dockerize/build_and_run_docker.sh
+++ b/tools/run_tests/dockerize/build_and_run_docker.sh
@@ -58,6 +58,10 @@ docker run \
"$@" \
-e EXTERNAL_GIT_ROOT="/var/local/jenkins/grpc" \
-e THIS_IS_REALLY_NEEDED='see https://github.com/docker/docker/issues/14203 for why docker is awful' \
+ -e "KOKORO_BUILD_ID=$KOKORO_BUILD_ID" \
+ -e "KOKORO_BUILD_NUMBER=$KOKORO_BUILD_NUMBER" \
+ -e "KOKORO_BUILD_URL=$KOKORO_BUILD_URL" \
+ -e "KOKORO_JOB_NAME=$KOKORO_JOB_NAME" \
-v "$git_root:/var/local/jenkins/grpc:ro" \
-w /var/local/git/grpc \
--name="$CONTAINER_NAME" \
diff --git a/tools/run_tests/generated/sources_and_headers.json b/tools/run_tests/generated/sources_and_headers.json
index e5a0d9a247..8a93396564 100644
--- a/tools/run_tests/generated/sources_and_headers.json
+++ b/tools/run_tests/generated/sources_and_headers.json
@@ -156,23 +156,6 @@
"headers": [],
"is_filegroup": false,
"language": "c",
- "name": "byte_stream_test",
- "src": [
- "test/core/transport/byte_stream_test.cc"
- ],
- "third_party": false,
- "type": "target"
- },
- {
- "deps": [
- "gpr",
- "gpr_test_util",
- "grpc",
- "grpc_test_util"
- ],
- "headers": [],
- "is_filegroup": false,
- "language": "c",
"name": "channel_create_test",
"src": [
"test/core/surface/channel_create_test.cc"
@@ -2988,6 +2971,23 @@
{
"deps": [
"gpr",
+ "gpr_test_util",
+ "grpc",
+ "grpc_test_util"
+ ],
+ "headers": [],
+ "is_filegroup": false,
+ "language": "c++",
+ "name": "byte_stream_test",
+ "src": [
+ "test/core/transport/byte_stream_test.cc"
+ ],
+ "third_party": false,
+ "type": "target"
+ },
+ {
+ "deps": [
+ "gpr",
"grpc",
"grpc++"
],
@@ -3666,6 +3666,28 @@
"gpr_test_util",
"grpc",
"grpc++",
+ "grpc++_test",
+ "grpc_test_util"
+ ],
+ "headers": [
+ "test/core/end2end/end2end_tests.h"
+ ],
+ "is_filegroup": false,
+ "language": "c++",
+ "name": "h2_ssl_session_reuse_test",
+ "src": [
+ "test/core/end2end/end2end_tests.h",
+ "test/core/end2end/h2_ssl_session_reuse_test.cc"
+ ],
+ "third_party": false,
+ "type": "target"
+ },
+ {
+ "deps": [
+ "gpr",
+ "gpr_test_util",
+ "grpc",
+ "grpc++",
"grpc++_test_util",
"grpc_test_util"
],
@@ -4458,24 +4480,6 @@
},
{
"deps": [
- "gpr",
- "gpr_test_util",
- "grpc",
- "grpc++",
- "grpc_test_util"
- ],
- "headers": [],
- "is_filegroup": false,
- "language": "c++",
- "name": "status_test",
- "src": [
- "test/cpp/util/status_test.cc"
- ],
- "third_party": false,
- "type": "target"
- },
- {
- "deps": [
"grpc"
],
"headers": [],
@@ -6645,8 +6649,12 @@
"deps": [
"gpr",
"grpc_base",
+ "grpc_base_headers",
+ "grpc_deadline_filter",
+ "grpc_message_size_filter",
"grpc_server_load_reporting",
"grpc_transport_chttp2_client_secure",
+ "grpc_transport_chttp2_server_secure",
"grpc_transport_cronet_client_secure"
],
"headers": [],
@@ -9027,6 +9035,8 @@
"src/core/lib/iomgr/gethostname_sysconf.cc",
"src/core/lib/iomgr/iocp_windows.cc",
"src/core/lib/iomgr/iomgr.cc",
+ "src/core/lib/iomgr/iomgr_custom.cc",
+ "src/core/lib/iomgr/iomgr_internal.cc",
"src/core/lib/iomgr/iomgr_posix.cc",
"src/core/lib/iomgr/iomgr_uv.cc",
"src/core/lib/iomgr/iomgr_windows.cc",
@@ -9035,12 +9045,16 @@
"src/core/lib/iomgr/lockfree_event.cc",
"src/core/lib/iomgr/network_status_tracker.cc",
"src/core/lib/iomgr/polling_entity.cc",
- "src/core/lib/iomgr/pollset_set_uv.cc",
+ "src/core/lib/iomgr/pollset.cc",
+ "src/core/lib/iomgr/pollset_custom.cc",
+ "src/core/lib/iomgr/pollset_set.cc",
+ "src/core/lib/iomgr/pollset_set_custom.cc",
"src/core/lib/iomgr/pollset_set_windows.cc",
"src/core/lib/iomgr/pollset_uv.cc",
"src/core/lib/iomgr/pollset_windows.cc",
+ "src/core/lib/iomgr/resolve_address.cc",
+ "src/core/lib/iomgr/resolve_address_custom.cc",
"src/core/lib/iomgr/resolve_address_posix.cc",
- "src/core/lib/iomgr/resolve_address_uv.cc",
"src/core/lib/iomgr/resolve_address_windows.cc",
"src/core/lib/iomgr/resource_quota.cc",
"src/core/lib/iomgr/sockaddr_utils.cc",
@@ -9052,19 +9066,24 @@
"src/core/lib/iomgr/socket_utils_uv.cc",
"src/core/lib/iomgr/socket_utils_windows.cc",
"src/core/lib/iomgr/socket_windows.cc",
+ "src/core/lib/iomgr/tcp_client.cc",
+ "src/core/lib/iomgr/tcp_client_custom.cc",
"src/core/lib/iomgr/tcp_client_posix.cc",
- "src/core/lib/iomgr/tcp_client_uv.cc",
"src/core/lib/iomgr/tcp_client_windows.cc",
+ "src/core/lib/iomgr/tcp_custom.cc",
"src/core/lib/iomgr/tcp_posix.cc",
+ "src/core/lib/iomgr/tcp_server.cc",
+ "src/core/lib/iomgr/tcp_server_custom.cc",
"src/core/lib/iomgr/tcp_server_posix.cc",
"src/core/lib/iomgr/tcp_server_utils_posix_common.cc",
"src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc",
"src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc",
- "src/core/lib/iomgr/tcp_server_uv.cc",
"src/core/lib/iomgr/tcp_server_windows.cc",
"src/core/lib/iomgr/tcp_uv.cc",
"src/core/lib/iomgr/tcp_windows.cc",
"src/core/lib/iomgr/time_averaged_stats.cc",
+ "src/core/lib/iomgr/timer.cc",
+ "src/core/lib/iomgr/timer_custom.cc",
"src/core/lib/iomgr/timer_generic.cc",
"src/core/lib/iomgr/timer_heap.cc",
"src/core/lib/iomgr/timer_manager.cc",
@@ -9186,9 +9205,9 @@
"src/core/lib/iomgr/gethostname.h",
"src/core/lib/iomgr/iocp_windows.h",
"src/core/lib/iomgr/iomgr.h",
+ "src/core/lib/iomgr/iomgr_custom.h",
"src/core/lib/iomgr/iomgr_internal.h",
"src/core/lib/iomgr/iomgr_posix.h",
- "src/core/lib/iomgr/iomgr_uv.h",
"src/core/lib/iomgr/is_epollexclusive_available.h",
"src/core/lib/iomgr/load_file.h",
"src/core/lib/iomgr/lockfree_event.h",
@@ -9196,14 +9215,17 @@
"src/core/lib/iomgr/network_status_tracker.h",
"src/core/lib/iomgr/polling_entity.h",
"src/core/lib/iomgr/pollset.h",
+ "src/core/lib/iomgr/pollset_custom.h",
"src/core/lib/iomgr/pollset_set.h",
+ "src/core/lib/iomgr/pollset_set_custom.h",
"src/core/lib/iomgr/pollset_set_windows.h",
- "src/core/lib/iomgr/pollset_uv.h",
"src/core/lib/iomgr/pollset_windows.h",
"src/core/lib/iomgr/port.h",
"src/core/lib/iomgr/resolve_address.h",
+ "src/core/lib/iomgr/resolve_address_custom.h",
"src/core/lib/iomgr/resource_quota.h",
"src/core/lib/iomgr/sockaddr.h",
+ "src/core/lib/iomgr/sockaddr_custom.h",
"src/core/lib/iomgr/sockaddr_posix.h",
"src/core/lib/iomgr/sockaddr_utils.h",
"src/core/lib/iomgr/sockaddr_windows.h",
@@ -9215,17 +9237,16 @@
"src/core/lib/iomgr/sys_epoll_wrapper.h",
"src/core/lib/iomgr/tcp_client.h",
"src/core/lib/iomgr/tcp_client_posix.h",
+ "src/core/lib/iomgr/tcp_custom.h",
"src/core/lib/iomgr/tcp_posix.h",
"src/core/lib/iomgr/tcp_server.h",
"src/core/lib/iomgr/tcp_server_utils_posix.h",
- "src/core/lib/iomgr/tcp_uv.h",
"src/core/lib/iomgr/tcp_windows.h",
"src/core/lib/iomgr/time_averaged_stats.h",
"src/core/lib/iomgr/timer.h",
- "src/core/lib/iomgr/timer_generic.h",
+ "src/core/lib/iomgr/timer_custom.h",
"src/core/lib/iomgr/timer_heap.h",
"src/core/lib/iomgr/timer_manager.h",
- "src/core/lib/iomgr/timer_uv.h",
"src/core/lib/iomgr/udp_server.h",
"src/core/lib/iomgr/unix_sockets_posix.h",
"src/core/lib/iomgr/wakeup_fd_cv.h",
@@ -9330,9 +9351,9 @@
"src/core/lib/iomgr/gethostname.h",
"src/core/lib/iomgr/iocp_windows.h",
"src/core/lib/iomgr/iomgr.h",
+ "src/core/lib/iomgr/iomgr_custom.h",
"src/core/lib/iomgr/iomgr_internal.h",
"src/core/lib/iomgr/iomgr_posix.h",
- "src/core/lib/iomgr/iomgr_uv.h",
"src/core/lib/iomgr/is_epollexclusive_available.h",
"src/core/lib/iomgr/load_file.h",
"src/core/lib/iomgr/lockfree_event.h",
@@ -9340,14 +9361,17 @@
"src/core/lib/iomgr/network_status_tracker.h",
"src/core/lib/iomgr/polling_entity.h",
"src/core/lib/iomgr/pollset.h",
+ "src/core/lib/iomgr/pollset_custom.h",
"src/core/lib/iomgr/pollset_set.h",
+ "src/core/lib/iomgr/pollset_set_custom.h",
"src/core/lib/iomgr/pollset_set_windows.h",
- "src/core/lib/iomgr/pollset_uv.h",
"src/core/lib/iomgr/pollset_windows.h",
"src/core/lib/iomgr/port.h",
"src/core/lib/iomgr/resolve_address.h",
+ "src/core/lib/iomgr/resolve_address_custom.h",
"src/core/lib/iomgr/resource_quota.h",
"src/core/lib/iomgr/sockaddr.h",
+ "src/core/lib/iomgr/sockaddr_custom.h",
"src/core/lib/iomgr/sockaddr_posix.h",
"src/core/lib/iomgr/sockaddr_utils.h",
"src/core/lib/iomgr/sockaddr_windows.h",
@@ -9359,17 +9383,16 @@
"src/core/lib/iomgr/sys_epoll_wrapper.h",
"src/core/lib/iomgr/tcp_client.h",
"src/core/lib/iomgr/tcp_client_posix.h",
+ "src/core/lib/iomgr/tcp_custom.h",
"src/core/lib/iomgr/tcp_posix.h",
"src/core/lib/iomgr/tcp_server.h",
"src/core/lib/iomgr/tcp_server_utils_posix.h",
- "src/core/lib/iomgr/tcp_uv.h",
"src/core/lib/iomgr/tcp_windows.h",
"src/core/lib/iomgr/time_averaged_stats.h",
"src/core/lib/iomgr/timer.h",
- "src/core/lib/iomgr/timer_generic.h",
+ "src/core/lib/iomgr/timer_custom.h",
"src/core/lib/iomgr/timer_heap.h",
"src/core/lib/iomgr/timer_manager.h",
- "src/core/lib/iomgr/timer_uv.h",
"src/core/lib/iomgr/udp_server.h",
"src/core/lib/iomgr/unix_sockets_posix.h",
"src/core/lib/iomgr/wakeup_fd_cv.h",
@@ -10399,6 +10422,8 @@
"headers": [
"src/core/tsi/alts_transport_security.h",
"src/core/tsi/fake_transport_security.h",
+ "src/core/tsi/ssl/session_cache/ssl_session.h",
+ "src/core/tsi/ssl/session_cache/ssl_session_cache.h",
"src/core/tsi/ssl_transport_security.h",
"src/core/tsi/ssl_types.h",
"src/core/tsi/transport_security_grpc.h"
@@ -10411,6 +10436,11 @@
"src/core/tsi/alts_transport_security.h",
"src/core/tsi/fake_transport_security.cc",
"src/core/tsi/fake_transport_security.h",
+ "src/core/tsi/ssl/session_cache/ssl_session.h",
+ "src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc",
+ "src/core/tsi/ssl/session_cache/ssl_session_cache.cc",
+ "src/core/tsi/ssl/session_cache/ssl_session_cache.h",
+ "src/core/tsi/ssl/session_cache/ssl_session_openssl.cc",
"src/core/tsi/ssl_transport_security.cc",
"src/core/tsi/ssl_transport_security.h",
"src/core/tsi/ssl_types.h",
diff --git a/tools/run_tests/generated/tests.json b/tools/run_tests/generated/tests.json
index db2776ba75..a7c83311a4 100644
--- a/tools/run_tests/generated/tests.json
+++ b/tools/run_tests/generated/tests.json
@@ -210,30 +210,6 @@
"flaky": false,
"gtest": false,
"language": "c",
- "name": "byte_stream_test",
- "platforms": [
- "linux",
- "mac",
- "posix",
- "windows"
- ],
- "uses_polling": false
- },
- {
- "args": [],
- "benchmark": false,
- "ci_platforms": [
- "linux",
- "mac",
- "posix",
- "windows"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "gtest": false,
- "language": "c",
"name": "channel_create_test",
"platforms": [
"linux",
@@ -3592,6 +3568,30 @@
"flaky": false,
"gtest": true,
"language": "c++",
+ "name": "byte_stream_test",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "uses_polling": false
+ },
+ {
+ "args": [],
+ "benchmark": false,
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "exclude_iomgrs": [],
+ "flaky": false,
+ "gtest": true,
+ "language": "c++",
"name": "channel_arguments_test",
"platforms": [
"linux",
@@ -4240,6 +4240,30 @@
"flaky": false,
"gtest": true,
"language": "c++",
+ "name": "h2_ssl_session_reuse_test",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "uses_polling": true
+ },
+ {
+ "args": [],
+ "benchmark": false,
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "exclude_iomgrs": [],
+ "flaky": false,
+ "gtest": true,
+ "language": "c++",
"name": "health_service_end2end_test",
"platforms": [
"linux",
@@ -4899,30 +4923,6 @@
"posix",
"windows"
],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "gtest": false,
- "language": "c++",
- "name": "status_test",
- "platforms": [
- "linux",
- "mac",
- "posix",
- "windows"
- ],
- "uses_polling": false
- },
- {
- "args": [],
- "benchmark": false,
- "ci_platforms": [
- "linux",
- "mac",
- "posix",
- "windows"
- ],
"cpu_cost": 0.1,
"exclude_configs": [],
"exclude_iomgrs": [],
diff --git a/tools/run_tests/run_interop_tests.py b/tools/run_tests/run_interop_tests.py
index 4a9c282d23..ba4ab3bd36 100755
--- a/tools/run_tests/run_interop_tests.py
+++ b/tools/run_tests/run_interop_tests.py
@@ -385,6 +385,36 @@ class NodeLanguage:
return 'node'
+class NodePureJSLanguage:
+
+ def __init__(self):
+ self.client_cwd = '../grpc-node'
+ self.server_cwd = '../grpc-node'
+ self.safename = str(self)
+
+ def client_cmd(self, args):
+ return [
+ 'packages/grpc-native-core/deps/grpc/tools/run_tests/interop/with_nvm.sh',
+ 'node', '--require', './test/fixtures/js_js',
+ 'test/interop/interop_client.js'
+ ] + args
+
+ def cloud_to_prod_env(self):
+ return {}
+
+ def global_env(self):
+ return {}
+
+ def unimplemented_test_cases(self):
+ return _SKIP_COMPRESSION + _SKIP_DATA_FRAME_PADDING
+
+ def unimplemented_test_cases_server(self):
+ return []
+
+ def __str__(self):
+ return 'nodepurejs'
+
+
class PHPLanguage:
def __init__(self):
@@ -559,6 +589,7 @@ _LANGUAGES = {
'java': JavaLanguage(),
'javaokhttp': JavaOkHttpClient(),
'node': NodeLanguage(),
+ 'nodepurejs': NodePureJSLanguage(),
'php': PHPLanguage(),
'php7': PHP7Language(),
'objc': ObjcLanguage(),
@@ -676,7 +707,7 @@ def auth_options(language, test_case):
if test_case in ['jwt_token_creds', 'per_rpc_creds', 'oauth2_auth_token']:
if language in [
'csharp', 'csharpcoreclr', 'node', 'php', 'php7', 'python',
- 'ruby'
+ 'ruby', 'nodepurejs'
]:
env['GOOGLE_APPLICATION_CREDENTIALS'] = key_filepath
else:
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py
index b751bf9714..85c7f5c4dc 100755
--- a/tools/run_tests/run_tests.py
+++ b/tools/run_tests/run_tests.py
@@ -281,7 +281,7 @@ class CLanguage(object):
self._docker_distro, self._make_options = self._compiler_options(
self.args.use_docker, self.args.compiler)
if args.iomgr_platform == "uv":
- cflags = '-DGRPC_UV -DGRPC_UV_THREAD_CHECK'
+ cflags = '-DGRPC_UV -DGRPC_CUSTOM_IOMGR_THREAD_CHECK '
try:
cflags += subprocess.check_output(
['pkg-config', '--cflags', 'libuv']).strip() + ' '
diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj b/vsprojects/vcxproj/grpc++/grpc++.vcxproj
new file mode 100644
index 0000000000..8f357d35e9
--- /dev/null
+++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj
@@ -0,0 +1,646 @@
+<?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-DLL|Win32">
+ <Configuration>Debug-DLL</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug-DLL|x64">
+ <Configuration>Debug-DLL</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release-DLL|Win32">
+ <Configuration>Release-DLL</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release-DLL|x64">
+ <Configuration>Release-DLL</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <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>{C187A093-A0FE-489D-A40A-6E33DE0F9FEB}</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>
+ <PropertyGroup Condition="'$(Configuration)'=='Debug-DLL'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Release-DLL'" 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>grpc++</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Release'">
+ <TargetName>grpc++</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug-DLL|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>Windows</SubSystem>
+ <GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
+ <GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug-DLL|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>Windows</SubSystem>
+ <GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
+ <GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release-DLL|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>Windows</SubSystem>
+ <GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
+ <GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release-DLL|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>Windows</SubSystem>
+ <GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
+ <GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+
+ <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>Windows</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>Windows</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>Windows</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>Windows</SubSystem>
+ <GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
+ <GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+
+ <ItemGroup>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\alarm.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\channel.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\client_context.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\completion_queue.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\create_channel.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\create_channel_posix.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\ext\health_check_service_server_builder_option.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\generic\async_generic_service.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\generic\generic_stub.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\grpc++.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\health_check_service_interface.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\call.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\channel_argument_option.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\client_unary_call.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\core_codegen.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\grpc_library.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\method_handler_impl.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\rpc_method.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\rpc_service_method.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\serialization_traits.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\server_builder_option.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\server_builder_plugin.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\server_initializer.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\service_type.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\resource_quota.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\security\auth_context.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\security\auth_metadata_processor.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\security\credentials.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\security\server_credentials.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\server.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\server_builder.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\server_context.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\server_posix.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\async_stream.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\async_unary_call.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\byte_buffer.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\channel_arguments.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\config.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\slice.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\status.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\status_code_enum.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\string_ref.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\stub_options.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\sync_stream.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\time.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\alloc.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\atm.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\atm_gcc_atomic.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\atm_gcc_sync.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\atm_windows.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\avl.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\cmdline.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\cpu.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\histogram.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\host_port.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\log.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\log_windows.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\port_platform.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\string_util.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\subprocess.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\sync.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\sync_generic.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\sync_posix.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\sync_windows.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\thd.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\time.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\tls.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\tls_gcc.h" />
+ <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\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\gpr_slice.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\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\byte_buffer.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\byte_buffer_reader.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\compression.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\grpc.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\grpc_posix.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\grpc_security_constants.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\load_reporting.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\slice.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\slice_buffer.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\status.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\workaround_list.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\exec_ctx_fwd.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\slice.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\status.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" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\call_hook.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\channel_interface.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\client_context.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\client_unary_call.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\completion_queue.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\completion_queue_tag.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\config.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\core_codegen_interface.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\create_auth_context.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\grpc_library.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\metadata_map.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\method_handler_impl.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\rpc_method.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\rpc_service_method.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\security\auth_context.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\serialization_traits.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\server_context.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\server_interface.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\service_type.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\slice.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\string_ref.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\stub_options.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\proto_utils.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\config_protobuf.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\core_codegen.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\cpp\client\secure_credentials.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\cpp\common\secure_auth_context.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\cpp\server\secure_server_credentials.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\cpp\client\create_channel_internal.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\cpp\common\channel_filter.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\cpp\server\dynamic_thread_pool.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\cpp\server\health\default_health_check_service.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\cpp\server\health\health.pb.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\cpp\server\thread_pool_interface.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\cpp\thread_manager\thread_manager.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\profiling\timers.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\arena.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\atomic.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\atomic_with_atm.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\atomic_with_std.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\backoff.h" />
+ <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\memory.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\mpscq.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\murmur_hash.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\spinlock.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" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\thd_internal.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\time_precise.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\tmpfile.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\channel_args.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\channel_stack.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\channel_stack_builder.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\connected_channel.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\context.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\handshaker.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\handshaker_factory.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\handshaker_registry.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\compression\algorithm_metadata.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\compression\message_compress.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\compression\stream_compression.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\http\format_request.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\http\httpcli.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\http\parser.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\closure.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\combiner.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\error.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\error_internal.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epoll1_linux.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epoll_limited_pollers_linux.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epoll_thread_pool_linux.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epollex_linux.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epollsig_linux.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_posix.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_posix.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\exec_ctx.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\executor.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iocp_windows.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_custom.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_internal.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_posix.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\is_epollexclusive_available.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\load_file.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\lockfree_event.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\nameser.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\network_status_tracker.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\polling_entity.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_set.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_set_windows.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_uv.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_windows.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\port.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\resource_quota.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\sockaddr.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\sockaddr_posix.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\sockaddr_utils.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\sockaddr_windows.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_factory_posix.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_mutator.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_utils.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_utils_posix.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_windows.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\sys_epoll_wrapper.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_posix.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_custom.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_posix.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_utils_posix.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_uv.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_windows.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\time_averaged_stats.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\timer.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_custom.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_heap.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_manager.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\udp_server.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\unix_sockets_posix.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\wakeup_fd_cv.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\wakeup_fd_pipe.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\wakeup_fd_posix.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\json\json.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\json\json_common.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\json\json_reader.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\json\json_writer.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\slice\b64.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\slice\percent_encoding.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\slice\slice_hash_table.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\slice\slice_internal.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\slice\slice_string_helpers.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\api_trace.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\call.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\call_test_only.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\channel.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\channel_init.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\channel_stack_type.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\completion_queue.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\completion_queue_factory.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\event_string.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\init.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\lame_client.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\server.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\validate_metadata.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\bdp_estimator.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\byte_stream.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\connectivity_state.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\error_utils.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\http2_errors.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\metadata.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\metadata_batch.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\pid_controller.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\service_config.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\static_metadata.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\status_conversion.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\timeout_encoding.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\transport.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\transport_impl.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\debug\trace.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\inproc\inproc_transport.h" />
+ <ClInclude Include="$(SolutionDir)\..\third_party\nanopb\pb.h" />
+ <ClInclude Include="$(SolutionDir)\..\third_party\nanopb\pb_common.h" />
+ <ClInclude Include="$(SolutionDir)\..\third_party\nanopb\pb_decode.h" />
+ <ClInclude Include="$(SolutionDir)\..\third_party\nanopb\pb_encode.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">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\common\secure_auth_context.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\common\secure_channel_arguments.cc">
+ </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.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\client\client_context.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\client\create_channel.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\client\create_channel_internal.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\client\create_channel_posix.cc">
+ </ClCompile>
+ <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\common\channel_arguments.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\common\channel_filter.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\common\completion_queue_cc.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\common\core_codegen.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\common\resource_quota_cc.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\common\rpc_method.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\common\version_cc.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\async_generic_service.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\channel_argument_option.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\create_default_thread_pool.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\dynamic_thread_pool.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\health\default_health_check_service.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\health\health.pb.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\health\health_check_service.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\health\health_check_service_server_builder_option.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\thread_manager\thread_manager.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\util\byte_buffer_cc.cc">
+ </ClCompile>
+ <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.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\codegen\codegen_init.cc">
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\grpc\grpc.vcxproj">
+ <Project>{29D16885-7228-4C31-81ED-5F9187C7F2A9}</Project>
+ </ProjectReference>
+ <ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\gpr\gpr.vcxproj">
+ <Project>{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}</Project>
+ </ProjectReference>
+ </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/grpc++/grpc++.vcxproj.filters b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters
new file mode 100644
index 0000000000..c5c1eba593
--- /dev/null
+++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters
@@ -0,0 +1,1096 @@
+<?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>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\common\auth_property_iterator.cc">
+ <Filter>src\cpp\common</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\common\secure_auth_context.cc">
+ <Filter>src\cpp\common</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\common\secure_channel_arguments.cc">
+ <Filter>src\cpp\common</Filter>
+ </ClCompile>
+ <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.cc">
+ <Filter>src\cpp\client</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\client\client_context.cc">
+ <Filter>src\cpp\client</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\client\create_channel.cc">
+ <Filter>src\cpp\client</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\client\create_channel_internal.cc">
+ <Filter>src\cpp\client</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\client\create_channel_posix.cc">
+ <Filter>src\cpp\client</Filter>
+ </ClCompile>
+ <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\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.cc">
+ <Filter>src\cpp\common</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\common\core_codegen.cc">
+ <Filter>src\cpp\common</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\common\resource_quota_cc.cc">
+ <Filter>src\cpp\common</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\common\rpc_method.cc">
+ <Filter>src\cpp\common</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\common\version_cc.cc">
+ <Filter>src\cpp\common</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\async_generic_service.cc">
+ <Filter>src\cpp\server</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\channel_argument_option.cc">
+ <Filter>src\cpp\server</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\create_default_thread_pool.cc">
+ <Filter>src\cpp\server</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\dynamic_thread_pool.cc">
+ <Filter>src\cpp\server</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\health\default_health_check_service.cc">
+ <Filter>src\cpp\server\health</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\health\health.pb.c">
+ <Filter>src\cpp\server\health</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\health\health_check_service.cc">
+ <Filter>src\cpp\server\health</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\health\health_check_service_server_builder_option.cc">
+ <Filter>src\cpp\server\health</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\server_builder.cc">
+ <Filter>src\cpp\server</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\server_cc.cc">
+ <Filter>src\cpp\server</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\server_context.cc">
+ <Filter>src\cpp\server</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\server_credentials.cc">
+ <Filter>src\cpp\server</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\server_posix.cc">
+ <Filter>src\cpp\server</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\thread_manager\thread_manager.cc">
+ <Filter>src\cpp\thread_manager</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\util\byte_buffer_cc.cc">
+ <Filter>src\cpp\util</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\util\slice_cc.cc">
+ <Filter>src\cpp\util</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\util\status.cc">
+ <Filter>src\cpp\util</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\util\string_ref.cc">
+ <Filter>src\cpp\util</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\util\time_cc.cc">
+ <Filter>src\cpp\util</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\codegen\codegen_init.cc">
+ <Filter>src\cpp\codegen</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\alarm.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\channel.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\client_context.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\completion_queue.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\create_channel.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\create_channel_posix.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\ext\health_check_service_server_builder_option.h">
+ <Filter>include\grpc++\ext</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\generic\async_generic_service.h">
+ <Filter>include\grpc++\generic</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\generic\generic_stub.h">
+ <Filter>include\grpc++\generic</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\grpc++.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\health_check_service_interface.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\call.h">
+ <Filter>include\grpc++\impl</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\channel_argument_option.h">
+ <Filter>include\grpc++\impl</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\client_unary_call.h">
+ <Filter>include\grpc++\impl</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\core_codegen.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\grpc_library.h">
+ <Filter>include\grpc++\impl</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\method_handler_impl.h">
+ <Filter>include\grpc++\impl</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\rpc_method.h">
+ <Filter>include\grpc++\impl</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\rpc_service_method.h">
+ <Filter>include\grpc++\impl</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\serialization_traits.h">
+ <Filter>include\grpc++\impl</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\server_builder_option.h">
+ <Filter>include\grpc++\impl</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\server_builder_plugin.h">
+ <Filter>include\grpc++\impl</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\server_initializer.h">
+ <Filter>include\grpc++\impl</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\service_type.h">
+ <Filter>include\grpc++\impl</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\resource_quota.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\security\auth_context.h">
+ <Filter>include\grpc++\security</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\security\auth_metadata_processor.h">
+ <Filter>include\grpc++\security</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\security\credentials.h">
+ <Filter>include\grpc++\security</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\security\server_credentials.h">
+ <Filter>include\grpc++\security</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\server.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\server_builder.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\server_context.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\server_posix.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\async_stream.h">
+ <Filter>include\grpc++\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\async_unary_call.h">
+ <Filter>include\grpc++\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\byte_buffer.h">
+ <Filter>include\grpc++\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\channel_arguments.h">
+ <Filter>include\grpc++\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\config.h">
+ <Filter>include\grpc++\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\slice.h">
+ <Filter>include\grpc++\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\status.h">
+ <Filter>include\grpc++\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\status_code_enum.h">
+ <Filter>include\grpc++\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\string_ref.h">
+ <Filter>include\grpc++\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\stub_options.h">
+ <Filter>include\grpc++\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\sync_stream.h">
+ <Filter>include\grpc++\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\time.h">
+ <Filter>include\grpc++\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\alloc.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\atm.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\atm_gcc_atomic.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\atm_gcc_sync.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\atm_windows.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\avl.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\cmdline.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\cpu.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\histogram.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\host_port.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\log.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\log_windows.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\port_platform.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\string_util.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\subprocess.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\sync.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\sync_generic.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\sync_posix.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\sync_windows.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\thd.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\time.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\tls.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\tls_gcc.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\tls_msvc.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\tls_pthread.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\useful.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_gcc_atomic.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_gcc_sync.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_windows.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\gpr_slice.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <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">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_generic.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_posix.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_windows.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\byte_buffer.h">
+ <Filter>include\grpc</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\byte_buffer_reader.h">
+ <Filter>include\grpc</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\compression.h">
+ <Filter>include\grpc</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\grpc.h">
+ <Filter>include\grpc</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\grpc_posix.h">
+ <Filter>include\grpc</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\grpc_security_constants.h">
+ <Filter>include\grpc</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\load_reporting.h">
+ <Filter>include\grpc</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\slice.h">
+ <Filter>include\grpc</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\slice_buffer.h">
+ <Filter>include\grpc</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\status.h">
+ <Filter>include\grpc</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\workaround_list.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer_reader.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\compression_types.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\connectivity_state.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\exec_ctx_fwd.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\grpc_types.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\propagation_bits.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\status.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>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\async_unary_call.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\call.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\call_hook.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\channel_interface.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\client_context.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\client_unary_call.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\completion_queue.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\completion_queue_tag.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\config.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\core_codegen_interface.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\create_auth_context.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\grpc_library.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\metadata_map.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\method_handler_impl.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\rpc_method.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\rpc_service_method.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\security\auth_context.h">
+ <Filter>include\grpc++\impl\codegen\security</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\serialization_traits.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\server_context.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\server_interface.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\service_type.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\slice.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <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\string_ref.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\stub_options.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_stream.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>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\config_protobuf.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\core_codegen.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\cpp\client\secure_credentials.h">
+ <Filter>src\cpp\client</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\cpp\common\secure_auth_context.h">
+ <Filter>src\cpp\common</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\cpp\server\secure_server_credentials.h">
+ <Filter>src\cpp\server</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\cpp\client\create_channel_internal.h">
+ <Filter>src\cpp\client</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\cpp\common\channel_filter.h">
+ <Filter>src\cpp\common</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\cpp\server\dynamic_thread_pool.h">
+ <Filter>src\cpp\server</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\cpp\server\health\default_health_check_service.h">
+ <Filter>src\cpp\server\health</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\cpp\server\health\health.pb.h">
+ <Filter>src\cpp\server\health</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\cpp\server\thread_pool_interface.h">
+ <Filter>src\cpp\server</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\cpp\thread_manager\thread_manager.h">
+ <Filter>src\cpp\thread_manager</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\profiling\timers.h">
+ <Filter>src\core\lib\profiling</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\arena.h">
+ <Filter>src\core\lib\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\atomic.h">
+ <Filter>src\core\lib\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\atomic_with_atm.h">
+ <Filter>src\core\lib\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\atomic_with_std.h">
+ <Filter>src\core\lib\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\backoff.h">
+ <Filter>src\core\lib\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\block_annotate.h">
+ <Filter>src\core\lib\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\env.h">
+ <Filter>src\core\lib\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\memory.h">
+ <Filter>src\core\lib\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\mpscq.h">
+ <Filter>src\core\lib\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\murmur_hash.h">
+ <Filter>src\core\lib\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\spinlock.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>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\string.h">
+ <Filter>src\core\lib\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\string_windows.h">
+ <Filter>src\core\lib\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\thd_internal.h">
+ <Filter>src\core\lib\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\time_precise.h">
+ <Filter>src\core\lib\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\tmpfile.h">
+ <Filter>src\core\lib\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\channel_args.h">
+ <Filter>src\core\lib\channel</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\channel_stack.h">
+ <Filter>src\core\lib\channel</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\channel_stack_builder.h">
+ <Filter>src\core\lib\channel</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\connected_channel.h">
+ <Filter>src\core\lib\channel</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\context.h">
+ <Filter>src\core\lib\channel</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\handshaker.h">
+ <Filter>src\core\lib\channel</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\handshaker_factory.h">
+ <Filter>src\core\lib\channel</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\handshaker_registry.h">
+ <Filter>src\core\lib\channel</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\compression\algorithm_metadata.h">
+ <Filter>src\core\lib\compression</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\compression\message_compress.h">
+ <Filter>src\core\lib\compression</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\compression\stream_compression.h">
+ <Filter>src\core\lib\compression</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\http\format_request.h">
+ <Filter>src\core\lib\http</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\http\httpcli.h">
+ <Filter>src\core\lib\http</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\http\parser.h">
+ <Filter>src\core\lib\http</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\closure.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\combiner.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\error.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\error_internal.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epoll1_linux.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epoll_limited_pollers_linux.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epoll_thread_pool_linux.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epollex_linux.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epollsig_linux.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_posix.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_posix.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\exec_ctx.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\executor.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iocp_windows.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_custom.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_internal.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_posix.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\is_epollexclusive_available.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\load_file.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\lockfree_event.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\nameser.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\network_status_tracker.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\polling_entity.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_set.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_set_windows.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_uv.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_windows.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\port.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\resource_quota.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\sockaddr.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\sockaddr_posix.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\sockaddr_utils.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\sockaddr_windows.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_factory_posix.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_mutator.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_utils.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_utils_posix.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_windows.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\sys_epoll_wrapper.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_posix.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_custom.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_posix.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_utils_posix.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_uv.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_windows.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\time_averaged_stats.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\timer.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_custom.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_heap.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_manager.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\udp_server.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\unix_sockets_posix.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\wakeup_fd_cv.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\wakeup_fd_pipe.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\wakeup_fd_posix.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\json\json.h">
+ <Filter>src\core\lib\json</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\json\json_common.h">
+ <Filter>src\core\lib\json</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\json\json_reader.h">
+ <Filter>src\core\lib\json</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\json\json_writer.h">
+ <Filter>src\core\lib\json</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\slice\b64.h">
+ <Filter>src\core\lib\slice</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\slice\percent_encoding.h">
+ <Filter>src\core\lib\slice</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\slice\slice_hash_table.h">
+ <Filter>src\core\lib\slice</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\slice\slice_internal.h">
+ <Filter>src\core\lib\slice</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\slice\slice_string_helpers.h">
+ <Filter>src\core\lib\slice</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\api_trace.h">
+ <Filter>src\core\lib\surface</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\call.h">
+ <Filter>src\core\lib\surface</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\call_test_only.h">
+ <Filter>src\core\lib\surface</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\channel.h">
+ <Filter>src\core\lib\surface</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\channel_init.h">
+ <Filter>src\core\lib\surface</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\channel_stack_type.h">
+ <Filter>src\core\lib\surface</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\completion_queue.h">
+ <Filter>src\core\lib\surface</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\completion_queue_factory.h">
+ <Filter>src\core\lib\surface</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\event_string.h">
+ <Filter>src\core\lib\surface</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\init.h">
+ <Filter>src\core\lib\surface</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\lame_client.h">
+ <Filter>src\core\lib\surface</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\server.h">
+ <Filter>src\core\lib\surface</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\validate_metadata.h">
+ <Filter>src\core\lib\surface</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\bdp_estimator.h">
+ <Filter>src\core\lib\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\byte_stream.h">
+ <Filter>src\core\lib\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\connectivity_state.h">
+ <Filter>src\core\lib\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\error_utils.h">
+ <Filter>src\core\lib\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\http2_errors.h">
+ <Filter>src\core\lib\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\metadata.h">
+ <Filter>src\core\lib\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\metadata_batch.h">
+ <Filter>src\core\lib\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\pid_controller.h">
+ <Filter>src\core\lib\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\service_config.h">
+ <Filter>src\core\lib\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\static_metadata.h">
+ <Filter>src\core\lib\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\status_conversion.h">
+ <Filter>src\core\lib\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\timeout_encoding.h">
+ <Filter>src\core\lib\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\transport.h">
+ <Filter>src\core\lib\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\transport_impl.h">
+ <Filter>src\core\lib\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\debug\trace.h">
+ <Filter>src\core\lib\debug</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\inproc\inproc_transport.h">
+ <Filter>src\core\ext\transport\inproc</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\third_party\nanopb\pb.h">
+ <Filter>third_party\nanopb</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\third_party\nanopb\pb_common.h">
+ <Filter>third_party\nanopb</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\third_party\nanopb\pb_decode.h">
+ <Filter>third_party\nanopb</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\third_party\nanopb\pb_encode.h">
+ <Filter>third_party\nanopb</Filter>
+ </ClInclude>
+ </ItemGroup>
+
+ <ItemGroup>
+ <Filter Include="include">
+ <UniqueIdentifier>{82445414-24cd-8198-1fe1-4267c3f3df00}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="include\grpc">
+ <UniqueIdentifier>{16946104-53ac-ac76-68b9-f9ec77ea6fae}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="include\grpc++">
+ <UniqueIdentifier>{784a0281-f547-aeb0-9f55-b26b7de9c769}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="include\grpc++\ext">
+ <UniqueIdentifier>{25501d8e-5fae-2fe4-14a6-d69a07acefdd}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="include\grpc++\generic">
+ <UniqueIdentifier>{51dae921-3aa2-1976-2ee4-c5615de1af54}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="include\grpc++\impl">
+ <UniqueIdentifier>{0da8cd95-314f-da1b-5ce7-7791a5be1f1a}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="include\grpc++\impl\codegen">
+ <UniqueIdentifier>{a3e7f28b-a7c7-7364-d402-edb1bfa414a4}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="include\grpc++\impl\codegen\security">
+ <UniqueIdentifier>{20cbcf00-994a-300a-5184-bda96c6f45e4}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="include\grpc++\security">
+ <UniqueIdentifier>{a80eb32b-1be9-1187-5f40-30d92accecc8}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="include\grpc++\support">
+ <UniqueIdentifier>{a5c10dae-f715-2a30-1066-d22f8bc94cb2}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="include\grpc\impl">
+ <UniqueIdentifier>{48c3b0ae-c00f-fa20-6965-b73da65d71cb}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="include\grpc\impl\codegen">
+ <UniqueIdentifier>{dc8bfccd-341f-26f0-8ee4-47dde62a6dd1}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="include\grpc\support">
+ <UniqueIdentifier>{5ec10a44-9a09-9220-cf3b-b18ce6e4f70f}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src">
+ <UniqueIdentifier>{328ff211-2886-406e-56f9-18ba1686f363}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core">
+ <UniqueIdentifier>{d02f1155-7e7e-3736-3c69-dc9146dc523d}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\ext">
+ <UniqueIdentifier>{96d09c4a-59f9-3486-6c2f-cbf695b285d8}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\ext\transport">
+ <UniqueIdentifier>{202b1172-189f-afc4-f16c-4ca12677b480}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\ext\transport\inproc">
+ <UniqueIdentifier>{635a93a8-e23a-a664-c9cb-0963736dd9ce}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\lib">
+ <UniqueIdentifier>{80567a8f-622f-a3ce-c12d-aebb63984b07}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\lib\channel">
+ <UniqueIdentifier>{e769265c-8abd-cd64-2cc2-a52da484fe7b}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\lib\compression">
+ <UniqueIdentifier>{701b2d46-11c6-3640-b189-45287f00bee3}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\lib\debug">
+ <UniqueIdentifier>{ada68fd5-8e51-98cb-71a7-baf7989d8ffa}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\lib\http">
+ <UniqueIdentifier>{e770844e-61d4-555e-59be-81288e21a35f}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\lib\iomgr">
+ <UniqueIdentifier>{04dfa1c8-7ffe-4f06-4a7c-37441dc75764}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\lib\json">
+ <UniqueIdentifier>{a5d5bddf-6f19-b655-a03a-f30ff5c253a5}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\lib\profiling">
+ <UniqueIdentifier>{836e78ab-aaae-9dce-dd1e-06f03c436a13}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\lib\slice">
+ <UniqueIdentifier>{afe126ba-52c9-1daa-d174-8ee8aade08c2}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\lib\support">
+ <UniqueIdentifier>{83b45914-6f97-b4ad-f2d0-cc56a10ea1bb}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\lib\surface">
+ <UniqueIdentifier>{fb2276d7-5a11-f1d9-82c3-e7c7f1155523}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\lib\transport">
+ <UniqueIdentifier>{4bd7971a-68f7-0d5a-f502-6dea3099caaa}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\cpp">
+ <UniqueIdentifier>{2420a905-e4f1-a5aa-a364-6a112878a39e}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\cpp\client">
+ <UniqueIdentifier>{7febf32a-d7a6-76fa-9e17-f189f591c062}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\cpp\codegen">
+ <UniqueIdentifier>{3c3e27f4-d3d9-3c42-5204-08b5e839f2de}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\cpp\common">
+ <UniqueIdentifier>{2336e396-7e0b-8bf9-3b09-adc6ad1f0e5b}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\cpp\server">
+ <UniqueIdentifier>{321b0980-74ad-e8ca-f23b-deffa5d6bb8f}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\cpp\server\health">
+ <UniqueIdentifier>{5bc9ef4e-78c1-159e-4e4e-30ddfce3e140}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\cpp\thread_manager">
+ <UniqueIdentifier>{23f9df56-8604-52a0-e6a2-f01b8e68d0e7}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\cpp\util">
+ <UniqueIdentifier>{f842537a-2bf1-1ec3-b495-7d62c64a1c06}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="third_party">
+ <UniqueIdentifier>{0cfc99f5-c633-356e-6810-754c93b15658}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="third_party\nanopb">
+ <UniqueIdentifier>{abc9bbec-57f7-141f-8616-e2d3aa8b2e6d}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+</Project>
+
diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj
new file mode 100644
index 0000000000..3d8bf82b6a
--- /dev/null
+++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj
@@ -0,0 +1,630 @@
+<?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-DLL|Win32">
+ <Configuration>Debug-DLL</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug-DLL|x64">
+ <Configuration>Debug-DLL</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release-DLL|Win32">
+ <Configuration>Release-DLL</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release-DLL|x64">
+ <Configuration>Release-DLL</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <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>{6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}</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>
+ <PropertyGroup Condition="'$(Configuration)'=='Debug-DLL'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Release-DLL'" 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>grpc++_unsecure</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Release'">
+ <TargetName>grpc++_unsecure</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug-DLL|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>Windows</SubSystem>
+ <GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
+ <GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug-DLL|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>Windows</SubSystem>
+ <GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
+ <GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release-DLL|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>Windows</SubSystem>
+ <GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
+ <GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release-DLL|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>Windows</SubSystem>
+ <GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
+ <GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+
+ <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>Windows</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>Windows</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>Windows</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>Windows</SubSystem>
+ <GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
+ <GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+
+ <ItemGroup>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\alarm.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\channel.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\client_context.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\completion_queue.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\create_channel.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\create_channel_posix.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\ext\health_check_service_server_builder_option.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\generic\async_generic_service.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\generic\generic_stub.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\grpc++.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\health_check_service_interface.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\call.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\channel_argument_option.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\client_unary_call.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\core_codegen.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\grpc_library.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\method_handler_impl.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\rpc_method.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\rpc_service_method.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\serialization_traits.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\server_builder_option.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\server_builder_plugin.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\server_initializer.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\service_type.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\resource_quota.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\security\auth_context.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\security\auth_metadata_processor.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\security\credentials.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\security\server_credentials.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\server.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\server_builder.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\server_context.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\server_posix.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\async_stream.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\async_unary_call.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\byte_buffer.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\channel_arguments.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\config.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\slice.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\status.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\status_code_enum.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\string_ref.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\stub_options.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\sync_stream.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\time.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\alloc.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\atm.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\atm_gcc_atomic.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\atm_gcc_sync.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\atm_windows.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\avl.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\cmdline.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\cpu.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\histogram.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\host_port.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\log.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\log_windows.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\port_platform.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\string_util.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\subprocess.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\sync.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\sync_generic.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\sync_posix.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\sync_windows.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\thd.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\time.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\tls.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\tls_gcc.h" />
+ <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\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\gpr_slice.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\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\byte_buffer.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\byte_buffer_reader.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\compression.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\grpc.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\grpc_posix.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\grpc_security_constants.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\load_reporting.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\slice.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\slice_buffer.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\status.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\workaround_list.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\exec_ctx_fwd.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\slice.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\status.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" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\call_hook.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\channel_interface.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\client_context.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\client_unary_call.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\completion_queue.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\completion_queue_tag.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\config.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\core_codegen_interface.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\create_auth_context.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\grpc_library.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\metadata_map.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\method_handler_impl.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\rpc_method.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\rpc_service_method.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\security\auth_context.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\serialization_traits.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\server_context.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\server_interface.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\service_type.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\slice.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\string_ref.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\stub_options.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_stream.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\time.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="$(SolutionDir)\..\src\cpp\client\create_channel_internal.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\cpp\common\channel_filter.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\cpp\server\dynamic_thread_pool.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\cpp\server\health\default_health_check_service.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\cpp\server\health\health.pb.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\cpp\server\thread_pool_interface.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\cpp\thread_manager\thread_manager.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\profiling\timers.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\arena.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\atomic.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\atomic_with_atm.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\atomic_with_std.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\backoff.h" />
+ <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\memory.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\mpscq.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\murmur_hash.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\spinlock.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" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\thd_internal.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\time_precise.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\tmpfile.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\channel_args.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\channel_stack.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\channel_stack_builder.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\connected_channel.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\context.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\handshaker.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\handshaker_factory.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\handshaker_registry.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\compression\algorithm_metadata.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\compression\message_compress.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\compression\stream_compression.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\http\format_request.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\http\httpcli.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\http\parser.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\closure.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\combiner.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\error.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\error_internal.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epoll1_linux.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epoll_limited_pollers_linux.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epoll_thread_pool_linux.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epollex_linux.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epollsig_linux.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_posix.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_posix.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\exec_ctx.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\executor.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iocp_windows.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_custom.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_internal.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_posix.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\is_epollexclusive_available.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\load_file.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\lockfree_event.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\nameser.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\network_status_tracker.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\polling_entity.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_set.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_set_windows.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_uv.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_windows.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\port.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\resource_quota.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\sockaddr.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\sockaddr_posix.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\sockaddr_utils.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\sockaddr_windows.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_factory_posix.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_mutator.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_utils.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_utils_posix.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_windows.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\sys_epoll_wrapper.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_posix.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_custom.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_posix.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_utils_posix.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_uv.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_windows.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\time_averaged_stats.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\timer.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_custom.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_heap.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_manager.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\udp_server.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\unix_sockets_posix.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\wakeup_fd_cv.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\wakeup_fd_pipe.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\wakeup_fd_posix.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\json\json.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\json\json_common.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\json\json_reader.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\json\json_writer.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\slice\b64.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\slice\percent_encoding.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\slice\slice_hash_table.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\slice\slice_internal.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\slice\slice_string_helpers.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\api_trace.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\call.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\call_test_only.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\channel.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\channel_init.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\channel_stack_type.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\completion_queue.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\completion_queue_factory.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\event_string.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\init.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\lame_client.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\server.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\validate_metadata.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\bdp_estimator.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\byte_stream.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\connectivity_state.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\error_utils.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\http2_errors.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\metadata.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\metadata_batch.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\pid_controller.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\service_config.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\static_metadata.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\status_conversion.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\timeout_encoding.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\transport.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\transport_impl.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\debug\trace.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\inproc\inproc_transport.h" />
+ <ClInclude Include="$(SolutionDir)\..\third_party\nanopb\pb.h" />
+ <ClInclude Include="$(SolutionDir)\..\third_party\nanopb\pb_common.h" />
+ <ClInclude Include="$(SolutionDir)\..\third_party\nanopb\pb_decode.h" />
+ <ClInclude Include="$(SolutionDir)\..\third_party\nanopb\pb_encode.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\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>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\client\create_channel.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\client\create_channel_internal.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\client\create_channel_posix.cc">
+ </ClCompile>
+ <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\common\channel_arguments.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\common\channel_filter.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\common\completion_queue_cc.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\common\core_codegen.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\common\resource_quota_cc.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\common\rpc_method.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\common\version_cc.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\async_generic_service.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\channel_argument_option.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\create_default_thread_pool.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\dynamic_thread_pool.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\health\default_health_check_service.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\health\health.pb.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\health\health_check_service.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\health\health_check_service_server_builder_option.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\thread_manager\thread_manager.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\util\byte_buffer_cc.cc">
+ </ClCompile>
+ <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.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\codegen\codegen_init.cc">
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\gpr\gpr.vcxproj">
+ <Project>{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}</Project>
+ </ProjectReference>
+ <ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\grpc_unsecure\grpc_unsecure.vcxproj">
+ <Project>{46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}</Project>
+ </ProjectReference>
+ </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/grpc++_unsecure/grpc++_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters
new file mode 100644
index 0000000000..2c4230f4fe
--- /dev/null
+++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters
@@ -0,0 +1,1063 @@
+<?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\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">
+ <Filter>src\cpp\client</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\client\create_channel.cc">
+ <Filter>src\cpp\client</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\client\create_channel_internal.cc">
+ <Filter>src\cpp\client</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\client\create_channel_posix.cc">
+ <Filter>src\cpp\client</Filter>
+ </ClCompile>
+ <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\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.cc">
+ <Filter>src\cpp\common</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\common\core_codegen.cc">
+ <Filter>src\cpp\common</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\common\resource_quota_cc.cc">
+ <Filter>src\cpp\common</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\common\rpc_method.cc">
+ <Filter>src\cpp\common</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\common\version_cc.cc">
+ <Filter>src\cpp\common</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\async_generic_service.cc">
+ <Filter>src\cpp\server</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\channel_argument_option.cc">
+ <Filter>src\cpp\server</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\create_default_thread_pool.cc">
+ <Filter>src\cpp\server</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\dynamic_thread_pool.cc">
+ <Filter>src\cpp\server</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\health\default_health_check_service.cc">
+ <Filter>src\cpp\server\health</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\health\health.pb.c">
+ <Filter>src\cpp\server\health</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\health\health_check_service.cc">
+ <Filter>src\cpp\server\health</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\health\health_check_service_server_builder_option.cc">
+ <Filter>src\cpp\server\health</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\server_builder.cc">
+ <Filter>src\cpp\server</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\server_cc.cc">
+ <Filter>src\cpp\server</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\server_context.cc">
+ <Filter>src\cpp\server</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\server_credentials.cc">
+ <Filter>src\cpp\server</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\server\server_posix.cc">
+ <Filter>src\cpp\server</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\thread_manager\thread_manager.cc">
+ <Filter>src\cpp\thread_manager</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\util\byte_buffer_cc.cc">
+ <Filter>src\cpp\util</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\util\slice_cc.cc">
+ <Filter>src\cpp\util</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\util\status.cc">
+ <Filter>src\cpp\util</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\util\string_ref.cc">
+ <Filter>src\cpp\util</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\util\time_cc.cc">
+ <Filter>src\cpp\util</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\cpp\codegen\codegen_init.cc">
+ <Filter>src\cpp\codegen</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\alarm.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\channel.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\client_context.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\completion_queue.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\create_channel.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\create_channel_posix.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\ext\health_check_service_server_builder_option.h">
+ <Filter>include\grpc++\ext</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\generic\async_generic_service.h">
+ <Filter>include\grpc++\generic</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\generic\generic_stub.h">
+ <Filter>include\grpc++\generic</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\grpc++.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\health_check_service_interface.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\call.h">
+ <Filter>include\grpc++\impl</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\channel_argument_option.h">
+ <Filter>include\grpc++\impl</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\client_unary_call.h">
+ <Filter>include\grpc++\impl</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\core_codegen.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\grpc_library.h">
+ <Filter>include\grpc++\impl</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\method_handler_impl.h">
+ <Filter>include\grpc++\impl</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\rpc_method.h">
+ <Filter>include\grpc++\impl</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\rpc_service_method.h">
+ <Filter>include\grpc++\impl</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\serialization_traits.h">
+ <Filter>include\grpc++\impl</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\server_builder_option.h">
+ <Filter>include\grpc++\impl</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\server_builder_plugin.h">
+ <Filter>include\grpc++\impl</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\server_initializer.h">
+ <Filter>include\grpc++\impl</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\service_type.h">
+ <Filter>include\grpc++\impl</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\resource_quota.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\security\auth_context.h">
+ <Filter>include\grpc++\security</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\security\auth_metadata_processor.h">
+ <Filter>include\grpc++\security</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\security\credentials.h">
+ <Filter>include\grpc++\security</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\security\server_credentials.h">
+ <Filter>include\grpc++\security</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\server.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\server_builder.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\server_context.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\server_posix.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\async_stream.h">
+ <Filter>include\grpc++\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\async_unary_call.h">
+ <Filter>include\grpc++\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\byte_buffer.h">
+ <Filter>include\grpc++\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\channel_arguments.h">
+ <Filter>include\grpc++\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\config.h">
+ <Filter>include\grpc++\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\slice.h">
+ <Filter>include\grpc++\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\status.h">
+ <Filter>include\grpc++\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\status_code_enum.h">
+ <Filter>include\grpc++\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\string_ref.h">
+ <Filter>include\grpc++\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\stub_options.h">
+ <Filter>include\grpc++\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\sync_stream.h">
+ <Filter>include\grpc++\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\support\time.h">
+ <Filter>include\grpc++\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\alloc.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\atm.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\atm_gcc_atomic.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\atm_gcc_sync.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\atm_windows.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\avl.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\cmdline.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\cpu.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\histogram.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\host_port.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\log.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\log_windows.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\port_platform.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\string_util.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\subprocess.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\sync.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\sync_generic.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\sync_posix.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\sync_windows.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\thd.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\time.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\tls.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\tls_gcc.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\tls_msvc.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\tls_pthread.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\useful.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_gcc_atomic.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_gcc_sync.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_windows.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\gpr_slice.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <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">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_generic.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_posix.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_windows.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\byte_buffer.h">
+ <Filter>include\grpc</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\byte_buffer_reader.h">
+ <Filter>include\grpc</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\compression.h">
+ <Filter>include\grpc</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\grpc.h">
+ <Filter>include\grpc</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\grpc_posix.h">
+ <Filter>include\grpc</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\grpc_security_constants.h">
+ <Filter>include\grpc</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\load_reporting.h">
+ <Filter>include\grpc</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\slice.h">
+ <Filter>include\grpc</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\slice_buffer.h">
+ <Filter>include\grpc</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\status.h">
+ <Filter>include\grpc</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\support\workaround_list.h">
+ <Filter>include\grpc\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer_reader.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\compression_types.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\connectivity_state.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\exec_ctx_fwd.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\grpc_types.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\propagation_bits.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\status.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>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\async_unary_call.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\call.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\call_hook.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\channel_interface.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\client_context.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\client_unary_call.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\completion_queue.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\completion_queue_tag.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\config.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\core_codegen_interface.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\create_auth_context.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\grpc_library.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\metadata_map.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\method_handler_impl.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\rpc_method.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\rpc_service_method.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\security\auth_context.h">
+ <Filter>include\grpc++\impl\codegen\security</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\serialization_traits.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\server_context.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\server_interface.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\service_type.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\slice.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <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\string_ref.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\stub_options.h">
+ <Filter>include\grpc++\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_stream.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\cpp\client\create_channel_internal.h">
+ <Filter>src\cpp\client</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\cpp\common\channel_filter.h">
+ <Filter>src\cpp\common</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\cpp\server\dynamic_thread_pool.h">
+ <Filter>src\cpp\server</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\cpp\server\health\default_health_check_service.h">
+ <Filter>src\cpp\server\health</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\cpp\server\health\health.pb.h">
+ <Filter>src\cpp\server\health</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\cpp\server\thread_pool_interface.h">
+ <Filter>src\cpp\server</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\cpp\thread_manager\thread_manager.h">
+ <Filter>src\cpp\thread_manager</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\profiling\timers.h">
+ <Filter>src\core\lib\profiling</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\arena.h">
+ <Filter>src\core\lib\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\atomic.h">
+ <Filter>src\core\lib\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\atomic_with_atm.h">
+ <Filter>src\core\lib\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\atomic_with_std.h">
+ <Filter>src\core\lib\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\backoff.h">
+ <Filter>src\core\lib\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\block_annotate.h">
+ <Filter>src\core\lib\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\env.h">
+ <Filter>src\core\lib\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\memory.h">
+ <Filter>src\core\lib\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\mpscq.h">
+ <Filter>src\core\lib\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\murmur_hash.h">
+ <Filter>src\core\lib\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\spinlock.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>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\string.h">
+ <Filter>src\core\lib\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\string_windows.h">
+ <Filter>src\core\lib\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\thd_internal.h">
+ <Filter>src\core\lib\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\time_precise.h">
+ <Filter>src\core\lib\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\support\tmpfile.h">
+ <Filter>src\core\lib\support</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\channel_args.h">
+ <Filter>src\core\lib\channel</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\channel_stack.h">
+ <Filter>src\core\lib\channel</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\channel_stack_builder.h">
+ <Filter>src\core\lib\channel</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\connected_channel.h">
+ <Filter>src\core\lib\channel</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\context.h">
+ <Filter>src\core\lib\channel</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\handshaker.h">
+ <Filter>src\core\lib\channel</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\handshaker_factory.h">
+ <Filter>src\core\lib\channel</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\channel\handshaker_registry.h">
+ <Filter>src\core\lib\channel</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\compression\algorithm_metadata.h">
+ <Filter>src\core\lib\compression</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\compression\message_compress.h">
+ <Filter>src\core\lib\compression</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\compression\stream_compression.h">
+ <Filter>src\core\lib\compression</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\http\format_request.h">
+ <Filter>src\core\lib\http</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\http\httpcli.h">
+ <Filter>src\core\lib\http</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\http\parser.h">
+ <Filter>src\core\lib\http</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\closure.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\combiner.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\error.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\error_internal.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epoll1_linux.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epoll_limited_pollers_linux.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epoll_thread_pool_linux.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epollex_linux.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epollsig_linux.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_posix.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_posix.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\exec_ctx.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\executor.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iocp_windows.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_custom.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_internal.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_posix.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\is_epollexclusive_available.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\load_file.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\lockfree_event.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\nameser.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\network_status_tracker.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\polling_entity.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_set.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_set_windows.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_uv.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_windows.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\port.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\resource_quota.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\sockaddr.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\sockaddr_posix.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\sockaddr_utils.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\sockaddr_windows.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_factory_posix.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_mutator.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_utils.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_utils_posix.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_windows.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\sys_epoll_wrapper.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_posix.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_custom.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_posix.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_utils_posix.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_uv.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_windows.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\time_averaged_stats.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\timer.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_custom.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_heap.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_manager.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\udp_server.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\unix_sockets_posix.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\wakeup_fd_cv.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\wakeup_fd_pipe.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\wakeup_fd_posix.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\json\json.h">
+ <Filter>src\core\lib\json</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\json\json_common.h">
+ <Filter>src\core\lib\json</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\json\json_reader.h">
+ <Filter>src\core\lib\json</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\json\json_writer.h">
+ <Filter>src\core\lib\json</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\slice\b64.h">
+ <Filter>src\core\lib\slice</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\slice\percent_encoding.h">
+ <Filter>src\core\lib\slice</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\slice\slice_hash_table.h">
+ <Filter>src\core\lib\slice</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\slice\slice_internal.h">
+ <Filter>src\core\lib\slice</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\slice\slice_string_helpers.h">
+ <Filter>src\core\lib\slice</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\api_trace.h">
+ <Filter>src\core\lib\surface</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\call.h">
+ <Filter>src\core\lib\surface</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\call_test_only.h">
+ <Filter>src\core\lib\surface</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\channel.h">
+ <Filter>src\core\lib\surface</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\channel_init.h">
+ <Filter>src\core\lib\surface</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\channel_stack_type.h">
+ <Filter>src\core\lib\surface</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\completion_queue.h">
+ <Filter>src\core\lib\surface</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\completion_queue_factory.h">
+ <Filter>src\core\lib\surface</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\event_string.h">
+ <Filter>src\core\lib\surface</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\init.h">
+ <Filter>src\core\lib\surface</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\lame_client.h">
+ <Filter>src\core\lib\surface</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\server.h">
+ <Filter>src\core\lib\surface</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\surface\validate_metadata.h">
+ <Filter>src\core\lib\surface</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\bdp_estimator.h">
+ <Filter>src\core\lib\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\byte_stream.h">
+ <Filter>src\core\lib\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\connectivity_state.h">
+ <Filter>src\core\lib\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\error_utils.h">
+ <Filter>src\core\lib\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\http2_errors.h">
+ <Filter>src\core\lib\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\metadata.h">
+ <Filter>src\core\lib\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\metadata_batch.h">
+ <Filter>src\core\lib\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\pid_controller.h">
+ <Filter>src\core\lib\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\service_config.h">
+ <Filter>src\core\lib\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\static_metadata.h">
+ <Filter>src\core\lib\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\status_conversion.h">
+ <Filter>src\core\lib\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\timeout_encoding.h">
+ <Filter>src\core\lib\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\transport.h">
+ <Filter>src\core\lib\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\transport\transport_impl.h">
+ <Filter>src\core\lib\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\debug\trace.h">
+ <Filter>src\core\lib\debug</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\inproc\inproc_transport.h">
+ <Filter>src\core\ext\transport\inproc</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\third_party\nanopb\pb.h">
+ <Filter>third_party\nanopb</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\third_party\nanopb\pb_common.h">
+ <Filter>third_party\nanopb</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\third_party\nanopb\pb_decode.h">
+ <Filter>third_party\nanopb</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\third_party\nanopb\pb_encode.h">
+ <Filter>third_party\nanopb</Filter>
+ </ClInclude>
+ </ItemGroup>
+
+ <ItemGroup>
+ <Filter Include="include">
+ <UniqueIdentifier>{5c4eb19f-d511-e8fd-e1d6-c377cdc7d3b1}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="include\grpc">
+ <UniqueIdentifier>{f3dd91a8-058b-becf-9e41-eb42c7bc6e55}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="include\grpc++">
+ <UniqueIdentifier>{eceb50c0-bb49-3812-b6bd-b0af6df81da7}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="include\grpc++\ext">
+ <UniqueIdentifier>{e6643be2-2b2f-953d-ab14-27d89c835c8a}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="include\grpc++\generic">
+ <UniqueIdentifier>{83717d3c-57d9-2bfa-ed9c-2b08f86da12b}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="include\grpc++\impl">
+ <UniqueIdentifier>{dadc0002-f2ac-451b-a9b8-33b8de10b5fc}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="include\grpc++\impl\codegen">
+ <UniqueIdentifier>{ccc364e2-3f28-8bfc-c26e-800dd6f9a9af}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="include\grpc++\impl\codegen\security">
+ <UniqueIdentifier>{87cae06e-f40c-8fb6-73d6-26c7482ed9da}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="include\grpc++\security">
+ <UniqueIdentifier>{64bf60ff-9192-bb59-dcc8-8a0021e1d016}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="include\grpc++\support">
+ <UniqueIdentifier>{0ebf8008-80b9-d6da-e1dc-854bf1ec2195}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="include\grpc\impl">
+ <UniqueIdentifier>{c1049250-64f6-f900-d2e5-1718e148f1f0}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="include\grpc\impl\codegen">
+ <UniqueIdentifier>{adf6b8e3-4a4b-cb35-bb3d-568af97b58d1}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="include\grpc\support">
+ <UniqueIdentifier>{9d6d36f2-26e7-a66b-c19d-a958b80878d6}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src">
+ <UniqueIdentifier>{cce6a85d-1111-3834-6825-31e170d93cff}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core">
+ <UniqueIdentifier>{595f2ea0-aafb-87e5-c938-db3ff0b0c69a}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\ext">
+ <UniqueIdentifier>{52eca76b-9502-3d96-9064-6415226a860f}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\ext\transport">
+ <UniqueIdentifier>{8e70201f-3b54-d3cb-8b30-ebe0d96a9b2a}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\ext\transport\inproc">
+ <UniqueIdentifier>{ecf09c42-c470-1883-35d7-442453ea8370}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\lib">
+ <UniqueIdentifier>{cf8fd5d8-ff54-331d-2d20-36d6cae0e14b}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\lib\channel">
+ <UniqueIdentifier>{7e0225af-000b-4873-1c16-caffffbfd084}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\lib\compression">
+ <UniqueIdentifier>{0bbdbf56-83ad-bb4b-c4e2-a6d38c342179}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\lib\debug">
+ <UniqueIdentifier>{3875f7d7-ff11-c91d-0f98-810260cb554b}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\lib\http">
+ <UniqueIdentifier>{4bd405b9-af65-f0a6-d67a-433f75900668}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\lib\iomgr">
+ <UniqueIdentifier>{f4b146e4-8fba-83a6-1cc1-1262ebb785e8}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\lib\json">
+ <UniqueIdentifier>{b83c8e70-e491-f6f9-a08c-85f632bb61d2}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\lib\profiling">
+ <UniqueIdentifier>{c3b582f8-079a-5936-7694-54cd75a7e61e}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\lib\slice">
+ <UniqueIdentifier>{0d6d88e2-8549-5118-8b78-06e8283dadcb}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\lib\support">
+ <UniqueIdentifier>{a5139298-498a-41d4-59fd-c38d8f0380c1}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\lib\surface">
+ <UniqueIdentifier>{1d59dcef-3358-d0ab-fa42-64da74065785}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\lib\transport">
+ <UniqueIdentifier>{ba865739-5dd9-6731-6772-48c25d45134f}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\cpp">
+ <UniqueIdentifier>{1e5fd68c-bd87-e803-42b0-75a7fa19b91d}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\cpp\client">
+ <UniqueIdentifier>{ff72923a-6499-8d2a-e0fb-6d574b85d77e}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\cpp\codegen">
+ <UniqueIdentifier>{18e9c249-37f0-7f2c-f026-502d48ed8c92}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\cpp\common">
+ <UniqueIdentifier>{ed8e4daa-825f-fbe5-2a45-846ad9165d3d}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\cpp\server">
+ <UniqueIdentifier>{8a54a279-d14b-4237-0df3-1ffe1ef5a7af}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\cpp\server\health">
+ <UniqueIdentifier>{a003cb5c-7249-106c-8ee5-de5e11a6692c}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\cpp\thread_manager">
+ <UniqueIdentifier>{e5b55f25-d99f-b8e5-9981-7da7fa7ba628}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\cpp\util">
+ <UniqueIdentifier>{fb5d9a64-20ca-5119-ed38-04a3cf94923d}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="third_party">
+ <UniqueIdentifier>{e911fd76-1313-5d02-3983-cdd0bafe1c6a}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="third_party\nanopb">
+ <UniqueIdentifier>{1ff41e28-caf4-c4b9-0170-53d36c7dac29}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+</Project>
+
diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj
index fbb9fde753..73cb0c243a 100644
--- a/vsprojects/vcxproj/grpc/grpc.vcxproj
+++ b/vsprojects/vcxproj/grpc/grpc.vcxproj
@@ -334,9 +334,9 @@
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\executor.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iocp_windows.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_custom.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_internal.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_posix.h" />
- <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_uv.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\is_epollexclusive_available.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\load_file.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\lockfree_event.h" />
@@ -362,6 +362,7 @@
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\sys_epoll_wrapper.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_posix.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_custom.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_posix.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_utils_posix.h" />
@@ -369,10 +370,9 @@
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_windows.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\time_averaged_stats.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\timer.h" />
- <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_generic.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_custom.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_heap.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_manager.h" />
- <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_uv.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\udp_server.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\unix_sockets_posix.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\wakeup_fd_cv.h" />
@@ -595,9 +595,11 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr.c">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_posix.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_custom.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_internal.c">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_uv.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_posix.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_windows.c">
</ClCompile>
@@ -611,7 +613,13 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\polling_entity.c">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_set_uv.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_custom.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_set.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_set_custom.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_set_windows.c">
</ClCompile>
@@ -619,9 +627,11 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_windows.c">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address_posix.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address.c">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address_uv.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address_custom.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address_posix.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address_windows.c">
</ClCompile>
@@ -645,14 +655,22 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_windows.c">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_posix.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client.c">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_uv.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_custom.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_posix.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_windows.c">
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_custom.c">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_posix.c">
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_custom.c">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_posix.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_utils_posix_common.c">
@@ -661,8 +679,6 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_utils_posix_noifaddrs.c">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_uv.c">
- </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_windows.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_uv.c">
@@ -671,6 +687,10 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\time_averaged_stats.c">
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\timer.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_custom.c">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_generic.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_heap.c">
@@ -885,6 +905,8 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\init_secure.c">
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\python\grpcio\grpc\_cython\cygrpc.c">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\tsi\fake_transport_security.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\tsi\gts_transport_security.c">
diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters
index 5332066df6..043671cd14 100644
--- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters
+++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters
@@ -106,10 +106,13 @@
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_posix.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_custom.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_internal.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_uv.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_posix.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_windows.c">
@@ -130,7 +133,16 @@
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\polling_entity.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_set_uv.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_custom.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_set.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_set_custom.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_set_windows.c">
@@ -142,10 +154,13 @@
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_windows.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address_posix.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address_uv.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address_custom.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address_posix.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address_windows.c">
@@ -181,18 +196,30 @@
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_windows.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_posix.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_uv.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_custom.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_posix.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_windows.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_custom.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_posix.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_custom.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_posix.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
@@ -205,9 +232,6 @@
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_utils_posix_noifaddrs.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_uv.c">
- <Filter>src\core\lib\iomgr</Filter>
- </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_windows.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
@@ -220,6 +244,12 @@
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\time_averaged_stats.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\timer.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_custom.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_generic.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
@@ -541,6 +571,9 @@
<ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\init_secure.c">
<Filter>src\core\lib\surface</Filter>
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\python\grpcio\grpc\_cython\cygrpc.c">
+ <Filter>src\python\grpcio\grpc\_cython</Filter>
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\tsi\fake_transport_security.c">
<Filter>src\core\tsi</Filter>
</ClCompile>
@@ -965,13 +998,13 @@
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr.h">
<Filter>src\core\lib\iomgr</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_internal.h">
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_custom.h">
<Filter>src\core\lib\iomgr</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_posix.h">
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_internal.h">
<Filter>src\core\lib\iomgr</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_uv.h">
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_posix.h">
<Filter>src\core\lib\iomgr</Filter>
</ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\is_epollexclusive_available.h">
@@ -1049,6 +1082,9 @@
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_posix.h">
<Filter>src\core\lib\iomgr</Filter>
</ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_custom.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_posix.h">
<Filter>src\core\lib\iomgr</Filter>
</ClInclude>
@@ -1070,7 +1106,7 @@
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\timer.h">
<Filter>src\core\lib\iomgr</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_generic.h">
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_custom.h">
<Filter>src\core\lib\iomgr</Filter>
</ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_heap.h">
@@ -1079,9 +1115,6 @@
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_manager.h">
<Filter>src\core\lib\iomgr</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_uv.h">
- <Filter>src\core\lib\iomgr</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\udp_server.h">
<Filter>src\core\lib\iomgr</Filter>
</ClInclude>
@@ -1748,6 +1781,18 @@
<Filter Include="src\core\tsi">
<UniqueIdentifier>{0b0f9ab1-efa4-7f03-e446-6fb9b5227e84}</UniqueIdentifier>
</Filter>
+ <Filter Include="src\python">
+ <UniqueIdentifier>{50d054e3-a413-b871-9049-e8612ef56281}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\python\grpcio">
+ <UniqueIdentifier>{92bc7bec-9183-0f2b-47d9-31f68a980f1e}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\python\grpcio\grpc">
+ <UniqueIdentifier>{a75d942e-8d7a-306e-372f-0c6260f439d4}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\python\grpcio\grpc\_cython">
+ <UniqueIdentifier>{89423fb6-ab96-95e8-d197-239e91b777ca}</UniqueIdentifier>
+ </Filter>
<Filter Include="third_party">
<UniqueIdentifier>{aaab30a4-2a15-732e-c141-3fbc0f0f5a7a}</UniqueIdentifier>
</Filter>
diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj
index 3fd0fb5f9f..cd7bbe2081 100644
--- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj
+++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj
@@ -420,9 +420,11 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr.c">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_posix.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_custom.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_internal.c">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_uv.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_posix.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_windows.c">
</ClCompile>
@@ -436,7 +438,13 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\polling_entity.c">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_set_uv.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_custom.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_set.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_set_custom.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_set_windows.c">
</ClCompile>
@@ -444,9 +452,11 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_windows.c">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address_posix.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address.c">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address_uv.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address_custom.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address_posix.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address_windows.c">
</ClCompile>
@@ -470,14 +480,22 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_windows.c">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_posix.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_custom.c">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_uv.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_posix.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_windows.c">
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_custom.c">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_posix.c">
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_custom.c">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_posix.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_utils_posix_common.c">
@@ -486,8 +504,6 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_utils_posix_noifaddrs.c">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_uv.c">
- </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_windows.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_uv.c">
@@ -496,6 +512,10 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\time_averaged_stats.c">
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\timer.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_custom.c">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_generic.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_heap.c">
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 d51623834f..6fd8b127e1 100644
--- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters
+++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters
@@ -163,10 +163,13 @@
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_posix.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_custom.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_internal.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_uv.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_posix.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_windows.c">
@@ -187,7 +190,16 @@
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\polling_entity.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_set_uv.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_custom.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_set.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_set_custom.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_set_windows.c">
@@ -199,10 +211,13 @@
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_windows.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address_posix.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address_uv.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address_custom.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address_posix.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address_windows.c">
@@ -238,18 +253,30 @@
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_windows.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_posix.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_uv.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_custom.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_posix.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_windows.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_custom.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_posix.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_custom.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_posix.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
@@ -262,9 +289,6 @@
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_utils_posix_noifaddrs.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_uv.c">
- <Filter>src\core\lib\iomgr</Filter>
- </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_windows.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
@@ -277,6 +301,12 @@
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\time_averaged_stats.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\timer.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_custom.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_generic.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
diff --git a/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj b/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj
new file mode 100644
index 0000000000..972828fa31
--- /dev/null
+++ b/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj
@@ -0,0 +1,649 @@
+<?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>{0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF}</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>grpc_test_util_unsecure</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Release'">
+ <TargetName>grpc_test_util_unsecure</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>Windows</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>Windows</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>Windows</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>Windows</SubSystem>
+ <GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
+ <GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+
+ <ItemGroup>
+ <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\exec_ctx_fwd.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\slice.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\status.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\gpr_slice.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\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" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\resolver\fake\fake_resolver.h" />
+ <ClInclude Include="$(SolutionDir)\..\test\core\end2end\cq_verifier.h" />
+ <ClInclude Include="$(SolutionDir)\..\test\core\end2end\fixtures\http_proxy_fixture.h" />
+ <ClInclude Include="$(SolutionDir)\..\test\core\end2end\fixtures\proxy.h" />
+ <ClInclude Include="$(SolutionDir)\..\test\core\iomgr\endpoint_tests.h" />
+ <ClInclude Include="$(SolutionDir)\..\test\core\util\debugger_macros.h" />
+ <ClInclude Include="$(SolutionDir)\..\test\core\util\grpc_profiler.h" />
+ <ClInclude Include="$(SolutionDir)\..\test\core\util\memory_counters.h" />
+ <ClInclude Include="$(SolutionDir)\..\test\core\util\mock_endpoint.h" />
+ <ClInclude Include="$(SolutionDir)\..\test\core\util\parse_hexstring.h" />
+ <ClInclude Include="$(SolutionDir)\..\test\core\util\passthru_endpoint.h" />
+ <ClInclude Include="$(SolutionDir)\..\test\core\util\port.h" />
+ <ClInclude Include="$(SolutionDir)\..\test\core\util\port_server_client.h" />
+ <ClInclude Include="$(SolutionDir)\..\test\core\util\slice_splitter.h" />
+ <ClInclude Include="$(SolutionDir)\..\test\core\util\trickle_endpoint.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\client_channel.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\client_channel_factory.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\connector.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\http_connect_handshaker.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\http_proxy.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\lb_policy.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\lb_policy_factory.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\lb_policy_registry.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\parse_address.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\proxy_mapper.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\proxy_mapper_registry.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\resolver.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\resolver_factory.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\resolver_registry.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\retry_throttle.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\subchannel.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\subchannel_index.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\uri_parser.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\filters\deadline\deadline_filter.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\bin_decoder.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\bin_encoder.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\chttp2_transport.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\frame.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\frame_data.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\frame_goaway.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\frame_ping.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\frame_rst_stream.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\frame_settings.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\frame_window_update.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\hpack_encoder.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\hpack_parser.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\hpack_table.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\http2_settings.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\huffsyms.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\incoming_metadata.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\internal.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\stream_map.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\varint.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\alpn\alpn.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\filters\http\client\http_client_filter.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\filters\http\message_compress\message_compress_filter.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\filters\http\server\http_server_filter.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\resolver\fake\fake_resolver.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\end2end\cq_verifier.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\end2end\fixtures\http_proxy_fixture.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\end2end\fixtures\proxy.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\iomgr\endpoint_tests.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\util\debugger_macros.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\util\grpc_profiler.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\util\memory_counters.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\util\mock_endpoint.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\util\parse_hexstring.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\util\passthru_endpoint.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\util\port.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\util\port_server_client.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\util\slice_splitter.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\util\trickle_endpoint.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\channel\channel_args.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\channel\channel_stack.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\channel\channel_stack_builder.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\channel\connected_channel.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\channel\handshaker.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\channel\handshaker_factory.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\channel\handshaker_registry.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\compression\compression.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\compression\message_compress.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\compression\stream_compression.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\http\format_request.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\http\httpcli.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\http\parser.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\closure.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\combiner.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_posix.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_uv.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_windows.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\error.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epoll1_linux.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epoll_limited_pollers_linux.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epoll_thread_pool_linux.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epollex_linux.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epollsig_linux.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_posix.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_posix.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_windows.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\exec_ctx.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\executor.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iocp_windows.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_custom.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_internal.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_posix.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_windows.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\is_epollexclusive_available.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\load_file.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\lockfree_event.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\network_status_tracker.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\polling_entity.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_custom.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_set.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_set_custom.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_set_windows.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_uv.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_windows.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address_custom.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address_posix.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address_windows.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resource_quota.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\sockaddr_utils.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_factory_posix.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_mutator.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_utils_common_posix.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_utils_linux.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_utils_posix.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_utils_uv.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_utils_windows.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_windows.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_custom.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_posix.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_windows.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_custom.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_posix.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_custom.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_posix.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_utils_posix_common.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_utils_posix_ifaddrs.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_utils_posix_noifaddrs.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_windows.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_uv.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_windows.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\time_averaged_stats.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\timer.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_custom.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_generic.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_heap.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_manager.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_uv.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\udp_server.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\unix_sockets_posix.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\unix_sockets_posix_noop.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\wakeup_fd_cv.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\wakeup_fd_eventfd.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\wakeup_fd_nospecial.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\wakeup_fd_pipe.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\wakeup_fd_posix.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\json\json.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\json\json_reader.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\json\json_string.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\json\json_writer.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\slice\b64.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\slice\percent_encoding.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\slice\slice.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\slice\slice_buffer.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\slice\slice_hash_table.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\slice\slice_intern.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\slice\slice_string_helpers.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\alarm.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\api_trace.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\byte_buffer.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\byte_buffer_reader.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\call.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\call_details.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\call_log_batch.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\channel.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\channel_init.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\channel_ping.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\channel_stack_type.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\completion_queue.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\completion_queue_factory.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\event_string.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\lame_client.cc">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\metadata_array.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\server.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\validate_metadata.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\version.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\bdp_estimator.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\byte_stream.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\connectivity_state.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\error_utils.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\metadata.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\metadata_batch.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\pid_controller.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\service_config.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\static_metadata.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\status_conversion.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\timeout_encoding.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\transport.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\transport_op_string.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\debug\trace.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\channel_connectivity.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\client_channel.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\client_channel_factory.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\client_channel_plugin.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\connector.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\http_connect_handshaker.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\http_proxy.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\lb_policy.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\lb_policy_factory.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\lb_policy_registry.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\parse_address.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\proxy_mapper.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\proxy_mapper_registry.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\resolver.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\resolver_factory.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\resolver_registry.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\retry_throttle.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\subchannel.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\subchannel_index.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\uri_parser.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\deadline\deadline_filter.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\bin_decoder.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\bin_encoder.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\chttp2_plugin.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\chttp2_transport.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\flow_control.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\frame_data.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\frame_goaway.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\frame_ping.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\frame_rst_stream.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\frame_settings.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\frame_window_update.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\hpack_encoder.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\hpack_parser.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\hpack_table.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\http2_settings.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\huffsyms.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\incoming_metadata.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\parsing.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\stream_lists.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\stream_map.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\varint.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\writing.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\alpn\alpn.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\http\client\http_client_filter.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\http\http_filters_plugin.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\http\message_compress\message_compress_filter.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\http\server\http_server_filter.c">
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\gpr\gpr.vcxproj">
+ <Project>{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}</Project>
+ </ProjectReference>
+ <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\.\grpc_unsecure\grpc_unsecure.vcxproj">
+ <Project>{46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}</Project>
+ </ProjectReference>
+ </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/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj.filters
new file mode 100644
index 0000000000..b92079c7a0
--- /dev/null
+++ b/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj.filters
@@ -0,0 +1,946 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\resolver\fake\fake_resolver.c">
+ <Filter>src\core\ext\filters\client_channel\resolver\fake</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\end2end\cq_verifier.c">
+ <Filter>test\core\end2end</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\end2end\fixtures\http_proxy_fixture.c">
+ <Filter>test\core\end2end\fixtures</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\end2end\fixtures\proxy.c">
+ <Filter>test\core\end2end\fixtures</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\iomgr\endpoint_tests.c">
+ <Filter>test\core\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\util\debugger_macros.c">
+ <Filter>test\core\util</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\util\grpc_profiler.c">
+ <Filter>test\core\util</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\util\memory_counters.c">
+ <Filter>test\core\util</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\util\mock_endpoint.c">
+ <Filter>test\core\util</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\util\parse_hexstring.c">
+ <Filter>test\core\util</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\util\passthru_endpoint.c">
+ <Filter>test\core\util</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\util\port.c">
+ <Filter>test\core\util</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\util\port_server_client.c">
+ <Filter>test\core\util</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\util\slice_splitter.c">
+ <Filter>test\core\util</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\test\core\util\trickle_endpoint.c">
+ <Filter>test\core\util</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\channel\channel_args.c">
+ <Filter>src\core\lib\channel</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\channel\channel_stack.c">
+ <Filter>src\core\lib\channel</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\channel\channel_stack_builder.c">
+ <Filter>src\core\lib\channel</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\channel\connected_channel.c">
+ <Filter>src\core\lib\channel</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\channel\handshaker.c">
+ <Filter>src\core\lib\channel</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\channel\handshaker_factory.c">
+ <Filter>src\core\lib\channel</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\channel\handshaker_registry.c">
+ <Filter>src\core\lib\channel</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\compression\compression.c">
+ <Filter>src\core\lib\compression</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\compression\message_compress.c">
+ <Filter>src\core\lib\compression</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\compression\stream_compression.c">
+ <Filter>src\core\lib\compression</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\http\format_request.c">
+ <Filter>src\core\lib\http</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\http\httpcli.c">
+ <Filter>src\core\lib\http</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\http\parser.c">
+ <Filter>src\core\lib\http</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\closure.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\combiner.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_posix.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_uv.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair_windows.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\error.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epoll1_linux.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epoll_limited_pollers_linux.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epoll_thread_pool_linux.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epollex_linux.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epollsig_linux.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_posix.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_posix.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_windows.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\exec_ctx.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\executor.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iocp_windows.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_custom.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_internal.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_posix.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_windows.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\is_epollexclusive_available.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\load_file.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\lockfree_event.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\network_status_tracker.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\polling_entity.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_custom.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_set.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_set_custom.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_set_windows.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_uv.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_windows.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address_custom.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address_posix.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address_windows.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resource_quota.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\sockaddr_utils.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_factory_posix.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_mutator.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_utils_common_posix.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_utils_linux.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_utils_posix.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_utils_uv.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_utils_windows.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_windows.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_custom.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_posix.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_windows.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_custom.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_posix.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_custom.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_posix.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_utils_posix_common.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_utils_posix_ifaddrs.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_utils_posix_noifaddrs.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_windows.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_uv.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_windows.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\time_averaged_stats.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\timer.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_custom.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_generic.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_heap.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_manager.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_uv.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\udp_server.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\unix_sockets_posix.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\unix_sockets_posix_noop.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\wakeup_fd_cv.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\wakeup_fd_eventfd.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\wakeup_fd_nospecial.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\wakeup_fd_pipe.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\wakeup_fd_posix.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\json\json.c">
+ <Filter>src\core\lib\json</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\json\json_reader.c">
+ <Filter>src\core\lib\json</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\json\json_string.c">
+ <Filter>src\core\lib\json</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\json\json_writer.c">
+ <Filter>src\core\lib\json</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\slice\b64.c">
+ <Filter>src\core\lib\slice</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\slice\percent_encoding.c">
+ <Filter>src\core\lib\slice</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\slice\slice.c">
+ <Filter>src\core\lib\slice</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\slice\slice_buffer.c">
+ <Filter>src\core\lib\slice</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\slice\slice_hash_table.c">
+ <Filter>src\core\lib\slice</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\slice\slice_intern.c">
+ <Filter>src\core\lib\slice</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\slice\slice_string_helpers.c">
+ <Filter>src\core\lib\slice</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\alarm.c">
+ <Filter>src\core\lib\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\api_trace.c">
+ <Filter>src\core\lib\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\byte_buffer.c">
+ <Filter>src\core\lib\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\byte_buffer_reader.c">
+ <Filter>src\core\lib\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\call.c">
+ <Filter>src\core\lib\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\call_details.c">
+ <Filter>src\core\lib\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\call_log_batch.c">
+ <Filter>src\core\lib\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\channel.c">
+ <Filter>src\core\lib\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\channel_init.c">
+ <Filter>src\core\lib\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\channel_ping.c">
+ <Filter>src\core\lib\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\channel_stack_type.c">
+ <Filter>src\core\lib\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\completion_queue.c">
+ <Filter>src\core\lib\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\completion_queue_factory.c">
+ <Filter>src\core\lib\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\event_string.c">
+ <Filter>src\core\lib\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\lame_client.cc">
+ <Filter>src\core\lib\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\metadata_array.c">
+ <Filter>src\core\lib\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\server.c">
+ <Filter>src\core\lib\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\validate_metadata.c">
+ <Filter>src\core\lib\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\surface\version.c">
+ <Filter>src\core\lib\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\bdp_estimator.c">
+ <Filter>src\core\lib\transport</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\byte_stream.c">
+ <Filter>src\core\lib\transport</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\connectivity_state.c">
+ <Filter>src\core\lib\transport</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\error_utils.c">
+ <Filter>src\core\lib\transport</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\metadata.c">
+ <Filter>src\core\lib\transport</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\metadata_batch.c">
+ <Filter>src\core\lib\transport</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\pid_controller.c">
+ <Filter>src\core\lib\transport</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\service_config.c">
+ <Filter>src\core\lib\transport</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\static_metadata.c">
+ <Filter>src\core\lib\transport</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\status_conversion.c">
+ <Filter>src\core\lib\transport</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\timeout_encoding.c">
+ <Filter>src\core\lib\transport</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\transport.c">
+ <Filter>src\core\lib\transport</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\transport\transport_op_string.c">
+ <Filter>src\core\lib\transport</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\debug\trace.c">
+ <Filter>src\core\lib\debug</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\channel_connectivity.c">
+ <Filter>src\core\ext\filters\client_channel</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\client_channel.c">
+ <Filter>src\core\ext\filters\client_channel</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\client_channel_factory.c">
+ <Filter>src\core\ext\filters\client_channel</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\client_channel_plugin.c">
+ <Filter>src\core\ext\filters\client_channel</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\connector.c">
+ <Filter>src\core\ext\filters\client_channel</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\http_connect_handshaker.c">
+ <Filter>src\core\ext\filters\client_channel</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\http_proxy.c">
+ <Filter>src\core\ext\filters\client_channel</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\lb_policy.c">
+ <Filter>src\core\ext\filters\client_channel</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\lb_policy_factory.c">
+ <Filter>src\core\ext\filters\client_channel</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\lb_policy_registry.c">
+ <Filter>src\core\ext\filters\client_channel</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\parse_address.c">
+ <Filter>src\core\ext\filters\client_channel</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\proxy_mapper.c">
+ <Filter>src\core\ext\filters\client_channel</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\proxy_mapper_registry.c">
+ <Filter>src\core\ext\filters\client_channel</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\resolver.c">
+ <Filter>src\core\ext\filters\client_channel</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\resolver_factory.c">
+ <Filter>src\core\ext\filters\client_channel</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\resolver_registry.c">
+ <Filter>src\core\ext\filters\client_channel</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\retry_throttle.c">
+ <Filter>src\core\ext\filters\client_channel</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\subchannel.c">
+ <Filter>src\core\ext\filters\client_channel</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\subchannel_index.c">
+ <Filter>src\core\ext\filters\client_channel</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\uri_parser.c">
+ <Filter>src\core\ext\filters\client_channel</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\deadline\deadline_filter.c">
+ <Filter>src\core\ext\filters\deadline</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\bin_decoder.c">
+ <Filter>src\core\ext\transport\chttp2\transport</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\bin_encoder.c">
+ <Filter>src\core\ext\transport\chttp2\transport</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\chttp2_plugin.c">
+ <Filter>src\core\ext\transport\chttp2\transport</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\chttp2_transport.c">
+ <Filter>src\core\ext\transport\chttp2\transport</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\flow_control.c">
+ <Filter>src\core\ext\transport\chttp2\transport</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\frame_data.c">
+ <Filter>src\core\ext\transport\chttp2\transport</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\frame_goaway.c">
+ <Filter>src\core\ext\transport\chttp2\transport</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\frame_ping.c">
+ <Filter>src\core\ext\transport\chttp2\transport</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\frame_rst_stream.c">
+ <Filter>src\core\ext\transport\chttp2\transport</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\frame_settings.c">
+ <Filter>src\core\ext\transport\chttp2\transport</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\frame_window_update.c">
+ <Filter>src\core\ext\transport\chttp2\transport</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\hpack_encoder.c">
+ <Filter>src\core\ext\transport\chttp2\transport</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\hpack_parser.c">
+ <Filter>src\core\ext\transport\chttp2\transport</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\hpack_table.c">
+ <Filter>src\core\ext\transport\chttp2\transport</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\http2_settings.c">
+ <Filter>src\core\ext\transport\chttp2\transport</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\huffsyms.c">
+ <Filter>src\core\ext\transport\chttp2\transport</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\incoming_metadata.c">
+ <Filter>src\core\ext\transport\chttp2\transport</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\parsing.c">
+ <Filter>src\core\ext\transport\chttp2\transport</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\stream_lists.c">
+ <Filter>src\core\ext\transport\chttp2\transport</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\stream_map.c">
+ <Filter>src\core\ext\transport\chttp2\transport</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\varint.c">
+ <Filter>src\core\ext\transport\chttp2\transport</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\writing.c">
+ <Filter>src\core\ext\transport\chttp2\transport</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\alpn\alpn.c">
+ <Filter>src\core\ext\transport\chttp2\alpn</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\http\client\http_client_filter.c">
+ <Filter>src\core\ext\filters\http\client</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\http\http_filters_plugin.c">
+ <Filter>src\core\ext\filters\http</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\http\message_compress\message_compress_filter.c">
+ <Filter>src\core\ext\filters\http\message_compress</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\ext\filters\http\server\http_server_filter.c">
+ <Filter>src\core\ext\filters\http\server</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer_reader.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\compression_types.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\connectivity_state.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\exec_ctx_fwd.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\grpc_types.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\propagation_bits.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\status.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_gcc_atomic.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_gcc_sync.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_windows.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\gpr_slice.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <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">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_generic.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_posix.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_windows.h">
+ <Filter>include\grpc\impl\codegen</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\resolver\fake\fake_resolver.h">
+ <Filter>src\core\ext\filters\client_channel\resolver\fake</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\test\core\end2end\cq_verifier.h">
+ <Filter>test\core\end2end</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\test\core\end2end\fixtures\http_proxy_fixture.h">
+ <Filter>test\core\end2end\fixtures</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\test\core\end2end\fixtures\proxy.h">
+ <Filter>test\core\end2end\fixtures</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\test\core\iomgr\endpoint_tests.h">
+ <Filter>test\core\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\test\core\util\debugger_macros.h">
+ <Filter>test\core\util</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\test\core\util\grpc_profiler.h">
+ <Filter>test\core\util</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\test\core\util\memory_counters.h">
+ <Filter>test\core\util</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\test\core\util\mock_endpoint.h">
+ <Filter>test\core\util</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\test\core\util\parse_hexstring.h">
+ <Filter>test\core\util</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\test\core\util\passthru_endpoint.h">
+ <Filter>test\core\util</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\test\core\util\port.h">
+ <Filter>test\core\util</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\test\core\util\port_server_client.h">
+ <Filter>test\core\util</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\test\core\util\slice_splitter.h">
+ <Filter>test\core\util</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\test\core\util\trickle_endpoint.h">
+ <Filter>test\core\util</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\client_channel.h">
+ <Filter>src\core\ext\filters\client_channel</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\client_channel_factory.h">
+ <Filter>src\core\ext\filters\client_channel</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\connector.h">
+ <Filter>src\core\ext\filters\client_channel</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\http_connect_handshaker.h">
+ <Filter>src\core\ext\filters\client_channel</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\http_proxy.h">
+ <Filter>src\core\ext\filters\client_channel</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\lb_policy.h">
+ <Filter>src\core\ext\filters\client_channel</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\lb_policy_factory.h">
+ <Filter>src\core\ext\filters\client_channel</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\lb_policy_registry.h">
+ <Filter>src\core\ext\filters\client_channel</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\parse_address.h">
+ <Filter>src\core\ext\filters\client_channel</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\proxy_mapper.h">
+ <Filter>src\core\ext\filters\client_channel</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\proxy_mapper_registry.h">
+ <Filter>src\core\ext\filters\client_channel</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\resolver.h">
+ <Filter>src\core\ext\filters\client_channel</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\resolver_factory.h">
+ <Filter>src\core\ext\filters\client_channel</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\resolver_registry.h">
+ <Filter>src\core\ext\filters\client_channel</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\retry_throttle.h">
+ <Filter>src\core\ext\filters\client_channel</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\subchannel.h">
+ <Filter>src\core\ext\filters\client_channel</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\subchannel_index.h">
+ <Filter>src\core\ext\filters\client_channel</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\filters\client_channel\uri_parser.h">
+ <Filter>src\core\ext\filters\client_channel</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\filters\deadline\deadline_filter.h">
+ <Filter>src\core\ext\filters\deadline</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\bin_decoder.h">
+ <Filter>src\core\ext\transport\chttp2\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\bin_encoder.h">
+ <Filter>src\core\ext\transport\chttp2\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\chttp2_transport.h">
+ <Filter>src\core\ext\transport\chttp2\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\frame.h">
+ <Filter>src\core\ext\transport\chttp2\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\frame_data.h">
+ <Filter>src\core\ext\transport\chttp2\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\frame_goaway.h">
+ <Filter>src\core\ext\transport\chttp2\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\frame_ping.h">
+ <Filter>src\core\ext\transport\chttp2\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\frame_rst_stream.h">
+ <Filter>src\core\ext\transport\chttp2\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\frame_settings.h">
+ <Filter>src\core\ext\transport\chttp2\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\frame_window_update.h">
+ <Filter>src\core\ext\transport\chttp2\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\hpack_encoder.h">
+ <Filter>src\core\ext\transport\chttp2\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\hpack_parser.h">
+ <Filter>src\core\ext\transport\chttp2\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\hpack_table.h">
+ <Filter>src\core\ext\transport\chttp2\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\http2_settings.h">
+ <Filter>src\core\ext\transport\chttp2\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\huffsyms.h">
+ <Filter>src\core\ext\transport\chttp2\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\incoming_metadata.h">
+ <Filter>src\core\ext\transport\chttp2\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\internal.h">
+ <Filter>src\core\ext\transport\chttp2\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\stream_map.h">
+ <Filter>src\core\ext\transport\chttp2\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\transport\varint.h">
+ <Filter>src\core\ext\transport\chttp2\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\transport\chttp2\alpn\alpn.h">
+ <Filter>src\core\ext\transport\chttp2\alpn</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\filters\http\client\http_client_filter.h">
+ <Filter>src\core\ext\filters\http\client</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\filters\http\message_compress\message_compress_filter.h">
+ <Filter>src\core\ext\filters\http\message_compress</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\ext\filters\http\server\http_server_filter.h">
+ <Filter>src\core\ext\filters\http\server</Filter>
+ </ClInclude>
+ </ItemGroup>
+
+ <ItemGroup>
+ <Filter Include="include">
+ <UniqueIdentifier>{9793fab6-15ae-1f61-712d-c3d673654d72}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="include\grpc">
+ <UniqueIdentifier>{c2447106-a6bf-6b88-9ad0-a42b7ac1573c}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="include\grpc\impl">
+ <UniqueIdentifier>{dba70812-267b-656c-9f8c-636338d3f5c0}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="include\grpc\impl\codegen">
+ <UniqueIdentifier>{b9e2ddac-f042-3042-ba4b-79ba4445e68c}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src">
+ <UniqueIdentifier>{65483377-42fd-137e-3847-00dfd4675db3}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core">
+ <UniqueIdentifier>{51a516dc-93e3-4dd5-d114-2d06f5df4ad7}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\ext">
+ <UniqueIdentifier>{a927155d-bcf6-0dd8-6d63-be48bcaf617f}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\ext\filters">
+ <UniqueIdentifier>{df16e935-149b-79bf-ecb3-dc3a6b628082}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\ext\filters\client_channel">
+ <UniqueIdentifier>{0fb7c1f0-5e3a-d1df-4c9d-96a677a7f3ee}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\ext\filters\client_channel\resolver">
+ <UniqueIdentifier>{f47477d5-cb4e-e726-04dd-182151e81c71}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\ext\filters\client_channel\resolver\fake">
+ <UniqueIdentifier>{2d280bd0-f4ee-d1f2-4d70-174147ac0dbc}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\ext\filters\deadline">
+ <UniqueIdentifier>{6820a68f-2aa3-8b45-ddea-294656d531f6}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\ext\filters\http">
+ <UniqueIdentifier>{b7df4d88-fa6b-6bd3-579e-b5f086ba6299}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\ext\filters\http\client">
+ <UniqueIdentifier>{37d93a32-6a75-3b9e-35a4-c47f0a2d274a}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\ext\filters\http\message_compress">
+ <UniqueIdentifier>{a4bd6a23-c8e1-4e35-f9eb-6434a86f38f0}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\ext\filters\http\server">
+ <UniqueIdentifier>{2dd536f5-341a-771f-4853-a95522e59224}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\ext\transport">
+ <UniqueIdentifier>{fb32254e-a807-768a-3686-4e87f3bf1e8e}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\ext\transport\chttp2">
+ <UniqueIdentifier>{87c61e56-5090-5e1a-22af-02e3c8bf4a2a}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\ext\transport\chttp2\alpn">
+ <UniqueIdentifier>{e50ce1d1-6b17-dad2-9ef3-46f68d4bee1b}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\ext\transport\chttp2\transport">
+ <UniqueIdentifier>{67007111-23fe-296f-1808-91f2b96a31aa}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\lib">
+ <UniqueIdentifier>{e3d002a7-9318-1ac5-4259-e177f58ccc9a}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\lib\channel">
+ <UniqueIdentifier>{ac14fd16-a4af-6b22-4226-2d7dabf25409}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\lib\compression">
+ <UniqueIdentifier>{24268e45-f6c3-6024-b49a-d01bb9c12d96}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\lib\debug">
+ <UniqueIdentifier>{0be401bd-3e26-dead-fdf4-2ce27a1ac3a3}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\lib\http">
+ <UniqueIdentifier>{ac2f12e3-ac77-f0a7-d15d-92899e61ed25}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\lib\iomgr">
+ <UniqueIdentifier>{9015222c-df04-298f-3f2c-d19babffc180}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\lib\json">
+ <UniqueIdentifier>{c3ff117a-aae9-dedd-2f5a-888f0383cbb8}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\lib\slice">
+ <UniqueIdentifier>{588ffbfc-2f94-a99f-85b0-4c47ec9f8d13}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\lib\surface">
+ <UniqueIdentifier>{732318c6-bb34-9a99-611b-9928db3d4e2a}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\lib\transport">
+ <UniqueIdentifier>{2c0ca4a1-38df-329d-eeba-5c5b61dc81a5}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="test">
+ <UniqueIdentifier>{037c7645-1698-cf2d-4163-525240323101}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="test\core">
+ <UniqueIdentifier>{85f90d4a-70b4-1b30-8cef-4eadb2a3a04b}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="test\core\end2end">
+ <UniqueIdentifier>{6387fc42-48d5-0134-a9d4-4477151722bf}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="test\core\end2end\fixtures">
+ <UniqueIdentifier>{204e56b4-4315-b3bd-4a71-7e1c3ebef3ce}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="test\core\iomgr">
+ <UniqueIdentifier>{53745d42-f5b1-2381-6b64-146f1234e513}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="test\core\util">
+ <UniqueIdentifier>{31b30beb-baf0-3979-2a54-560a16814cf9}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+</Project>
+
diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj
index 08c1e78e8f..0575d47622 100644
--- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj
+++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj
@@ -324,9 +324,9 @@
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\executor.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iocp_windows.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_custom.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_internal.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_posix.h" />
- <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_uv.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\is_epollexclusive_available.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\load_file.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\lockfree_event.h" />
@@ -352,6 +352,7 @@
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\sys_epoll_wrapper.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_posix.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_custom.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_posix.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_utils_posix.h" />
@@ -359,10 +360,9 @@
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_windows.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\time_averaged_stats.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\timer.h" />
- <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_generic.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_custom.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_heap.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_manager.h" />
- <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_uv.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\udp_server.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\unix_sockets_posix.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\wakeup_fd_cv.h" />
@@ -561,9 +561,11 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr.c">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_posix.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_custom.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_internal.c">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_uv.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_posix.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_windows.c">
</ClCompile>
@@ -577,7 +579,13 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\polling_entity.c">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_set_uv.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_custom.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_set.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_set_custom.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_set_windows.c">
</ClCompile>
@@ -585,9 +593,11 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_windows.c">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address_posix.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address.c">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address_uv.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address_custom.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address_posix.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address_windows.c">
</ClCompile>
@@ -611,14 +621,22 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_windows.c">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_posix.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_custom.c">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_uv.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_posix.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_windows.c">
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_custom.c">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_posix.c">
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_custom.c">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_posix.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_utils_posix_common.c">
@@ -627,8 +645,6 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_utils_posix_noifaddrs.c">
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_uv.c">
- </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_windows.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_uv.c">
@@ -637,6 +653,10 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\time_averaged_stats.c">
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\timer.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_custom.c">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_generic.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_heap.c">
diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters
index d9a5914e65..4c25674b1e 100644
--- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters
+++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters
@@ -109,10 +109,13 @@
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_posix.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_custom.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_uv.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_internal.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_posix.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_windows.c">
@@ -133,7 +136,16 @@
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\polling_entity.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_set_uv.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_custom.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_set.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_set_custom.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_set_windows.c">
@@ -145,10 +157,13 @@
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\pollset_windows.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address_posix.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address_uv.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address_custom.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address_posix.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\resolve_address_windows.c">
@@ -184,18 +199,30 @@
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\socket_windows.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_posix.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_uv.c">
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_custom.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_posix.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_windows.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_custom.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_posix.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_custom.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_posix.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
@@ -208,9 +235,6 @@
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_utils_posix_noifaddrs.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
- <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_uv.c">
- <Filter>src\core\lib\iomgr</Filter>
- </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_server_windows.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
@@ -223,6 +247,12 @@
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\time_averaged_stats.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\timer.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_custom.c">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_generic.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
@@ -872,13 +902,13 @@
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr.h">
<Filter>src\core\lib\iomgr</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_internal.h">
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_custom.h">
<Filter>src\core\lib\iomgr</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_posix.h">
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_internal.h">
<Filter>src\core\lib\iomgr</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_uv.h">
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\iomgr_posix.h">
<Filter>src\core\lib\iomgr</Filter>
</ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\is_epollexclusive_available.h">
@@ -956,6 +986,9 @@
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_client_posix.h">
<Filter>src\core\lib\iomgr</Filter>
</ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_custom.h">
+ <Filter>src\core\lib\iomgr</Filter>
+ </ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\tcp_posix.h">
<Filter>src\core\lib\iomgr</Filter>
</ClInclude>
@@ -977,7 +1010,7 @@
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\timer.h">
<Filter>src\core\lib\iomgr</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_generic.h">
+ <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_custom.h">
<Filter>src\core\lib\iomgr</Filter>
</ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_heap.h">
@@ -986,9 +1019,6 @@
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_manager.h">
<Filter>src\core\lib\iomgr</Filter>
</ClInclude>
- <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\timer_uv.h">
- <Filter>src\core\lib\iomgr</Filter>
- </ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\udp_server.h">
<Filter>src\core\lib\iomgr</Filter>
</ClInclude>