Merge github.com:grpc/grpc into filter-selection

pull/5304/head
Craig Tiller 9 years ago
commit 5a9d7d2dcc
  1. 1
      .gitignore
  2. 3
      .gitmodules
  3. 4
      .travis.yml
  4. 67
      BUILD
  5. 10
      INSTALL
  6. 323
      Makefile
  7. 3
      PYTHON-MANIFEST.in
  8. 15
      binding.gyp
  9. 151
      build.yaml
  10. 608
      config.m4
  11. 4
      doc/health-checking.md
  12. 2
      examples/csharp/helloworld/.nuget/packages.config
  13. 25
      examples/csharp/helloworld/Greeter/Greeter.csproj
  14. 36
      examples/csharp/helloworld/Greeter/Helloworld.cs
  15. 2
      examples/csharp/helloworld/Greeter/HelloworldGrpc.cs
  16. 12
      examples/csharp/helloworld/Greeter/packages.config
  17. 25
      examples/csharp/helloworld/GreeterClient/GreeterClient.csproj
  18. 12
      examples/csharp/helloworld/GreeterClient/packages.config
  19. 25
      examples/csharp/helloworld/GreeterServer/GreeterServer.csproj
  20. 12
      examples/csharp/helloworld/GreeterServer/packages.config
  21. 29
      examples/csharp/helloworld/README.md
  22. 2
      examples/csharp/helloworld/generate_protos.bat
  23. 2
      examples/csharp/route_guide/.nuget/packages.config
  24. 168
      examples/csharp/route_guide/RouteGuide/RouteGuide.cs
  25. 20
      examples/csharp/route_guide/RouteGuide/RouteGuide.csproj
  26. 2
      examples/csharp/route_guide/RouteGuide/RouteGuideGrpc.cs
  27. 10
      examples/csharp/route_guide/RouteGuide/packages.config
  28. 20
      examples/csharp/route_guide/RouteGuideClient/RouteGuideClient.csproj
  29. 10
      examples/csharp/route_guide/RouteGuideClient/packages.config
  30. 20
      examples/csharp/route_guide/RouteGuideServer/RouteGuideServer.csproj
  31. 10
      examples/csharp/route_guide/RouteGuideServer/packages.config
  32. 2
      examples/csharp/route_guide/generate_protos.bat
  33. 26
      examples/python/README.md
  34. 41
      gRPC.podspec
  35. 26
      grpc.gemspec
  36. 17
      include/grpc++/alarm.h
  37. 6
      include/grpc++/server.h
  38. 208
      package.json
  39. 981
      package.xml
  40. 1
      setup.py
  41. 163
      src/core/client_config/lb_policies/load_balancer_api.c
  42. 85
      src/core/client_config/lb_policies/load_balancer_api.h
  43. 2
      src/core/client_config/subchannel_index.c
  44. 0
      src/core/compression/compression_algorithm.c
  45. 14
      src/core/httpcli/httpcli_security_connector.c
  46. 4
      src/core/iomgr/pollset.h
  47. 38
      src/core/iomgr/pollset_posix.c
  48. 36
      src/core/iomgr/pollset_windows.c
  49. 119
      src/core/proto/grpc/lb/v0/load_balancer.pb.c
  50. 182
      src/core/proto/grpc/lb/v0/load_balancer.pb.h
  51. 2
      src/core/security/b64.c
  52. 2
      src/core/security/b64.h
  53. 1
      src/core/security/client_auth_filter.c
  54. 6
      src/core/security/credentials.c
  55. 6
      src/core/security/credentials.h
  56. 4
      src/core/security/google_default_credentials.c
  57. 22
      src/core/security/handshake.c
  58. 3
      src/core/security/handshake.h
  59. 2
      src/core/security/json_token.c
  60. 2
      src/core/security/jwt_verifier.c
  61. 139
      src/core/security/security_connector.c
  62. 64
      src/core/security/security_connector.h
  63. 14
      src/core/security/server_secure_chttp2.c
  64. 14
      src/core/support/env_linux.c
  65. 4
      src/core/support/load_file.c
  66. 16
      src/core/support/load_file.h
  67. 55
      src/core/support/tmpfile.h
  68. 4
      src/core/support/tmpfile_posix.c
  69. 4
      src/core/support/tmpfile_win32.c
  70. 5
      src/core/surface/alarm.c
  71. 12
      src/core/surface/completion_queue.c
  72. 11
      src/core/surface/secure_channel_create.c
  73. 9
      src/core/transport/chttp2/internal.h
  74. 22
      src/core/transport/chttp2/stream_lists.c
  75. 10
      src/core/transport/chttp2/writing.c
  76. 2
      src/core/transport/chttp2_transport.c
  77. 14
      src/cpp/server/server.cc
  78. 2
      src/cpp/server/server_builder.cc
  79. 2
      src/csharp/Grpc.Core/Internal/DefaultSslRootsOverride.cs
  80. 6
      src/csharp/Grpc.Core/Internal/PlatformApis.cs
  81. 14
      src/csharp/Grpc.HealthCheck.Tests/HealthClientServerTest.cs
  82. 48
      src/csharp/Grpc.HealthCheck.Tests/HealthServiceImplTest.cs
  83. 2
      src/csharp/Grpc.HealthCheck/Grpc.HealthCheck.nuspec
  84. 72
      src/csharp/Grpc.HealthCheck/Health.cs
  85. 30
      src/csharp/Grpc.HealthCheck/HealthGrpc.cs
  86. 46
      src/csharp/Grpc.HealthCheck/HealthServiceImpl.cs
  87. 419
      src/csharp/Grpc.IntegrationTesting/Control.cs
  88. 15
      src/csharp/Grpc.IntegrationTesting/QpsWorker.cs
  89. 6
      src/csharp/Grpc.IntegrationTesting/RunnerClientServerTest.cs
  90. 2
      src/csharp/Grpc.IntegrationTesting/ServerRunners.cs
  91. 7
      src/csharp/Grpc.IntegrationTesting/Services.cs
  92. 71
      src/csharp/Grpc.IntegrationTesting/ServicesGrpc.cs
  93. 18
      src/csharp/Grpc.IntegrationTesting/WorkerServiceImpl.cs
  94. 116
      src/csharp/README.md
  95. 2
      src/csharp/generate_proto_csharp.sh
  96. 6
      src/node/health_check/health.js
  97. 46
      src/objective-c/tests/GRPCClientTests.m
  98. 13
      src/objective-c/tests/InteropTestsLocalSSL.m
  99. 22
      src/objective-c/tests/RxLibraryUnitTests.m
  100. 7
      src/proto/grpc/health/v1/health.proto
  101. Some files were not shown because too many files have changed in this diff Show More

1
.gitignore vendored

@ -35,6 +35,7 @@ coverage
# cache for run_tests.py
.run_tests_cache
.preprocessed_build
# emacs temp files
*~

3
.gitmodules vendored

@ -14,3 +14,6 @@
[submodule "third_party/boringssl"]
path = third_party/boringssl
url = https://boringssl.googlesource.com/boringssl
[submodule "third_party/nanopb"]
path = third_party/nanopb
url = https://github.com/nanopb/nanopb.git

@ -1,5 +1,5 @@
language: objective-c
osx_image: xcode7.1
osx_image: xcode7.2
env:
global:
- CONFIG=opt
@ -27,6 +27,6 @@ xcode_scheme:
- InteropTestsLocalCleartext
# TODO(jcanizales): Investigate why they time out:
# - InteropTestsRemote
xcode_sdk: iphonesimulator9.1
xcode_sdk: iphonesimulator9.2
notifications:
email: false

67
BUILD

@ -47,13 +47,14 @@ cc_library(
"src/core/profiling/timers.h",
"src/core/support/block_annotate.h",
"src/core/support/env.h",
"src/core/support/file.h",
"src/core/support/load_file.h",
"src/core/support/murmur_hash.h",
"src/core/support/stack_lockfree.h",
"src/core/support/string.h",
"src/core/support/string_win32.h",
"src/core/support/thd_internal.h",
"src/core/support/time_precise.h",
"src/core/support/tmpfile.h",
"src/core/profiling/basic_timers.c",
"src/core/profiling/stap_timers.c",
"src/core/support/alloc.c",
@ -66,11 +67,9 @@ cc_library(
"src/core/support/env_linux.c",
"src/core/support/env_posix.c",
"src/core/support/env_win32.c",
"src/core/support/file.c",
"src/core/support/file_posix.c",
"src/core/support/file_win32.c",
"src/core/support/histogram.c",
"src/core/support/host_port.c",
"src/core/support/load_file.c",
"src/core/support/log.c",
"src/core/support/log_android.c",
"src/core/support/log_linux.c",
@ -96,6 +95,8 @@ cc_library(
"src/core/support/time_precise.c",
"src/core/support/time_win32.c",
"src/core/support/tls_pthread.c",
"src/core/support/tmpfile_posix.c",
"src/core/support/tmpfile_win32.c",
"src/core/support/wrap_memcpy.c",
],
hdrs = [
@ -170,6 +171,7 @@ cc_library(
"src/core/client_config/client_config.h",
"src/core/client_config/connector.h",
"src/core/client_config/initial_connect_string.h",
"src/core/client_config/lb_policies/load_balancer_api.h",
"src/core/client_config/lb_policies/pick_first.h",
"src/core/client_config/lb_policies/round_robin.h",
"src/core/client_config/lb_policy.h",
@ -230,6 +232,7 @@ cc_library(
"src/core/json/json_common.h",
"src/core/json/json_reader.h",
"src/core/json/json_writer.h",
"src/core/proto/grpc/lb/v0/load_balancer.pb.h",
"src/core/statistics/census_interface.h",
"src/core/statistics/census_rpc_stats.h",
"src/core/surface/api_trace.h",
@ -273,7 +276,7 @@ cc_library(
"src/core/transport/transport.h",
"src/core/transport/transport_impl.h",
"src/core/security/auth_filters.h",
"src/core/security/base64.h",
"src/core/security/b64.h",
"src/core/security/credentials.h",
"src/core/security/handshake.h",
"src/core/security/json_token.h",
@ -289,6 +292,10 @@ cc_library(
"src/core/census/aggregation.h",
"src/core/census/mlog.h",
"src/core/census/rpc_metric_id.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/census/grpc_context.c",
"src/core/census/grpc_filter.c",
"src/core/census/grpc_plugin.c",
@ -306,6 +313,7 @@ cc_library(
"src/core/client_config/connector.c",
"src/core/client_config/default_initial_connect_string.c",
"src/core/client_config/initial_connect_string.c",
"src/core/client_config/lb_policies/load_balancer_api.c",
"src/core/client_config/lb_policies/pick_first.c",
"src/core/client_config/lb_policies/round_robin.c",
"src/core/client_config/lb_policy.c",
@ -320,7 +328,7 @@ cc_library(
"src/core/client_config/subchannel_factory.c",
"src/core/client_config/subchannel_index.c",
"src/core/client_config/uri_parser.c",
"src/core/compression/algorithm.c",
"src/core/compression/compression_algorithm.c",
"src/core/compression/message_compress.c",
"src/core/debug/trace.c",
"src/core/httpcli/format_request.c",
@ -370,6 +378,7 @@ cc_library(
"src/core/json/json_reader.c",
"src/core/json/json_string.c",
"src/core/json/json_writer.c",
"src/core/proto/grpc/lb/v0/load_balancer.pb.c",
"src/core/surface/alarm.c",
"src/core/surface/api_trace.c",
"src/core/surface/byte_buffer.c",
@ -421,7 +430,7 @@ cc_library(
"src/core/transport/transport.c",
"src/core/transport/transport_op_string.c",
"src/core/httpcli/httpcli_security_connector.c",
"src/core/security/base64.c",
"src/core/security/b64.c",
"src/core/security/client_auth_filter.c",
"src/core/security/credentials.c",
"src/core/security/credentials_metadata.c",
@ -447,6 +456,9 @@ cc_library(
"src/core/census/operation.c",
"src/core/census/placeholders.c",
"src/core/census/tracing.c",
"third_party/nanopb/pb_common.c",
"third_party/nanopb/pb_decode.c",
"third_party/nanopb/pb_encode.c",
],
hdrs = [
"include/grpc/grpc_security.h",
@ -497,6 +509,7 @@ cc_library(
"src/core/client_config/client_config.h",
"src/core/client_config/connector.h",
"src/core/client_config/initial_connect_string.h",
"src/core/client_config/lb_policies/load_balancer_api.h",
"src/core/client_config/lb_policies/pick_first.h",
"src/core/client_config/lb_policies/round_robin.h",
"src/core/client_config/lb_policy.h",
@ -557,6 +570,7 @@ cc_library(
"src/core/json/json_common.h",
"src/core/json/json_reader.h",
"src/core/json/json_writer.h",
"src/core/proto/grpc/lb/v0/load_balancer.pb.h",
"src/core/statistics/census_interface.h",
"src/core/statistics/census_rpc_stats.h",
"src/core/surface/api_trace.h",
@ -602,6 +616,10 @@ cc_library(
"src/core/census/aggregation.h",
"src/core/census/mlog.h",
"src/core/census/rpc_metric_id.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/surface/init_unsecure.c",
"src/core/census/grpc_context.c",
"src/core/census/grpc_filter.c",
@ -620,6 +638,7 @@ cc_library(
"src/core/client_config/connector.c",
"src/core/client_config/default_initial_connect_string.c",
"src/core/client_config/initial_connect_string.c",
"src/core/client_config/lb_policies/load_balancer_api.c",
"src/core/client_config/lb_policies/pick_first.c",
"src/core/client_config/lb_policies/round_robin.c",
"src/core/client_config/lb_policy.c",
@ -634,7 +653,7 @@ cc_library(
"src/core/client_config/subchannel_factory.c",
"src/core/client_config/subchannel_index.c",
"src/core/client_config/uri_parser.c",
"src/core/compression/algorithm.c",
"src/core/compression/compression_algorithm.c",
"src/core/compression/message_compress.c",
"src/core/debug/trace.c",
"src/core/httpcli/format_request.c",
@ -684,6 +703,7 @@ cc_library(
"src/core/json/json_reader.c",
"src/core/json/json_string.c",
"src/core/json/json_writer.c",
"src/core/proto/grpc/lb/v0/load_balancer.pb.c",
"src/core/surface/alarm.c",
"src/core/surface/api_trace.c",
"src/core/surface/byte_buffer.c",
@ -740,6 +760,9 @@ cc_library(
"src/core/census/operation.c",
"src/core/census/placeholders.c",
"src/core/census/tracing.c",
"third_party/nanopb/pb_common.c",
"third_party/nanopb/pb_decode.c",
"third_party/nanopb/pb_encode.c",
],
hdrs = [
"include/grpc/byte_buffer.h",
@ -811,7 +834,6 @@ cc_library(
"src/cpp/client/credentials.cc",
"src/cpp/client/generic_stub.cc",
"src/cpp/client/insecure_credentials.cc",
"src/cpp/common/alarm.cc",
"src/cpp/common/call.cc",
"src/cpp/common/channel_arguments.cc",
"src/cpp/common/completion_queue.cc",
@ -935,7 +957,6 @@ cc_library(
"src/cpp/client/credentials.cc",
"src/cpp/client/generic_stub.cc",
"src/cpp/client/insecure_credentials.cc",
"src/cpp/common/alarm.cc",
"src/cpp/common/call.cc",
"src/cpp/common/channel_arguments.cc",
"src/cpp/common/completion_queue.cc",
@ -1165,11 +1186,9 @@ objc_library(
"src/core/support/env_linux.c",
"src/core/support/env_posix.c",
"src/core/support/env_win32.c",
"src/core/support/file.c",
"src/core/support/file_posix.c",
"src/core/support/file_win32.c",
"src/core/support/histogram.c",
"src/core/support/host_port.c",
"src/core/support/load_file.c",
"src/core/support/log.c",
"src/core/support/log_android.c",
"src/core/support/log_linux.c",
@ -1195,6 +1214,8 @@ objc_library(
"src/core/support/time_precise.c",
"src/core/support/time_win32.c",
"src/core/support/tls_pthread.c",
"src/core/support/tmpfile_posix.c",
"src/core/support/tmpfile_win32.c",
"src/core/support/wrap_memcpy.c",
],
hdrs = [
@ -1243,13 +1264,14 @@ objc_library(
"src/core/profiling/timers.h",
"src/core/support/block_annotate.h",
"src/core/support/env.h",
"src/core/support/file.h",
"src/core/support/load_file.h",
"src/core/support/murmur_hash.h",
"src/core/support/stack_lockfree.h",
"src/core/support/string.h",
"src/core/support/string_win32.h",
"src/core/support/thd_internal.h",
"src/core/support/time_precise.h",
"src/core/support/tmpfile.h",
],
includes = [
"include",
@ -1280,6 +1302,7 @@ objc_library(
"src/core/client_config/connector.c",
"src/core/client_config/default_initial_connect_string.c",
"src/core/client_config/initial_connect_string.c",
"src/core/client_config/lb_policies/load_balancer_api.c",
"src/core/client_config/lb_policies/pick_first.c",
"src/core/client_config/lb_policies/round_robin.c",
"src/core/client_config/lb_policy.c",
@ -1294,7 +1317,7 @@ objc_library(
"src/core/client_config/subchannel_factory.c",
"src/core/client_config/subchannel_index.c",
"src/core/client_config/uri_parser.c",
"src/core/compression/algorithm.c",
"src/core/compression/compression_algorithm.c",
"src/core/compression/message_compress.c",
"src/core/debug/trace.c",
"src/core/httpcli/format_request.c",
@ -1344,6 +1367,7 @@ objc_library(
"src/core/json/json_reader.c",
"src/core/json/json_string.c",
"src/core/json/json_writer.c",
"src/core/proto/grpc/lb/v0/load_balancer.pb.c",
"src/core/surface/alarm.c",
"src/core/surface/api_trace.c",
"src/core/surface/byte_buffer.c",
@ -1395,7 +1419,7 @@ objc_library(
"src/core/transport/transport.c",
"src/core/transport/transport_op_string.c",
"src/core/httpcli/httpcli_security_connector.c",
"src/core/security/base64.c",
"src/core/security/b64.c",
"src/core/security/client_auth_filter.c",
"src/core/security/credentials.c",
"src/core/security/credentials_metadata.c",
@ -1421,6 +1445,9 @@ objc_library(
"src/core/census/operation.c",
"src/core/census/placeholders.c",
"src/core/census/tracing.c",
"third_party/nanopb/pb_common.c",
"third_party/nanopb/pb_decode.c",
"third_party/nanopb/pb_encode.c",
],
hdrs = [
"include/grpc/grpc_security.h",
@ -1452,6 +1479,7 @@ objc_library(
"src/core/client_config/client_config.h",
"src/core/client_config/connector.h",
"src/core/client_config/initial_connect_string.h",
"src/core/client_config/lb_policies/load_balancer_api.h",
"src/core/client_config/lb_policies/pick_first.h",
"src/core/client_config/lb_policies/round_robin.h",
"src/core/client_config/lb_policy.h",
@ -1512,6 +1540,7 @@ objc_library(
"src/core/json/json_common.h",
"src/core/json/json_reader.h",
"src/core/json/json_writer.h",
"src/core/proto/grpc/lb/v0/load_balancer.pb.h",
"src/core/statistics/census_interface.h",
"src/core/statistics/census_rpc_stats.h",
"src/core/surface/api_trace.h",
@ -1555,7 +1584,7 @@ objc_library(
"src/core/transport/transport.h",
"src/core/transport/transport_impl.h",
"src/core/security/auth_filters.h",
"src/core/security/base64.h",
"src/core/security/b64.h",
"src/core/security/credentials.h",
"src/core/security/handshake.h",
"src/core/security/json_token.h",
@ -1571,6 +1600,10 @@ objc_library(
"src/core/census/aggregation.h",
"src/core/census/mlog.h",
"src/core/census/rpc_metric_id.h",
"third_party/nanopb/pb.h",
"third_party/nanopb/pb_common.h",
"third_party/nanopb/pb_decode.h",
"third_party/nanopb/pb_encode.h",
],
includes = [
"include",

@ -141,15 +141,7 @@ Then execute the following for all the needed build dependencies
$ make gtest.a gtest_main.a
$ sudo cp libgtest.a libgtest_main.a /opt/local/lib
$ sudo mkdir /opt/local/include/gtest
$ sudo cp -pr ../gtest-svn/include/gtest /opt/local/include/gtest
We will also need to make openssl and install it appropriately
$ cd <git directory>
$ cd third_party/openssl
$ ./config
$ sudo make install
$ cd ../../
$ sudo cp -pr ../gtest-svn/include/gtest /opt/local/include/gtest
If you are going to make changes and need to regenerate the projects file,
you will need to install certain modules for python.

@ -121,7 +121,7 @@ LD_asan-noleaks = clang
LDXX_asan-noleaks = clang++
CPPFLAGS_asan-noleaks = -O0 -fsanitize=address -fno-omit-frame-pointer -Wno-unused-command-line-argument -DGPR_NO_DIRECT_SYSCALLS
LDFLAGS_asan-noleaks = -fsanitize=address
DEFINES_asan-noleaks += GRPC_TEST_SLOWDOWN_BUILD_FACTOR=1.5
DEFINES_asan-noleaks += GRPC_TEST_SLOWDOWN_BUILD_FACTOR=3
VALID_CONFIG_ubsan = 1
REQUIRE_CUSTOM_LIBRARIES_ubsan = 1
@ -177,7 +177,7 @@ LD_asan = clang
LDXX_asan = clang++
CPPFLAGS_asan = -O0 -fsanitize=address -fno-omit-frame-pointer -Wno-unused-command-line-argument -DGPR_NO_DIRECT_SYSCALLS
LDFLAGS_asan = -fsanitize=address
DEFINES_asan += GRPC_TEST_SLOWDOWN_BUILD_FACTOR=1.5
DEFINES_asan += GRPC_TEST_SLOWDOWN_BUILD_FACTOR=3
VALID_CONFIG_tsan = 1
REQUIRE_CUSTOM_LIBRARIES_tsan = 1
@ -187,7 +187,7 @@ LD_tsan = clang
LDXX_tsan = clang++
CPPFLAGS_tsan = -O0 -fsanitize=thread -fno-omit-frame-pointer -Wno-unused-command-line-argument -fPIE -pie -DGPR_NO_DIRECT_SYSCALLS
LDFLAGS_tsan = -fsanitize=thread -fPIE -pie $(if $(JENKINS_BUILD),-Wl$(comma)-Ttext-segment=0x7e0000000000,)
DEFINES_tsan += GRPC_TEST_SLOWDOWN_BUILD_FACTOR=2
DEFINES_tsan += GRPC_TEST_SLOWDOWN_BUILD_FACTOR=5
VALID_CONFIG_msan = 1
REQUIRE_CUSTOM_LIBRARIES_msan = 1
@ -198,7 +198,7 @@ LDXX_msan = clang++
CPPFLAGS_msan = -O0 -fsanitize=memory -fsanitize-memory-track-origins -fno-omit-frame-pointer -DGTEST_HAS_TR1_TUPLE=0 -DGTEST_USE_OWN_TR1_TUPLE=1 -Wno-unused-command-line-argument -fPIE -pie -DGPR_NO_DIRECT_SYSCALLS
LDFLAGS_msan = -fsanitize=memory -DGTEST_HAS_TR1_TUPLE=0 -DGTEST_USE_OWN_TR1_TUPLE=1 -fPIE -pie $(if $(JENKINS_BUILD),-Wl$(comma)-Ttext-segment=0x7e0000000000,)
DEFINES_msan = NDEBUG
DEFINES_msan += GRPC_TEST_SLOWDOWN_BUILD_FACTOR=2
DEFINES_msan += GRPC_TEST_SLOWDOWN_BUILD_FACTOR=4
VALID_CONFIG_mutrace = 1
CC_mutrace = $(DEFAULT_CC)
@ -275,6 +275,12 @@ endif
CXX11_CHECK_CMD = $(CXX) -std=c++11 -o $(TMPOUT) -c test/build/c++11.cc
HAS_CXX11 = $(shell $(CXX11_CHECK_CMD) 2> /dev/null && echo true || echo false)
CHECK_SHADOW_WORKS_CMD = $(CC) -std=c99 -Werror -Wshadow -o $(TMPOUT) -c test/build/shadow.c
HAS_WORKING_SHADOW = $(shell $(CHECK_SHADOW_WORKS_CMD) 2> /dev/null && echo true || echo false)
ifeq ($(HAS_WORKING_SHADOW),true)
W_SHADOW=-Wshadow
endif
CHECK_NO_SHIFT_NEGATIVE_VALUE_CMD = $(CC) -std=c99 -Werror -Wno-shift-negative-value -o $(TMPOUT) -c test/build/empty.c
HAS_NO_SHIFT_NEGATIVE_VALUE = $(shell $(CHECK_NO_SHIFT_NEGATIVE_VALUE_CMD) 2> /dev/null && echo true || echo false)
ifeq ($(HAS_NO_SHIFT_NEGATIVE_VALUE),true)
@ -295,7 +301,7 @@ ifdef EXTRA_DEFINES
DEFINES += $(EXTRA_DEFINES)
endif
CFLAGS += -std=c99 -Wsign-conversion -Wconversion -Wshadow
CFLAGS += -std=c99 -Wsign-conversion -Wconversion $(W_SHADOW)
ifeq ($(HAS_CXX11),true)
CXXFLAGS += -std=c++11
else
@ -426,6 +432,7 @@ endif
OPENSSL_ALPN_CHECK_CMD = $(CC) $(CPPFLAGS) $(CFLAGS) -o $(TMPOUT) test/build/openssl-alpn.c $(addprefix -l, $(OPENSSL_LIBS)) $(LDFLAGS)
OPENSSL_NPN_CHECK_CMD = $(CC) $(CPPFLAGS) $(CFLAGS) -o $(TMPOUT) test/build/openssl-npn.c $(addprefix -l, $(OPENSSL_LIBS)) $(LDFLAGS)
BORINGSSL_COMPILE_CHECK_CMD = $(CC) $(CPPFLAGS) -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare -o $(TMPOUT) test/build/boringssl.c $(LDFLAGS)
ZLIB_CHECK_CMD = $(CC) $(CPPFLAGS) $(CFLAGS) -o $(TMPOUT) test/build/zlib.c -lz $(LDFLAGS)
PROTOBUF_CHECK_CMD = $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $(TMPOUT) test/build/protobuf.cc -lprotobuf $(LDFLAGS)
@ -510,10 +517,13 @@ HAS_ZOOKEEPER = $(shell $(ZOOKEEPER_CHECK_CMD) 2> /dev/null && echo true || echo
# Note that for testing purposes, one can do:
# make HAS_EMBEDDED_OPENSSL_ALPN=false
# to emulate the fact we do not have OpenSSL in the third_party folder.
ifeq ($(wildcard third_party/boringssl/include/openssl/ssl.h),)
ifneq ($(wildcard third_party/openssl-1.0.2f/libssl.a),)
HAS_EMBEDDED_OPENSSL_ALPN = third_party/openssl-1.0.2f
else ifeq ($(wildcard third_party/boringssl/include/openssl/ssl.h),)
HAS_EMBEDDED_OPENSSL_ALPN = false
else
HAS_EMBEDDED_OPENSSL_ALPN = true
CAN_COMPILE_EMBEDDED_OPENSSL ?= $(shell $(BORINGSSL_COMPILE_CHECK_CMD) 2> /dev/null && echo true || echo false)
HAS_EMBEDDED_OPENSSL_ALPN = $(CAN_COMPILE_EMBEDDED_OPENSSL)
endif
ifeq ($(wildcard third_party/zlib/zlib.h),)
@ -572,8 +582,8 @@ ifeq ($(HAS_SYSTEM_OPENSSL_ALPN),true)
EMBED_OPENSSL ?= false
NO_SECURE ?= false
else # HAS_SYSTEM_OPENSSL_ALPN=false
ifeq ($(HAS_EMBEDDED_OPENSSL_ALPN),true)
EMBED_OPENSSL ?= true
ifneq ($(HAS_EMBEDDED_OPENSSL_ALPN),false)
EMBED_OPENSSL ?= $(HAS_EMBEDDED_OPENSSL_ALPN)
NO_SECURE ?= false
else # HAS_EMBEDDED_OPENSSL_ALPN=false
ifeq ($(HAS_SYSTEM_OPENSSL_NPN),true)
@ -594,6 +604,12 @@ OPENSSL_MERGE_LIBS += $(LIBDIR)/$(CONFIG)/libboringssl.a
OPENSSL_MERGE_OBJS += $(LIBBORINGSSL_OBJS)
# need to prefix these to ensure overriding system libraries
CPPFLAGS := -Ithird_party/boringssl/include $(CPPFLAGS)
else ifneq ($(EMBED_OPENSSL),false)
OPENSSL_DEP += $(EMBED_OPENSSL)/libssl.a $(EMBED_OPENSSL)/libcrypto.a
OPENSSL_MERGE_LIBS += $(EMBED_OPENSSL)/libssl.a $(EMBED_OPENSSL)/libcrypto.a
OPENSSL_MERGE_OBJS += $(wildcard $(EMBED_OPENSSL)/grpc_obj/*.o)
# need to prefix these to ensure overriding system libraries
CPPFLAGS := -I$(EMBED_OPENSSL)/include $(CPPFLAGS)
else # EMBED_OPENSSL=false
ifeq ($(HAS_PKG_CONFIG),true)
OPENSSL_PKG_CONFIG = true
@ -768,8 +784,9 @@ openssl_dep_message:
@echo
@echo "DEPENDENCY ERROR"
@echo
@echo "The target you are trying to run requires OpenSSL."
@echo "Your system doesn't have it, and neither does the third_party directory."
@echo "The target you are trying to run requires an OpenSSL implementation."
@echo "Your system doesn't have one, and either the third_party directory"
@echo "doesn't have it, or your compiler can't build BoringSSL."
@echo
@echo "Please consult INSTALL to get more information."
@echo
@ -826,7 +843,6 @@ alloc_test: $(BINDIR)/$(CONFIG)/alloc_test
alpn_test: $(BINDIR)/$(CONFIG)/alpn_test
bin_encoder_test: $(BINDIR)/$(CONFIG)/bin_encoder_test
census_context_test: $(BINDIR)/$(CONFIG)/census_context_test
census_log_test: $(BINDIR)/$(CONFIG)/census_log_test
channel_create_test: $(BINDIR)/$(CONFIG)/channel_create_test
chttp2_hpack_encoder_test: $(BINDIR)/$(CONFIG)/chttp2_hpack_encoder_test
chttp2_status_conversion_test: $(BINDIR)/$(CONFIG)/chttp2_status_conversion_test
@ -848,9 +864,9 @@ gpr_avl_test: $(BINDIR)/$(CONFIG)/gpr_avl_test
gpr_cmdline_test: $(BINDIR)/$(CONFIG)/gpr_cmdline_test
gpr_cpu_test: $(BINDIR)/$(CONFIG)/gpr_cpu_test
gpr_env_test: $(BINDIR)/$(CONFIG)/gpr_env_test
gpr_file_test: $(BINDIR)/$(CONFIG)/gpr_file_test
gpr_histogram_test: $(BINDIR)/$(CONFIG)/gpr_histogram_test
gpr_host_port_test: $(BINDIR)/$(CONFIG)/gpr_host_port_test
gpr_load_file_test: $(BINDIR)/$(CONFIG)/gpr_load_file_test
gpr_log_test: $(BINDIR)/$(CONFIG)/gpr_log_test
gpr_slice_buffer_test: $(BINDIR)/$(CONFIG)/gpr_slice_buffer_test
gpr_slice_test: $(BINDIR)/$(CONFIG)/gpr_slice_test
@ -862,7 +878,7 @@ gpr_time_test: $(BINDIR)/$(CONFIG)/gpr_time_test
gpr_tls_test: $(BINDIR)/$(CONFIG)/gpr_tls_test
gpr_useful_test: $(BINDIR)/$(CONFIG)/gpr_useful_test
grpc_auth_context_test: $(BINDIR)/$(CONFIG)/grpc_auth_context_test
grpc_base64_test: $(BINDIR)/$(CONFIG)/grpc_base64_test
grpc_b64_test: $(BINDIR)/$(CONFIG)/grpc_b64_test
grpc_byte_buffer_reader_test: $(BINDIR)/$(CONFIG)/grpc_byte_buffer_reader_test
grpc_channel_args_test: $(BINDIR)/$(CONFIG)/grpc_channel_args_test
grpc_channel_stack_test: $(BINDIR)/$(CONFIG)/grpc_channel_stack_test
@ -892,6 +908,7 @@ lame_client_test: $(BINDIR)/$(CONFIG)/lame_client_test
lb_policies_test: $(BINDIR)/$(CONFIG)/lb_policies_test
low_level_ping_pong_benchmark: $(BINDIR)/$(CONFIG)/low_level_ping_pong_benchmark
message_compress_test: $(BINDIR)/$(CONFIG)/message_compress_test
mlog_test: $(BINDIR)/$(CONFIG)/mlog_test
multiple_server_queues_test: $(BINDIR)/$(CONFIG)/multiple_server_queues_test
murmur_hash_test: $(BINDIR)/$(CONFIG)/murmur_hash_test
no_server_test: $(BINDIR)/$(CONFIG)/no_server_test
@ -941,6 +958,7 @@ grpc_csharp_plugin: $(BINDIR)/$(CONFIG)/grpc_csharp_plugin
grpc_objective_c_plugin: $(BINDIR)/$(CONFIG)/grpc_objective_c_plugin
grpc_python_plugin: $(BINDIR)/$(CONFIG)/grpc_python_plugin
grpc_ruby_plugin: $(BINDIR)/$(CONFIG)/grpc_ruby_plugin
grpclb_api_test: $(BINDIR)/$(CONFIG)/grpclb_api_test
hybrid_end2end_test: $(BINDIR)/$(CONFIG)/hybrid_end2end_test
interop_client: $(BINDIR)/$(CONFIG)/interop_client
interop_server: $(BINDIR)/$(CONFIG)/interop_server
@ -1137,7 +1155,6 @@ buildtests_c: privatelibs_c \
$(BINDIR)/$(CONFIG)/alpn_test \
$(BINDIR)/$(CONFIG)/bin_encoder_test \
$(BINDIR)/$(CONFIG)/census_context_test \
$(BINDIR)/$(CONFIG)/census_log_test \
$(BINDIR)/$(CONFIG)/channel_create_test \
$(BINDIR)/$(CONFIG)/chttp2_hpack_encoder_test \
$(BINDIR)/$(CONFIG)/chttp2_status_conversion_test \
@ -1157,9 +1174,9 @@ buildtests_c: privatelibs_c \
$(BINDIR)/$(CONFIG)/gpr_cmdline_test \
$(BINDIR)/$(CONFIG)/gpr_cpu_test \
$(BINDIR)/$(CONFIG)/gpr_env_test \
$(BINDIR)/$(CONFIG)/gpr_file_test \
$(BINDIR)/$(CONFIG)/gpr_histogram_test \
$(BINDIR)/$(CONFIG)/gpr_host_port_test \
$(BINDIR)/$(CONFIG)/gpr_load_file_test \
$(BINDIR)/$(CONFIG)/gpr_log_test \
$(BINDIR)/$(CONFIG)/gpr_slice_buffer_test \
$(BINDIR)/$(CONFIG)/gpr_slice_test \
@ -1171,7 +1188,7 @@ buildtests_c: privatelibs_c \
$(BINDIR)/$(CONFIG)/gpr_tls_test \
$(BINDIR)/$(CONFIG)/gpr_useful_test \
$(BINDIR)/$(CONFIG)/grpc_auth_context_test \
$(BINDIR)/$(CONFIG)/grpc_base64_test \
$(BINDIR)/$(CONFIG)/grpc_b64_test \
$(BINDIR)/$(CONFIG)/grpc_byte_buffer_reader_test \
$(BINDIR)/$(CONFIG)/grpc_channel_args_test \
$(BINDIR)/$(CONFIG)/grpc_channel_stack_test \
@ -1196,6 +1213,7 @@ buildtests_c: privatelibs_c \
$(BINDIR)/$(CONFIG)/lame_client_test \
$(BINDIR)/$(CONFIG)/lb_policies_test \
$(BINDIR)/$(CONFIG)/message_compress_test \
$(BINDIR)/$(CONFIG)/mlog_test \
$(BINDIR)/$(CONFIG)/multiple_server_queues_test \
$(BINDIR)/$(CONFIG)/murmur_hash_test \
$(BINDIR)/$(CONFIG)/no_server_test \
@ -1289,6 +1307,7 @@ buildtests_cxx: buildtests_zookeeper privatelibs_cxx \
$(BINDIR)/$(CONFIG)/generic_async_streaming_ping_pong_test \
$(BINDIR)/$(CONFIG)/generic_end2end_test \
$(BINDIR)/$(CONFIG)/grpc_cli \
$(BINDIR)/$(CONFIG)/grpclb_api_test \
$(BINDIR)/$(CONFIG)/hybrid_end2end_test \
$(BINDIR)/$(CONFIG)/interop_client \
$(BINDIR)/$(CONFIG)/interop_server \
@ -1375,8 +1394,6 @@ test_c: buildtests_c
$(Q) $(BINDIR)/$(CONFIG)/bin_encoder_test || ( echo test bin_encoder_test failed ; exit 1 )
$(E) "[RUN] Testing census_context_test"
$(Q) $(BINDIR)/$(CONFIG)/census_context_test || ( echo test census_context_test failed ; exit 1 )
$(E) "[RUN] Testing census_log_test"
$(Q) $(BINDIR)/$(CONFIG)/census_log_test || ( echo test census_log_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"
@ -1411,12 +1428,12 @@ test_c: buildtests_c
$(Q) $(BINDIR)/$(CONFIG)/gpr_cpu_test || ( echo test gpr_cpu_test failed ; exit 1 )
$(E) "[RUN] Testing gpr_env_test"
$(Q) $(BINDIR)/$(CONFIG)/gpr_env_test || ( echo test gpr_env_test failed ; exit 1 )
$(E) "[RUN] Testing gpr_file_test"
$(Q) $(BINDIR)/$(CONFIG)/gpr_file_test || ( echo test gpr_file_test failed ; exit 1 )
$(E) "[RUN] Testing gpr_histogram_test"
$(Q) $(BINDIR)/$(CONFIG)/gpr_histogram_test || ( echo test gpr_histogram_test failed ; exit 1 )
$(E) "[RUN] Testing gpr_host_port_test"
$(Q) $(BINDIR)/$(CONFIG)/gpr_host_port_test || ( echo test gpr_host_port_test failed ; exit 1 )
$(E) "[RUN] Testing gpr_load_file_test"
$(Q) $(BINDIR)/$(CONFIG)/gpr_load_file_test || ( echo test gpr_load_file_test failed ; exit 1 )
$(E) "[RUN] Testing gpr_log_test"
$(Q) $(BINDIR)/$(CONFIG)/gpr_log_test || ( echo test gpr_log_test failed ; exit 1 )
$(E) "[RUN] Testing gpr_slice_buffer_test"
@ -1439,8 +1456,8 @@ test_c: buildtests_c
$(Q) $(BINDIR)/$(CONFIG)/gpr_useful_test || ( echo test gpr_useful_test failed ; exit 1 )
$(E) "[RUN] Testing grpc_auth_context_test"
$(Q) $(BINDIR)/$(CONFIG)/grpc_auth_context_test || ( echo test grpc_auth_context_test failed ; exit 1 )
$(E) "[RUN] Testing grpc_base64_test"
$(Q) $(BINDIR)/$(CONFIG)/grpc_base64_test || ( echo test grpc_base64_test failed ; exit 1 )
$(E) "[RUN] Testing grpc_b64_test"
$(Q) $(BINDIR)/$(CONFIG)/grpc_b64_test || ( echo test grpc_b64_test failed ; exit 1 )
$(E) "[RUN] Testing grpc_byte_buffer_reader_test"
$(Q) $(BINDIR)/$(CONFIG)/grpc_byte_buffer_reader_test || ( echo test grpc_byte_buffer_reader_test failed ; exit 1 )
$(E) "[RUN] Testing grpc_channel_args_test"
@ -1487,6 +1504,8 @@ test_c: buildtests_c
$(Q) $(BINDIR)/$(CONFIG)/lb_policies_test || ( echo test lb_policies_test failed ; exit 1 )
$(E) "[RUN] Testing message_compress_test"
$(Q) $(BINDIR)/$(CONFIG)/message_compress_test || ( echo test message_compress_test failed ; exit 1 )
$(E) "[RUN] Testing mlog_test"
$(Q) $(BINDIR)/$(CONFIG)/mlog_test || ( echo test mlog_test failed ; exit 1 )
$(E) "[RUN] Testing multiple_server_queues_test"
$(Q) $(BINDIR)/$(CONFIG)/multiple_server_queues_test || ( echo test multiple_server_queues_test failed ; exit 1 )
$(E) "[RUN] Testing murmur_hash_test"
@ -1599,6 +1618,8 @@ test_cxx: test_zookeeper buildtests_cxx
$(Q) $(BINDIR)/$(CONFIG)/generic_async_streaming_ping_pong_test || ( echo test generic_async_streaming_ping_pong_test failed ; exit 1 )
$(E) "[RUN] Testing generic_end2end_test"
$(Q) $(BINDIR)/$(CONFIG)/generic_end2end_test || ( echo test generic_end2end_test failed ; exit 1 )
$(E) "[RUN] Testing grpclb_api_test"
$(Q) $(BINDIR)/$(CONFIG)/grpclb_api_test || ( echo test grpclb_api_test failed ; exit 1 )
$(E) "[RUN] Testing hybrid_end2end_test"
$(Q) $(BINDIR)/$(CONFIG)/hybrid_end2end_test || ( echo test hybrid_end2end_test failed ; exit 1 )
$(E) "[RUN] Testing interop_test"
@ -1750,6 +1771,21 @@ $(LIBDIR)/$(CONFIG)/pkgconfig/grpc++_unsecure.pc:
$(Q) mkdir -p $(@D)
$(Q) echo "$(GRPCXX_UNSECURE_PC_FILE)" | tr , '\n' >$@
ifeq ($(NO_PROTOC),true)
$(GENDIR)/src/proto/grpc/lb/v0/load_balancer.pb.cc: protoc_dep_error
$(GENDIR)/src/proto/grpc/lb/v0/load_balancer.grpc.pb.cc: protoc_dep_error
else
$(GENDIR)/src/proto/grpc/lb/v0/load_balancer.pb.cc: src/proto/grpc/lb/v0/load_balancer.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS)
$(E) "[PROTOC] Generating protobuf CC file from $<"
$(Q) mkdir -p `dirname $@`
$(Q) $(PROTOC) --cpp_out=$(GENDIR) $<
$(GENDIR)/src/proto/grpc/lb/v0/load_balancer.grpc.pb.cc: src/proto/grpc/lb/v0/load_balancer.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS)
$(E) "[GRPC] Generating gRPC's protobuf service CC file from $<"
$(Q) mkdir -p `dirname $@`
$(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $<
endif
ifeq ($(NO_PROTOC),true)
$(GENDIR)/src/proto/grpc/testing/control.pb.cc: protoc_dep_error
$(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc: protoc_dep_error
@ -2184,11 +2220,9 @@ LIBGPR_SRC = \
src/core/support/env_linux.c \
src/core/support/env_posix.c \
src/core/support/env_win32.c \
src/core/support/file.c \
src/core/support/file_posix.c \
src/core/support/file_win32.c \
src/core/support/histogram.c \
src/core/support/host_port.c \
src/core/support/load_file.c \
src/core/support/log.c \
src/core/support/log_android.c \
src/core/support/log_linux.c \
@ -2214,6 +2248,8 @@ LIBGPR_SRC = \
src/core/support/time_precise.c \
src/core/support/time_win32.c \
src/core/support/tls_pthread.c \
src/core/support/tmpfile_posix.c \
src/core/support/tmpfile_win32.c \
src/core/support/wrap_memcpy.c \
PUBLIC_HEADERS_C += \
@ -2339,6 +2375,7 @@ LIBGRPC_SRC = \
src/core/client_config/connector.c \
src/core/client_config/default_initial_connect_string.c \
src/core/client_config/initial_connect_string.c \
src/core/client_config/lb_policies/load_balancer_api.c \
src/core/client_config/lb_policies/pick_first.c \
src/core/client_config/lb_policies/round_robin.c \
src/core/client_config/lb_policy.c \
@ -2353,7 +2390,7 @@ LIBGRPC_SRC = \
src/core/client_config/subchannel_factory.c \
src/core/client_config/subchannel_index.c \
src/core/client_config/uri_parser.c \
src/core/compression/algorithm.c \
src/core/compression/compression_algorithm.c \
src/core/compression/message_compress.c \
src/core/debug/trace.c \
src/core/httpcli/format_request.c \
@ -2403,6 +2440,7 @@ LIBGRPC_SRC = \
src/core/json/json_reader.c \
src/core/json/json_string.c \
src/core/json/json_writer.c \
src/core/proto/grpc/lb/v0/load_balancer.pb.c \
src/core/surface/alarm.c \
src/core/surface/api_trace.c \
src/core/surface/byte_buffer.c \
@ -2454,7 +2492,7 @@ LIBGRPC_SRC = \
src/core/transport/transport.c \
src/core/transport/transport_op_string.c \
src/core/httpcli/httpcli_security_connector.c \
src/core/security/base64.c \
src/core/security/b64.c \
src/core/security/client_auth_filter.c \
src/core/security/credentials.c \
src/core/security/credentials_metadata.c \
@ -2480,6 +2518,9 @@ LIBGRPC_SRC = \
src/core/census/operation.c \
src/core/census/placeholders.c \
src/core/census/tracing.c \
third_party/nanopb/pb_common.c \
third_party/nanopb/pb_decode.c \
third_party/nanopb/pb_encode.c \
PUBLIC_HEADERS_C += \
include/grpc/grpc_security.h \
@ -2649,6 +2690,7 @@ LIBGRPC_UNSECURE_SRC = \
src/core/client_config/connector.c \
src/core/client_config/default_initial_connect_string.c \
src/core/client_config/initial_connect_string.c \
src/core/client_config/lb_policies/load_balancer_api.c \
src/core/client_config/lb_policies/pick_first.c \
src/core/client_config/lb_policies/round_robin.c \
src/core/client_config/lb_policy.c \
@ -2663,7 +2705,7 @@ LIBGRPC_UNSECURE_SRC = \
src/core/client_config/subchannel_factory.c \
src/core/client_config/subchannel_index.c \
src/core/client_config/uri_parser.c \
src/core/compression/algorithm.c \
src/core/compression/compression_algorithm.c \
src/core/compression/message_compress.c \
src/core/debug/trace.c \
src/core/httpcli/format_request.c \
@ -2713,6 +2755,7 @@ LIBGRPC_UNSECURE_SRC = \
src/core/json/json_reader.c \
src/core/json/json_string.c \
src/core/json/json_writer.c \
src/core/proto/grpc/lb/v0/load_balancer.pb.c \
src/core/surface/alarm.c \
src/core/surface/api_trace.c \
src/core/surface/byte_buffer.c \
@ -2769,6 +2812,9 @@ LIBGRPC_UNSECURE_SRC = \
src/core/census/operation.c \
src/core/census/placeholders.c \
src/core/census/tracing.c \
third_party/nanopb/pb_common.c \
third_party/nanopb/pb_decode.c \
third_party/nanopb/pb_encode.c \
PUBLIC_HEADERS_C += \
include/grpc/byte_buffer.h \
@ -2954,7 +3000,6 @@ LIBGRPC++_SRC = \
src/cpp/client/credentials.cc \
src/cpp/client/generic_stub.cc \
src/cpp/client/insecure_credentials.cc \
src/cpp/common/alarm.cc \
src/cpp/common/call.cc \
src/cpp/common/channel_arguments.cc \
src/cpp/common/completion_queue.cc \
@ -3235,7 +3280,6 @@ LIBGRPC++_UNSECURE_SRC = \
src/cpp/client/credentials.cc \
src/cpp/client/generic_stub.cc \
src/cpp/client/insecure_credentials.cc \
src/cpp/common/alarm.cc \
src/cpp/common/call.cc \
src/cpp/common/channel_arguments.cc \
src/cpp/common/completion_queue.cc \
@ -3628,7 +3672,7 @@ LIBINTEROP_SERVER_MAIN_SRC = \
$(GENDIR)/src/proto/grpc/testing/empty.pb.cc $(GENDIR)/src/proto/grpc/testing/empty.grpc.pb.cc \
$(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc \
$(GENDIR)/src/proto/grpc/testing/test.pb.cc $(GENDIR)/src/proto/grpc/testing/test.grpc.pb.cc \
test/cpp/interop/server.cc \
test/cpp/interop/server_main.cc \
LIBINTEROP_SERVER_MAIN_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBINTEROP_SERVER_MAIN_SRC))))
@ -3673,7 +3717,7 @@ ifneq ($(NO_DEPS),true)
-include $(LIBINTEROP_SERVER_MAIN_OBJS:.o=.dep)
endif
endif
$(OBJDIR)/$(CONFIG)/test/cpp/interop/server.o: $(GENDIR)/src/proto/grpc/testing/empty.pb.cc $(GENDIR)/src/proto/grpc/testing/empty.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/test.pb.cc $(GENDIR)/src/proto/grpc/testing/test.grpc.pb.cc
$(OBJDIR)/$(CONFIG)/test/cpp/interop/server_main.o: $(GENDIR)/src/proto/grpc/testing/empty.pb.cc $(GENDIR)/src/proto/grpc/testing/empty.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/test.pb.cc $(GENDIR)/src/proto/grpc/testing/test.grpc.pb.cc
LIBQPS_SRC = \
@ -3692,7 +3736,7 @@ LIBQPS_SRC = \
test/cpp/qps/report.cc \
test/cpp/qps/server_async.cc \
test/cpp/qps/server_sync.cc \
test/cpp/qps/timer.cc \
test/cpp/qps/usage_timer.cc \
test/cpp/util/benchmark_config.cc \
@ -3747,7 +3791,7 @@ $(OBJDIR)/$(CONFIG)/test/cpp/qps/qps_worker.o: $(GENDIR)/src/proto/grpc/testing/
$(OBJDIR)/$(CONFIG)/test/cpp/qps/report.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc
$(OBJDIR)/$(CONFIG)/test/cpp/qps/server_async.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc
$(OBJDIR)/$(CONFIG)/test/cpp/qps/server_sync.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc
$(OBJDIR)/$(CONFIG)/test/cpp/qps/timer.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc
$(OBJDIR)/$(CONFIG)/test/cpp/qps/usage_timer.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc
$(OBJDIR)/$(CONFIG)/test/cpp/util/benchmark_config.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc
@ -5443,7 +5487,7 @@ endif
LIBBAD_SSL_TEST_SERVER_SRC = \
test/core/bad_ssl/server.c \
test/core/bad_ssl/server_common.c \
LIBBAD_SSL_TEST_SERVER_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBAD_SSL_TEST_SERVER_SRC))))
@ -5491,9 +5535,8 @@ LIBEND2END_TESTS_SRC = \
test/core/end2end/tests/cancel_before_invoke.c \
test/core/end2end/tests/cancel_in_a_vacuum.c \
test/core/end2end/tests/cancel_with_status.c \
test/core/end2end/tests/channel_connectivity.c \
test/core/end2end/tests/channel_ping.c \
test/core/end2end/tests/compressed_payload.c \
test/core/end2end/tests/connectivity.c \
test/core/end2end/tests/default_host.c \
test/core/end2end/tests/disappearing_server.c \
test/core/end2end/tests/empty_batch.c \
@ -5504,10 +5547,10 @@ LIBEND2END_TESTS_SRC = \
test/core/end2end/tests/large_metadata.c \
test/core/end2end/tests/max_concurrent_streams.c \
test/core/end2end/tests/max_message_length.c \
test/core/end2end/tests/metadata.c \
test/core/end2end/tests/negative_deadline.c \
test/core/end2end/tests/no_op.c \
test/core/end2end/tests/payload.c \
test/core/end2end/tests/ping.c \
test/core/end2end/tests/ping_pong_streaming.c \
test/core/end2end/tests/registered_call.c \
test/core/end2end/tests/request_with_flags.c \
@ -5516,6 +5559,7 @@ LIBEND2END_TESTS_SRC = \
test/core/end2end/tests/shutdown_finishes_calls.c \
test/core/end2end/tests/shutdown_finishes_tags.c \
test/core/end2end/tests/simple_delayed_request.c \
test/core/end2end/tests/simple_metadata.c \
test/core/end2end/tests/simple_request.c \
test/core/end2end/tests/trailing_metadata.c \
@ -5564,9 +5608,8 @@ LIBEND2END_NOSEC_TESTS_SRC = \
test/core/end2end/tests/cancel_before_invoke.c \
test/core/end2end/tests/cancel_in_a_vacuum.c \
test/core/end2end/tests/cancel_with_status.c \
test/core/end2end/tests/channel_connectivity.c \
test/core/end2end/tests/channel_ping.c \
test/core/end2end/tests/compressed_payload.c \
test/core/end2end/tests/connectivity.c \
test/core/end2end/tests/default_host.c \
test/core/end2end/tests/disappearing_server.c \
test/core/end2end/tests/empty_batch.c \
@ -5577,10 +5620,10 @@ LIBEND2END_NOSEC_TESTS_SRC = \
test/core/end2end/tests/large_metadata.c \
test/core/end2end/tests/max_concurrent_streams.c \
test/core/end2end/tests/max_message_length.c \
test/core/end2end/tests/metadata.c \
test/core/end2end/tests/negative_deadline.c \
test/core/end2end/tests/no_op.c \
test/core/end2end/tests/payload.c \
test/core/end2end/tests/ping.c \
test/core/end2end/tests/ping_pong_streaming.c \
test/core/end2end/tests/registered_call.c \
test/core/end2end/tests/request_with_flags.c \
@ -5589,6 +5632,7 @@ LIBEND2END_NOSEC_TESTS_SRC = \
test/core/end2end/tests/shutdown_finishes_calls.c \
test/core/end2end/tests/shutdown_finishes_tags.c \
test/core/end2end/tests/simple_delayed_request.c \
test/core/end2end/tests/simple_metadata.c \
test/core/end2end/tests/simple_request.c \
test/core/end2end/tests/trailing_metadata.c \
@ -5849,38 +5893,6 @@ endif
endif
CENSUS_LOG_TEST_SRC = \
test/core/census/mlog_test.c \
CENSUS_LOG_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(CENSUS_LOG_TEST_SRC))))
ifeq ($(NO_SECURE),true)
# You can't build secure targets if you don't have OpenSSL.
$(BINDIR)/$(CONFIG)/census_log_test: openssl_dep_error
else
$(BINDIR)/$(CONFIG)/census_log_test: $(CENSUS_LOG_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) $(CENSUS_LOG_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)/census_log_test
endif
$(OBJDIR)/$(CONFIG)/test/core/census/mlog_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
deps_census_log_test: $(CENSUS_LOG_TEST_OBJS:.o=.dep)
ifneq ($(NO_SECURE),true)
ifneq ($(NO_DEPS),true)
-include $(CENSUS_LOG_TEST_OBJS:.o=.dep)
endif
endif
CHANNEL_CREATE_TEST_SRC = \
test/core/surface/channel_create_test.c \
@ -6553,98 +6565,98 @@ endif
endif
GPR_FILE_TEST_SRC = \
test/core/support/file_test.c \
GPR_HISTOGRAM_TEST_SRC = \
test/core/support/histogram_test.c \
GPR_FILE_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(GPR_FILE_TEST_SRC))))
GPR_HISTOGRAM_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(GPR_HISTOGRAM_TEST_SRC))))
ifeq ($(NO_SECURE),true)
# You can't build secure targets if you don't have OpenSSL.
$(BINDIR)/$(CONFIG)/gpr_file_test: openssl_dep_error
$(BINDIR)/$(CONFIG)/gpr_histogram_test: openssl_dep_error
else
$(BINDIR)/$(CONFIG)/gpr_file_test: $(GPR_FILE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
$(BINDIR)/$(CONFIG)/gpr_histogram_test: $(GPR_HISTOGRAM_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
$(E) "[LD] Linking $@"
$(Q) mkdir -p `dirname $@`
$(Q) $(LD) $(LDFLAGS) $(GPR_FILE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/gpr_file_test
$(Q) $(LD) $(LDFLAGS) $(GPR_HISTOGRAM_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/gpr_histogram_test
endif
$(OBJDIR)/$(CONFIG)/test/core/support/file_test.o: $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
$(OBJDIR)/$(CONFIG)/test/core/support/histogram_test.o: $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
deps_gpr_file_test: $(GPR_FILE_TEST_OBJS:.o=.dep)
deps_gpr_histogram_test: $(GPR_HISTOGRAM_TEST_OBJS:.o=.dep)
ifneq ($(NO_SECURE),true)
ifneq ($(NO_DEPS),true)
-include $(GPR_FILE_TEST_OBJS:.o=.dep)
-include $(GPR_HISTOGRAM_TEST_OBJS:.o=.dep)
endif
endif
GPR_HISTOGRAM_TEST_SRC = \
test/core/support/histogram_test.c \
GPR_HOST_PORT_TEST_SRC = \
test/core/support/host_port_test.c \
GPR_HISTOGRAM_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(GPR_HISTOGRAM_TEST_SRC))))
GPR_HOST_PORT_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(GPR_HOST_PORT_TEST_SRC))))
ifeq ($(NO_SECURE),true)
# You can't build secure targets if you don't have OpenSSL.
$(BINDIR)/$(CONFIG)/gpr_histogram_test: openssl_dep_error
$(BINDIR)/$(CONFIG)/gpr_host_port_test: openssl_dep_error
else
$(BINDIR)/$(CONFIG)/gpr_histogram_test: $(GPR_HISTOGRAM_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
$(BINDIR)/$(CONFIG)/gpr_host_port_test: $(GPR_HOST_PORT_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
$(E) "[LD] Linking $@"
$(Q) mkdir -p `dirname $@`
$(Q) $(LD) $(LDFLAGS) $(GPR_HISTOGRAM_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/gpr_histogram_test
$(Q) $(LD) $(LDFLAGS) $(GPR_HOST_PORT_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/gpr_host_port_test
endif
$(OBJDIR)/$(CONFIG)/test/core/support/histogram_test.o: $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
$(OBJDIR)/$(CONFIG)/test/core/support/host_port_test.o: $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
deps_gpr_histogram_test: $(GPR_HISTOGRAM_TEST_OBJS:.o=.dep)
deps_gpr_host_port_test: $(GPR_HOST_PORT_TEST_OBJS:.o=.dep)
ifneq ($(NO_SECURE),true)
ifneq ($(NO_DEPS),true)
-include $(GPR_HISTOGRAM_TEST_OBJS:.o=.dep)
-include $(GPR_HOST_PORT_TEST_OBJS:.o=.dep)
endif
endif
GPR_HOST_PORT_TEST_SRC = \
test/core/support/host_port_test.c \
GPR_LOAD_FILE_TEST_SRC = \
test/core/support/load_file_test.c \
GPR_HOST_PORT_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(GPR_HOST_PORT_TEST_SRC))))
GPR_LOAD_FILE_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(GPR_LOAD_FILE_TEST_SRC))))
ifeq ($(NO_SECURE),true)
# You can't build secure targets if you don't have OpenSSL.
$(BINDIR)/$(CONFIG)/gpr_host_port_test: openssl_dep_error
$(BINDIR)/$(CONFIG)/gpr_load_file_test: openssl_dep_error
else
$(BINDIR)/$(CONFIG)/gpr_host_port_test: $(GPR_HOST_PORT_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
$(BINDIR)/$(CONFIG)/gpr_load_file_test: $(GPR_LOAD_FILE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
$(E) "[LD] Linking $@"
$(Q) mkdir -p `dirname $@`
$(Q) $(LD) $(LDFLAGS) $(GPR_HOST_PORT_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/gpr_host_port_test
$(Q) $(LD) $(LDFLAGS) $(GPR_LOAD_FILE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/gpr_load_file_test
endif
$(OBJDIR)/$(CONFIG)/test/core/support/host_port_test.o: $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
$(OBJDIR)/$(CONFIG)/test/core/support/load_file_test.o: $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
deps_gpr_host_port_test: $(GPR_HOST_PORT_TEST_OBJS:.o=.dep)
deps_gpr_load_file_test: $(GPR_LOAD_FILE_TEST_OBJS:.o=.dep)
ifneq ($(NO_SECURE),true)
ifneq ($(NO_DEPS),true)
-include $(GPR_HOST_PORT_TEST_OBJS:.o=.dep)
-include $(GPR_LOAD_FILE_TEST_OBJS:.o=.dep)
endif
endif
@ -7001,34 +7013,34 @@ endif
endif
GRPC_BASE64_TEST_SRC = \
test/core/security/base64_test.c \
GRPC_B64_TEST_SRC = \
test/core/security/b64_test.c \
GRPC_BASE64_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(GRPC_BASE64_TEST_SRC))))
GRPC_B64_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(GRPC_B64_TEST_SRC))))
ifeq ($(NO_SECURE),true)
# You can't build secure targets if you don't have OpenSSL.
$(BINDIR)/$(CONFIG)/grpc_base64_test: openssl_dep_error
$(BINDIR)/$(CONFIG)/grpc_b64_test: openssl_dep_error
else
$(BINDIR)/$(CONFIG)/grpc_base64_test: $(GRPC_BASE64_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
$(BINDIR)/$(CONFIG)/grpc_b64_test: $(GRPC_B64_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) $(GRPC_BASE64_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)/grpc_base64_test
$(Q) $(LD) $(LDFLAGS) $(GRPC_B64_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)/grpc_b64_test
endif
$(OBJDIR)/$(CONFIG)/test/core/security/base64_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
$(OBJDIR)/$(CONFIG)/test/core/security/b64_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
deps_grpc_base64_test: $(GRPC_BASE64_TEST_OBJS:.o=.dep)
deps_grpc_b64_test: $(GRPC_B64_TEST_OBJS:.o=.dep)
ifneq ($(NO_SECURE),true)
ifneq ($(NO_DEPS),true)
-include $(GRPC_BASE64_TEST_OBJS:.o=.dep)
-include $(GRPC_B64_TEST_OBJS:.o=.dep)
endif
endif
@ -7961,6 +7973,38 @@ endif
endif
MLOG_TEST_SRC = \
test/core/census/mlog_test.c \
MLOG_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(MLOG_TEST_SRC))))
ifeq ($(NO_SECURE),true)
# You can't build secure targets if you don't have OpenSSL.
$(BINDIR)/$(CONFIG)/mlog_test: openssl_dep_error
else
$(BINDIR)/$(CONFIG)/mlog_test: $(MLOG_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) $(MLOG_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)/mlog_test
endif
$(OBJDIR)/$(CONFIG)/test/core/census/mlog_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
deps_mlog_test: $(MLOG_TEST_OBJS:.o=.dep)
ifneq ($(NO_SECURE),true)
ifneq ($(NO_DEPS),true)
-include $(MLOG_TEST_OBJS:.o=.dep)
endif
endif
MULTIPLE_SERVER_QUEUES_TEST_SRC = \
test/core/end2end/multiple_server_queues_test.c \
@ -9722,6 +9766,53 @@ ifneq ($(NO_DEPS),true)
endif
GRPCLB_API_TEST_SRC = \
$(GENDIR)/src/proto/grpc/lb/v0/load_balancer.pb.cc $(GENDIR)/src/proto/grpc/lb/v0/load_balancer.grpc.pb.cc \
test/cpp/grpclb/grpclb_api_test.cc \
GRPCLB_API_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(GRPCLB_API_TEST_SRC))))
ifeq ($(NO_SECURE),true)
# You can't build secure targets if you don't have OpenSSL.
$(BINDIR)/$(CONFIG)/grpclb_api_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)/grpclb_api_test: protobuf_dep_error
else
$(BINDIR)/$(CONFIG)/grpclb_api_test: $(PROTOBUF_DEP) $(GRPCLB_API_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a
$(E) "[LD] Linking $@"
$(Q) mkdir -p `dirname $@`
$(Q) $(LDXX) $(LDFLAGS) $(GRPCLB_API_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/grpclb_api_test
endif
endif
$(OBJDIR)/$(CONFIG)/src/proto/grpc/lb/v0/load_balancer.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a
$(OBJDIR)/$(CONFIG)/test/cpp/grpclb/grpclb_api_test.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a
deps_grpclb_api_test: $(GRPCLB_API_TEST_OBJS:.o=.dep)
ifneq ($(NO_SECURE),true)
ifneq ($(NO_DEPS),true)
-include $(GRPCLB_API_TEST_OBJS:.o=.dep)
endif
endif
$(OBJDIR)/$(CONFIG)/test/cpp/grpclb/grpclb_api_test.o: $(GENDIR)/src/proto/grpc/lb/v0/load_balancer.pb.cc $(GENDIR)/src/proto/grpc/lb/v0/load_balancer.grpc.pb.cc
HYBRID_END2END_TEST_SRC = \
test/cpp/end2end/hybrid_end2end_test.cc \
@ -13019,7 +13110,7 @@ ifneq ($(OPENSSL_DEP),)
# installing headers to their final destination on the drive. We need this
# otherwise parallel compilation will fail if a source is compiled first.
src/core/httpcli/httpcli_security_connector.c: $(OPENSSL_DEP)
src/core/security/base64.c: $(OPENSSL_DEP)
src/core/security/b64.c: $(OPENSSL_DEP)
src/core/security/client_auth_filter.c: $(OPENSSL_DEP)
src/core/security/credentials.c: $(OPENSSL_DEP)
src/core/security/credentials_metadata.c: $(OPENSSL_DEP)
@ -13047,7 +13138,7 @@ src/cpp/common/secure_create_auth_context.cc: $(OPENSSL_DEP)
src/cpp/server/secure_server_credentials.cc: $(OPENSSL_DEP)
src/csharp/ext/grpc_csharp_ext.c: $(OPENSSL_DEP)
test/core/bad_client/bad_client.c: $(OPENSSL_DEP)
test/core/bad_ssl/server.c: $(OPENSSL_DEP)
test/core/bad_ssl/server_common.c: $(OPENSSL_DEP)
test/core/end2end/data/server1_cert.c: $(OPENSSL_DEP)
test/core/end2end/data/server1_key.c: $(OPENSSL_DEP)
test/core/end2end/data/test_root_cert.c: $(OPENSSL_DEP)
@ -13060,8 +13151,8 @@ test/cpp/end2end/test_service_impl.cc: $(OPENSSL_DEP)
test/cpp/interop/client.cc: $(OPENSSL_DEP)
test/cpp/interop/client_helper.cc: $(OPENSSL_DEP)
test/cpp/interop/interop_client.cc: $(OPENSSL_DEP)
test/cpp/interop/server.cc: $(OPENSSL_DEP)
test/cpp/interop/server_helper.cc: $(OPENSSL_DEP)
test/cpp/interop/server_main.cc: $(OPENSSL_DEP)
test/cpp/qps/client_async.cc: $(OPENSSL_DEP)
test/cpp/qps/client_sync.cc: $(OPENSSL_DEP)
test/cpp/qps/driver.cc: $(OPENSSL_DEP)
@ -13071,7 +13162,7 @@ test/cpp/qps/qps_worker.cc: $(OPENSSL_DEP)
test/cpp/qps/report.cc: $(OPENSSL_DEP)
test/cpp/qps/server_async.cc: $(OPENSSL_DEP)
test/cpp/qps/server_sync.cc: $(OPENSSL_DEP)
test/cpp/qps/timer.cc: $(OPENSSL_DEP)
test/cpp/qps/usage_timer.cc: $(OPENSSL_DEP)
test/cpp/util/benchmark_config.cc: $(OPENSSL_DEP)
test/cpp/util/byte_buffer_proto_helper.cc: $(OPENSSL_DEP)
test/cpp/util/cli_call.cc: $(OPENSSL_DEP)
@ -13083,3 +13174,7 @@ test/cpp/util/test_credentials_provider.cc: $(OPENSSL_DEP)
endif
.PHONY: all strip tools dep_error openssl_dep_error openssl_dep_message git_update stop buildtests buildtests_c buildtests_cxx test test_c test_cxx install install_c install_cxx install-headers install-headers_c install-headers_cxx install-shared install-shared_c install-shared_cxx install-static install-static_c install-static_cxx strip strip-shared strip-static strip_c strip-shared_c strip-static_c strip_cxx strip-shared_cxx strip-static_cxx dep_c dep_cxx bins_dep_c bins_dep_cxx clean
.PHONY: printvars
printvars:
@$(foreach V,$(sort $(.VARIABLES)), $(if $(filter-out environment% default automatic, $(origin $V)),$(warning $V=$($V) ($(value $V)))))

@ -1,4 +1,5 @@
graft src/python/grpcio/grpc
recursive-include src/python/grpcio/grpc *.c *.h *.py *.pyx *.pxd *.pxi *.python *.pem
recursive-exclude src/python/grpcio/grpc/_cython *.so *.pyd
graft src/python/grpcio/tests
graft src/core
graft include/grpc

@ -504,11 +504,9 @@
'src/core/support/env_linux.c',
'src/core/support/env_posix.c',
'src/core/support/env_win32.c',
'src/core/support/file.c',
'src/core/support/file_posix.c',
'src/core/support/file_win32.c',
'src/core/support/histogram.c',
'src/core/support/host_port.c',
'src/core/support/load_file.c',
'src/core/support/log.c',
'src/core/support/log_android.c',
'src/core/support/log_linux.c',
@ -534,6 +532,8 @@
'src/core/support/time_precise.c',
'src/core/support/time_win32.c',
'src/core/support/tls_pthread.c',
'src/core/support/tmpfile_posix.c',
'src/core/support/tmpfile_win32.c',
'src/core/support/wrap_memcpy.c',
],
"conditions": [
@ -574,6 +574,7 @@
'src/core/client_config/connector.c',
'src/core/client_config/default_initial_connect_string.c',
'src/core/client_config/initial_connect_string.c',
'src/core/client_config/lb_policies/load_balancer_api.c',
'src/core/client_config/lb_policies/pick_first.c',
'src/core/client_config/lb_policies/round_robin.c',
'src/core/client_config/lb_policy.c',
@ -588,7 +589,7 @@
'src/core/client_config/subchannel_factory.c',
'src/core/client_config/subchannel_index.c',
'src/core/client_config/uri_parser.c',
'src/core/compression/algorithm.c',
'src/core/compression/compression_algorithm.c',
'src/core/compression/message_compress.c',
'src/core/debug/trace.c',
'src/core/httpcli/format_request.c',
@ -638,6 +639,7 @@
'src/core/json/json_reader.c',
'src/core/json/json_string.c',
'src/core/json/json_writer.c',
'src/core/proto/grpc/lb/v0/load_balancer.pb.c',
'src/core/surface/alarm.c',
'src/core/surface/api_trace.c',
'src/core/surface/byte_buffer.c',
@ -689,7 +691,7 @@
'src/core/transport/transport.c',
'src/core/transport/transport_op_string.c',
'src/core/httpcli/httpcli_security_connector.c',
'src/core/security/base64.c',
'src/core/security/b64.c',
'src/core/security/client_auth_filter.c',
'src/core/security/credentials.c',
'src/core/security/credentials_metadata.c',
@ -715,6 +717,9 @@
'src/core/census/operation.c',
'src/core/census/placeholders.c',
'src/core/census/tracing.c',
'third_party/nanopb/pb_common.c',
'third_party/nanopb/pb_decode.c',
'third_party/nanopb/pb_encode.c',
],
"conditions": [
['OS == "mac"', {

@ -57,13 +57,14 @@ filegroups:
- src/core/profiling/timers.h
- src/core/support/block_annotate.h
- src/core/support/env.h
- src/core/support/file.h
- src/core/support/load_file.h
- src/core/support/murmur_hash.h
- src/core/support/stack_lockfree.h
- src/core/support/string.h
- src/core/support/string_win32.h
- src/core/support/thd_internal.h
- src/core/support/time_precise.h
- src/core/support/tmpfile.h
src:
- src/core/profiling/basic_timers.c
- src/core/profiling/stap_timers.c
@ -77,11 +78,9 @@ filegroups:
- src/core/support/env_linux.c
- src/core/support/env_posix.c
- src/core/support/env_win32.c
- src/core/support/file.c
- src/core/support/file_posix.c
- src/core/support/file_win32.c
- src/core/support/histogram.c
- src/core/support/host_port.c
- src/core/support/load_file.c
- src/core/support/log.c
- src/core/support/log_android.c
- src/core/support/log_linux.c
@ -107,6 +106,8 @@ filegroups:
- src/core/support/time_precise.c
- src/core/support/time_win32.c
- src/core/support/tls_pthread.c
- src/core/support/tmpfile_posix.c
- src/core/support/tmpfile_win32.c
- src/core/support/wrap_memcpy.c
- name: gpr_codegen
public_headers:
@ -183,7 +184,6 @@ filegroups:
- src/cpp/client/credentials.cc
- src/cpp/client/generic_stub.cc
- src/cpp/client/insecure_credentials.cc
- src/cpp/common/alarm.cc
- src/cpp/common/call.cc
- src/cpp/common/channel_arguments.cc
- src/cpp/common/completion_queue.cc
@ -260,6 +260,7 @@ filegroups:
- src/core/client_config/client_config.h
- src/core/client_config/connector.h
- src/core/client_config/initial_connect_string.h
- src/core/client_config/lb_policies/load_balancer_api.h
- src/core/client_config/lb_policies/pick_first.h
- src/core/client_config/lb_policies/round_robin.h
- src/core/client_config/lb_policy.h
@ -320,6 +321,7 @@ filegroups:
- src/core/json/json_common.h
- src/core/json/json_reader.h
- src/core/json/json_writer.h
- src/core/proto/grpc/lb/v0/load_balancer.pb.h
- src/core/statistics/census_interface.h
- src/core/statistics/census_rpc_stats.h
- src/core/surface/api_trace.h
@ -380,6 +382,7 @@ filegroups:
- src/core/client_config/connector.c
- src/core/client_config/default_initial_connect_string.c
- src/core/client_config/initial_connect_string.c
- src/core/client_config/lb_policies/load_balancer_api.c
- src/core/client_config/lb_policies/pick_first.c
- src/core/client_config/lb_policies/round_robin.c
- src/core/client_config/lb_policy.c
@ -394,7 +397,7 @@ filegroups:
- src/core/client_config/subchannel_factory.c
- src/core/client_config/subchannel_index.c
- src/core/client_config/uri_parser.c
- src/core/compression/algorithm.c
- src/core/compression/compression_algorithm.c
- src/core/compression/message_compress.c
- src/core/debug/trace.c
- src/core/httpcli/format_request.c
@ -444,6 +447,7 @@ filegroups:
- src/core/json/json_reader.c
- src/core/json/json_string.c
- src/core/json/json_writer.c
- src/core/proto/grpc/lb/v0/load_balancer.pb.c
- src/core/surface/alarm.c
- src/core/surface/api_trace.c
- src/core/surface/byte_buffer.c
@ -505,7 +509,7 @@ filegroups:
- name: grpc_secure
headers:
- src/core/security/auth_filters.h
- src/core/security/base64.h
- src/core/security/b64.h
- src/core/security/credentials.h
- src/core/security/handshake.h
- src/core/security/json_token.h
@ -520,7 +524,7 @@ filegroups:
- src/core/tsi/transport_security_interface.h
src:
- src/core/httpcli/httpcli_security_connector.c
- src/core/security/base64.c
- src/core/security/b64.c
- src/core/security/client_auth_filter.c
- src/core/security/credentials.c
- src/core/security/credentials_metadata.c
@ -558,6 +562,16 @@ filegroups:
- test/core/util/port_posix.c
- test/core/util/port_windows.c
- test/core/util/slice_splitter.c
- name: nanopb
headers:
- third_party/nanopb/pb.h
- third_party/nanopb/pb_common.h
- third_party/nanopb/pb_decode.h
- third_party/nanopb/pb_encode.h
src:
- third_party/nanopb/pb_common.c
- third_party/nanopb/pb_decode.c
- third_party/nanopb/pb_encode.c
libs:
- name: gpr
build: all
@ -593,6 +607,7 @@ libs:
- grpc_base
- grpc_secure
- census
- nanopb
secure: true
vs_packages:
- grpc.dependencies.openssl
@ -662,6 +677,7 @@ libs:
- grpc_base
- grpc_codegen
- census
- nanopb
secure: false
vs_project_guid: '{46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}'
- name: grpc_zookeeper
@ -808,6 +824,8 @@ libs:
- gpr_codegen
secure: false
vs_project_guid: '{B6E81D84-2ACB-41B8-8781-493A944C7817}'
vs_props:
- protoc
- name: interop_client_helper
build: private
language: c++
@ -861,7 +879,7 @@ libs:
- src/proto/grpc/testing/empty.proto
- src/proto/grpc/testing/messages.proto
- src/proto/grpc/testing/test.proto
- test/cpp/interop/server.cc
- test/cpp/interop/server_main.cc
deps:
- interop_server_helper
- grpc++_test_util
@ -885,7 +903,7 @@ libs:
- test/cpp/qps/report.h
- test/cpp/qps/server.h
- test/cpp/qps/stats.h
- test/cpp/qps/timer.h
- test/cpp/qps/usage_timer.h
- test/cpp/util/benchmark_config.h
src:
- src/proto/grpc/testing/messages.proto
@ -903,7 +921,7 @@ libs:
- test/cpp/qps/report.cc
- test/cpp/qps/server_async.cc
- test/cpp/qps/server_sync.cc
- test/cpp/qps/timer.cc
- test/cpp/qps/usage_timer.cc
- test/cpp/util/benchmark_config.cc
deps:
- grpc_test_util
@ -987,16 +1005,6 @@ targets:
- grpc
- gpr_test_util
- gpr
- name: census_log_test
build: test
language: c
src:
- test/core/census/mlog_test.c
deps:
- grpc_test_util
- grpc
- gpr_test_util
- gpr
- name: channel_create_test
build: test
language: c
@ -1218,27 +1226,27 @@ targets:
deps:
- gpr_test_util
- gpr
- name: gpr_file_test
- name: gpr_histogram_test
build: test
language: c
src:
- test/core/support/file_test.c
- test/core/support/histogram_test.c
deps:
- gpr_test_util
- gpr
- name: gpr_histogram_test
- name: gpr_host_port_test
build: test
language: c
src:
- test/core/support/histogram_test.c
- test/core/support/host_port_test.c
deps:
- gpr_test_util
- gpr
- name: gpr_host_port_test
- name: gpr_load_file_test
build: test
language: c
src:
- test/core/support/host_port_test.c
- test/core/support/load_file_test.c
deps:
- gpr_test_util
- gpr
@ -1335,11 +1343,11 @@ targets:
- grpc
- gpr_test_util
- gpr
- name: grpc_base64_test
- name: grpc_b64_test
build: test
language: c
src:
- test/core/security/base64_test.c
- test/core/security/b64_test.c
deps:
- grpc_test_util
- grpc
@ -1651,6 +1659,16 @@ targets:
- grpc
- gpr_test_util
- gpr
- name: mlog_test
build: test
language: c
src:
- test/core/census/mlog_test.c
deps:
- grpc_test_util
- grpc
- gpr_test_util
- gpr
- name: multiple_server_queues_test
build: test
language: c
@ -1943,6 +1961,7 @@ targets:
- linux
- posix
- name: alarm_cpp_test
gtest: true
build: test
language: c++
src:
@ -1955,6 +1974,7 @@ targets:
- gpr_test_util
- gpr
- name: async_end2end_test
gtest: true
build: test
language: c++
src:
@ -2001,6 +2021,7 @@ targets:
- linux
- posix
- name: auth_property_iterator_test
gtest: true
build: test
language: c++
src:
@ -2013,6 +2034,7 @@ targets:
- gpr_test_util
- gpr
- name: channel_arguments_test
gtest: true
build: test
language: c++
src:
@ -2022,6 +2044,7 @@ targets:
- grpc
- gpr
- name: cli_call_test
gtest: true
build: test
language: c++
src:
@ -2034,6 +2057,7 @@ targets:
- gpr_test_util
- gpr
- name: client_crash_test
gtest: true
cpu_cost: 0.1
build: test
language: c++
@ -2064,6 +2088,7 @@ targets:
- gpr_test_util
- gpr
- name: credentials_test
gtest: true
build: test
language: c++
src:
@ -2073,6 +2098,7 @@ targets:
- grpc
- gpr
- name: cxx_byte_buffer_test
gtest: true
build: test
language: c++
src:
@ -2084,6 +2110,7 @@ targets:
- gpr_test_util
- gpr
- name: cxx_slice_test
gtest: true
build: test
language: c++
src:
@ -2095,6 +2122,7 @@ targets:
- gpr_test_util
- gpr
- name: cxx_string_ref_test
gtest: true
build: test
language: c++
src:
@ -2102,6 +2130,7 @@ targets:
deps:
- grpc++
- name: cxx_time_test
gtest: true
build: test
language: c++
src:
@ -2113,6 +2142,7 @@ targets:
- gpr_test_util
- gpr
- name: end2end_test
gtest: true
cpu_cost: 0.5
build: test
language: c++
@ -2143,6 +2173,7 @@ targets:
- linux
- posix
- name: generic_end2end_test
gtest: true
build: test
language: c++
src:
@ -2218,7 +2249,20 @@ targets:
secure: false
vs_config_type: Application
vs_project_guid: '{069E9D05-B78B-4751-9252-D21EBAE7DE8E}'
- name: grpclb_api_test
gtest: true
build: test
language: c++
src:
- src/proto/grpc/lb/v0/load_balancer.proto
- test/cpp/grpclb/grpclb_api_test.cc
deps:
- grpc++_test_util
- grpc_test_util
- grpc++
- grpc
- name: hybrid_end2end_test
gtest: true
build: test
language: c++
src:
@ -2298,6 +2342,7 @@ targets:
- gpr
- grpc++_test_config
- name: mock_test
gtest: true
build: test
language: c++
src:
@ -2342,6 +2387,7 @@ targets:
- linux
- posix
- name: qps_openloop_test
cpu_cost: 10
build: test
language: c++
src:
@ -2374,8 +2420,6 @@ targets:
- gpr_test_util
- gpr
- grpc++_test_config
exclude_configs:
- tsan
platforms:
- mac
- linux
@ -2434,6 +2478,7 @@ targets:
- gpr
- grpc++_test_config
- name: secure_auth_context_test
gtest: true
build: test
language: c++
src:
@ -2463,6 +2508,7 @@ targets:
- linux
- posix
- name: server_crash_test
gtest: true
cpu_cost: 0.1
build: test
language: c++
@ -2493,6 +2539,7 @@ targets:
- gpr_test_util
- gpr
- name: shutdown_test
gtest: true
build: test
language: c++
src:
@ -2516,6 +2563,7 @@ targets:
- gpr_test_util
- gpr
- name: streaming_throughput_test
gtest: true
build: test
language: c++
src:
@ -2592,6 +2640,7 @@ targets:
- linux
- posix
- name: thread_stress_test
gtest: true
cpu_cost: 100
build: test
language: c++
@ -2605,6 +2654,7 @@ targets:
- gpr_test_util
- gpr
- name: zookeeper_test
gtest: true
build: test
run: false
language: c++
@ -2663,7 +2713,7 @@ configs:
test_environ:
ASAN_OPTIONS: detect_leaks=1:color=always
LSAN_OPTIONS: suppressions=tools/lsan_suppressions.txt:report_objects=1
timeout_multiplier: 1.5
timeout_multiplier: 3
asan-noleaks:
CC: clang
CPPFLAGS: -O0 -fsanitize=address -fno-omit-frame-pointer -Wno-unused-command-line-argument
@ -2675,7 +2725,7 @@ configs:
compile_the_world: true
test_environ:
ASAN_OPTIONS: detect_leaks=0:color=always
timeout_multiplier: 1.5
timeout_multiplier: 3
basicprof:
CPPFLAGS: -O2 -DGRPC_BASIC_PROFILER -DGRPC_TIMERS_RDTSC
DEFINES: NDEBUG
@ -2714,7 +2764,7 @@ configs:
-fPIE -pie $(if $(JENKINS_BUILD),-Wl$(comma)-Ttext-segment=0x7e0000000000,)
LDXX: clang++
compile_the_world: true
timeout_multiplier: 2
timeout_multiplier: 4
mutrace:
CPPFLAGS: -O0
DEFINES: _DEBUG DEBUG
@ -2736,7 +2786,7 @@ configs:
compile_the_world: true
test_environ:
TSAN_OPTIONS: suppressions=tools/tsan_suppressions.txt:halt_on_error=1:second_deadlock_stack=1
timeout_multiplier: 2
timeout_multiplier: 5
ubsan:
CC: clang
CPPFLAGS: -O1 -fsanitize=undefined -fno-omit-frame-pointer -Wno-unused-command-line-argument
@ -2795,6 +2845,37 @@ node_modules:
- src/node/ext/server.cc
- src/node/ext/server_credentials.cc
- src/node/ext/timeval.cc
openssl_fallback:
base_uri: http://openssl.org/source/
extraction_dir: openssl-1.0.2f
tarball: openssl-1.0.2f.tar.gz
php_config_m4:
deps:
- grpc
- gpr
- boringssl
headers:
- src/php/ext/grpc/byte_buffer.h
- src/php/ext/grpc/call.h
- src/php/ext/grpc/call_credentials.h
- src/php/ext/grpc/channel.h
- src/php/ext/grpc/channel_credentials.h
- src/php/ext/grpc/completion_queue.h
- src/php/ext/grpc/php_grpc.h
- src/php/ext/grpc/server.h
- src/php/ext/grpc/server_credentials.h
- src/php/ext/grpc/timeval.h
src:
- src/php/ext/grpc/byte_buffer.c
- src/php/ext/grpc/call.c
- src/php/ext/grpc/call_credentials.c
- src/php/ext/grpc/channel.c
- src/php/ext/grpc/channel_credentials.c
- src/php/ext/grpc/completion_queue.c
- src/php/ext/grpc/php_grpc.c
- src/php/ext/grpc/server.c
- src/php/ext/grpc/server_credentials.c
- src/php/ext/grpc/timeval.c
python_dependencies:
deps:
- grpc

@ -0,0 +1,608 @@
PHP_ARG_ENABLE(grpc, whether to enable grpc support,
[ --enable-grpc Enable grpc support])
if test "$PHP_GRPC" != "no"; then
dnl Write more examples of tests here...
dnl # --with-grpc -> add include path
PHP_ADD_INCLUDE(../../grpc/include)
PHP_ADD_INCLUDE(../../grpc/src/php/ext/grpc)
PHP_ADD_INCLUDE(../../grpc/third_party/boringssl/include)
LIBS="-lpthread $LIBS"
GRPC_SHARED_LIBADD="-lpthread $GRPC_SHARED_LIBADD"
PHP_ADD_LIBRARY(pthread)
PHP_ADD_LIBRARY(dl,,GRPC_SHARED_LIBADD)
PHP_ADD_LIBRARY(dl)
case $host in
*darwin*) ;;
*)
PHP_ADD_LIBRARY(rt,,GRPC_SHARED_LIBADD)
PHP_ADD_LIBRARY(rt)
;;
esac
PHP_NEW_EXTENSION(grpc,
src/php/ext/grpc/byte_buffer.c \
src/php/ext/grpc/call.c \
src/php/ext/grpc/call_credentials.c \
src/php/ext/grpc/channel.c \
src/php/ext/grpc/channel_credentials.c \
src/php/ext/grpc/completion_queue.c \
src/php/ext/grpc/php_grpc.c \
src/php/ext/grpc/server.c \
src/php/ext/grpc/server_credentials.c \
src/php/ext/grpc/timeval.c \
src/core/profiling/basic_timers.c \
src/core/profiling/stap_timers.c \
src/core/support/alloc.c \
src/core/support/avl.c \
src/core/support/cmdline.c \
src/core/support/cpu_iphone.c \
src/core/support/cpu_linux.c \
src/core/support/cpu_posix.c \
src/core/support/cpu_windows.c \
src/core/support/env_linux.c \
src/core/support/env_posix.c \
src/core/support/env_win32.c \
src/core/support/histogram.c \
src/core/support/host_port.c \
src/core/support/load_file.c \
src/core/support/log.c \
src/core/support/log_android.c \
src/core/support/log_linux.c \
src/core/support/log_posix.c \
src/core/support/log_win32.c \
src/core/support/murmur_hash.c \
src/core/support/slice.c \
src/core/support/slice_buffer.c \
src/core/support/stack_lockfree.c \
src/core/support/string.c \
src/core/support/string_posix.c \
src/core/support/string_win32.c \
src/core/support/subprocess_posix.c \
src/core/support/subprocess_windows.c \
src/core/support/sync.c \
src/core/support/sync_posix.c \
src/core/support/sync_win32.c \
src/core/support/thd.c \
src/core/support/thd_posix.c \
src/core/support/thd_win32.c \
src/core/support/time.c \
src/core/support/time_posix.c \
src/core/support/time_precise.c \
src/core/support/time_win32.c \
src/core/support/tls_pthread.c \
src/core/support/tmpfile_posix.c \
src/core/support/tmpfile_win32.c \
src/core/support/wrap_memcpy.c \
src/core/census/grpc_context.c \
src/core/census/grpc_filter.c \
src/core/census/grpc_plugin.c \
src/core/channel/channel_args.c \
src/core/channel/channel_stack.c \
src/core/channel/channel_stack_builder.c \
src/core/channel/client_channel.c \
src/core/channel/client_uchannel.c \
src/core/channel/compress_filter.c \
src/core/channel/connected_channel.c \
src/core/channel/http_client_filter.c \
src/core/channel/http_server_filter.c \
src/core/channel/subchannel_call_holder.c \
src/core/client_config/client_config.c \
src/core/client_config/connector.c \
src/core/client_config/default_initial_connect_string.c \
src/core/client_config/initial_connect_string.c \
src/core/client_config/lb_policies/load_balancer_api.c \
src/core/client_config/lb_policies/pick_first.c \
src/core/client_config/lb_policies/round_robin.c \
src/core/client_config/lb_policy.c \
src/core/client_config/lb_policy_factory.c \
src/core/client_config/lb_policy_registry.c \
src/core/client_config/resolver.c \
src/core/client_config/resolver_factory.c \
src/core/client_config/resolver_registry.c \
src/core/client_config/resolvers/dns_resolver.c \
src/core/client_config/resolvers/sockaddr_resolver.c \
src/core/client_config/subchannel.c \
src/core/client_config/subchannel_factory.c \
src/core/client_config/subchannel_index.c \
src/core/client_config/uri_parser.c \
src/core/compression/compression_algorithm.c \
src/core/compression/message_compress.c \
src/core/debug/trace.c \
src/core/httpcli/format_request.c \
src/core/httpcli/httpcli.c \
src/core/httpcli/parser.c \
src/core/iomgr/closure.c \
src/core/iomgr/endpoint.c \
src/core/iomgr/endpoint_pair_posix.c \
src/core/iomgr/endpoint_pair_windows.c \
src/core/iomgr/exec_ctx.c \
src/core/iomgr/executor.c \
src/core/iomgr/fd_posix.c \
src/core/iomgr/iocp_windows.c \
src/core/iomgr/iomgr.c \
src/core/iomgr/iomgr_posix.c \
src/core/iomgr/iomgr_windows.c \
src/core/iomgr/pollset_multipoller_with_epoll.c \
src/core/iomgr/pollset_multipoller_with_poll_posix.c \
src/core/iomgr/pollset_posix.c \
src/core/iomgr/pollset_set_posix.c \
src/core/iomgr/pollset_set_windows.c \
src/core/iomgr/pollset_windows.c \
src/core/iomgr/resolve_address_posix.c \
src/core/iomgr/resolve_address_windows.c \
src/core/iomgr/sockaddr_utils.c \
src/core/iomgr/socket_utils_common_posix.c \
src/core/iomgr/socket_utils_linux.c \
src/core/iomgr/socket_utils_posix.c \
src/core/iomgr/socket_windows.c \
src/core/iomgr/tcp_client_posix.c \
src/core/iomgr/tcp_client_windows.c \
src/core/iomgr/tcp_posix.c \
src/core/iomgr/tcp_server_posix.c \
src/core/iomgr/tcp_server_windows.c \
src/core/iomgr/tcp_windows.c \
src/core/iomgr/time_averaged_stats.c \
src/core/iomgr/timer.c \
src/core/iomgr/timer_heap.c \
src/core/iomgr/udp_server.c \
src/core/iomgr/wakeup_fd_eventfd.c \
src/core/iomgr/wakeup_fd_nospecial.c \
src/core/iomgr/wakeup_fd_pipe.c \
src/core/iomgr/wakeup_fd_posix.c \
src/core/iomgr/workqueue_posix.c \
src/core/iomgr/workqueue_windows.c \
src/core/json/json.c \
src/core/json/json_reader.c \
src/core/json/json_string.c \
src/core/json/json_writer.c \
src/core/proto/grpc/lb/v0/load_balancer.pb.c \
src/core/surface/alarm.c \
src/core/surface/api_trace.c \
src/core/surface/byte_buffer.c \
src/core/surface/byte_buffer_reader.c \
src/core/surface/call.c \
src/core/surface/call_details.c \
src/core/surface/call_log_batch.c \
src/core/surface/channel.c \
src/core/surface/channel_connectivity.c \
src/core/surface/channel_create.c \
src/core/surface/channel_init.c \
src/core/surface/channel_ping.c \
src/core/surface/channel_stack_type.c \
src/core/surface/completion_queue.c \
src/core/surface/event_string.c \
src/core/surface/init.c \
src/core/surface/lame_client.c \
src/core/surface/metadata_array.c \
src/core/surface/server.c \
src/core/surface/server_chttp2.c \
src/core/surface/validate_metadata.c \
src/core/surface/version.c \
src/core/transport/byte_stream.c \
src/core/transport/chttp2/alpn.c \
src/core/transport/chttp2/bin_encoder.c \
src/core/transport/chttp2/frame_data.c \
src/core/transport/chttp2/frame_goaway.c \
src/core/transport/chttp2/frame_ping.c \
src/core/transport/chttp2/frame_rst_stream.c \
src/core/transport/chttp2/frame_settings.c \
src/core/transport/chttp2/frame_window_update.c \
src/core/transport/chttp2/hpack_encoder.c \
src/core/transport/chttp2/hpack_parser.c \
src/core/transport/chttp2/hpack_table.c \
src/core/transport/chttp2/huffsyms.c \
src/core/transport/chttp2/incoming_metadata.c \
src/core/transport/chttp2/parsing.c \
src/core/transport/chttp2/status_conversion.c \
src/core/transport/chttp2/stream_lists.c \
src/core/transport/chttp2/stream_map.c \
src/core/transport/chttp2/timeout_encoding.c \
src/core/transport/chttp2/varint.c \
src/core/transport/chttp2/writing.c \
src/core/transport/chttp2_transport.c \
src/core/transport/connectivity_state.c \
src/core/transport/metadata.c \
src/core/transport/metadata_batch.c \
src/core/transport/static_metadata.c \
src/core/transport/transport.c \
src/core/transport/transport_op_string.c \
src/core/httpcli/httpcli_security_connector.c \
src/core/security/b64.c \
src/core/security/client_auth_filter.c \
src/core/security/credentials.c \
src/core/security/credentials_metadata.c \
src/core/security/credentials_posix.c \
src/core/security/credentials_win32.c \
src/core/security/google_default_credentials.c \
src/core/security/handshake.c \
src/core/security/json_token.c \
src/core/security/jwt_verifier.c \
src/core/security/secure_endpoint.c \
src/core/security/security_connector.c \
src/core/security/security_context.c \
src/core/security/server_auth_filter.c \
src/core/security/server_secure_chttp2.c \
src/core/surface/init_secure.c \
src/core/surface/secure_channel_create.c \
src/core/tsi/fake_transport_security.c \
src/core/tsi/ssl_transport_security.c \
src/core/tsi/transport_security.c \
src/core/census/context.c \
src/core/census/initialize.c \
src/core/census/mlog.c \
src/core/census/operation.c \
src/core/census/placeholders.c \
src/core/census/tracing.c \
third_party/nanopb/pb_common.c \
third_party/nanopb/pb_decode.c \
third_party/nanopb/pb_encode.c \
src/boringssl/err_data.c \
third_party/boringssl/crypto/aes/aes.c \
third_party/boringssl/crypto/aes/mode_wrappers.c \
third_party/boringssl/crypto/asn1/a_bitstr.c \
third_party/boringssl/crypto/asn1/a_bool.c \
third_party/boringssl/crypto/asn1/a_bytes.c \
third_party/boringssl/crypto/asn1/a_d2i_fp.c \
third_party/boringssl/crypto/asn1/a_dup.c \
third_party/boringssl/crypto/asn1/a_enum.c \
third_party/boringssl/crypto/asn1/a_gentm.c \
third_party/boringssl/crypto/asn1/a_i2d_fp.c \
third_party/boringssl/crypto/asn1/a_int.c \
third_party/boringssl/crypto/asn1/a_mbstr.c \
third_party/boringssl/crypto/asn1/a_object.c \
third_party/boringssl/crypto/asn1/a_octet.c \
third_party/boringssl/crypto/asn1/a_print.c \
third_party/boringssl/crypto/asn1/a_strnid.c \
third_party/boringssl/crypto/asn1/a_time.c \
third_party/boringssl/crypto/asn1/a_type.c \
third_party/boringssl/crypto/asn1/a_utctm.c \
third_party/boringssl/crypto/asn1/a_utf8.c \
third_party/boringssl/crypto/asn1/asn1_lib.c \
third_party/boringssl/crypto/asn1/asn1_par.c \
third_party/boringssl/crypto/asn1/asn_pack.c \
third_party/boringssl/crypto/asn1/bio_asn1.c \
third_party/boringssl/crypto/asn1/bio_ndef.c \
third_party/boringssl/crypto/asn1/f_enum.c \
third_party/boringssl/crypto/asn1/f_int.c \
third_party/boringssl/crypto/asn1/f_string.c \
third_party/boringssl/crypto/asn1/t_bitst.c \
third_party/boringssl/crypto/asn1/t_pkey.c \
third_party/boringssl/crypto/asn1/tasn_dec.c \
third_party/boringssl/crypto/asn1/tasn_enc.c \
third_party/boringssl/crypto/asn1/tasn_fre.c \
third_party/boringssl/crypto/asn1/tasn_new.c \
third_party/boringssl/crypto/asn1/tasn_prn.c \
third_party/boringssl/crypto/asn1/tasn_typ.c \
third_party/boringssl/crypto/asn1/tasn_utl.c \
third_party/boringssl/crypto/asn1/x_bignum.c \
third_party/boringssl/crypto/asn1/x_long.c \
third_party/boringssl/crypto/base64/base64.c \
third_party/boringssl/crypto/bio/bio.c \
third_party/boringssl/crypto/bio/bio_mem.c \
third_party/boringssl/crypto/bio/buffer.c \
third_party/boringssl/crypto/bio/connect.c \
third_party/boringssl/crypto/bio/fd.c \
third_party/boringssl/crypto/bio/file.c \
third_party/boringssl/crypto/bio/hexdump.c \
third_party/boringssl/crypto/bio/pair.c \
third_party/boringssl/crypto/bio/printf.c \
third_party/boringssl/crypto/bio/socket.c \
third_party/boringssl/crypto/bio/socket_helper.c \
third_party/boringssl/crypto/bn/add.c \
third_party/boringssl/crypto/bn/asm/x86_64-gcc.c \
third_party/boringssl/crypto/bn/bn.c \
third_party/boringssl/crypto/bn/bn_asn1.c \
third_party/boringssl/crypto/bn/cmp.c \
third_party/boringssl/crypto/bn/convert.c \
third_party/boringssl/crypto/bn/ctx.c \
third_party/boringssl/crypto/bn/div.c \
third_party/boringssl/crypto/bn/exponentiation.c \
third_party/boringssl/crypto/bn/gcd.c \
third_party/boringssl/crypto/bn/generic.c \
third_party/boringssl/crypto/bn/kronecker.c \
third_party/boringssl/crypto/bn/montgomery.c \
third_party/boringssl/crypto/bn/mul.c \
third_party/boringssl/crypto/bn/prime.c \
third_party/boringssl/crypto/bn/random.c \
third_party/boringssl/crypto/bn/rsaz_exp.c \
third_party/boringssl/crypto/bn/shift.c \
third_party/boringssl/crypto/bn/sqrt.c \
third_party/boringssl/crypto/buf/buf.c \
third_party/boringssl/crypto/bytestring/ber.c \
third_party/boringssl/crypto/bytestring/cbb.c \
third_party/boringssl/crypto/bytestring/cbs.c \
third_party/boringssl/crypto/chacha/chacha_generic.c \
third_party/boringssl/crypto/chacha/chacha_vec.c \
third_party/boringssl/crypto/cipher/aead.c \
third_party/boringssl/crypto/cipher/cipher.c \
third_party/boringssl/crypto/cipher/derive_key.c \
third_party/boringssl/crypto/cipher/e_aes.c \
third_party/boringssl/crypto/cipher/e_chacha20poly1305.c \
third_party/boringssl/crypto/cipher/e_des.c \
third_party/boringssl/crypto/cipher/e_null.c \
third_party/boringssl/crypto/cipher/e_rc2.c \
third_party/boringssl/crypto/cipher/e_rc4.c \
third_party/boringssl/crypto/cipher/e_ssl3.c \
third_party/boringssl/crypto/cipher/e_tls.c \
third_party/boringssl/crypto/cipher/tls_cbc.c \
third_party/boringssl/crypto/cmac/cmac.c \
third_party/boringssl/crypto/conf/conf.c \
third_party/boringssl/crypto/cpu-arm.c \
third_party/boringssl/crypto/cpu-intel.c \
third_party/boringssl/crypto/crypto.c \
third_party/boringssl/crypto/curve25519/curve25519.c \
third_party/boringssl/crypto/des/des.c \
third_party/boringssl/crypto/dh/check.c \
third_party/boringssl/crypto/dh/dh.c \
third_party/boringssl/crypto/dh/dh_asn1.c \
third_party/boringssl/crypto/dh/params.c \
third_party/boringssl/crypto/digest/digest.c \
third_party/boringssl/crypto/digest/digests.c \
third_party/boringssl/crypto/directory_posix.c \
third_party/boringssl/crypto/directory_win.c \
third_party/boringssl/crypto/dsa/dsa.c \
third_party/boringssl/crypto/dsa/dsa_asn1.c \
third_party/boringssl/crypto/ec/ec.c \
third_party/boringssl/crypto/ec/ec_asn1.c \
third_party/boringssl/crypto/ec/ec_key.c \
third_party/boringssl/crypto/ec/ec_montgomery.c \
third_party/boringssl/crypto/ec/oct.c \
third_party/boringssl/crypto/ec/p224-64.c \
third_party/boringssl/crypto/ec/p256-64.c \
third_party/boringssl/crypto/ec/p256-x86_64.c \
third_party/boringssl/crypto/ec/simple.c \
third_party/boringssl/crypto/ec/util-64.c \
third_party/boringssl/crypto/ec/wnaf.c \
third_party/boringssl/crypto/ecdh/ecdh.c \
third_party/boringssl/crypto/ecdsa/ecdsa.c \
third_party/boringssl/crypto/ecdsa/ecdsa_asn1.c \
third_party/boringssl/crypto/engine/engine.c \
third_party/boringssl/crypto/err/err.c \
third_party/boringssl/crypto/evp/algorithm.c \
third_party/boringssl/crypto/evp/digestsign.c \
third_party/boringssl/crypto/evp/evp.c \
third_party/boringssl/crypto/evp/evp_asn1.c \
third_party/boringssl/crypto/evp/evp_ctx.c \
third_party/boringssl/crypto/evp/p_dsa_asn1.c \
third_party/boringssl/crypto/evp/p_ec.c \
third_party/boringssl/crypto/evp/p_ec_asn1.c \
third_party/boringssl/crypto/evp/p_rsa.c \
third_party/boringssl/crypto/evp/p_rsa_asn1.c \
third_party/boringssl/crypto/evp/pbkdf.c \
third_party/boringssl/crypto/evp/sign.c \
third_party/boringssl/crypto/ex_data.c \
third_party/boringssl/crypto/hkdf/hkdf.c \
third_party/boringssl/crypto/hmac/hmac.c \
third_party/boringssl/crypto/lhash/lhash.c \
third_party/boringssl/crypto/md4/md4.c \
third_party/boringssl/crypto/md5/md5.c \
third_party/boringssl/crypto/mem.c \
third_party/boringssl/crypto/modes/cbc.c \
third_party/boringssl/crypto/modes/cfb.c \
third_party/boringssl/crypto/modes/ctr.c \
third_party/boringssl/crypto/modes/gcm.c \
third_party/boringssl/crypto/modes/ofb.c \
third_party/boringssl/crypto/obj/obj.c \
third_party/boringssl/crypto/obj/obj_xref.c \
third_party/boringssl/crypto/pem/pem_all.c \
third_party/boringssl/crypto/pem/pem_info.c \
third_party/boringssl/crypto/pem/pem_lib.c \
third_party/boringssl/crypto/pem/pem_oth.c \
third_party/boringssl/crypto/pem/pem_pk8.c \
third_party/boringssl/crypto/pem/pem_pkey.c \
third_party/boringssl/crypto/pem/pem_x509.c \
third_party/boringssl/crypto/pem/pem_xaux.c \
third_party/boringssl/crypto/pkcs8/p5_pbe.c \
third_party/boringssl/crypto/pkcs8/p5_pbev2.c \
third_party/boringssl/crypto/pkcs8/p8_pkey.c \
third_party/boringssl/crypto/pkcs8/pkcs8.c \
third_party/boringssl/crypto/poly1305/poly1305.c \
third_party/boringssl/crypto/poly1305/poly1305_arm.c \
third_party/boringssl/crypto/poly1305/poly1305_vec.c \
third_party/boringssl/crypto/rand/rand.c \
third_party/boringssl/crypto/rand/urandom.c \
third_party/boringssl/crypto/rand/windows.c \
third_party/boringssl/crypto/rc4/rc4.c \
third_party/boringssl/crypto/refcount_c11.c \
third_party/boringssl/crypto/refcount_lock.c \
third_party/boringssl/crypto/rsa/blinding.c \
third_party/boringssl/crypto/rsa/padding.c \
third_party/boringssl/crypto/rsa/rsa.c \
third_party/boringssl/crypto/rsa/rsa_asn1.c \
third_party/boringssl/crypto/rsa/rsa_impl.c \
third_party/boringssl/crypto/sha/sha1.c \
third_party/boringssl/crypto/sha/sha256.c \
third_party/boringssl/crypto/sha/sha512.c \
third_party/boringssl/crypto/stack/stack.c \
third_party/boringssl/crypto/thread.c \
third_party/boringssl/crypto/thread_none.c \
third_party/boringssl/crypto/thread_pthread.c \
third_party/boringssl/crypto/thread_win.c \
third_party/boringssl/crypto/time_support.c \
third_party/boringssl/crypto/x509/a_digest.c \
third_party/boringssl/crypto/x509/a_sign.c \
third_party/boringssl/crypto/x509/a_strex.c \
third_party/boringssl/crypto/x509/a_verify.c \
third_party/boringssl/crypto/x509/asn1_gen.c \
third_party/boringssl/crypto/x509/by_dir.c \
third_party/boringssl/crypto/x509/by_file.c \
third_party/boringssl/crypto/x509/i2d_pr.c \
third_party/boringssl/crypto/x509/pkcs7.c \
third_party/boringssl/crypto/x509/t_crl.c \
third_party/boringssl/crypto/x509/t_req.c \
third_party/boringssl/crypto/x509/t_x509.c \
third_party/boringssl/crypto/x509/t_x509a.c \
third_party/boringssl/crypto/x509/x509.c \
third_party/boringssl/crypto/x509/x509_att.c \
third_party/boringssl/crypto/x509/x509_cmp.c \
third_party/boringssl/crypto/x509/x509_d2.c \
third_party/boringssl/crypto/x509/x509_def.c \
third_party/boringssl/crypto/x509/x509_ext.c \
third_party/boringssl/crypto/x509/x509_lu.c \
third_party/boringssl/crypto/x509/x509_obj.c \
third_party/boringssl/crypto/x509/x509_r2x.c \
third_party/boringssl/crypto/x509/x509_req.c \
third_party/boringssl/crypto/x509/x509_set.c \
third_party/boringssl/crypto/x509/x509_trs.c \
third_party/boringssl/crypto/x509/x509_txt.c \
third_party/boringssl/crypto/x509/x509_v3.c \
third_party/boringssl/crypto/x509/x509_vfy.c \
third_party/boringssl/crypto/x509/x509_vpm.c \
third_party/boringssl/crypto/x509/x509cset.c \
third_party/boringssl/crypto/x509/x509name.c \
third_party/boringssl/crypto/x509/x509rset.c \
third_party/boringssl/crypto/x509/x509spki.c \
third_party/boringssl/crypto/x509/x509type.c \
third_party/boringssl/crypto/x509/x_algor.c \
third_party/boringssl/crypto/x509/x_all.c \
third_party/boringssl/crypto/x509/x_attrib.c \
third_party/boringssl/crypto/x509/x_crl.c \
third_party/boringssl/crypto/x509/x_exten.c \
third_party/boringssl/crypto/x509/x_info.c \
third_party/boringssl/crypto/x509/x_name.c \
third_party/boringssl/crypto/x509/x_pkey.c \
third_party/boringssl/crypto/x509/x_pubkey.c \
third_party/boringssl/crypto/x509/x_req.c \
third_party/boringssl/crypto/x509/x_sig.c \
third_party/boringssl/crypto/x509/x_spki.c \
third_party/boringssl/crypto/x509/x_val.c \
third_party/boringssl/crypto/x509/x_x509.c \
third_party/boringssl/crypto/x509/x_x509a.c \
third_party/boringssl/crypto/x509v3/pcy_cache.c \
third_party/boringssl/crypto/x509v3/pcy_data.c \
third_party/boringssl/crypto/x509v3/pcy_lib.c \
third_party/boringssl/crypto/x509v3/pcy_map.c \
third_party/boringssl/crypto/x509v3/pcy_node.c \
third_party/boringssl/crypto/x509v3/pcy_tree.c \
third_party/boringssl/crypto/x509v3/v3_akey.c \
third_party/boringssl/crypto/x509v3/v3_akeya.c \
third_party/boringssl/crypto/x509v3/v3_alt.c \
third_party/boringssl/crypto/x509v3/v3_bcons.c \
third_party/boringssl/crypto/x509v3/v3_bitst.c \
third_party/boringssl/crypto/x509v3/v3_conf.c \
third_party/boringssl/crypto/x509v3/v3_cpols.c \
third_party/boringssl/crypto/x509v3/v3_crld.c \
third_party/boringssl/crypto/x509v3/v3_enum.c \
third_party/boringssl/crypto/x509v3/v3_extku.c \
third_party/boringssl/crypto/x509v3/v3_genn.c \
third_party/boringssl/crypto/x509v3/v3_ia5.c \
third_party/boringssl/crypto/x509v3/v3_info.c \
third_party/boringssl/crypto/x509v3/v3_int.c \
third_party/boringssl/crypto/x509v3/v3_lib.c \
third_party/boringssl/crypto/x509v3/v3_ncons.c \
third_party/boringssl/crypto/x509v3/v3_pci.c \
third_party/boringssl/crypto/x509v3/v3_pcia.c \
third_party/boringssl/crypto/x509v3/v3_pcons.c \
third_party/boringssl/crypto/x509v3/v3_pku.c \
third_party/boringssl/crypto/x509v3/v3_pmaps.c \
third_party/boringssl/crypto/x509v3/v3_prn.c \
third_party/boringssl/crypto/x509v3/v3_purp.c \
third_party/boringssl/crypto/x509v3/v3_skey.c \
third_party/boringssl/crypto/x509v3/v3_sxnet.c \
third_party/boringssl/crypto/x509v3/v3_utl.c \
third_party/boringssl/ssl/custom_extensions.c \
third_party/boringssl/ssl/d1_both.c \
third_party/boringssl/ssl/d1_clnt.c \
third_party/boringssl/ssl/d1_lib.c \
third_party/boringssl/ssl/d1_meth.c \
third_party/boringssl/ssl/d1_pkt.c \
third_party/boringssl/ssl/d1_srtp.c \
third_party/boringssl/ssl/d1_srvr.c \
third_party/boringssl/ssl/dtls_record.c \
third_party/boringssl/ssl/pqueue/pqueue.c \
third_party/boringssl/ssl/s3_both.c \
third_party/boringssl/ssl/s3_clnt.c \
third_party/boringssl/ssl/s3_enc.c \
third_party/boringssl/ssl/s3_lib.c \
third_party/boringssl/ssl/s3_meth.c \
third_party/boringssl/ssl/s3_pkt.c \
third_party/boringssl/ssl/s3_srvr.c \
third_party/boringssl/ssl/ssl_aead_ctx.c \
third_party/boringssl/ssl/ssl_asn1.c \
third_party/boringssl/ssl/ssl_buffer.c \
third_party/boringssl/ssl/ssl_cert.c \
third_party/boringssl/ssl/ssl_cipher.c \
third_party/boringssl/ssl/ssl_file.c \
third_party/boringssl/ssl/ssl_lib.c \
third_party/boringssl/ssl/ssl_rsa.c \
third_party/boringssl/ssl/ssl_session.c \
third_party/boringssl/ssl/ssl_stat.c \
third_party/boringssl/ssl/t1_enc.c \
third_party/boringssl/ssl/t1_lib.c \
third_party/boringssl/ssl/tls_record.c \
, $ext_shared, , -Wall -Werror -std=c11 \
-fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN \
-D_HAS_EXCEPTIONS=0 -DNOMINMAX)
PHP_ADD_BUILD_DIR($ext_builddir/src/php/ext/grpc)
PHP_ADD_BUILD_DIR($ext_builddir/src/boringssl)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/census)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/channel)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/client_config)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/client_config/lb_policies)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/client_config/resolvers)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/compression)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/debug)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/httpcli)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/iomgr)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/json)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/profiling)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/proto/grpc/lb/v0)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/security)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/support)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/surface)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/transport)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/transport/chttp2)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/tsi)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/aes)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/asn1)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/base64)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/bio)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/bn)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/bn/asm)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/buf)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/bytestring)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/chacha)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/cipher)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/cmac)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/conf)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/curve25519)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/des)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/dh)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/digest)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/dsa)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/ec)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/ecdh)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/ecdsa)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/engine)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/err)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/evp)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/hkdf)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/hmac)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/lhash)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/md4)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/md5)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/modes)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/obj)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/pem)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/pkcs8)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/poly1305)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/rand)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/rc4)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/rsa)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/sha)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/stack)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/x509)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/x509v3)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/ssl)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/ssl/pqueue)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/nanopb)
fi

@ -26,7 +26,7 @@ The server should export a service defined in the following proto:
```
syntax = "proto3";
package grpc.health.v1alpha;
package grpc.health.v1;
message HealthCheckRequest {
string service = 1;
@ -49,7 +49,7 @@ service Health {
A client can query the server’s health status by calling the `Check` method, and
a deadline should be set on the rpc. The client can optionally set the service
name it wants to query for health status. The suggested format of service name
is `package_names.ServiceName`, such as `grpc.health.v1alpha.Health`.
is `package_names.ServiceName`, such as `grpc.health.v1.Health`.
The server should register all the services manually and set
the individual status, including an empty service name and its status. For each

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Grpc.Tools" version="0.12.0" />
<package id="Grpc.Tools" version="0.13.0" />
</packages>

@ -10,7 +10,7 @@
<RootNamespace>Greeter</RootNamespace>
<AssemblyName>Greeter</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<NuGetPackageImportStamp>4eea1d1c</NuGetPackageImportStamp>
<NuGetPackageImportStamp>39f4a691</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -31,15 +31,18 @@
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<ItemGroup>
<Reference Include="Google.Protobuf">
<HintPath>..\packages\Google.Protobuf.3.0.0-alpha4\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
<Reference Include="Google.Protobuf, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Google.Protobuf.3.0.0-beta2\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
</Reference>
<Reference Include="Grpc.Core">
<HintPath>..\packages\Grpc.Core.0.12.0\lib\net45\Grpc.Core.dll</HintPath>
<Reference Include="Grpc.Core, Version=0.13.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Grpc.Core.0.13.0\lib\net45\Grpc.Core.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Interactive.Async">
<HintPath>..\packages\Ix-Async.1.2.3\lib\net45\System.Interactive.Async.dll</HintPath>
<Reference Include="System.Interactive.Async, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Ix-Async.1.2.5\lib\net45\System.Interactive.Async.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
@ -53,15 +56,11 @@
<None Include="protos\helloworld.proto" />
</ItemGroup>
<ItemGroup />
<Import Project="..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets" Condition="Exists('..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets')" />
<Import Project="..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets" Condition="Exists('..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets'))" />
<Error Condition="!Exists('..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets'))" />
<Error Condition="!Exists('..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets'))" />
<Error Condition="!Exists('..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets'))" />
</Target>
<Import Project="..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets" Condition="Exists('..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets')" />
<Import Project="..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets" Condition="Exists('..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" />
</Project>

@ -9,41 +9,46 @@ using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace Helloworld {
/// <summary>Holder for reflection information generated from helloworld.proto</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public static partial class Helloworld {
public static partial class HelloworldReflection {
#region Descriptor
/// <summary>File descriptor for helloworld.proto</summary>
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;
static Helloworld() {
static HelloworldReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"ChBoZWxsb3dvcmxkLnByb3RvEgpoZWxsb3dvcmxkIhwKDEhlbGxvUmVxdWVz",
"dBIMCgRuYW1lGAEgASgJIh0KCkhlbGxvUmVwbHkSDwoHbWVzc2FnZRgBIAEo",
"CTJJCgdHcmVldGVyEj4KCFNheUhlbGxvEhguaGVsbG93b3JsZC5IZWxsb1Jl",
"cXVlc3QaFi5oZWxsb3dvcmxkLkhlbGxvUmVwbHkiAEIYChBpby5ncnBjLmV4",
"ChBoZWxsb3dvcmxkLnByb3RvEgpoZWxsb3dvcmxkIhwKDEhlbGxvUmVxdWVz",
"dBIMCgRuYW1lGAEgASgJIh0KCkhlbGxvUmVwbHkSDwoHbWVzc2FnZRgBIAEo",
"CTJJCgdHcmVldGVyEj4KCFNheUhlbGxvEhguaGVsbG93b3JsZC5IZWxsb1Jl",
"cXVlc3QaFi5oZWxsb3dvcmxkLkhlbGxvUmVwbHkiAEIYChBpby5ncnBjLmV4",
"YW1wbGVzogIDSExXYgZwcm90bzM="));
descriptor = pbr::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedCodeInfo(null, new pbr::GeneratedCodeInfo[] {
new pbr::GeneratedCodeInfo(typeof(global::Helloworld.HelloRequest), new[]{ "Name" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Helloworld.HelloReply), new[]{ "Message" }, null, null, null)
new pbr::GeneratedCodeInfo(typeof(global::Helloworld.HelloRequest), global::Helloworld.HelloRequest.Parser, new[]{ "Name" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Helloworld.HelloReply), global::Helloworld.HelloReply.Parser, new[]{ "Message" }, null, null, null)
}));
}
#endregion
}
#region Messages
/// <summary>
/// The request message containing the user's name.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class HelloRequest : pb::IMessage<HelloRequest> {
private static readonly pb::MessageParser<HelloRequest> _parser = new pb::MessageParser<HelloRequest>(() => new HelloRequest());
public static pb::MessageParser<HelloRequest> Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
get { return global::Helloworld.Helloworld.Descriptor.MessageTypes[0]; }
get { return global::Helloworld.HelloworldReflection.Descriptor.MessageTypes[0]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
@ -64,6 +69,7 @@ namespace Helloworld {
return new HelloRequest(this);
}
/// <summary>Field number for the "name" field.</summary>
public const int NameFieldNumber = 1;
private string name_ = "";
public string Name {
@ -95,7 +101,7 @@ namespace Helloworld {
}
public override string ToString() {
return pb::JsonFormatter.Default.Format(this);
return pb::JsonFormatter.ToDiagnosticString(this);
}
public void WriteTo(pb::CodedOutputStream output) {
@ -139,13 +145,16 @@ namespace Helloworld {
}
/// <summary>
/// The response message containing the greetings
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class HelloReply : pb::IMessage<HelloReply> {
private static readonly pb::MessageParser<HelloReply> _parser = new pb::MessageParser<HelloReply>(() => new HelloReply());
public static pb::MessageParser<HelloReply> Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
get { return global::Helloworld.Helloworld.Descriptor.MessageTypes[1]; }
get { return global::Helloworld.HelloworldReflection.Descriptor.MessageTypes[1]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
@ -166,6 +175,7 @@ namespace Helloworld {
return new HelloReply(this);
}
/// <summary>Field number for the "message" field.</summary>
public const int MessageFieldNumber = 1;
private string message_ = "";
public string Message {
@ -197,7 +207,7 @@ namespace Helloworld {
}
public override string ToString() {
return pb::JsonFormatter.Default.Format(this);
return pb::JsonFormatter.ToDiagnosticString(this);
}
public void WriteTo(pb::CodedOutputStream output) {

@ -25,7 +25,7 @@ namespace Helloworld {
// service descriptor
public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
{
get { return global::Helloworld.Helloworld.Descriptor.Services[0]; }
get { return global::Helloworld.HelloworldReflection.Descriptor.Services[0]; }
}
// client interface

@ -1,10 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Google.Protobuf" version="3.0.0-alpha4" targetFramework="net45" />
<package id="Grpc" version="0.12.0" targetFramework="net45" />
<package id="Grpc.Core" version="0.12.0" targetFramework="net45" />
<package id="grpc.dependencies.openssl.redist" version="1.0.204.1" targetFramework="net45" />
<package id="grpc.dependencies.zlib.redist" version="1.2.8.10" targetFramework="net45" />
<package id="grpc.native.csharp" version="0.12.0" targetFramework="net45" />
<package id="Ix-Async" version="1.2.3" targetFramework="net45" />
<package id="Google.Protobuf" version="3.0.0-beta2" targetFramework="net45" />
<package id="Grpc" version="0.13.0" targetFramework="net45" />
<package id="Grpc.Core" version="0.13.0" targetFramework="net45" />
<package id="grpc.native.csharp" version="0.13.0" targetFramework="net45" />
<package id="Ix-Async" version="1.2.5" targetFramework="net45" />
</packages>

@ -10,7 +10,7 @@
<RootNamespace>GreeterClient</RootNamespace>
<AssemblyName>GreeterClient</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<NuGetPackageImportStamp>29206d49</NuGetPackageImportStamp>
<NuGetPackageImportStamp>dcebbc77</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -31,15 +31,18 @@
<Externalconsole>true</Externalconsole>
</PropertyGroup>
<ItemGroup>
<Reference Include="Google.Protobuf">
<HintPath>..\packages\Google.Protobuf.3.0.0-alpha4\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
<Reference Include="Google.Protobuf, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Google.Protobuf.3.0.0-beta2\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
</Reference>
<Reference Include="Grpc.Core">
<HintPath>..\packages\Grpc.Core.0.12.0\lib\net45\Grpc.Core.dll</HintPath>
<Reference Include="Grpc.Core, Version=0.13.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Grpc.Core.0.13.0\lib\net45\Grpc.Core.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Interactive.Async">
<HintPath>..\packages\Ix-Async.1.2.3\lib\net45\System.Interactive.Async.dll</HintPath>
<Reference Include="System.Interactive.Async, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Ix-Async.1.2.5\lib\net45\System.Interactive.Async.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
@ -56,15 +59,11 @@
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets" Condition="Exists('..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets')" />
<Import Project="..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets" Condition="Exists('..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets'))" />
<Error Condition="!Exists('..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets'))" />
<Error Condition="!Exists('..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets'))" />
<Error Condition="!Exists('..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets'))" />
</Target>
<Import Project="..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets" Condition="Exists('..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets')" />
<Import Project="..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets" Condition="Exists('..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" />
</Project>

@ -1,10 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Google.Protobuf" version="3.0.0-alpha4" targetFramework="net45" />
<package id="Grpc" version="0.12.0" targetFramework="net45" />
<package id="Grpc.Core" version="0.12.0" targetFramework="net45" />
<package id="grpc.dependencies.openssl.redist" version="1.0.204.1" targetFramework="net45" />
<package id="grpc.dependencies.zlib.redist" version="1.2.8.10" targetFramework="net45" />
<package id="grpc.native.csharp" version="0.12.0" targetFramework="net45" />
<package id="Ix-Async" version="1.2.3" targetFramework="net45" />
<package id="Google.Protobuf" version="3.0.0-beta2" targetFramework="net45" />
<package id="Grpc" version="0.13.0" targetFramework="net45" />
<package id="Grpc.Core" version="0.13.0" targetFramework="net45" />
<package id="grpc.native.csharp" version="0.13.0" targetFramework="net45" />
<package id="Ix-Async" version="1.2.5" targetFramework="net45" />
</packages>

@ -10,7 +10,7 @@
<RootNamespace>GreeterServer</RootNamespace>
<AssemblyName>GreeterServer</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<NuGetPackageImportStamp>8a2cae0f</NuGetPackageImportStamp>
<NuGetPackageImportStamp>2ea5dfd0</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -31,15 +31,18 @@
<Externalconsole>true</Externalconsole>
</PropertyGroup>
<ItemGroup>
<Reference Include="Google.Protobuf">
<HintPath>..\packages\Google.Protobuf.3.0.0-alpha4\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
<Reference Include="Google.Protobuf, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Google.Protobuf.3.0.0-beta2\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
</Reference>
<Reference Include="Grpc.Core">
<HintPath>..\packages\Grpc.Core.0.12.0\lib\net45\Grpc.Core.dll</HintPath>
<Reference Include="Grpc.Core, Version=0.13.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Grpc.Core.0.13.0\lib\net45\Grpc.Core.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Interactive.Async">
<HintPath>..\packages\Ix-Async.1.2.3\lib\net45\System.Interactive.Async.dll</HintPath>
<Reference Include="System.Interactive.Async, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Ix-Async.1.2.5\lib\net45\System.Interactive.Async.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
@ -56,15 +59,11 @@
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets" Condition="Exists('..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets')" />
<Import Project="..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets" Condition="Exists('..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets'))" />
<Error Condition="!Exists('..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets'))" />
<Error Condition="!Exists('..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets'))" />
<Error Condition="!Exists('..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets'))" />
</Target>
<Import Project="..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets" Condition="Exists('..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets')" />
<Import Project="..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets" Condition="Exists('..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" />
</Project>

@ -1,10 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Google.Protobuf" version="3.0.0-alpha4" targetFramework="net45" />
<package id="Grpc" version="0.12.0" targetFramework="net45" />
<package id="Grpc.Core" version="0.12.0" targetFramework="net45" />
<package id="grpc.dependencies.openssl.redist" version="1.0.204.1" targetFramework="net45" />
<package id="grpc.dependencies.zlib.redist" version="1.2.8.10" targetFramework="net45" />
<package id="grpc.native.csharp" version="0.12.0" targetFramework="net45" />
<package id="Ix-Async" version="1.2.3" targetFramework="net45" />
<package id="Google.Protobuf" version="3.0.0-beta2" targetFramework="net45" />
<package id="Grpc" version="0.13.0" targetFramework="net45" />
<package id="Grpc.Core" version="0.13.0" targetFramework="net45" />
<package id="grpc.native.csharp" version="0.13.0" targetFramework="net45" />
<package id="Ix-Async" version="1.2.5" targetFramework="net45" />
</packages>

@ -16,35 +16,17 @@ PREREQUISITES
- Visual Studio 2013 or 2015
**Linux**
- Mono
- Monodevelop 5.9 with NuGet Add-in installed
- Mono 4.0+
- Monodevelop 5.9+ (with NuGet plugin installed)
**Mac OS X**
- Xamarin Studio (with NuGet plugin installed)
- Xamarin Studio 5.9+
- [homebrew][]
BUILD
-------
**Windows**
- Open solution `Greeter.sln` with Visual Studio
- Build the solution (this will automatically download NuGet dependencies)
**Linux (Debian)**
- Install gRPC C core and C# native extension using [How to use gRPC C#][] instructions
- Open solution `Greeter.sln` in MonoDevelop.
- Build the solution (you need to manually restore dependencies by using `mono nuget.exe restore` if you don't have NuGet add-in)
**Mac OS X**
- Install gRPC C core and C# native extension using [How to use gRPC C#][] instructions
- Open solution `Greeter.sln` with Xamarin Studio
- Open solution `Greeter.sln` with Visual Studio, Monodevelop (on Linux) or Xamarin Studio (on Mac OS X)
- Build the solution (this will automatically download NuGet dependencies)
@ -65,7 +47,7 @@ Try it!
> GreeterClient.exe
```
You can also run the server and client directly from Visual Studio.
You can also run the server and client directly from the IDE.
On Linux or Mac, use `mono GreeterServer.exe` and `mono GreeterClient.exe` to run the server and client.
@ -76,5 +58,4 @@ You can find a more detailed tutorial in [gRPC Basics: C#][]
[homebrew]:http://brew.sh
[helloworld.proto]:../../protos/helloworld.proto
[How to use gRPC C#]:../../../src/csharp#how-to-use
[gRPC Basics: C#]:http://www.grpc.io/docs/tutorials/basic/csharp.html

@ -5,6 +5,6 @@ setlocal
@rem enter this directory
cd /d %~dp0
packages\Google.Protobuf.3.0.0-alpha4\tools\protoc.exe -I../../protos --csharp_out Greeter ../../protos/helloworld.proto --grpc_out Greeter --plugin=protoc-gen-grpc=packages\Grpc.Tools.0.12.0\tools\grpc_csharp_plugin.exe
packages\Google.Protobuf.3.0.0-beta2\tools\protoc.exe -I../../protos --csharp_out Greeter ../../protos/helloworld.proto --grpc_out Greeter --plugin=protoc-gen-grpc=packages\Grpc.Tools.0.13.0\tools\grpc_csharp_plugin.exe
endlocal

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Grpc.Tools" version="0.12.0" />
<package id="Grpc.Tools" version="0.13.0" />
</packages>

@ -9,57 +9,62 @@ using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace Routeguide {
namespace Proto {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public static partial class RouteGuide {
#region Descriptor
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;
static RouteGuide() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"ChFyb3V0ZV9ndWlkZS5wcm90bxIKcm91dGVndWlkZSIsCgVQb2ludBIQCghs",
"YXRpdHVkZRgBIAEoBRIRCglsb25naXR1ZGUYAiABKAUiSQoJUmVjdGFuZ2xl",
"Eh0KAmxvGAEgASgLMhEucm91dGVndWlkZS5Qb2ludBIdCgJoaRgCIAEoCzIR",
"LnJvdXRlZ3VpZGUuUG9pbnQiPAoHRmVhdHVyZRIMCgRuYW1lGAEgASgJEiMK",
"CGxvY2F0aW9uGAIgASgLMhEucm91dGVndWlkZS5Qb2ludCJBCglSb3V0ZU5v",
"dGUSIwoIbG9jYXRpb24YASABKAsyES5yb3V0ZWd1aWRlLlBvaW50Eg8KB21l",
"c3NhZ2UYAiABKAkiYgoMUm91dGVTdW1tYXJ5EhMKC3BvaW50X2NvdW50GAEg",
"ASgFEhUKDWZlYXR1cmVfY291bnQYAiABKAUSEAoIZGlzdGFuY2UYAyABKAUS",
"FAoMZWxhcHNlZF90aW1lGAQgASgFMoUCCgpSb3V0ZUd1aWRlEjYKCkdldEZl",
"YXR1cmUSES5yb3V0ZWd1aWRlLlBvaW50GhMucm91dGVndWlkZS5GZWF0dXJl",
"IgASPgoMTGlzdEZlYXR1cmVzEhUucm91dGVndWlkZS5SZWN0YW5nbGUaEy5y",
"b3V0ZWd1aWRlLkZlYXR1cmUiADABEj4KC1JlY29yZFJvdXRlEhEucm91dGVn",
"dWlkZS5Qb2ludBoYLnJvdXRlZ3VpZGUuUm91dGVTdW1tYXJ5IgAoARI/CglS",
"b3V0ZUNoYXQSFS5yb3V0ZWd1aWRlLlJvdXRlTm90ZRoVLnJvdXRlZ3VpZGUu",
"Um91dGVOb3RlIgAoATABQg8KB2V4LmdycGOiAgNSVEdiBnByb3RvMw=="));
descriptor = pbr::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedCodeInfo(null, new pbr::GeneratedCodeInfo[] {
new pbr::GeneratedCodeInfo(typeof(global::Routeguide.Point), new[]{ "Latitude", "Longitude" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Routeguide.Rectangle), new[]{ "Lo", "Hi" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Routeguide.Feature), new[]{ "Name", "Location" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Routeguide.RouteNote), new[]{ "Location", "Message" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Routeguide.RouteSummary), new[]{ "PointCount", "FeatureCount", "Distance", "ElapsedTime" }, null, null, null)
}));
}
#endregion
/// <summary>Holder for reflection information generated from route_guide.proto</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public static partial class RouteGuideReflection {
#region Descriptor
/// <summary>File descriptor for route_guide.proto</summary>
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;
static RouteGuideReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"ChFyb3V0ZV9ndWlkZS5wcm90bxIKcm91dGVndWlkZSIsCgVQb2ludBIQCghs",
"YXRpdHVkZRgBIAEoBRIRCglsb25naXR1ZGUYAiABKAUiSQoJUmVjdGFuZ2xl",
"Eh0KAmxvGAEgASgLMhEucm91dGVndWlkZS5Qb2ludBIdCgJoaRgCIAEoCzIR",
"LnJvdXRlZ3VpZGUuUG9pbnQiPAoHRmVhdHVyZRIMCgRuYW1lGAEgASgJEiMK",
"CGxvY2F0aW9uGAIgASgLMhEucm91dGVndWlkZS5Qb2ludCJBCglSb3V0ZU5v",
"dGUSIwoIbG9jYXRpb24YASABKAsyES5yb3V0ZWd1aWRlLlBvaW50Eg8KB21l",
"c3NhZ2UYAiABKAkiYgoMUm91dGVTdW1tYXJ5EhMKC3BvaW50X2NvdW50GAEg",
"ASgFEhUKDWZlYXR1cmVfY291bnQYAiABKAUSEAoIZGlzdGFuY2UYAyABKAUS",
"FAoMZWxhcHNlZF90aW1lGAQgASgFMoUCCgpSb3V0ZUd1aWRlEjYKCkdldEZl",
"YXR1cmUSES5yb3V0ZWd1aWRlLlBvaW50GhMucm91dGVndWlkZS5GZWF0dXJl",
"IgASPgoMTGlzdEZlYXR1cmVzEhUucm91dGVndWlkZS5SZWN0YW5nbGUaEy5y",
"b3V0ZWd1aWRlLkZlYXR1cmUiADABEj4KC1JlY29yZFJvdXRlEhEucm91dGVn",
"dWlkZS5Qb2ludBoYLnJvdXRlZ3VpZGUuUm91dGVTdW1tYXJ5IgAoARI/CglS",
"b3V0ZUNoYXQSFS5yb3V0ZWd1aWRlLlJvdXRlTm90ZRoVLnJvdXRlZ3VpZGUu",
"Um91dGVOb3RlIgAoATABQg8KB2V4LmdycGOiAgNSVEdiBnByb3RvMw=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedCodeInfo(null, new pbr::GeneratedCodeInfo[] {
new pbr::GeneratedCodeInfo(typeof(global::Routeguide.Point), global::Routeguide.Point.Parser, new[]{ "Latitude", "Longitude" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Routeguide.Rectangle), global::Routeguide.Rectangle.Parser, new[]{ "Lo", "Hi" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Routeguide.Feature), global::Routeguide.Feature.Parser, new[]{ "Name", "Location" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Routeguide.RouteNote), global::Routeguide.RouteNote.Parser, new[]{ "Location", "Message" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Routeguide.RouteSummary), global::Routeguide.RouteSummary.Parser, new[]{ "PointCount", "FeatureCount", "Distance", "ElapsedTime" }, null, null, null)
}));
}
#endregion
}
}
#region Messages
/// <summary>
/// Points are represented as latitude-longitude pairs in the E7 representation
/// (degrees multiplied by 10**7 and rounded to the nearest integer).
/// Latitudes should be in the range +/- 90 degrees and longitude should be in
/// the range +/- 180 degrees (inclusive).
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class Point : pb::IMessage<Point> {
private static readonly pb::MessageParser<Point> _parser = new pb::MessageParser<Point>(() => new Point());
public static pb::MessageParser<Point> Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
get { return global::Routeguide.Proto.RouteGuide.Descriptor.MessageTypes[0]; }
get { return global::Routeguide.RouteGuideReflection.Descriptor.MessageTypes[0]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
@ -81,6 +86,7 @@ namespace Routeguide {
return new Point(this);
}
/// <summary>Field number for the "latitude" field.</summary>
public const int LatitudeFieldNumber = 1;
private int latitude_;
public int Latitude {
@ -90,6 +96,7 @@ namespace Routeguide {
}
}
/// <summary>Field number for the "longitude" field.</summary>
public const int LongitudeFieldNumber = 2;
private int longitude_;
public int Longitude {
@ -123,7 +130,7 @@ namespace Routeguide {
}
public override string ToString() {
return pb::JsonFormatter.Default.Format(this);
return pb::JsonFormatter.ToDiagnosticString(this);
}
public void WriteTo(pb::CodedOutputStream output) {
@ -181,13 +188,17 @@ namespace Routeguide {
}
/// <summary>
/// A latitude-longitude rectangle, represented as two diagonally opposite
/// points "lo" and "hi".
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class Rectangle : pb::IMessage<Rectangle> {
private static readonly pb::MessageParser<Rectangle> _parser = new pb::MessageParser<Rectangle>(() => new Rectangle());
public static pb::MessageParser<Rectangle> Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
get { return global::Routeguide.Proto.RouteGuide.Descriptor.MessageTypes[1]; }
get { return global::Routeguide.RouteGuideReflection.Descriptor.MessageTypes[1]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
@ -209,8 +220,12 @@ namespace Routeguide {
return new Rectangle(this);
}
/// <summary>Field number for the "lo" field.</summary>
public const int LoFieldNumber = 1;
private global::Routeguide.Point lo_;
/// <summary>
/// One corner of the rectangle.
/// </summary>
public global::Routeguide.Point Lo {
get { return lo_; }
set {
@ -218,8 +233,12 @@ namespace Routeguide {
}
}
/// <summary>Field number for the "hi" field.</summary>
public const int HiFieldNumber = 2;
private global::Routeguide.Point hi_;
/// <summary>
/// The other corner of the rectangle.
/// </summary>
public global::Routeguide.Point Hi {
get { return hi_; }
set {
@ -251,7 +270,7 @@ namespace Routeguide {
}
public override string ToString() {
return pb::JsonFormatter.Default.Format(this);
return pb::JsonFormatter.ToDiagnosticString(this);
}
public void WriteTo(pb::CodedOutputStream output) {
@ -321,13 +340,18 @@ namespace Routeguide {
}
/// <summary>
/// A feature names something at a given point.
///
/// If a feature could not be named, the name is empty.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class Feature : pb::IMessage<Feature> {
private static readonly pb::MessageParser<Feature> _parser = new pb::MessageParser<Feature>(() => new Feature());
public static pb::MessageParser<Feature> Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
get { return global::Routeguide.Proto.RouteGuide.Descriptor.MessageTypes[2]; }
get { return global::Routeguide.RouteGuideReflection.Descriptor.MessageTypes[2]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
@ -349,8 +373,12 @@ namespace Routeguide {
return new Feature(this);
}
/// <summary>Field number for the "name" field.</summary>
public const int NameFieldNumber = 1;
private string name_ = "";
/// <summary>
/// The name of the feature.
/// </summary>
public string Name {
get { return name_; }
set {
@ -358,8 +386,12 @@ namespace Routeguide {
}
}
/// <summary>Field number for the "location" field.</summary>
public const int LocationFieldNumber = 2;
private global::Routeguide.Point location_;
/// <summary>
/// The point where the feature is detected.
/// </summary>
public global::Routeguide.Point Location {
get { return location_; }
set {
@ -391,7 +423,7 @@ namespace Routeguide {
}
public override string ToString() {
return pb::JsonFormatter.Default.Format(this);
return pb::JsonFormatter.ToDiagnosticString(this);
}
public void WriteTo(pb::CodedOutputStream output) {
@ -455,13 +487,16 @@ namespace Routeguide {
}
/// <summary>
/// A RouteNote is a message sent while at a given point.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class RouteNote : pb::IMessage<RouteNote> {
private static readonly pb::MessageParser<RouteNote> _parser = new pb::MessageParser<RouteNote>(() => new RouteNote());
public static pb::MessageParser<RouteNote> Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
get { return global::Routeguide.Proto.RouteGuide.Descriptor.MessageTypes[3]; }
get { return global::Routeguide.RouteGuideReflection.Descriptor.MessageTypes[3]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
@ -483,8 +518,12 @@ namespace Routeguide {
return new RouteNote(this);
}
/// <summary>Field number for the "location" field.</summary>
public const int LocationFieldNumber = 1;
private global::Routeguide.Point location_;
/// <summary>
/// The location from which the message is sent.
/// </summary>
public global::Routeguide.Point Location {
get { return location_; }
set {
@ -492,8 +531,12 @@ namespace Routeguide {
}
}
/// <summary>Field number for the "message" field.</summary>
public const int MessageFieldNumber = 2;
private string message_ = "";
/// <summary>
/// The message to be sent.
/// </summary>
public string Message {
get { return message_; }
set {
@ -525,7 +568,7 @@ namespace Routeguide {
}
public override string ToString() {
return pb::JsonFormatter.Default.Format(this);
return pb::JsonFormatter.ToDiagnosticString(this);
}
public void WriteTo(pb::CodedOutputStream output) {
@ -589,13 +632,20 @@ namespace Routeguide {
}
/// <summary>
/// A RouteSummary is received in response to a RecordRoute rpc.
///
/// It contains the number of individual points received, the number of
/// detected features, and the total distance covered as the cumulative sum of
/// the distance between each point.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class RouteSummary : pb::IMessage<RouteSummary> {
private static readonly pb::MessageParser<RouteSummary> _parser = new pb::MessageParser<RouteSummary>(() => new RouteSummary());
public static pb::MessageParser<RouteSummary> Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
get { return global::Routeguide.Proto.RouteGuide.Descriptor.MessageTypes[4]; }
get { return global::Routeguide.RouteGuideReflection.Descriptor.MessageTypes[4]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
@ -619,8 +669,12 @@ namespace Routeguide {
return new RouteSummary(this);
}
/// <summary>Field number for the "point_count" field.</summary>
public const int PointCountFieldNumber = 1;
private int pointCount_;
/// <summary>
/// The number of points received.
/// </summary>
public int PointCount {
get { return pointCount_; }
set {
@ -628,8 +682,12 @@ namespace Routeguide {
}
}
/// <summary>Field number for the "feature_count" field.</summary>
public const int FeatureCountFieldNumber = 2;
private int featureCount_;
/// <summary>
/// The number of known features passed while traversing the route.
/// </summary>
public int FeatureCount {
get { return featureCount_; }
set {
@ -637,8 +695,12 @@ namespace Routeguide {
}
}
/// <summary>Field number for the "distance" field.</summary>
public const int DistanceFieldNumber = 3;
private int distance_;
/// <summary>
/// The distance covered in metres.
/// </summary>
public int Distance {
get { return distance_; }
set {
@ -646,8 +708,12 @@ namespace Routeguide {
}
}
/// <summary>Field number for the "elapsed_time" field.</summary>
public const int ElapsedTimeFieldNumber = 4;
private int elapsedTime_;
/// <summary>
/// The duration of the traversal in seconds.
/// </summary>
public int ElapsedTime {
get { return elapsedTime_; }
set {
@ -683,7 +749,7 @@ namespace Routeguide {
}
public override string ToString() {
return pb::JsonFormatter.Default.Format(this);
return pb::JsonFormatter.ToDiagnosticString(this);
}
public void WriteTo(pb::CodedOutputStream output) {

@ -11,7 +11,7 @@
<AssemblyName>RouteGuide</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<NuGetPackageImportStamp>68b3dd23</NuGetPackageImportStamp>
<NuGetPackageImportStamp>5b6d924a</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -31,11 +31,13 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Google.Protobuf">
<HintPath>..\packages\Google.Protobuf.3.0.0-alpha4\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
<Reference Include="Google.Protobuf, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Google.Protobuf.3.0.0-beta2\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
</Reference>
<Reference Include="Grpc.Core">
<HintPath>..\packages\Grpc.Core.0.12.0\lib\net45\Grpc.Core.dll</HintPath>
<Reference Include="Grpc.Core, Version=0.12.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Grpc.Core.0.13.0\lib\net45\Grpc.Core.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
@ -65,17 +67,13 @@
</None>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets" Condition="Exists('..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets')" />
<Import Project="..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets" Condition="Exists('..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets'))" />
<Error Condition="!Exists('..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets'))" />
<Error Condition="!Exists('..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets'))" />
<Error Condition="!Exists('..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets'))" />
</Target>
<Import Project="..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets" Condition="Exists('..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets')" />
<Import Project="..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets" Condition="Exists('..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">

@ -49,7 +49,7 @@ namespace Routeguide {
// service descriptor
public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
{
get { return global::Routeguide.Proto.RouteGuide.Descriptor.Services[0]; }
get { return global::Routeguide.RouteGuideReflection.Descriptor.Services[0]; }
}
// client interface

@ -1,11 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Google.Protobuf" version="3.0.0-alpha4" targetFramework="net45" />
<package id="Grpc" version="0.12.0" targetFramework="net45" />
<package id="Grpc.Core" version="0.12.0" targetFramework="net45" />
<package id="grpc.dependencies.openssl.redist" version="1.0.204.1" targetFramework="net45" />
<package id="grpc.dependencies.zlib.redist" version="1.2.8.10" targetFramework="net45" />
<package id="grpc.native.csharp" version="0.12.0" targetFramework="net45" />
<package id="Google.Protobuf" version="3.0.0-beta2" targetFramework="net45" />
<package id="Grpc" version="0.13.0" targetFramework="net45" />
<package id="Grpc.Core" version="0.13.0" targetFramework="net45" />
<package id="grpc.native.csharp" version="0.13.0" targetFramework="net45" />
<package id="Ix-Async" version="1.2.3" targetFramework="net45" />
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
</packages>

@ -11,7 +11,7 @@
<AssemblyName>RouteGuideClient</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<NuGetPackageImportStamp>f5579f73</NuGetPackageImportStamp>
<NuGetPackageImportStamp>69015b00</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@ -33,11 +33,13 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Google.Protobuf">
<HintPath>..\packages\Google.Protobuf.3.0.0-alpha4\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
<Reference Include="Google.Protobuf, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Google.Protobuf.3.0.0-beta2\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
</Reference>
<Reference Include="Grpc.Core">
<HintPath>..\packages\Grpc.Core.0.12.0\lib\net45\Grpc.Core.dll</HintPath>
<Reference Include="Grpc.Core, Version=0.12.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Grpc.Core.0.13.0\lib\net45\Grpc.Core.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
@ -68,17 +70,13 @@
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets" Condition="Exists('..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets')" />
<Import Project="..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets" Condition="Exists('..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets'))" />
<Error Condition="!Exists('..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets'))" />
<Error Condition="!Exists('..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets'))" />
<Error Condition="!Exists('..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets'))" />
</Target>
<Import Project="..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets" Condition="Exists('..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets')" />
<Import Project="..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets" Condition="Exists('..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">

@ -1,11 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Google.Protobuf" version="3.0.0-alpha4" targetFramework="net45" />
<package id="Grpc" version="0.12.0" targetFramework="net45" />
<package id="Grpc.Core" version="0.12.0" targetFramework="net45" />
<package id="grpc.dependencies.openssl.redist" version="1.0.204.1" targetFramework="net45" />
<package id="grpc.dependencies.zlib.redist" version="1.2.8.10" targetFramework="net45" />
<package id="grpc.native.csharp" version="0.12.0" targetFramework="net45" />
<package id="Google.Protobuf" version="3.0.0-beta2" targetFramework="net45" />
<package id="Grpc" version="0.13.0" targetFramework="net45" />
<package id="Grpc.Core" version="0.13.0" targetFramework="net45" />
<package id="grpc.native.csharp" version="0.13.0" targetFramework="net45" />
<package id="Ix-Async" version="1.2.3" targetFramework="net45" />
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
</packages>

@ -11,7 +11,7 @@
<AssemblyName>RouteGuideServer</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<NuGetPackageImportStamp>89e15444</NuGetPackageImportStamp>
<NuGetPackageImportStamp>656158d8</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@ -33,11 +33,13 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Google.Protobuf">
<HintPath>..\packages\Google.Protobuf.3.0.0-alpha4\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
<Reference Include="Google.Protobuf, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Google.Protobuf.3.0.0-beta2\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
</Reference>
<Reference Include="Grpc.Core">
<HintPath>..\packages\Grpc.Core.0.12.0\lib\net45\Grpc.Core.dll</HintPath>
<Reference Include="Grpc.Core, Version=0.12.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Grpc.Core.0.13.0\lib\net45\Grpc.Core.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
@ -69,17 +71,13 @@
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets" Condition="Exists('..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets')" />
<Import Project="..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets" Condition="Exists('..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.zlib.redist.targets'))" />
<Error Condition="!Exists('..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets'))" />
<Error Condition="!Exists('..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets'))" />
<Error Condition="!Exists('..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\grpc.native.csharp.0.13.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets'))" />
</Target>
<Import Project="..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets" Condition="Exists('..\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\portable-net45+netcore45+wpa81+wp8\grpc.dependencies.openssl.redist.targets')" />
<Import Project="..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets" Condition="Exists('..\packages\grpc.native.csharp.0.12.0\build\portable-net45+netcore45+wpa81+wp8\grpc.native.csharp.targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">

@ -1,11 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Google.Protobuf" version="3.0.0-alpha4" targetFramework="net45" />
<package id="Grpc" version="0.12.0" targetFramework="net45" />
<package id="Grpc.Core" version="0.12.0" targetFramework="net45" />
<package id="grpc.dependencies.openssl.redist" version="1.0.204.1" targetFramework="net45" />
<package id="grpc.dependencies.zlib.redist" version="1.2.8.10" targetFramework="net45" />
<package id="grpc.native.csharp" version="0.12.0" targetFramework="net45" />
<package id="Google.Protobuf" version="3.0.0-beta2" targetFramework="net45" />
<package id="Grpc" version="0.13.0" targetFramework="net45" />
<package id="Grpc.Core" version="0.13.0" targetFramework="net45" />
<package id="grpc.native.csharp" version="0.13.0" targetFramework="net45" />
<package id="Ix-Async" version="1.2.3" targetFramework="net45" />
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
</packages>

@ -5,6 +5,6 @@ setlocal
@rem enter this directory
cd /d %~dp0
packages\Google.Protobuf.3.0.0-alpha4\tools\protoc.exe -I../../protos --csharp_out RouteGuide ../../protos/route_guide.proto --grpc_out RouteGuide --plugin=protoc-gen-grpc=packages\Grpc.Tools.0.12.0\tools\grpc_csharp_plugin.exe
packages\Google.Protobuf.3.0.0-beta2\tools\protoc.exe -I../../protos --csharp_out RouteGuide ../../protos/route_guide.proto --grpc_out RouteGuide --plugin=protoc-gen-grpc=packages\Grpc.Tools.0.13.0\tools\grpc_csharp_plugin.exe
endlocal

@ -6,24 +6,18 @@ Background
For this sample, we've already generated the server and client stubs from
[helloworld.proto][] and we'll be using a specific reference platform.
Prerequisites
-------------
- Debian 8.2 "Jessie" platform with `root` access
- `git`
- `python2.7`
- `pip`
- Python development headers
Set-up
-------
Install gRPC:
```sh
$ # install the gRPC Core:
$ sudo apt-get install libgrpc-dev
$ # install gRPC Python:
$ sudo pip install -U grpcio==0.11.0b1
$ # Since this "hello, world" example uses protocol buffers:
$ sudo pip install -U protobuf==3.0.0a3
$ pip install grpcio
```
Or, to install it system wide:
```sh
$ sudo pip install grpcio
```
Download the example
```sh
$ # Clone the repository to get the example code:
$ git clone https://github.com/grpc/grpc
$ # Navigate to the "hello, world" Python example:

@ -66,13 +66,14 @@ Pod::Spec.new do |s|
ss.source_files = 'src/core/profiling/timers.h',
'src/core/support/block_annotate.h',
'src/core/support/env.h',
'src/core/support/file.h',
'src/core/support/load_file.h',
'src/core/support/murmur_hash.h',
'src/core/support/stack_lockfree.h',
'src/core/support/string.h',
'src/core/support/string_win32.h',
'src/core/support/thd_internal.h',
'src/core/support/time_precise.h',
'src/core/support/tmpfile.h',
'include/grpc/support/alloc.h',
'include/grpc/support/atm.h',
'include/grpc/support/atm_gcc_atomic.h',
@ -127,11 +128,9 @@ Pod::Spec.new do |s|
'src/core/support/env_linux.c',
'src/core/support/env_posix.c',
'src/core/support/env_win32.c',
'src/core/support/file.c',
'src/core/support/file_posix.c',
'src/core/support/file_win32.c',
'src/core/support/histogram.c',
'src/core/support/host_port.c',
'src/core/support/load_file.c',
'src/core/support/log.c',
'src/core/support/log_android.c',
'src/core/support/log_linux.c',
@ -157,6 +156,8 @@ Pod::Spec.new do |s|
'src/core/support/time_precise.c',
'src/core/support/time_win32.c',
'src/core/support/tls_pthread.c',
'src/core/support/tmpfile_posix.c',
'src/core/support/tmpfile_win32.c',
'src/core/support/wrap_memcpy.c',
'src/core/census/grpc_filter.h',
'src/core/census/grpc_plugin.h',
@ -174,6 +175,7 @@ Pod::Spec.new do |s|
'src/core/client_config/client_config.h',
'src/core/client_config/connector.h',
'src/core/client_config/initial_connect_string.h',
'src/core/client_config/lb_policies/load_balancer_api.h',
'src/core/client_config/lb_policies/pick_first.h',
'src/core/client_config/lb_policies/round_robin.h',
'src/core/client_config/lb_policy.h',
@ -234,6 +236,7 @@ Pod::Spec.new do |s|
'src/core/json/json_common.h',
'src/core/json/json_reader.h',
'src/core/json/json_writer.h',
'src/core/proto/grpc/lb/v0/load_balancer.pb.h',
'src/core/statistics/census_interface.h',
'src/core/statistics/census_rpc_stats.h',
'src/core/surface/api_trace.h',
@ -277,7 +280,7 @@ Pod::Spec.new do |s|
'src/core/transport/transport.h',
'src/core/transport/transport_impl.h',
'src/core/security/auth_filters.h',
'src/core/security/base64.h',
'src/core/security/b64.h',
'src/core/security/credentials.h',
'src/core/security/handshake.h',
'src/core/security/json_token.h',
@ -293,6 +296,10 @@ Pod::Spec.new do |s|
'src/core/census/aggregation.h',
'src/core/census/mlog.h',
'src/core/census/rpc_metric_id.h',
'third_party/nanopb/pb.h',
'third_party/nanopb/pb_common.h',
'third_party/nanopb/pb_decode.h',
'third_party/nanopb/pb_encode.h',
'include/grpc/grpc_security.h',
'include/grpc/impl/codegen/byte_buffer.h',
'include/grpc/impl/codegen/compression_types.h',
@ -323,6 +330,7 @@ Pod::Spec.new do |s|
'src/core/client_config/connector.c',
'src/core/client_config/default_initial_connect_string.c',
'src/core/client_config/initial_connect_string.c',
'src/core/client_config/lb_policies/load_balancer_api.c',
'src/core/client_config/lb_policies/pick_first.c',
'src/core/client_config/lb_policies/round_robin.c',
'src/core/client_config/lb_policy.c',
@ -337,7 +345,7 @@ Pod::Spec.new do |s|
'src/core/client_config/subchannel_factory.c',
'src/core/client_config/subchannel_index.c',
'src/core/client_config/uri_parser.c',
'src/core/compression/algorithm.c',
'src/core/compression/compression_algorithm.c',
'src/core/compression/message_compress.c',
'src/core/debug/trace.c',
'src/core/httpcli/format_request.c',
@ -387,6 +395,7 @@ Pod::Spec.new do |s|
'src/core/json/json_reader.c',
'src/core/json/json_string.c',
'src/core/json/json_writer.c',
'src/core/proto/grpc/lb/v0/load_balancer.pb.c',
'src/core/surface/alarm.c',
'src/core/surface/api_trace.c',
'src/core/surface/byte_buffer.c',
@ -438,7 +447,7 @@ Pod::Spec.new do |s|
'src/core/transport/transport.c',
'src/core/transport/transport_op_string.c',
'src/core/httpcli/httpcli_security_connector.c',
'src/core/security/base64.c',
'src/core/security/b64.c',
'src/core/security/client_auth_filter.c',
'src/core/security/credentials.c',
'src/core/security/credentials_metadata.c',
@ -463,18 +472,22 @@ Pod::Spec.new do |s|
'src/core/census/mlog.c',
'src/core/census/operation.c',
'src/core/census/placeholders.c',
'src/core/census/tracing.c'
'src/core/census/tracing.c',
'third_party/nanopb/pb_common.c',
'third_party/nanopb/pb_decode.c',
'third_party/nanopb/pb_encode.c'
ss.private_header_files = 'src/core/profiling/timers.h',
'src/core/support/block_annotate.h',
'src/core/support/env.h',
'src/core/support/file.h',
'src/core/support/load_file.h',
'src/core/support/murmur_hash.h',
'src/core/support/stack_lockfree.h',
'src/core/support/string.h',
'src/core/support/string_win32.h',
'src/core/support/thd_internal.h',
'src/core/support/time_precise.h',
'src/core/support/tmpfile.h',
'src/core/census/grpc_filter.h',
'src/core/census/grpc_plugin.h',
'src/core/channel/channel_args.h',
@ -491,6 +504,7 @@ Pod::Spec.new do |s|
'src/core/client_config/client_config.h',
'src/core/client_config/connector.h',
'src/core/client_config/initial_connect_string.h',
'src/core/client_config/lb_policies/load_balancer_api.h',
'src/core/client_config/lb_policies/pick_first.h',
'src/core/client_config/lb_policies/round_robin.h',
'src/core/client_config/lb_policy.h',
@ -551,6 +565,7 @@ Pod::Spec.new do |s|
'src/core/json/json_common.h',
'src/core/json/json_reader.h',
'src/core/json/json_writer.h',
'src/core/proto/grpc/lb/v0/load_balancer.pb.h',
'src/core/statistics/census_interface.h',
'src/core/statistics/census_rpc_stats.h',
'src/core/surface/api_trace.h',
@ -594,7 +609,7 @@ Pod::Spec.new do |s|
'src/core/transport/transport.h',
'src/core/transport/transport_impl.h',
'src/core/security/auth_filters.h',
'src/core/security/base64.h',
'src/core/security/b64.h',
'src/core/security/credentials.h',
'src/core/security/handshake.h',
'src/core/security/json_token.h',
@ -609,7 +624,11 @@ Pod::Spec.new do |s|
'src/core/tsi/transport_security_interface.h',
'src/core/census/aggregation.h',
'src/core/census/mlog.h',
'src/core/census/rpc_metric_id.h'
'src/core/census/rpc_metric_id.h',
'third_party/nanopb/pb.h',
'third_party/nanopb/pb_common.h',
'third_party/nanopb/pb_decode.h',
'third_party/nanopb/pb_encode.h'
ss.header_mappings_dir = '.'
# This isn't officially supported in Cocoapods. We've asked for an alternative:

@ -91,13 +91,14 @@ Gem::Specification.new do |s|
s.files += %w( src/core/profiling/timers.h )
s.files += %w( src/core/support/block_annotate.h )
s.files += %w( src/core/support/env.h )
s.files += %w( src/core/support/file.h )
s.files += %w( src/core/support/load_file.h )
s.files += %w( src/core/support/murmur_hash.h )
s.files += %w( src/core/support/stack_lockfree.h )
s.files += %w( src/core/support/string.h )
s.files += %w( src/core/support/string_win32.h )
s.files += %w( src/core/support/thd_internal.h )
s.files += %w( src/core/support/time_precise.h )
s.files += %w( src/core/support/tmpfile.h )
s.files += %w( src/core/profiling/basic_timers.c )
s.files += %w( src/core/profiling/stap_timers.c )
s.files += %w( src/core/support/alloc.c )
@ -110,11 +111,9 @@ Gem::Specification.new do |s|
s.files += %w( src/core/support/env_linux.c )
s.files += %w( src/core/support/env_posix.c )
s.files += %w( src/core/support/env_win32.c )
s.files += %w( src/core/support/file.c )
s.files += %w( src/core/support/file_posix.c )
s.files += %w( src/core/support/file_win32.c )
s.files += %w( src/core/support/histogram.c )
s.files += %w( src/core/support/host_port.c )
s.files += %w( src/core/support/load_file.c )
s.files += %w( src/core/support/log.c )
s.files += %w( src/core/support/log_android.c )
s.files += %w( src/core/support/log_linux.c )
@ -140,6 +139,8 @@ Gem::Specification.new do |s|
s.files += %w( src/core/support/time_precise.c )
s.files += %w( src/core/support/time_win32.c )
s.files += %w( src/core/support/tls_pthread.c )
s.files += %w( src/core/support/tmpfile_posix.c )
s.files += %w( src/core/support/tmpfile_win32.c )
s.files += %w( src/core/support/wrap_memcpy.c )
s.files += %w( include/grpc/grpc_security.h )
s.files += %w( include/grpc/impl/codegen/byte_buffer.h )
@ -170,6 +171,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/client_config/client_config.h )
s.files += %w( src/core/client_config/connector.h )
s.files += %w( src/core/client_config/initial_connect_string.h )
s.files += %w( src/core/client_config/lb_policies/load_balancer_api.h )
s.files += %w( src/core/client_config/lb_policies/pick_first.h )
s.files += %w( src/core/client_config/lb_policies/round_robin.h )
s.files += %w( src/core/client_config/lb_policy.h )
@ -230,6 +232,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/json/json_common.h )
s.files += %w( src/core/json/json_reader.h )
s.files += %w( src/core/json/json_writer.h )
s.files += %w( src/core/proto/grpc/lb/v0/load_balancer.pb.h )
s.files += %w( src/core/statistics/census_interface.h )
s.files += %w( src/core/statistics/census_rpc_stats.h )
s.files += %w( src/core/surface/api_trace.h )
@ -273,7 +276,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/transport/transport.h )
s.files += %w( src/core/transport/transport_impl.h )
s.files += %w( src/core/security/auth_filters.h )
s.files += %w( src/core/security/base64.h )
s.files += %w( src/core/security/b64.h )
s.files += %w( src/core/security/credentials.h )
s.files += %w( src/core/security/handshake.h )
s.files += %w( src/core/security/json_token.h )
@ -289,6 +292,10 @@ Gem::Specification.new do |s|
s.files += %w( src/core/census/aggregation.h )
s.files += %w( src/core/census/mlog.h )
s.files += %w( src/core/census/rpc_metric_id.h )
s.files += %w( third_party/nanopb/pb.h )
s.files += %w( third_party/nanopb/pb_common.h )
s.files += %w( third_party/nanopb/pb_decode.h )
s.files += %w( third_party/nanopb/pb_encode.h )
s.files += %w( src/core/census/grpc_context.c )
s.files += %w( src/core/census/grpc_filter.c )
s.files += %w( src/core/census/grpc_plugin.c )
@ -306,6 +313,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/client_config/connector.c )
s.files += %w( src/core/client_config/default_initial_connect_string.c )
s.files += %w( src/core/client_config/initial_connect_string.c )
s.files += %w( src/core/client_config/lb_policies/load_balancer_api.c )
s.files += %w( src/core/client_config/lb_policies/pick_first.c )
s.files += %w( src/core/client_config/lb_policies/round_robin.c )
s.files += %w( src/core/client_config/lb_policy.c )
@ -320,7 +328,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/client_config/subchannel_factory.c )
s.files += %w( src/core/client_config/subchannel_index.c )
s.files += %w( src/core/client_config/uri_parser.c )
s.files += %w( src/core/compression/algorithm.c )
s.files += %w( src/core/compression/compression_algorithm.c )
s.files += %w( src/core/compression/message_compress.c )
s.files += %w( src/core/debug/trace.c )
s.files += %w( src/core/httpcli/format_request.c )
@ -370,6 +378,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/json/json_reader.c )
s.files += %w( src/core/json/json_string.c )
s.files += %w( src/core/json/json_writer.c )
s.files += %w( src/core/proto/grpc/lb/v0/load_balancer.pb.c )
s.files += %w( src/core/surface/alarm.c )
s.files += %w( src/core/surface/api_trace.c )
s.files += %w( src/core/surface/byte_buffer.c )
@ -421,7 +430,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/transport/transport.c )
s.files += %w( src/core/transport/transport_op_string.c )
s.files += %w( src/core/httpcli/httpcli_security_connector.c )
s.files += %w( src/core/security/base64.c )
s.files += %w( src/core/security/b64.c )
s.files += %w( src/core/security/client_auth_filter.c )
s.files += %w( src/core/security/credentials.c )
s.files += %w( src/core/security/credentials_metadata.c )
@ -447,6 +456,9 @@ Gem::Specification.new do |s|
s.files += %w( src/core/census/operation.c )
s.files += %w( src/core/census/placeholders.c )
s.files += %w( src/core/census/tracing.c )
s.files += %w( third_party/nanopb/pb_common.c )
s.files += %w( third_party/nanopb/pb_decode.c )
s.files += %w( third_party/nanopb/pb_encode.c )
s.files += %w( third_party/boringssl/crypto/aes/internal.h )
s.files += %w( third_party/boringssl/crypto/asn1/asn1_locl.h )
s.files += %w( third_party/boringssl/crypto/bio/internal.h )

@ -36,9 +36,12 @@
#ifndef GRPCXX_ALARM_H
#define GRPCXX_ALARM_H
#include <grpc++/impl/codegen/completion_queue.h>
#include <grpc++/impl/codegen/completion_queue_tag.h>
#include <grpc++/impl/codegen/grpc_library.h>
#include <grpc++/impl/codegen/time.h>
#include <grpc++/impl/grpc_library.h>
#include <grpc/grpc.h>
struct grpc_alarm;
@ -54,14 +57,22 @@ class Alarm : private GrpcLibrary {
/// Once the alarm expires (at \a deadline) or it's cancelled (see \a Cancel),
/// an event with tag \a tag will be added to \a cq. If the alarm expired, the
/// event's success bit will be true, false otherwise (ie, upon cancellation).
Alarm(CompletionQueue* cq, gpr_timespec deadline, void* tag);
/// \internal We rely on the presence of \a cq for grpc initialization. If \a
/// cq were ever to be removed, a reference to a static
/// internal::GrpcLibraryInitializer instance would need to be introduced
/// here. \endinternal.
template <typename T>
Alarm(CompletionQueue* cq, const T& deadline, void* tag)
: tag_(tag),
alarm_(grpc_alarm_create(cq->cq(), TimePoint<T>(deadline).raw_time(),
static_cast<void*>(&tag_))) {}
/// Destroy the given completion queue alarm, cancelling it in the process.
~Alarm();
~Alarm() { grpc_alarm_destroy(alarm_); }
/// Cancel a completion queue alarm. Calling this function over an alarm that
/// has already fired has no effect.
void Cancel();
void Cancel() { grpc_alarm_cancel(alarm_); }
private:
class AlarmEntry : public CompletionQueueTag {

@ -79,6 +79,8 @@ class Server GRPC_FINAL : public ServerInterface, private GrpcLibrary {
class GlobalCallbacks {
public:
virtual ~GlobalCallbacks() {}
/// Called before server is created.
virtual void UpdateArguments(ChannelArguments* args) {}
/// Called before application callback for each synchronous server request
virtual void PreSynchronousRequest(ServerContext* context) = 0;
/// Called after application callback for each synchronous server request
@ -108,7 +110,7 @@ class Server GRPC_FINAL : public ServerInterface, private GrpcLibrary {
/// \param max_message_size Maximum message length that the channel can
/// receive.
Server(ThreadPoolInterface* thread_pool, bool thread_pool_owned,
int max_message_size, const ChannelArguments& args);
int max_message_size, ChannelArguments* args);
/// Register a service. This call does not take ownership of the service.
/// The service must exist for the lifetime of the Server instance.
@ -177,7 +179,7 @@ class Server GRPC_FINAL : public ServerInterface, private GrpcLibrary {
bool has_generic_service_;
// Pointer to the c grpc server.
grpc_server* const server_;
grpc_server* server_;
ThreadPoolInterface* thread_pool_;
// Whether the thread pool is created and owned by the server.

@ -115,6 +115,7 @@
"src/core/client_config/client_config.h",
"src/core/client_config/connector.h",
"src/core/client_config/initial_connect_string.h",
"src/core/client_config/lb_policies/load_balancer_api.h",
"src/core/client_config/lb_policies/pick_first.h",
"src/core/client_config/lb_policies/round_robin.h",
"src/core/client_config/lb_policy.h",
@ -175,6 +176,7 @@
"src/core/json/json_common.h",
"src/core/json/json_reader.h",
"src/core/json/json_writer.h",
"src/core/proto/grpc/lb/v0/load_balancer.pb.h",
"src/core/statistics/census_interface.h",
"src/core/statistics/census_rpc_stats.h",
"src/core/surface/api_trace.h",
@ -218,7 +220,7 @@
"src/core/transport/transport.h",
"src/core/transport/transport_impl.h",
"src/core/security/auth_filters.h",
"src/core/security/base64.h",
"src/core/security/b64.h",
"src/core/security/credentials.h",
"src/core/security/handshake.h",
"src/core/security/json_token.h",
@ -234,6 +236,10 @@
"src/core/census/aggregation.h",
"src/core/census/mlog.h",
"src/core/census/rpc_metric_id.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/census/grpc_context.c",
"src/core/census/grpc_filter.c",
"src/core/census/grpc_plugin.c",
@ -251,6 +257,7 @@
"src/core/client_config/connector.c",
"src/core/client_config/default_initial_connect_string.c",
"src/core/client_config/initial_connect_string.c",
"src/core/client_config/lb_policies/load_balancer_api.c",
"src/core/client_config/lb_policies/pick_first.c",
"src/core/client_config/lb_policies/round_robin.c",
"src/core/client_config/lb_policy.c",
@ -265,7 +272,7 @@
"src/core/client_config/subchannel_factory.c",
"src/core/client_config/subchannel_index.c",
"src/core/client_config/uri_parser.c",
"src/core/compression/algorithm.c",
"src/core/compression/compression_algorithm.c",
"src/core/compression/message_compress.c",
"src/core/debug/trace.c",
"src/core/httpcli/format_request.c",
@ -315,6 +322,7 @@
"src/core/json/json_reader.c",
"src/core/json/json_string.c",
"src/core/json/json_writer.c",
"src/core/proto/grpc/lb/v0/load_balancer.pb.c",
"src/core/surface/alarm.c",
"src/core/surface/api_trace.c",
"src/core/surface/byte_buffer.c",
@ -366,7 +374,7 @@
"src/core/transport/transport.c",
"src/core/transport/transport_op_string.c",
"src/core/httpcli/httpcli_security_connector.c",
"src/core/security/base64.c",
"src/core/security/b64.c",
"src/core/security/client_auth_filter.c",
"src/core/security/credentials.c",
"src/core/security/credentials_metadata.c",
@ -392,6 +400,9 @@
"src/core/census/operation.c",
"src/core/census/placeholders.c",
"src/core/census/tracing.c",
"third_party/nanopb/pb_common.c",
"third_party/nanopb/pb_decode.c",
"third_party/nanopb/pb_encode.c",
"third_party/zlib/crc32.h",
"third_party/zlib/deflate.h",
"third_party/zlib/gzguts.h",
@ -418,101 +429,6 @@
"third_party/zlib/trees.c",
"third_party/zlib/uncompr.c",
"third_party/zlib/zutil.c",
"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_win32.h",
"include/grpc/support/avl.h",
"include/grpc/support/cmdline.h",
"include/grpc/support/cpu.h",
"include/grpc/support/histogram.h",
"include/grpc/support/host_port.h",
"include/grpc/support/log.h",
"include/grpc/support/log_win32.h",
"include/grpc/support/port_platform.h",
"include/grpc/support/slice.h",
"include/grpc/support/slice_buffer.h",
"include/grpc/support/string_util.h",
"include/grpc/support/subprocess.h",
"include/grpc/support/sync.h",
"include/grpc/support/sync_generic.h",
"include/grpc/support/sync_posix.h",
"include/grpc/support/sync_win32.h",
"include/grpc/support/thd.h",
"include/grpc/support/time.h",
"include/grpc/support/tls.h",
"include/grpc/support/tls_gcc.h",
"include/grpc/support/tls_msvc.h",
"include/grpc/support/tls_pthread.h",
"include/grpc/support/useful.h",
"include/grpc/impl/codegen/alloc.h",
"include/grpc/impl/codegen/atm.h",
"include/grpc/impl/codegen/atm_gcc_atomic.h",
"include/grpc/impl/codegen/atm_gcc_sync.h",
"include/grpc/impl/codegen/atm_win32.h",
"include/grpc/impl/codegen/log.h",
"include/grpc/impl/codegen/port_platform.h",
"include/grpc/impl/codegen/slice.h",
"include/grpc/impl/codegen/slice_buffer.h",
"include/grpc/impl/codegen/sync.h",
"include/grpc/impl/codegen/sync_generic.h",
"include/grpc/impl/codegen/sync_posix.h",
"include/grpc/impl/codegen/sync_win32.h",
"include/grpc/impl/codegen/time.h",
"src/core/profiling/timers.h",
"src/core/support/block_annotate.h",
"src/core/support/env.h",
"src/core/support/file.h",
"src/core/support/murmur_hash.h",
"src/core/support/stack_lockfree.h",
"src/core/support/string.h",
"src/core/support/string_win32.h",
"src/core/support/thd_internal.h",
"src/core/support/time_precise.h",
"src/core/profiling/basic_timers.c",
"src/core/profiling/stap_timers.c",
"src/core/support/alloc.c",
"src/core/support/avl.c",
"src/core/support/cmdline.c",
"src/core/support/cpu_iphone.c",
"src/core/support/cpu_linux.c",
"src/core/support/cpu_posix.c",
"src/core/support/cpu_windows.c",
"src/core/support/env_linux.c",
"src/core/support/env_posix.c",
"src/core/support/env_win32.c",
"src/core/support/file.c",
"src/core/support/file_posix.c",
"src/core/support/file_win32.c",
"src/core/support/histogram.c",
"src/core/support/host_port.c",
"src/core/support/log.c",
"src/core/support/log_android.c",
"src/core/support/log_linux.c",
"src/core/support/log_posix.c",
"src/core/support/log_win32.c",
"src/core/support/murmur_hash.c",
"src/core/support/slice.c",
"src/core/support/slice_buffer.c",
"src/core/support/stack_lockfree.c",
"src/core/support/string.c",
"src/core/support/string_posix.c",
"src/core/support/string_win32.c",
"src/core/support/subprocess_posix.c",
"src/core/support/subprocess_windows.c",
"src/core/support/sync.c",
"src/core/support/sync_posix.c",
"src/core/support/sync_win32.c",
"src/core/support/thd.c",
"src/core/support/thd_posix.c",
"src/core/support/thd_win32.c",
"src/core/support/time.c",
"src/core/support/time_posix.c",
"src/core/support/time_precise.c",
"src/core/support/time_win32.c",
"src/core/support/tls_pthread.c",
"src/core/support/wrap_memcpy.c",
"third_party/boringssl/crypto/aes/internal.h",
"third_party/boringssl/crypto/asn1/asn1_locl.h",
"third_party/boringssl/crypto/bio/internal.h",
@ -914,6 +830,102 @@
"third_party/boringssl/ssl/t1_enc.c",
"third_party/boringssl/ssl/t1_lib.c",
"third_party/boringssl/ssl/tls_record.c",
"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_win32.h",
"include/grpc/support/avl.h",
"include/grpc/support/cmdline.h",
"include/grpc/support/cpu.h",
"include/grpc/support/histogram.h",
"include/grpc/support/host_port.h",
"include/grpc/support/log.h",
"include/grpc/support/log_win32.h",
"include/grpc/support/port_platform.h",
"include/grpc/support/slice.h",
"include/grpc/support/slice_buffer.h",
"include/grpc/support/string_util.h",
"include/grpc/support/subprocess.h",
"include/grpc/support/sync.h",
"include/grpc/support/sync_generic.h",
"include/grpc/support/sync_posix.h",
"include/grpc/support/sync_win32.h",
"include/grpc/support/thd.h",
"include/grpc/support/time.h",
"include/grpc/support/tls.h",
"include/grpc/support/tls_gcc.h",
"include/grpc/support/tls_msvc.h",
"include/grpc/support/tls_pthread.h",
"include/grpc/support/useful.h",
"include/grpc/impl/codegen/alloc.h",
"include/grpc/impl/codegen/atm.h",
"include/grpc/impl/codegen/atm_gcc_atomic.h",
"include/grpc/impl/codegen/atm_gcc_sync.h",
"include/grpc/impl/codegen/atm_win32.h",
"include/grpc/impl/codegen/log.h",
"include/grpc/impl/codegen/port_platform.h",
"include/grpc/impl/codegen/slice.h",
"include/grpc/impl/codegen/slice_buffer.h",
"include/grpc/impl/codegen/sync.h",
"include/grpc/impl/codegen/sync_generic.h",
"include/grpc/impl/codegen/sync_posix.h",
"include/grpc/impl/codegen/sync_win32.h",
"include/grpc/impl/codegen/time.h",
"src/core/profiling/timers.h",
"src/core/support/block_annotate.h",
"src/core/support/env.h",
"src/core/support/load_file.h",
"src/core/support/murmur_hash.h",
"src/core/support/stack_lockfree.h",
"src/core/support/string.h",
"src/core/support/string_win32.h",
"src/core/support/thd_internal.h",
"src/core/support/time_precise.h",
"src/core/support/tmpfile.h",
"src/core/profiling/basic_timers.c",
"src/core/profiling/stap_timers.c",
"src/core/support/alloc.c",
"src/core/support/avl.c",
"src/core/support/cmdline.c",
"src/core/support/cpu_iphone.c",
"src/core/support/cpu_linux.c",
"src/core/support/cpu_posix.c",
"src/core/support/cpu_windows.c",
"src/core/support/env_linux.c",
"src/core/support/env_posix.c",
"src/core/support/env_win32.c",
"src/core/support/histogram.c",
"src/core/support/host_port.c",
"src/core/support/load_file.c",
"src/core/support/log.c",
"src/core/support/log_android.c",
"src/core/support/log_linux.c",
"src/core/support/log_posix.c",
"src/core/support/log_win32.c",
"src/core/support/murmur_hash.c",
"src/core/support/slice.c",
"src/core/support/slice_buffer.c",
"src/core/support/stack_lockfree.c",
"src/core/support/string.c",
"src/core/support/string_posix.c",
"src/core/support/string_win32.c",
"src/core/support/subprocess_posix.c",
"src/core/support/subprocess_windows.c",
"src/core/support/sync.c",
"src/core/support/sync_posix.c",
"src/core/support/sync_win32.c",
"src/core/support/thd.c",
"src/core/support/thd_posix.c",
"src/core/support/thd_win32.c",
"src/core/support/time.c",
"src/core/support/time_posix.c",
"src/core/support/time_precise.c",
"src/core/support/time_win32.c",
"src/core/support/tls_pthread.c",
"src/core/support/tmpfile_posix.c",
"src/core/support/tmpfile_win32.c",
"src/core/support/wrap_memcpy.c",
"binding.gyp"
],
"main": "src/node/index.js",

@ -0,0 +1,981 @@
<?xml version="1.0" encoding="UTF-8"?>
<package packagerversion="1.9.5" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
<name>grpc</name>
<channel>pecl.php.net</channel>
<summary>A high performance, open source, general RPC framework that puts mobile and HTTP/2 first.</summary>
<description>Remote Procedure Calls (RPCs) provide a useful abstraction for building distributed applications and services. The libraries in this repository provide a concrete implementation of the gRPC protocol, layered over HTTP/2. These libraries enable communication between clients and servers using any combination of the supported languages.</description>
<lead>
<name>Stanley Cheung</name>
<user>stanleycheung</user>
<email>grpc-packages@google.com</email>
<active>yes</active>
</lead>
<date>2016-02-24</date>
<time>16:06:07</time>
<version>
<release>0.8.0</release>
<api>0.8.0</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<license>BSD</license>
<notes>
- Simplify gRPC PHP installation #4517
</notes>
<contents>
<dir baseinstalldir="/" name="/">
<file baseinstalldir="/" name="config.m4" role="src" />
<file baseinstalldir="/" name="src/php/ext/grpc/CREDITS" role="src" />
<file baseinstalldir="/" name="src/php/ext/grpc/LICENSE" role="src" />
<file baseinstalldir="/" name="src/php/ext/grpc/README.md" role="src" />
<file baseinstalldir="/" name="src/php/ext/grpc/byte_buffer.c" role="src" />
<file baseinstalldir="/" name="src/php/ext/grpc/call.c" role="src" />
<file baseinstalldir="/" name="src/php/ext/grpc/call_credentials.c" role="src" />
<file baseinstalldir="/" name="src/php/ext/grpc/channel.c" role="src" />
<file baseinstalldir="/" name="src/php/ext/grpc/channel_credentials.c" role="src" />
<file baseinstalldir="/" name="src/php/ext/grpc/completion_queue.c" role="src" />
<file baseinstalldir="/" name="src/php/ext/grpc/php_grpc.c" role="src" />
<file baseinstalldir="/" name="src/php/ext/grpc/server.c" role="src" />
<file baseinstalldir="/" name="src/php/ext/grpc/server_credentials.c" role="src" />
<file baseinstalldir="/" name="src/php/ext/grpc/timeval.c" role="src" />
<file baseinstalldir="/" name="src/php/ext/grpc/byte_buffer.h" role="src" />
<file baseinstalldir="/" name="src/php/ext/grpc/call.h" role="src" />
<file baseinstalldir="/" name="src/php/ext/grpc/call_credentials.h" role="src" />
<file baseinstalldir="/" name="src/php/ext/grpc/channel.h" role="src" />
<file baseinstalldir="/" name="src/php/ext/grpc/channel_credentials.h" role="src" />
<file baseinstalldir="/" name="src/php/ext/grpc/completion_queue.h" role="src" />
<file baseinstalldir="/" name="src/php/ext/grpc/php_grpc.h" role="src" />
<file baseinstalldir="/" name="src/php/ext/grpc/server.h" role="src" />
<file baseinstalldir="/" name="src/php/ext/grpc/server_credentials.h" role="src" />
<file baseinstalldir="/" name="src/php/ext/grpc/timeval.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/alloc.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/atm.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/atm_gcc_atomic.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/atm_gcc_sync.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/atm_win32.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/avl.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/cmdline.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/cpu.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/histogram.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/host_port.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/log.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/log_win32.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/port_platform.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/slice.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/slice_buffer.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/string_util.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/subprocess.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/sync.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/sync_generic.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/sync_posix.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/sync_win32.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/thd.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/time.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/tls.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/tls_gcc.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/tls_msvc.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/tls_pthread.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/useful.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/alloc.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/atm.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/atm_gcc_atomic.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/atm_gcc_sync.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/atm_win32.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/log.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/port_platform.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/slice.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/slice_buffer.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/sync.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/sync_generic.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/sync_posix.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/sync_win32.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/time.h" role="src" />
<file baseinstalldir="/" name="src/core/profiling/timers.h" role="src" />
<file baseinstalldir="/" name="src/core/support/block_annotate.h" role="src" />
<file baseinstalldir="/" name="src/core/support/env.h" role="src" />
<file baseinstalldir="/" name="src/core/support/load_file.h" role="src" />
<file baseinstalldir="/" name="src/core/support/murmur_hash.h" role="src" />
<file baseinstalldir="/" name="src/core/support/stack_lockfree.h" role="src" />
<file baseinstalldir="/" name="src/core/support/string.h" role="src" />
<file baseinstalldir="/" name="src/core/support/string_win32.h" role="src" />
<file baseinstalldir="/" name="src/core/support/thd_internal.h" role="src" />
<file baseinstalldir="/" name="src/core/support/time_precise.h" role="src" />
<file baseinstalldir="/" name="src/core/support/tmpfile.h" role="src" />
<file baseinstalldir="/" name="src/core/profiling/basic_timers.c" role="src" />
<file baseinstalldir="/" name="src/core/profiling/stap_timers.c" role="src" />
<file baseinstalldir="/" name="src/core/support/alloc.c" role="src" />
<file baseinstalldir="/" name="src/core/support/avl.c" role="src" />
<file baseinstalldir="/" name="src/core/support/cmdline.c" role="src" />
<file baseinstalldir="/" name="src/core/support/cpu_iphone.c" role="src" />
<file baseinstalldir="/" name="src/core/support/cpu_linux.c" role="src" />
<file baseinstalldir="/" name="src/core/support/cpu_posix.c" role="src" />
<file baseinstalldir="/" name="src/core/support/cpu_windows.c" role="src" />
<file baseinstalldir="/" name="src/core/support/env_linux.c" role="src" />
<file baseinstalldir="/" name="src/core/support/env_posix.c" role="src" />
<file baseinstalldir="/" name="src/core/support/env_win32.c" role="src" />
<file baseinstalldir="/" name="src/core/support/histogram.c" role="src" />
<file baseinstalldir="/" name="src/core/support/host_port.c" role="src" />
<file baseinstalldir="/" name="src/core/support/load_file.c" role="src" />
<file baseinstalldir="/" name="src/core/support/log.c" role="src" />
<file baseinstalldir="/" name="src/core/support/log_android.c" role="src" />
<file baseinstalldir="/" name="src/core/support/log_linux.c" role="src" />
<file baseinstalldir="/" name="src/core/support/log_posix.c" role="src" />
<file baseinstalldir="/" name="src/core/support/log_win32.c" role="src" />
<file baseinstalldir="/" name="src/core/support/murmur_hash.c" role="src" />
<file baseinstalldir="/" name="src/core/support/slice.c" role="src" />
<file baseinstalldir="/" name="src/core/support/slice_buffer.c" role="src" />
<file baseinstalldir="/" name="src/core/support/stack_lockfree.c" role="src" />
<file baseinstalldir="/" name="src/core/support/string.c" role="src" />
<file baseinstalldir="/" name="src/core/support/string_posix.c" role="src" />
<file baseinstalldir="/" name="src/core/support/string_win32.c" role="src" />
<file baseinstalldir="/" name="src/core/support/subprocess_posix.c" role="src" />
<file baseinstalldir="/" name="src/core/support/subprocess_windows.c" role="src" />
<file baseinstalldir="/" name="src/core/support/sync.c" role="src" />
<file baseinstalldir="/" name="src/core/support/sync_posix.c" role="src" />
<file baseinstalldir="/" name="src/core/support/sync_win32.c" role="src" />
<file baseinstalldir="/" name="src/core/support/thd.c" role="src" />
<file baseinstalldir="/" name="src/core/support/thd_posix.c" role="src" />
<file baseinstalldir="/" name="src/core/support/thd_win32.c" role="src" />
<file baseinstalldir="/" name="src/core/support/time.c" role="src" />
<file baseinstalldir="/" name="src/core/support/time_posix.c" role="src" />
<file baseinstalldir="/" name="src/core/support/time_precise.c" role="src" />
<file baseinstalldir="/" name="src/core/support/time_win32.c" role="src" />
<file baseinstalldir="/" name="src/core/support/tls_pthread.c" role="src" />
<file baseinstalldir="/" name="src/core/support/tmpfile_posix.c" role="src" />
<file baseinstalldir="/" name="src/core/support/tmpfile_win32.c" role="src" />
<file baseinstalldir="/" name="src/core/support/wrap_memcpy.c" role="src" />
<file baseinstalldir="/" name="include/grpc/grpc_security.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/byte_buffer.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/compression_types.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/connectivity_state.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/grpc_types.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/propagation_bits.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/status.h" role="src" />
<file baseinstalldir="/" name="include/grpc/byte_buffer.h" role="src" />
<file baseinstalldir="/" name="include/grpc/byte_buffer_reader.h" role="src" />
<file baseinstalldir="/" name="include/grpc/compression.h" role="src" />
<file baseinstalldir="/" name="include/grpc/grpc.h" role="src" />
<file baseinstalldir="/" name="include/grpc/status.h" role="src" />
<file baseinstalldir="/" name="include/grpc/census.h" role="src" />
<file baseinstalldir="/" name="src/core/census/grpc_filter.h" role="src" />
<file baseinstalldir="/" name="src/core/census/grpc_plugin.h" role="src" />
<file baseinstalldir="/" name="src/core/channel/channel_args.h" role="src" />
<file baseinstalldir="/" name="src/core/channel/channel_stack.h" role="src" />
<file baseinstalldir="/" name="src/core/channel/channel_stack_builder.h" role="src" />
<file baseinstalldir="/" name="src/core/channel/client_channel.h" role="src" />
<file baseinstalldir="/" name="src/core/channel/client_uchannel.h" role="src" />
<file baseinstalldir="/" name="src/core/channel/compress_filter.h" role="src" />
<file baseinstalldir="/" name="src/core/channel/connected_channel.h" role="src" />
<file baseinstalldir="/" name="src/core/channel/context.h" role="src" />
<file baseinstalldir="/" name="src/core/channel/http_client_filter.h" role="src" />
<file baseinstalldir="/" name="src/core/channel/http_server_filter.h" role="src" />
<file baseinstalldir="/" name="src/core/channel/subchannel_call_holder.h" role="src" />
<file baseinstalldir="/" name="src/core/client_config/client_config.h" role="src" />
<file baseinstalldir="/" name="src/core/client_config/connector.h" role="src" />
<file baseinstalldir="/" name="src/core/client_config/initial_connect_string.h" role="src" />
<file baseinstalldir="/" name="src/core/client_config/lb_policies/load_balancer_api.h" role="src" />
<file baseinstalldir="/" name="src/core/client_config/lb_policies/pick_first.h" role="src" />
<file baseinstalldir="/" name="src/core/client_config/lb_policies/round_robin.h" role="src" />
<file baseinstalldir="/" name="src/core/client_config/lb_policy.h" role="src" />
<file baseinstalldir="/" name="src/core/client_config/lb_policy_factory.h" role="src" />
<file baseinstalldir="/" name="src/core/client_config/lb_policy_registry.h" role="src" />
<file baseinstalldir="/" name="src/core/client_config/resolver.h" role="src" />
<file baseinstalldir="/" name="src/core/client_config/resolver_factory.h" role="src" />
<file baseinstalldir="/" name="src/core/client_config/resolver_registry.h" role="src" />
<file baseinstalldir="/" name="src/core/client_config/resolvers/dns_resolver.h" role="src" />
<file baseinstalldir="/" name="src/core/client_config/resolvers/sockaddr_resolver.h" role="src" />
<file baseinstalldir="/" name="src/core/client_config/subchannel.h" role="src" />
<file baseinstalldir="/" name="src/core/client_config/subchannel_factory.h" role="src" />
<file baseinstalldir="/" name="src/core/client_config/subchannel_index.h" role="src" />
<file baseinstalldir="/" name="src/core/client_config/uri_parser.h" role="src" />
<file baseinstalldir="/" name="src/core/compression/algorithm_metadata.h" role="src" />
<file baseinstalldir="/" name="src/core/compression/message_compress.h" role="src" />
<file baseinstalldir="/" name="src/core/debug/trace.h" role="src" />
<file baseinstalldir="/" name="src/core/httpcli/format_request.h" role="src" />
<file baseinstalldir="/" name="src/core/httpcli/httpcli.h" role="src" />
<file baseinstalldir="/" name="src/core/httpcli/parser.h" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/closure.h" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/endpoint.h" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/endpoint_pair.h" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/exec_ctx.h" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/executor.h" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/fd_posix.h" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/iocp_windows.h" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/iomgr.h" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/iomgr_internal.h" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/iomgr_posix.h" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/pollset.h" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/pollset_posix.h" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/pollset_set.h" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/pollset_set_posix.h" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/pollset_set_windows.h" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/pollset_windows.h" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/resolve_address.h" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/sockaddr.h" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/sockaddr_posix.h" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/sockaddr_utils.h" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/sockaddr_win32.h" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/socket_utils_posix.h" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/socket_windows.h" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/tcp_client.h" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/tcp_posix.h" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/tcp_server.h" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/tcp_windows.h" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/time_averaged_stats.h" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/timer.h" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/timer_heap.h" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/udp_server.h" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/wakeup_fd_pipe.h" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/wakeup_fd_posix.h" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/workqueue.h" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/workqueue_posix.h" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/workqueue_windows.h" role="src" />
<file baseinstalldir="/" name="src/core/json/json.h" role="src" />
<file baseinstalldir="/" name="src/core/json/json_common.h" role="src" />
<file baseinstalldir="/" name="src/core/json/json_reader.h" role="src" />
<file baseinstalldir="/" name="src/core/json/json_writer.h" role="src" />
<file baseinstalldir="/" name="src/core/proto/grpc/lb/v0/load_balancer.pb.h" role="src" />
<file baseinstalldir="/" name="src/core/statistics/census_interface.h" role="src" />
<file baseinstalldir="/" name="src/core/statistics/census_rpc_stats.h" role="src" />
<file baseinstalldir="/" name="src/core/surface/api_trace.h" role="src" />
<file baseinstalldir="/" name="src/core/surface/call.h" role="src" />
<file baseinstalldir="/" name="src/core/surface/call_test_only.h" role="src" />
<file baseinstalldir="/" name="src/core/surface/channel.h" role="src" />
<file baseinstalldir="/" name="src/core/surface/channel_init.h" role="src" />
<file baseinstalldir="/" name="src/core/surface/channel_stack_type.h" role="src" />
<file baseinstalldir="/" name="src/core/surface/completion_queue.h" role="src" />
<file baseinstalldir="/" name="src/core/surface/event_string.h" role="src" />
<file baseinstalldir="/" name="src/core/surface/init.h" role="src" />
<file baseinstalldir="/" name="src/core/surface/lame_client.h" role="src" />
<file baseinstalldir="/" name="src/core/surface/server.h" role="src" />
<file baseinstalldir="/" name="src/core/surface/surface_trace.h" role="src" />
<file baseinstalldir="/" name="src/core/transport/byte_stream.h" role="src" />
<file baseinstalldir="/" name="src/core/transport/chttp2/alpn.h" role="src" />
<file baseinstalldir="/" name="src/core/transport/chttp2/bin_encoder.h" role="src" />
<file baseinstalldir="/" name="src/core/transport/chttp2/frame.h" role="src" />
<file baseinstalldir="/" name="src/core/transport/chttp2/frame_data.h" role="src" />
<file baseinstalldir="/" name="src/core/transport/chttp2/frame_goaway.h" role="src" />
<file baseinstalldir="/" name="src/core/transport/chttp2/frame_ping.h" role="src" />
<file baseinstalldir="/" name="src/core/transport/chttp2/frame_rst_stream.h" role="src" />
<file baseinstalldir="/" name="src/core/transport/chttp2/frame_settings.h" role="src" />
<file baseinstalldir="/" name="src/core/transport/chttp2/frame_window_update.h" role="src" />
<file baseinstalldir="/" name="src/core/transport/chttp2/hpack_encoder.h" role="src" />
<file baseinstalldir="/" name="src/core/transport/chttp2/hpack_parser.h" role="src" />
<file baseinstalldir="/" name="src/core/transport/chttp2/hpack_table.h" role="src" />
<file baseinstalldir="/" name="src/core/transport/chttp2/http2_errors.h" role="src" />
<file baseinstalldir="/" name="src/core/transport/chttp2/huffsyms.h" role="src" />
<file baseinstalldir="/" name="src/core/transport/chttp2/incoming_metadata.h" role="src" />
<file baseinstalldir="/" name="src/core/transport/chttp2/internal.h" role="src" />
<file baseinstalldir="/" name="src/core/transport/chttp2/status_conversion.h" role="src" />
<file baseinstalldir="/" name="src/core/transport/chttp2/stream_map.h" role="src" />
<file baseinstalldir="/" name="src/core/transport/chttp2/timeout_encoding.h" role="src" />
<file baseinstalldir="/" name="src/core/transport/chttp2/varint.h" role="src" />
<file baseinstalldir="/" name="src/core/transport/chttp2_transport.h" role="src" />
<file baseinstalldir="/" name="src/core/transport/connectivity_state.h" role="src" />
<file baseinstalldir="/" name="src/core/transport/metadata.h" role="src" />
<file baseinstalldir="/" name="src/core/transport/metadata_batch.h" role="src" />
<file baseinstalldir="/" name="src/core/transport/static_metadata.h" role="src" />
<file baseinstalldir="/" name="src/core/transport/transport.h" role="src" />
<file baseinstalldir="/" name="src/core/transport/transport_impl.h" role="src" />
<file baseinstalldir="/" name="src/core/security/auth_filters.h" role="src" />
<file baseinstalldir="/" name="src/core/security/b64.h" role="src" />
<file baseinstalldir="/" name="src/core/security/credentials.h" role="src" />
<file baseinstalldir="/" name="src/core/security/handshake.h" role="src" />
<file baseinstalldir="/" name="src/core/security/json_token.h" role="src" />
<file baseinstalldir="/" name="src/core/security/jwt_verifier.h" role="src" />
<file baseinstalldir="/" name="src/core/security/secure_endpoint.h" role="src" />
<file baseinstalldir="/" name="src/core/security/security_connector.h" role="src" />
<file baseinstalldir="/" name="src/core/security/security_context.h" role="src" />
<file baseinstalldir="/" name="src/core/tsi/fake_transport_security.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.h" role="src" />
<file baseinstalldir="/" name="src/core/tsi/transport_security_interface.h" role="src" />
<file baseinstalldir="/" name="src/core/census/aggregation.h" role="src" />
<file baseinstalldir="/" name="src/core/census/mlog.h" role="src" />
<file baseinstalldir="/" name="src/core/census/rpc_metric_id.h" role="src" />
<file baseinstalldir="/" name="third_party/nanopb/pb.h" role="src" />
<file baseinstalldir="/" name="third_party/nanopb/pb_common.h" role="src" />
<file baseinstalldir="/" name="third_party/nanopb/pb_decode.h" role="src" />
<file baseinstalldir="/" name="third_party/nanopb/pb_encode.h" role="src" />
<file baseinstalldir="/" name="src/core/census/grpc_context.c" role="src" />
<file baseinstalldir="/" name="src/core/census/grpc_filter.c" role="src" />
<file baseinstalldir="/" name="src/core/census/grpc_plugin.c" role="src" />
<file baseinstalldir="/" name="src/core/channel/channel_args.c" role="src" />
<file baseinstalldir="/" name="src/core/channel/channel_stack.c" role="src" />
<file baseinstalldir="/" name="src/core/channel/channel_stack_builder.c" role="src" />
<file baseinstalldir="/" name="src/core/channel/client_channel.c" role="src" />
<file baseinstalldir="/" name="src/core/channel/client_uchannel.c" role="src" />
<file baseinstalldir="/" name="src/core/channel/compress_filter.c" role="src" />
<file baseinstalldir="/" name="src/core/channel/connected_channel.c" role="src" />
<file baseinstalldir="/" name="src/core/channel/http_client_filter.c" role="src" />
<file baseinstalldir="/" name="src/core/channel/http_server_filter.c" role="src" />
<file baseinstalldir="/" name="src/core/channel/subchannel_call_holder.c" role="src" />
<file baseinstalldir="/" name="src/core/client_config/client_config.c" role="src" />
<file baseinstalldir="/" name="src/core/client_config/connector.c" role="src" />
<file baseinstalldir="/" name="src/core/client_config/default_initial_connect_string.c" role="src" />
<file baseinstalldir="/" name="src/core/client_config/initial_connect_string.c" role="src" />
<file baseinstalldir="/" name="src/core/client_config/lb_policies/load_balancer_api.c" role="src" />
<file baseinstalldir="/" name="src/core/client_config/lb_policies/pick_first.c" role="src" />
<file baseinstalldir="/" name="src/core/client_config/lb_policies/round_robin.c" role="src" />
<file baseinstalldir="/" name="src/core/client_config/lb_policy.c" role="src" />
<file baseinstalldir="/" name="src/core/client_config/lb_policy_factory.c" role="src" />
<file baseinstalldir="/" name="src/core/client_config/lb_policy_registry.c" role="src" />
<file baseinstalldir="/" name="src/core/client_config/resolver.c" role="src" />
<file baseinstalldir="/" name="src/core/client_config/resolver_factory.c" role="src" />
<file baseinstalldir="/" name="src/core/client_config/resolver_registry.c" role="src" />
<file baseinstalldir="/" name="src/core/client_config/resolvers/dns_resolver.c" role="src" />
<file baseinstalldir="/" name="src/core/client_config/resolvers/sockaddr_resolver.c" role="src" />
<file baseinstalldir="/" name="src/core/client_config/subchannel.c" role="src" />
<file baseinstalldir="/" name="src/core/client_config/subchannel_factory.c" role="src" />
<file baseinstalldir="/" name="src/core/client_config/subchannel_index.c" role="src" />
<file baseinstalldir="/" name="src/core/client_config/uri_parser.c" role="src" />
<file baseinstalldir="/" name="src/core/compression/compression_algorithm.c" role="src" />
<file baseinstalldir="/" name="src/core/compression/message_compress.c" role="src" />
<file baseinstalldir="/" name="src/core/debug/trace.c" role="src" />
<file baseinstalldir="/" name="src/core/httpcli/format_request.c" role="src" />
<file baseinstalldir="/" name="src/core/httpcli/httpcli.c" role="src" />
<file baseinstalldir="/" name="src/core/httpcli/parser.c" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/closure.c" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/endpoint.c" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/endpoint_pair_posix.c" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/endpoint_pair_windows.c" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/exec_ctx.c" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/executor.c" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/fd_posix.c" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/iocp_windows.c" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/iomgr.c" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/iomgr_posix.c" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/iomgr_windows.c" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/pollset_multipoller_with_epoll.c" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/pollset_multipoller_with_poll_posix.c" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/pollset_posix.c" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/pollset_set_posix.c" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/pollset_set_windows.c" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/pollset_windows.c" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/resolve_address_posix.c" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/resolve_address_windows.c" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/sockaddr_utils.c" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/socket_utils_common_posix.c" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/socket_utils_linux.c" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/socket_utils_posix.c" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/socket_windows.c" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/tcp_client_posix.c" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/tcp_client_windows.c" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/tcp_posix.c" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/tcp_server_posix.c" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/tcp_server_windows.c" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/tcp_windows.c" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/time_averaged_stats.c" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/timer.c" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/timer_heap.c" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/udp_server.c" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/wakeup_fd_eventfd.c" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/wakeup_fd_nospecial.c" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/wakeup_fd_pipe.c" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/wakeup_fd_posix.c" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/workqueue_posix.c" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/workqueue_windows.c" role="src" />
<file baseinstalldir="/" name="src/core/json/json.c" role="src" />
<file baseinstalldir="/" name="src/core/json/json_reader.c" role="src" />
<file baseinstalldir="/" name="src/core/json/json_string.c" role="src" />
<file baseinstalldir="/" name="src/core/json/json_writer.c" role="src" />
<file baseinstalldir="/" name="src/core/proto/grpc/lb/v0/load_balancer.pb.c" role="src" />
<file baseinstalldir="/" name="src/core/surface/alarm.c" role="src" />
<file baseinstalldir="/" name="src/core/surface/api_trace.c" role="src" />
<file baseinstalldir="/" name="src/core/surface/byte_buffer.c" role="src" />
<file baseinstalldir="/" name="src/core/surface/byte_buffer_reader.c" role="src" />
<file baseinstalldir="/" name="src/core/surface/call.c" role="src" />
<file baseinstalldir="/" name="src/core/surface/call_details.c" role="src" />
<file baseinstalldir="/" name="src/core/surface/call_log_batch.c" role="src" />
<file baseinstalldir="/" name="src/core/surface/channel.c" role="src" />
<file baseinstalldir="/" name="src/core/surface/channel_connectivity.c" role="src" />
<file baseinstalldir="/" name="src/core/surface/channel_create.c" role="src" />
<file baseinstalldir="/" name="src/core/surface/channel_init.c" role="src" />
<file baseinstalldir="/" name="src/core/surface/channel_ping.c" role="src" />
<file baseinstalldir="/" name="src/core/surface/channel_stack_type.c" role="src" />
<file baseinstalldir="/" name="src/core/surface/completion_queue.c" role="src" />
<file baseinstalldir="/" name="src/core/surface/event_string.c" role="src" />
<file baseinstalldir="/" name="src/core/surface/init.c" role="src" />
<file baseinstalldir="/" name="src/core/surface/lame_client.c" role="src" />
<file baseinstalldir="/" name="src/core/surface/metadata_array.c" role="src" />
<file baseinstalldir="/" name="src/core/surface/server.c" role="src" />
<file baseinstalldir="/" name="src/core/surface/server_chttp2.c" role="src" />
<file baseinstalldir="/" name="src/core/surface/validate_metadata.c" role="src" />
<file baseinstalldir="/" name="src/core/surface/version.c" role="src" />
<file baseinstalldir="/" name="src/core/transport/byte_stream.c" role="src" />
<file baseinstalldir="/" name="src/core/transport/chttp2/alpn.c" role="src" />
<file baseinstalldir="/" name="src/core/transport/chttp2/bin_encoder.c" role="src" />
<file baseinstalldir="/" name="src/core/transport/chttp2/frame_data.c" role="src" />
<file baseinstalldir="/" name="src/core/transport/chttp2/frame_goaway.c" role="src" />
<file baseinstalldir="/" name="src/core/transport/chttp2/frame_ping.c" role="src" />
<file baseinstalldir="/" name="src/core/transport/chttp2/frame_rst_stream.c" role="src" />
<file baseinstalldir="/" name="src/core/transport/chttp2/frame_settings.c" role="src" />
<file baseinstalldir="/" name="src/core/transport/chttp2/frame_window_update.c" role="src" />
<file baseinstalldir="/" name="src/core/transport/chttp2/hpack_encoder.c" role="src" />
<file baseinstalldir="/" name="src/core/transport/chttp2/hpack_parser.c" role="src" />
<file baseinstalldir="/" name="src/core/transport/chttp2/hpack_table.c" role="src" />
<file baseinstalldir="/" name="src/core/transport/chttp2/huffsyms.c" role="src" />
<file baseinstalldir="/" name="src/core/transport/chttp2/incoming_metadata.c" role="src" />
<file baseinstalldir="/" name="src/core/transport/chttp2/parsing.c" role="src" />
<file baseinstalldir="/" name="src/core/transport/chttp2/status_conversion.c" role="src" />
<file baseinstalldir="/" name="src/core/transport/chttp2/stream_lists.c" role="src" />
<file baseinstalldir="/" name="src/core/transport/chttp2/stream_map.c" role="src" />
<file baseinstalldir="/" name="src/core/transport/chttp2/timeout_encoding.c" role="src" />
<file baseinstalldir="/" name="src/core/transport/chttp2/varint.c" role="src" />
<file baseinstalldir="/" name="src/core/transport/chttp2/writing.c" role="src" />
<file baseinstalldir="/" name="src/core/transport/chttp2_transport.c" role="src" />
<file baseinstalldir="/" name="src/core/transport/connectivity_state.c" role="src" />
<file baseinstalldir="/" name="src/core/transport/metadata.c" role="src" />
<file baseinstalldir="/" name="src/core/transport/metadata_batch.c" role="src" />
<file baseinstalldir="/" name="src/core/transport/static_metadata.c" role="src" />
<file baseinstalldir="/" name="src/core/transport/transport.c" role="src" />
<file baseinstalldir="/" name="src/core/transport/transport_op_string.c" role="src" />
<file baseinstalldir="/" name="src/core/httpcli/httpcli_security_connector.c" role="src" />
<file baseinstalldir="/" name="src/core/security/b64.c" role="src" />
<file baseinstalldir="/" name="src/core/security/client_auth_filter.c" role="src" />
<file baseinstalldir="/" name="src/core/security/credentials.c" role="src" />
<file baseinstalldir="/" name="src/core/security/credentials_metadata.c" role="src" />
<file baseinstalldir="/" name="src/core/security/credentials_posix.c" role="src" />
<file baseinstalldir="/" name="src/core/security/credentials_win32.c" role="src" />
<file baseinstalldir="/" name="src/core/security/google_default_credentials.c" role="src" />
<file baseinstalldir="/" name="src/core/security/handshake.c" role="src" />
<file baseinstalldir="/" name="src/core/security/json_token.c" role="src" />
<file baseinstalldir="/" name="src/core/security/jwt_verifier.c" role="src" />
<file baseinstalldir="/" name="src/core/security/secure_endpoint.c" role="src" />
<file baseinstalldir="/" name="src/core/security/security_connector.c" role="src" />
<file baseinstalldir="/" name="src/core/security/security_context.c" role="src" />
<file baseinstalldir="/" name="src/core/security/server_auth_filter.c" role="src" />
<file baseinstalldir="/" name="src/core/security/server_secure_chttp2.c" role="src" />
<file baseinstalldir="/" name="src/core/surface/init_secure.c" role="src" />
<file baseinstalldir="/" name="src/core/surface/secure_channel_create.c" role="src" />
<file baseinstalldir="/" name="src/core/tsi/fake_transport_security.c" role="src" />
<file baseinstalldir="/" name="src/core/tsi/ssl_transport_security.c" role="src" />
<file baseinstalldir="/" name="src/core/tsi/transport_security.c" role="src" />
<file baseinstalldir="/" name="src/core/census/context.c" role="src" />
<file baseinstalldir="/" name="src/core/census/initialize.c" role="src" />
<file baseinstalldir="/" name="src/core/census/mlog.c" role="src" />
<file baseinstalldir="/" name="src/core/census/operation.c" role="src" />
<file baseinstalldir="/" name="src/core/census/placeholders.c" role="src" />
<file baseinstalldir="/" name="src/core/census/tracing.c" role="src" />
<file baseinstalldir="/" name="third_party/nanopb/pb_common.c" role="src" />
<file baseinstalldir="/" name="third_party/nanopb/pb_decode.c" role="src" />
<file baseinstalldir="/" name="third_party/nanopb/pb_encode.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/aes/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/asn1_locl.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bio/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bn/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bn/rsaz_exp.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bytestring/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/cipher/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/conf/conf_def.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/conf/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/des/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/dh/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/digest/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/digest/md32_common.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/directory.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/dsa/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/ec/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/ec/p256-x86_64-table.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/evp/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/modes/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/obj/obj_dat.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/obj/obj_xref.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/pkcs8/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/rand/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/rsa/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/test/scoped_types.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/test/test_util.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/charmap.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/vpm_int.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509v3/ext_dat.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509v3/pcy_int.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/aead.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/aes.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/arm_arch.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/asn1.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/asn1_mac.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/asn1t.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/base.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/base64.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/bio.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/blowfish.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/bn.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/buf.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/buffer.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/bytestring.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/cast.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/chacha.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/cipher.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/cmac.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/conf.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/cpu.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/crypto.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/curve25519.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/des.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/dh.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/digest.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/dsa.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/dtls1.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/ec.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/ec_key.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/ecdh.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/ecdsa.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/engine.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/err.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/evp.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/ex_data.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/hkdf.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/hmac.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/lhash.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/lhash_macros.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/md4.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/md5.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/mem.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/obj.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/obj_mac.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/objects.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/opensslfeatures.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/opensslv.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/ossl_typ.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/pem.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/pkcs12.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/pkcs7.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/pkcs8.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/poly1305.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/pqueue.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/rand.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/rc4.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/rsa.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/safestack.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/sha.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/srtp.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/ssl.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/ssl3.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/stack.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/stack_macros.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/thread.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/time_support.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/tls1.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/type_check.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/x509.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/x509_vfy.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/x509v3.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/test/async_bio.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/test/packeted_bio.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/test/scoped_types.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/test/test_config.h" role="src" />
<file baseinstalldir="/" name="src/boringssl/err_data.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/aes/aes.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/aes/mode_wrappers.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/a_bitstr.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/a_bool.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/a_bytes.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/a_d2i_fp.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/a_dup.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/a_enum.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/a_gentm.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/a_i2d_fp.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/a_int.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/a_mbstr.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/a_object.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/a_octet.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/a_print.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/a_strnid.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/a_time.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/a_type.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/a_utctm.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/a_utf8.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/asn1_lib.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/asn1_par.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/asn_pack.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/bio_asn1.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/bio_ndef.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/f_enum.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/f_int.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/f_string.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/t_bitst.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/t_pkey.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/tasn_dec.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/tasn_enc.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/tasn_fre.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/tasn_new.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/tasn_prn.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/tasn_typ.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/tasn_utl.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/x_bignum.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/x_long.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/base64/base64.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bio/bio.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bio/bio_mem.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bio/buffer.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bio/connect.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bio/fd.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bio/file.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bio/hexdump.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bio/pair.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bio/printf.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bio/socket.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bio/socket_helper.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bn/add.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bn/asm/x86_64-gcc.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bn/bn.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bn/bn_asn1.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bn/cmp.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bn/convert.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bn/ctx.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bn/div.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bn/exponentiation.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bn/gcd.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bn/generic.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bn/kronecker.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bn/montgomery.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bn/mul.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bn/prime.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bn/random.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bn/rsaz_exp.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bn/shift.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bn/sqrt.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/buf/buf.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bytestring/ber.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bytestring/cbb.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bytestring/cbs.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/chacha/chacha_generic.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/chacha/chacha_vec.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/cipher/aead.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/cipher/cipher.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/cipher/derive_key.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/cipher/e_aes.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/cipher/e_chacha20poly1305.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/cipher/e_des.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/cipher/e_null.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/cipher/e_rc2.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/cipher/e_rc4.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/cipher/e_ssl3.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/cipher/e_tls.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/cipher/tls_cbc.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/cmac/cmac.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/conf/conf.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/cpu-arm.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/cpu-intel.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/crypto.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/curve25519/curve25519.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/des/des.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/dh/check.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/dh/dh.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/dh/dh_asn1.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/dh/params.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/digest/digest.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/digest/digests.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/directory_posix.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/directory_win.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/dsa/dsa.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/dsa/dsa_asn1.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/ec/ec.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/ec/ec_asn1.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/ec/ec_key.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/ec/ec_montgomery.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/ec/oct.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/ec/p224-64.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/ec/p256-64.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/ec/p256-x86_64.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/ec/simple.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/ec/util-64.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/ec/wnaf.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/ecdh/ecdh.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/ecdsa/ecdsa.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/ecdsa/ecdsa_asn1.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/engine/engine.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/err/err.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/evp/algorithm.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/evp/digestsign.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/evp/evp.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/evp/evp_asn1.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/evp/evp_ctx.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/evp/p_dsa_asn1.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/evp/p_ec.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/evp/p_ec_asn1.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/evp/p_rsa.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/evp/p_rsa_asn1.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/evp/pbkdf.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/evp/sign.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/ex_data.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/hkdf/hkdf.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/hmac/hmac.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/lhash/lhash.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/md4/md4.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/md5/md5.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/mem.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/modes/cbc.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/modes/cfb.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/modes/ctr.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/modes/gcm.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/modes/ofb.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/obj/obj.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/obj/obj_xref.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/pem/pem_all.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/pem/pem_info.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/pem/pem_lib.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/pem/pem_oth.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/pem/pem_pk8.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/pem/pem_pkey.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/pem/pem_x509.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/pem/pem_xaux.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/pkcs8/p5_pbe.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/pkcs8/p5_pbev2.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/pkcs8/p8_pkey.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/pkcs8/pkcs8.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/poly1305/poly1305.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/poly1305/poly1305_arm.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/poly1305/poly1305_vec.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/rand/rand.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/rand/urandom.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/rand/windows.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/rc4/rc4.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/refcount_c11.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/refcount_lock.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/rsa/blinding.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/rsa/padding.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/rsa/rsa.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/rsa/rsa_asn1.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/rsa/rsa_impl.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/sha/sha1.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/sha/sha256.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/sha/sha512.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/stack/stack.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/thread.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/thread_none.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/thread_pthread.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/thread_win.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/time_support.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/a_digest.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/a_sign.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/a_strex.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/a_verify.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/asn1_gen.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/by_dir.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/by_file.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/i2d_pr.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/pkcs7.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/t_crl.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/t_req.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/t_x509.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/t_x509a.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/x509.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/x509_att.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/x509_cmp.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/x509_d2.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/x509_def.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/x509_ext.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/x509_lu.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/x509_obj.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/x509_r2x.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/x509_req.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/x509_set.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/x509_trs.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/x509_txt.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/x509_v3.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/x509_vfy.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/x509_vpm.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/x509cset.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/x509name.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/x509rset.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/x509spki.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/x509type.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/x_algor.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/x_all.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/x_attrib.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/x_crl.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/x_exten.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/x_info.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/x_name.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/x_pkey.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/x_pubkey.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/x_req.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/x_sig.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/x_spki.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/x_val.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/x_x509.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/x_x509a.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509v3/pcy_cache.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509v3/pcy_data.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509v3/pcy_lib.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509v3/pcy_map.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509v3/pcy_node.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509v3/pcy_tree.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509v3/v3_akey.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509v3/v3_akeya.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509v3/v3_alt.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509v3/v3_bcons.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509v3/v3_bitst.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509v3/v3_conf.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509v3/v3_cpols.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509v3/v3_crld.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509v3/v3_enum.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509v3/v3_extku.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509v3/v3_genn.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509v3/v3_ia5.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509v3/v3_info.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509v3/v3_int.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509v3/v3_lib.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509v3/v3_ncons.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509v3/v3_pci.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509v3/v3_pcia.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509v3/v3_pcons.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509v3/v3_pku.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509v3/v3_pmaps.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509v3/v3_prn.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509v3/v3_purp.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509v3/v3_skey.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509v3/v3_sxnet.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509v3/v3_utl.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/custom_extensions.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/d1_both.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/d1_clnt.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/d1_lib.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/d1_meth.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/d1_pkt.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/d1_srtp.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/d1_srvr.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/dtls_record.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/pqueue/pqueue.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/s3_both.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/s3_clnt.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/s3_enc.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/s3_lib.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/s3_meth.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/s3_pkt.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/s3_srvr.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/ssl_aead_ctx.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/ssl_asn1.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/ssl_buffer.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/ssl_cert.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/ssl_cipher.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/ssl_file.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/ssl_lib.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/ssl_rsa.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/ssl_session.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/ssl_stat.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/t1_enc.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/t1_lib.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/tls_record.c" role="src" />
</dir>
</contents>
<dependencies>
<required>
<php>
<min>5.5.0</min>
</php>
<pearinstaller>
<min>1.4.0</min>
</pearinstaller>
</required>
</dependencies>
<providesextension>grpc</providesextension>
<extsrcrelease />
<changelog>
<release>
<version>
<release>0.5.0</release>
<api>0.5.0</api>
</version>
<stability>
<release>alpha</release>
<api>alpha</api>
</stability>
<date>2015-06-16</date>
<license>BSD</license>
<notes>
First alpha release
</notes>
</release>
<release>
<version>
<release>0.5.1</release>
<api>0.5.1</api>
</version>
<stability>
<release>alpha</release>
<api>alpha</api>
</stability>
<date>2015-07-09</date>
<license>BSD</license>
<notes>
Update to wrap gRPC C Core version 0.10.0
</notes>
</release>
<release>
<version>
<release>0.6.0</release>
<api>0.6.0</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<date>2015-09-24</date>
<license>BSD</license>
<notes>
- support per message compression disable
- expose per-call host override option
- expose connectivity API
- expose channel target and call peer
- add user-agent
- update to wrap gRPC C core library beta version 0.11.0
</notes>
</release>
<release>
<version>
<release>0.6.1</release>
<api>0.6.0</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<date>2015-10-21</date>
<license>BSD</license>
<notes>
- fixed undefined constant fatal error when run with apache/nginx #2275
</notes>
</release>
<release>
<version>
<release>0.7.0</release>
<api>0.7.0</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<date>2016-01-13</date>
<license>BSD</license>
<notes>
- Breaking change to Credentials class (removed) #3765
- Replaced by ChannelCredentials and CallCredentials class #3765
- New plugin based metadata auth API #4394
- Explicit ChannelCredentials::createInsecure() call
</notes>
</release>
<release>
<version>
<release>0.8.0</release>
<api>0.8.0</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<date>2016-02-24</date>
<license>BSD</license>
<notes>
- Simplify gRPC PHP installation #4517
</notes>
</release>
</changelog>
</package>

@ -208,7 +208,6 @@ PACKAGE_DATA = {
'_credentials/roots.pem',
'_windows/grpc_c.32.python',
'_windows/grpc_c.64.python',
'cygrpc.so',
],
}
if INSTALL_TESTS:

@ -0,0 +1,163 @@
/*
*
* Copyright 2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#include "src/core/client_config/lb_policies/load_balancer_api.h"
#include "third_party/nanopb/pb_decode.h"
#include "third_party/nanopb/pb_encode.h"
#include <grpc/support/alloc.h>
typedef struct decode_serverlist_arg {
int first_pass;
int i;
size_t num_servers;
grpc_grpclb_server **servers;
} decode_serverlist_arg;
/* invoked once for every Server in ServerList */
static bool decode_serverlist(pb_istream_t *stream, const pb_field_t *field,
void **arg) {
decode_serverlist_arg *dec_arg = *arg;
if (dec_arg->first_pass != 0) { /* first pass */
grpc_grpclb_server server;
if (!pb_decode(stream, grpc_lb_v0_Server_fields, &server)) {
return false;
}
dec_arg->num_servers++;
} else { /* second pass */
grpc_grpclb_server *server = gpr_malloc(sizeof(grpc_grpclb_server));
GPR_ASSERT(dec_arg->num_servers > 0);
if (dec_arg->i == 0) { /* first iteration of second pass */
dec_arg->servers =
gpr_malloc(sizeof(grpc_grpclb_server *) * dec_arg->num_servers);
}
if (!pb_decode(stream, grpc_lb_v0_Server_fields, server)) {
return false;
}
dec_arg->servers[dec_arg->i++] = server;
}
return true;
}
grpc_grpclb_request *grpc_grpclb_request_create(const char *lb_service_name) {
grpc_grpclb_request *req = gpr_malloc(sizeof(grpc_grpclb_request));
req->has_client_stats = 0; /* TODO(dgq): add support for stats once defined */
req->has_initial_request = 1;
req->initial_request.has_name = 1;
strncpy(req->initial_request.name, lb_service_name,
GRPC_GRPCLB_SERVICE_NAME_MAX_LENGTH);
return req;
}
gpr_slice grpc_grpclb_request_encode(const grpc_grpclb_request *request) {
size_t encoded_length;
pb_ostream_t sizestream;
pb_ostream_t outputstream;
gpr_slice slice;
memset(&sizestream, 0, sizeof(pb_ostream_t));
pb_encode(&sizestream, grpc_lb_v0_LoadBalanceRequest_fields, request);
encoded_length = sizestream.bytes_written;
slice = gpr_slice_malloc(encoded_length);
outputstream =
pb_ostream_from_buffer(GPR_SLICE_START_PTR(slice), encoded_length);
GPR_ASSERT(pb_encode(&outputstream, grpc_lb_v0_LoadBalanceRequest_fields,
request) != 0);
return slice;
}
void grpc_grpclb_request_destroy(grpc_grpclb_request *request) {
gpr_free(request);
}
grpc_grpclb_response *grpc_grpclb_response_parse(gpr_slice encoded_response) {
bool status;
pb_istream_t stream =
pb_istream_from_buffer(GPR_SLICE_START_PTR(encoded_response),
GPR_SLICE_LENGTH(encoded_response));
grpc_grpclb_response *res = gpr_malloc(sizeof(grpc_grpclb_response));
memset(res, 0, sizeof(*res));
status = pb_decode(&stream, grpc_lb_v0_LoadBalanceResponse_fields, res);
GPR_ASSERT(status == true);
return res;
}
grpc_grpclb_serverlist *grpc_grpclb_response_parse_serverlist(
gpr_slice encoded_response) {
grpc_grpclb_serverlist *sl = gpr_malloc(sizeof(grpc_grpclb_serverlist));
bool status;
decode_serverlist_arg arg;
pb_istream_t stream =
pb_istream_from_buffer(GPR_SLICE_START_PTR(encoded_response),
GPR_SLICE_LENGTH(encoded_response));
pb_istream_t stream_at_start = stream;
grpc_grpclb_response *res = gpr_malloc(sizeof(grpc_grpclb_response));
memset(res, 0, sizeof(*res));
memset(&arg, 0, sizeof(decode_serverlist_arg));
res->server_list.servers.funcs.decode = decode_serverlist;
res->server_list.servers.arg = &arg;
arg.first_pass = 1;
status = pb_decode(&stream, grpc_lb_v0_LoadBalanceResponse_fields, res);
GPR_ASSERT(status == true);
GPR_ASSERT(arg.num_servers > 0);
arg.first_pass = 0;
status =
pb_decode(&stream_at_start, grpc_lb_v0_LoadBalanceResponse_fields, res);
GPR_ASSERT(status == true);
GPR_ASSERT(arg.servers != NULL);
sl->num_servers = arg.num_servers;
sl->servers = arg.servers;
if (res->server_list.has_expiration_interval) {
sl->expiration_interval = res->server_list.expiration_interval;
}
grpc_grpclb_response_destroy(res);
return sl;
}
void grpc_grpclb_destroy_serverlist(grpc_grpclb_serverlist *serverlist) {
size_t i;
for (i = 0; i < serverlist->num_servers; i++) {
gpr_free(serverlist->servers[i]);
}
gpr_free(serverlist->servers);
gpr_free(serverlist);
}
void grpc_grpclb_response_destroy(grpc_grpclb_response *response) {
gpr_free(response);
}

@ -0,0 +1,85 @@
/*
*
* Copyright 2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef GRPC_INTERNAL_CORE_CLIENT_CONFIG_LB_POLICIES_LOAD_BALANCER_API_H
#define GRPC_INTERNAL_CORE_CLIENT_CONFIG_LB_POLICIES_LOAD_BALANCER_API_H
#include <grpc/support/slice_buffer.h>
#include "src/core/client_config/lb_policy_factory.h"
#include "src/core/proto/grpc/lb/v0/load_balancer.pb.h"
#ifdef __cplusplus
extern "C" {
#endif
#define GRPC_GRPCLB_SERVICE_NAME_MAX_LENGTH 128
typedef grpc_lb_v0_LoadBalanceRequest grpc_grpclb_request;
typedef grpc_lb_v0_LoadBalanceResponse grpc_grpclb_response;
typedef grpc_lb_v0_Server grpc_grpclb_server;
typedef grpc_lb_v0_Duration grpc_grpclb_duration;
typedef struct grpc_grpclb_serverlist {
grpc_grpclb_server **servers;
size_t num_servers;
grpc_grpclb_duration expiration_interval;
} grpc_grpclb_serverlist;
/** Create a request for a gRPC LB service under \a lb_service_name */
grpc_grpclb_request *grpc_grpclb_request_create(const char *lb_service_name);
/** Protocol Buffers v3-encode \a request */
gpr_slice grpc_grpclb_request_encode(const grpc_grpclb_request *request);
/** Destroy \a request */
void grpc_grpclb_request_destroy(grpc_grpclb_request *request);
/** Parse (ie, decode) the bytes in \a encoded_response as a \a
* grpc_grpclb_response */
grpc_grpclb_response *grpc_grpclb_response_parse(gpr_slice encoded_response);
/** Destroy \a serverlist */
void grpc_grpclb_destroy_serverlist(grpc_grpclb_serverlist *serverlist);
/** Parse the list of servers from an encoded \a grpc_grpclb_response */
grpc_grpclb_serverlist *grpc_grpclb_response_parse_serverlist(
gpr_slice encoded_response);
/** Destroy \a response */
void grpc_grpclb_response_destroy(grpc_grpclb_response *response);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_INTERNAL_CORE_CLIENT_CONFIG_LB_POLICIES_LOAD_BALANCER_API_H */

@ -149,11 +149,13 @@ static const gpr_avl_vtable subchannel_avl_vtable = {
void grpc_subchannel_index_init(void) {
g_subchannel_index = gpr_avl_create(&subchannel_avl_vtable);
gpr_mu_init(&g_mu);
gpr_tls_init(&subchannel_index_exec_ctx);
}
void grpc_subchannel_index_shutdown(void) {
gpr_mu_destroy(&g_mu);
gpr_avl_unref(g_subchannel_index);
gpr_tls_destroy(&subchannel_index_exec_ctx);
}
grpc_subchannel *grpc_subchannel_index_find(grpc_exec_ctx *exec_ctx,

@ -59,7 +59,7 @@ static void httpcli_ssl_destroy(grpc_security_connector *sc) {
}
static void httpcli_ssl_do_handshake(grpc_exec_ctx *exec_ctx,
grpc_security_connector *sc,
grpc_channel_security_connector *sc,
grpc_endpoint *nonsecure_endpoint,
grpc_security_handshake_done_cb cb,
void *user_data) {
@ -78,8 +78,8 @@ static void httpcli_ssl_do_handshake(grpc_exec_ctx *exec_ctx,
tsi_result_to_string(result));
cb(exec_ctx, user_data, GRPC_SECURITY_ERROR, NULL, NULL);
} else {
grpc_do_security_handshake(exec_ctx, handshaker, sc, nonsecure_endpoint, cb,
user_data);
grpc_do_security_handshake(exec_ctx, handshaker, &sc->base, true,
nonsecure_endpoint, cb, user_data);
}
}
@ -103,7 +103,7 @@ static void httpcli_ssl_check_peer(grpc_exec_ctx *exec_ctx,
}
static grpc_security_connector_vtable httpcli_ssl_vtable = {
httpcli_ssl_destroy, httpcli_ssl_do_handshake, httpcli_ssl_check_peer};
httpcli_ssl_destroy, httpcli_ssl_check_peer};
static grpc_security_status httpcli_ssl_channel_security_connector_create(
const unsigned char *pem_root_certs, size_t pem_root_certs_size,
@ -121,7 +121,6 @@ static grpc_security_status httpcli_ssl_channel_security_connector_create(
memset(c, 0, sizeof(grpc_httpcli_ssl_channel_security_connector));
gpr_ref_init(&c->base.base.refcount, 1);
c->base.base.is_client_side = 1;
c->base.base.vtable = &httpcli_ssl_vtable;
if (secure_peer_name != NULL) {
c->secure_peer_name = gpr_strdup(secure_peer_name);
@ -136,6 +135,7 @@ static grpc_security_status httpcli_ssl_channel_security_connector_create(
*sc = NULL;
return GRPC_SECURITY_ERROR;
}
c->base.do_handshake = httpcli_ssl_do_handshake;
*sc = &c->base;
return GRPC_SECURITY_OK;
}
@ -180,8 +180,8 @@ static void ssl_handshake(grpc_exec_ctx *exec_ctx, void *arg,
GPR_ASSERT(httpcli_ssl_channel_security_connector_create(
pem_root_certs, pem_root_certs_size, host, &sc) ==
GRPC_SECURITY_OK);
grpc_security_connector_do_handshake(exec_ctx, &sc->base, tcp,
on_secure_transport_setup_done, c);
grpc_channel_security_connector_do_handshake(
exec_ctx, sc, tcp, on_secure_transport_setup_done, c);
GRPC_SECURITY_CONNECTOR_UNREF(&sc->base, "httpcli");
}

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -83,7 +83,7 @@ void grpc_pollset_destroy(grpc_pollset *pollset);
pollset
lock */
void grpc_pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
grpc_pollset_worker *worker, gpr_timespec now,
grpc_pollset_worker **worker, gpr_timespec now,
gpr_timespec deadline);
/* Break one polling thread out of polling work for this pollset.

@ -246,8 +246,11 @@ static void finish_shutdown(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset) {
}
void grpc_pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
grpc_pollset_worker *worker, gpr_timespec now,
grpc_pollset_worker **worker_hdl, gpr_timespec now,
gpr_timespec deadline) {
grpc_pollset_worker worker;
*worker_hdl = &worker;
/* pollset->mu already held */
int added_worker = 0;
int locked = 1;
@ -255,16 +258,16 @@ void grpc_pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
int keep_polling = 0;
GPR_TIMER_BEGIN("grpc_pollset_work", 0);
/* this must happen before we (potentially) drop pollset->mu */
worker->next = worker->prev = NULL;
worker->reevaluate_polling_on_wakeup = 0;
worker.next = worker.prev = NULL;
worker.reevaluate_polling_on_wakeup = 0;
if (pollset->local_wakeup_cache != NULL) {
worker->wakeup_fd = pollset->local_wakeup_cache;
pollset->local_wakeup_cache = worker->wakeup_fd->next;
worker.wakeup_fd = pollset->local_wakeup_cache;
pollset->local_wakeup_cache = worker.wakeup_fd->next;
} else {
worker->wakeup_fd = gpr_malloc(sizeof(*worker->wakeup_fd));
grpc_wakeup_fd_init(&worker->wakeup_fd->fd);
worker.wakeup_fd = gpr_malloc(sizeof(*worker.wakeup_fd));
grpc_wakeup_fd_init(&worker.wakeup_fd->fd);
}
worker->kicked_specifically = 0;
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 (!grpc_pollset_has_workers(pollset) &&
@ -293,13 +296,13 @@ void grpc_pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
keep_polling = 0;
if (!pollset->kicked_without_pollers) {
if (!added_worker) {
push_front_worker(pollset, worker);
push_front_worker(pollset, &worker);
added_worker = 1;
gpr_tls_set(&g_current_thread_worker, (intptr_t)worker);
gpr_tls_set(&g_current_thread_worker, (intptr_t)&worker);
}
gpr_tls_set(&g_current_thread_poller, (intptr_t)pollset);
GPR_TIMER_BEGIN("maybe_work_and_unlock", 0);
pollset->vtable->maybe_work_and_unlock(exec_ctx, pollset, worker,
pollset->vtable->maybe_work_and_unlock(exec_ctx, pollset, &worker,
deadline, now);
GPR_TIMER_END("maybe_work_and_unlock", 0);
locked = 0;
@ -321,10 +324,10 @@ void grpc_pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
/* If we're forced to re-evaluate polling (via grpc_pollset_kick with
GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP) then we land here and force
a loop */
if (worker->reevaluate_polling_on_wakeup) {
worker->reevaluate_polling_on_wakeup = 0;
if (worker.reevaluate_polling_on_wakeup) {
worker.reevaluate_polling_on_wakeup = 0;
pollset->kicked_without_pollers = 0;
if (queued_work || worker->kicked_specifically) {
if (queued_work || worker.kicked_specifically) {
/* If there's queued work on the list, then set the deadline to be
immediate so we get back out of the polling loop quickly */
deadline = gpr_inf_past(GPR_CLOCK_MONOTONIC);
@ -333,12 +336,12 @@ void grpc_pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
}
}
if (added_worker) {
remove_worker(pollset, worker);
remove_worker(pollset, &worker);
gpr_tls_set(&g_current_thread_worker, 0);
}
/* release wakeup fd to the local pool */
worker->wakeup_fd->next = pollset->local_wakeup_cache;
pollset->local_wakeup_cache = worker->wakeup_fd;
worker.wakeup_fd->next = pollset->local_wakeup_cache;
pollset->local_wakeup_cache = worker.wakeup_fd;
/* check shutdown conditions */
if (pollset->shutting_down) {
if (grpc_pollset_has_workers(pollset)) {
@ -360,6 +363,7 @@ void grpc_pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
gpr_mu_lock(&pollset->mu);
}
}
*worker_hdl = NULL;
GPR_TIMER_END("grpc_pollset_work", 0);
}

@ -125,22 +125,25 @@ void grpc_pollset_reset(grpc_pollset *pollset) {
}
void grpc_pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
grpc_pollset_worker *worker, gpr_timespec now,
grpc_pollset_worker **worker_hdl, gpr_timespec now,
gpr_timespec deadline) {
grpc_pollset_worker worker;
*worker_hdl = &worker;
int added_worker = 0;
worker->links[GRPC_POLLSET_WORKER_LINK_POLLSET].next =
worker->links[GRPC_POLLSET_WORKER_LINK_POLLSET].prev =
worker->links[GRPC_POLLSET_WORKER_LINK_GLOBAL].next =
worker->links[GRPC_POLLSET_WORKER_LINK_GLOBAL].prev = NULL;
worker->kicked = 0;
worker->pollset = pollset;
gpr_cv_init(&worker->cv);
worker.links[GRPC_POLLSET_WORKER_LINK_POLLSET].next =
worker.links[GRPC_POLLSET_WORKER_LINK_POLLSET].prev =
worker.links[GRPC_POLLSET_WORKER_LINK_GLOBAL].next =
worker.links[GRPC_POLLSET_WORKER_LINK_GLOBAL].prev = NULL;
worker.kicked = 0;
worker.pollset = pollset;
gpr_cv_init(&worker.cv);
if (!pollset->kicked_without_pollers && !pollset->shutting_down) {
if (g_active_poller == NULL) {
grpc_pollset_worker *next_worker;
/* become poller */
pollset->is_iocp_worker = 1;
g_active_poller = worker;
g_active_poller = &worker;
gpr_mu_unlock(&grpc_polling_mu);
grpc_iocp_work(exec_ctx, deadline);
grpc_exec_ctx_flush(exec_ctx);
@ -167,12 +170,12 @@ void grpc_pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
goto done;
}
push_front_worker(&g_global_root_worker, GRPC_POLLSET_WORKER_LINK_GLOBAL,
worker);
&worker);
push_front_worker(&pollset->root_worker, GRPC_POLLSET_WORKER_LINK_POLLSET,
worker);
&worker);
added_worker = 1;
while (!worker->kicked) {
if (gpr_cv_wait(&worker->cv, &grpc_polling_mu, deadline)) {
while (!worker.kicked) {
if (gpr_cv_wait(&worker.cv, &grpc_polling_mu, deadline)) {
break;
}
}
@ -186,10 +189,11 @@ done:
gpr_mu_lock(&grpc_polling_mu);
}
if (added_worker) {
remove_worker(worker, GRPC_POLLSET_WORKER_LINK_GLOBAL);
remove_worker(worker, GRPC_POLLSET_WORKER_LINK_POLLSET);
remove_worker(&worker, GRPC_POLLSET_WORKER_LINK_GLOBAL);
remove_worker(&worker, GRPC_POLLSET_WORKER_LINK_POLLSET);
}
gpr_cv_destroy(&worker->cv);
gpr_cv_destroy(&worker.cv);
*worker_hdl = NULL;
}
void grpc_pollset_kick(grpc_pollset *p, grpc_pollset_worker *specific_worker) {

@ -0,0 +1,119 @@
/*
*
* Copyright 2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* Automatically generated nanopb constant definitions */
/* Generated by nanopb-0.3.5-dev */
#include "src/core/proto/grpc/lb/v0/load_balancer.pb.h"
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
const pb_field_t grpc_lb_v0_Duration_fields[3] = {
PB_FIELD( 1, INT64 , OPTIONAL, STATIC , FIRST, grpc_lb_v0_Duration, seconds, seconds, 0),
PB_FIELD( 2, INT32 , OPTIONAL, STATIC , OTHER, grpc_lb_v0_Duration, nanos, seconds, 0),
PB_LAST_FIELD
};
const pb_field_t grpc_lb_v0_LoadBalanceRequest_fields[3] = {
PB_FIELD( 1, MESSAGE , OPTIONAL, STATIC , FIRST, grpc_lb_v0_LoadBalanceRequest, initial_request, initial_request, &grpc_lb_v0_InitialLoadBalanceRequest_fields),
PB_FIELD( 2, MESSAGE , OPTIONAL, STATIC , OTHER, grpc_lb_v0_LoadBalanceRequest, client_stats, initial_request, &grpc_lb_v0_ClientStats_fields),
PB_LAST_FIELD
};
const pb_field_t grpc_lb_v0_InitialLoadBalanceRequest_fields[2] = {
PB_FIELD( 1, STRING , OPTIONAL, STATIC , FIRST, grpc_lb_v0_InitialLoadBalanceRequest, name, name, 0),
PB_LAST_FIELD
};
const pb_field_t grpc_lb_v0_ClientStats_fields[4] = {
PB_FIELD( 1, INT64 , OPTIONAL, STATIC , FIRST, grpc_lb_v0_ClientStats, total_requests, total_requests, 0),
PB_FIELD( 2, INT64 , OPTIONAL, STATIC , OTHER, grpc_lb_v0_ClientStats, client_rpc_errors, total_requests, 0),
PB_FIELD( 3, INT64 , OPTIONAL, STATIC , OTHER, grpc_lb_v0_ClientStats, dropped_requests, client_rpc_errors, 0),
PB_LAST_FIELD
};
const pb_field_t grpc_lb_v0_LoadBalanceResponse_fields[3] = {
PB_FIELD( 1, MESSAGE , OPTIONAL, STATIC , FIRST, grpc_lb_v0_LoadBalanceResponse, initial_response, initial_response, &grpc_lb_v0_InitialLoadBalanceResponse_fields),
PB_FIELD( 2, MESSAGE , OPTIONAL, STATIC , OTHER, grpc_lb_v0_LoadBalanceResponse, server_list, initial_response, &grpc_lb_v0_ServerList_fields),
PB_LAST_FIELD
};
const pb_field_t grpc_lb_v0_InitialLoadBalanceResponse_fields[4] = {
PB_FIELD( 1, STRING , OPTIONAL, STATIC , FIRST, grpc_lb_v0_InitialLoadBalanceResponse, client_config, client_config, 0),
PB_FIELD( 2, STRING , OPTIONAL, STATIC , OTHER, grpc_lb_v0_InitialLoadBalanceResponse, load_balancer_delegate, client_config, 0),
PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, grpc_lb_v0_InitialLoadBalanceResponse, client_stats_report_interval, load_balancer_delegate, &grpc_lb_v0_Duration_fields),
PB_LAST_FIELD
};
const pb_field_t grpc_lb_v0_ServerList_fields[3] = {
PB_FIELD( 1, MESSAGE , REPEATED, CALLBACK, FIRST, grpc_lb_v0_ServerList, servers, servers, &grpc_lb_v0_Server_fields),
PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, grpc_lb_v0_ServerList, expiration_interval, servers, &grpc_lb_v0_Duration_fields),
PB_LAST_FIELD
};
const pb_field_t grpc_lb_v0_Server_fields[5] = {
PB_FIELD( 1, STRING , OPTIONAL, STATIC , FIRST, grpc_lb_v0_Server, ip_address, ip_address, 0),
PB_FIELD( 2, INT32 , OPTIONAL, STATIC , OTHER, grpc_lb_v0_Server, port, ip_address, 0),
PB_FIELD( 3, BYTES , OPTIONAL, STATIC , OTHER, grpc_lb_v0_Server, load_balance_token, port, 0),
PB_FIELD( 4, BOOL , OPTIONAL, STATIC , OTHER, grpc_lb_v0_Server, drop_request, load_balance_token, 0),
PB_LAST_FIELD
};
/* Check that field information fits in pb_field_t */
#if !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_32BIT
* compile-time option. You can do that in pb.h or on compiler command line.
*
* The reason you need to do this is that some of your messages contain tag
* numbers or field sizes that are larger than what can fit in 8 or 16 bit
* field descriptors.
*/
PB_STATIC_ASSERT((pb_membersize(grpc_lb_v0_LoadBalanceRequest, initial_request) < 65536 && pb_membersize(grpc_lb_v0_LoadBalanceRequest, client_stats) < 65536 && pb_membersize(grpc_lb_v0_LoadBalanceResponse, initial_response) < 65536 && pb_membersize(grpc_lb_v0_LoadBalanceResponse, server_list) < 65536 && pb_membersize(grpc_lb_v0_InitialLoadBalanceResponse, client_stats_report_interval) < 65536 && pb_membersize(grpc_lb_v0_ServerList, servers) < 65536 && pb_membersize(grpc_lb_v0_ServerList, expiration_interval) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_grpc_lb_v0_Duration_grpc_lb_v0_LoadBalanceRequest_grpc_lb_v0_InitialLoadBalanceRequest_grpc_lb_v0_ClientStats_grpc_lb_v0_LoadBalanceResponse_grpc_lb_v0_InitialLoadBalanceResponse_grpc_lb_v0_ServerList_grpc_lb_v0_Server)
#endif
#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_16BIT
* compile-time option. You can do that in pb.h or on compiler command line.
*
* The reason you need to do this is that some of your messages contain tag
* numbers or field sizes that are larger than what can fit in the default
* 8 bit descriptors.
*/
PB_STATIC_ASSERT((pb_membersize(grpc_lb_v0_LoadBalanceRequest, initial_request) < 256 && pb_membersize(grpc_lb_v0_LoadBalanceRequest, client_stats) < 256 && pb_membersize(grpc_lb_v0_LoadBalanceResponse, initial_response) < 256 && pb_membersize(grpc_lb_v0_LoadBalanceResponse, server_list) < 256 && pb_membersize(grpc_lb_v0_InitialLoadBalanceResponse, client_stats_report_interval) < 256 && pb_membersize(grpc_lb_v0_ServerList, servers) < 256 && pb_membersize(grpc_lb_v0_ServerList, expiration_interval) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_grpc_lb_v0_Duration_grpc_lb_v0_LoadBalanceRequest_grpc_lb_v0_InitialLoadBalanceRequest_grpc_lb_v0_ClientStats_grpc_lb_v0_LoadBalanceResponse_grpc_lb_v0_InitialLoadBalanceResponse_grpc_lb_v0_ServerList_grpc_lb_v0_Server)
#endif

@ -0,0 +1,182 @@
/*
*
* Copyright 2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* Automatically generated nanopb header */
/* Generated by nanopb-0.3.5-dev */
#ifndef PB_LOAD_BALANCER_PB_H_INCLUDED
#define PB_LOAD_BALANCER_PB_H_INCLUDED
#include "third_party/nanopb/pb.h"
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* Struct definitions */
typedef struct _grpc_lb_v0_ClientStats {
bool has_total_requests;
int64_t total_requests;
bool has_client_rpc_errors;
int64_t client_rpc_errors;
bool has_dropped_requests;
int64_t dropped_requests;
} grpc_lb_v0_ClientStats;
typedef struct _grpc_lb_v0_Duration {
bool has_seconds;
int64_t seconds;
bool has_nanos;
int32_t nanos;
} grpc_lb_v0_Duration;
typedef struct _grpc_lb_v0_InitialLoadBalanceRequest {
bool has_name;
char name[128];
} grpc_lb_v0_InitialLoadBalanceRequest;
typedef PB_BYTES_ARRAY_T(64) grpc_lb_v0_Server_load_balance_token_t;
typedef struct _grpc_lb_v0_Server {
bool has_ip_address;
char ip_address[46];
bool has_port;
int32_t port;
bool has_load_balance_token;
grpc_lb_v0_Server_load_balance_token_t load_balance_token;
bool has_drop_request;
bool drop_request;
} grpc_lb_v0_Server;
typedef struct _grpc_lb_v0_InitialLoadBalanceResponse {
bool has_client_config;
char client_config[64];
bool has_load_balancer_delegate;
char load_balancer_delegate[64];
bool has_client_stats_report_interval;
grpc_lb_v0_Duration client_stats_report_interval;
} grpc_lb_v0_InitialLoadBalanceResponse;
typedef struct _grpc_lb_v0_LoadBalanceRequest {
bool has_initial_request;
grpc_lb_v0_InitialLoadBalanceRequest initial_request;
bool has_client_stats;
grpc_lb_v0_ClientStats client_stats;
} grpc_lb_v0_LoadBalanceRequest;
typedef struct _grpc_lb_v0_ServerList {
pb_callback_t servers;
bool has_expiration_interval;
grpc_lb_v0_Duration expiration_interval;
} grpc_lb_v0_ServerList;
typedef struct _grpc_lb_v0_LoadBalanceResponse {
bool has_initial_response;
grpc_lb_v0_InitialLoadBalanceResponse initial_response;
bool has_server_list;
grpc_lb_v0_ServerList server_list;
} grpc_lb_v0_LoadBalanceResponse;
/* Default values for struct fields */
/* Initializer values for message structs */
#define grpc_lb_v0_Duration_init_default {false, 0, false, 0}
#define grpc_lb_v0_LoadBalanceRequest_init_default {false, grpc_lb_v0_InitialLoadBalanceRequest_init_default, false, grpc_lb_v0_ClientStats_init_default}
#define grpc_lb_v0_InitialLoadBalanceRequest_init_default {false, ""}
#define grpc_lb_v0_ClientStats_init_default {false, 0, false, 0, false, 0}
#define grpc_lb_v0_LoadBalanceResponse_init_default {false, grpc_lb_v0_InitialLoadBalanceResponse_init_default, false, grpc_lb_v0_ServerList_init_default}
#define grpc_lb_v0_InitialLoadBalanceResponse_init_default {false, "", false, "", false, grpc_lb_v0_Duration_init_default}
#define grpc_lb_v0_ServerList_init_default {{{NULL}, NULL}, false, grpc_lb_v0_Duration_init_default}
#define grpc_lb_v0_Server_init_default {false, "", false, 0, false, {0, {0}}, false, 0}
#define grpc_lb_v0_Duration_init_zero {false, 0, false, 0}
#define grpc_lb_v0_LoadBalanceRequest_init_zero {false, grpc_lb_v0_InitialLoadBalanceRequest_init_zero, false, grpc_lb_v0_ClientStats_init_zero}
#define grpc_lb_v0_InitialLoadBalanceRequest_init_zero {false, ""}
#define grpc_lb_v0_ClientStats_init_zero {false, 0, false, 0, false, 0}
#define grpc_lb_v0_LoadBalanceResponse_init_zero {false, grpc_lb_v0_InitialLoadBalanceResponse_init_zero, false, grpc_lb_v0_ServerList_init_zero}
#define grpc_lb_v0_InitialLoadBalanceResponse_init_zero {false, "", false, "", false, grpc_lb_v0_Duration_init_zero}
#define grpc_lb_v0_ServerList_init_zero {{{NULL}, NULL}, false, grpc_lb_v0_Duration_init_zero}
#define grpc_lb_v0_Server_init_zero {false, "", false, 0, false, {0, {0}}, false, 0}
/* Field tags (for use in manual encoding/decoding) */
#define grpc_lb_v0_ClientStats_total_requests_tag 1
#define grpc_lb_v0_ClientStats_client_rpc_errors_tag 2
#define grpc_lb_v0_ClientStats_dropped_requests_tag 3
#define grpc_lb_v0_Duration_seconds_tag 1
#define grpc_lb_v0_Duration_nanos_tag 2
#define grpc_lb_v0_InitialLoadBalanceRequest_name_tag 1
#define grpc_lb_v0_Server_ip_address_tag 1
#define grpc_lb_v0_Server_port_tag 2
#define grpc_lb_v0_Server_load_balance_token_tag 3
#define grpc_lb_v0_Server_drop_request_tag 4
#define grpc_lb_v0_InitialLoadBalanceResponse_client_config_tag 1
#define grpc_lb_v0_InitialLoadBalanceResponse_load_balancer_delegate_tag 2
#define grpc_lb_v0_InitialLoadBalanceResponse_client_stats_report_interval_tag 3
#define grpc_lb_v0_LoadBalanceRequest_initial_request_tag 1
#define grpc_lb_v0_LoadBalanceRequest_client_stats_tag 2
#define grpc_lb_v0_ServerList_servers_tag 1
#define grpc_lb_v0_ServerList_expiration_interval_tag 3
#define grpc_lb_v0_LoadBalanceResponse_initial_response_tag 1
#define grpc_lb_v0_LoadBalanceResponse_server_list_tag 2
/* Struct field encoding specification for nanopb */
extern const pb_field_t grpc_lb_v0_Duration_fields[3];
extern const pb_field_t grpc_lb_v0_LoadBalanceRequest_fields[3];
extern const pb_field_t grpc_lb_v0_InitialLoadBalanceRequest_fields[2];
extern const pb_field_t grpc_lb_v0_ClientStats_fields[4];
extern const pb_field_t grpc_lb_v0_LoadBalanceResponse_fields[3];
extern const pb_field_t grpc_lb_v0_InitialLoadBalanceResponse_fields[4];
extern const pb_field_t grpc_lb_v0_ServerList_fields[3];
extern const pb_field_t grpc_lb_v0_Server_fields[5];
/* Maximum encoded size of messages (where known) */
#define grpc_lb_v0_Duration_size 22
#define grpc_lb_v0_LoadBalanceRequest_size 169
#define grpc_lb_v0_InitialLoadBalanceRequest_size 131
#define grpc_lb_v0_ClientStats_size 33
#define grpc_lb_v0_LoadBalanceResponse_size (165 + grpc_lb_v0_ServerList_size)
#define grpc_lb_v0_InitialLoadBalanceResponse_size 156
#define grpc_lb_v0_Server_size 127
/* Message IDs (where set with "msgid" option) */
#ifdef PB_MSGID
#define LOAD_BALANCER_MESSAGES \
#endif
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif

@ -31,7 +31,7 @@
*
*/
#include "src/core/security/base64.h"
#include "src/core/security/b64.h"
#include <stdint.h>
#include <string.h>

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

@ -310,7 +310,6 @@ static void init_channel_elem(grpc_exec_ctx *exec_ctx,
GPR_ASSERT(auth_context != NULL);
/* initialize members */
GPR_ASSERT(sc->is_client_side);
chand->security_connector =
(grpc_channel_security_connector *)GRPC_SECURITY_CONNECTOR_REF(
sc, "client_auth_filter");

@ -166,7 +166,7 @@ void grpc_server_credentials_release(grpc_server_credentials *creds) {
}
grpc_security_status grpc_server_credentials_create_security_connector(
grpc_server_credentials *creds, grpc_security_connector **sc) {
grpc_server_credentials *creds, grpc_server_security_connector **sc) {
if (creds == NULL || creds->vtable->create_security_connector == NULL) {
gpr_log(GPR_ERROR, "Server credentials cannot create security context.");
return GRPC_SECURITY_ERROR;
@ -298,7 +298,7 @@ static grpc_security_status ssl_create_security_connector(
}
static grpc_security_status ssl_server_create_security_connector(
grpc_server_credentials *creds, grpc_security_connector **sc) {
grpc_server_credentials *creds, grpc_server_security_connector **sc) {
grpc_ssl_server_credentials *c = (grpc_ssl_server_credentials *)creds;
return grpc_ssl_server_security_connector_create(&c->config, sc);
}
@ -894,7 +894,7 @@ static grpc_security_status fake_transport_security_create_security_connector(
static grpc_security_status
fake_transport_security_server_create_security_connector(
grpc_server_credentials *c, grpc_security_connector **sc) {
grpc_server_credentials *c, grpc_server_security_connector **sc) {
*sc = grpc_fake_server_security_connector_create();
return GRPC_SECURITY_OK;
}

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -234,7 +234,7 @@ grpc_refresh_token_credentials_create_from_auth_refresh_token(
typedef struct {
void (*destruct)(grpc_server_credentials *c);
grpc_security_status (*create_security_connector)(
grpc_server_credentials *c, grpc_security_connector **sc);
grpc_server_credentials *c, grpc_server_security_connector **sc);
} grpc_server_credentials_vtable;
struct grpc_server_credentials {
@ -245,7 +245,7 @@ struct grpc_server_credentials {
};
grpc_security_status grpc_server_credentials_create_security_connector(
grpc_server_credentials *creds, grpc_security_connector **sc);
grpc_server_credentials *creds, grpc_server_security_connector **sc);
grpc_server_credentials *grpc_server_credentials_ref(
grpc_server_credentials *creds);

@ -41,7 +41,7 @@
#include "src/core/httpcli/httpcli.h"
#include "src/core/support/env.h"
#include "src/core/support/file.h"
#include "src/core/support/load_file.h"
#include "src/core/surface/api_trace.h"
/* -- Constants. -- */
@ -122,7 +122,7 @@ static int is_stack_running_on_compute_engine(void) {
called once for the lifetime of the process by the default credentials. */
gpr_mu_lock(GRPC_POLLSET_MU(&detector.pollset));
while (!detector.is_done) {
grpc_pollset_worker worker;
grpc_pollset_worker *worker = NULL;
grpc_pollset_work(&exec_ctx, &detector.pollset, &worker,
gpr_now(GPR_CLOCK_MONOTONIC),
gpr_inf_future(GPR_CLOCK_MONOTONIC));

@ -33,6 +33,7 @@
#include "src/core/security/handshake.h"
#include <stdbool.h>
#include <string.h>
#include "src/core/security/security_context.h"
@ -46,6 +47,7 @@
typedef struct {
grpc_security_connector *connector;
tsi_handshaker *handshaker;
bool is_client_side;
unsigned char *handshake_buffer;
size_t handshake_buffer_size;
grpc_endpoint *wrapped_endpoint;
@ -67,9 +69,11 @@ static void on_handshake_data_sent_to_peer(grpc_exec_ctx *exec_ctx, void *setup,
bool success);
static void security_connector_remove_handshake(grpc_security_handshake *h) {
GPR_ASSERT(!h->is_client_side);
grpc_security_connector_handshake_list *node;
grpc_security_connector_handshake_list *tmp;
grpc_security_connector *sc = h->connector;
grpc_server_security_connector *sc =
(grpc_server_security_connector *)h->connector;
gpr_mu_lock(&sc->mu);
node = sc->handshaking_handshakes;
if (node && node->handshake == h) {
@ -94,7 +98,7 @@ static void security_connector_remove_handshake(grpc_security_handshake *h) {
static void security_handshake_done(grpc_exec_ctx *exec_ctx,
grpc_security_handshake *h,
int is_success) {
if (!h->connector->is_client_side) {
if (!h->is_client_side) {
security_connector_remove_handshake(h);
}
if (is_success) {
@ -290,6 +294,7 @@ static void on_handshake_data_sent_to_peer(grpc_exec_ctx *exec_ctx,
void grpc_do_security_handshake(grpc_exec_ctx *exec_ctx,
tsi_handshaker *handshaker,
grpc_security_connector *connector,
bool is_client_side,
grpc_endpoint *nonsecure_endpoint,
grpc_security_handshake_done_cb cb,
void *user_data) {
@ -298,6 +303,7 @@ void grpc_do_security_handshake(grpc_exec_ctx *exec_ctx,
memset(h, 0, sizeof(grpc_security_handshake));
h->handshaker = handshaker;
h->connector = GRPC_SECURITY_CONNECTOR_REF(connector, "handshake");
h->is_client_side = is_client_side;
h->handshake_buffer_size = GRPC_INITIAL_HANDSHAKE_BUFFER_SIZE;
h->handshake_buffer = gpr_malloc(h->handshake_buffer_size);
h->wrapped_endpoint = nonsecure_endpoint;
@ -310,13 +316,15 @@ void grpc_do_security_handshake(grpc_exec_ctx *exec_ctx,
gpr_slice_buffer_init(&h->left_overs);
gpr_slice_buffer_init(&h->outgoing);
gpr_slice_buffer_init(&h->incoming);
if (!connector->is_client_side) {
if (!is_client_side) {
grpc_server_security_connector *server_connector =
(grpc_server_security_connector *)connector;
handshake_node = gpr_malloc(sizeof(grpc_security_connector_handshake_list));
handshake_node->handshake = h;
gpr_mu_lock(&connector->mu);
handshake_node->next = connector->handshaking_handshakes;
connector->handshaking_handshakes = handshake_node;
gpr_mu_unlock(&connector->mu);
gpr_mu_lock(&server_connector->mu);
handshake_node->next = server_connector->handshaking_handshakes;
server_connector->handshaking_handshakes = handshake_node;
gpr_mu_unlock(&server_connector->mu);
}
send_handshake_bytes_to_peer(exec_ctx, h);
}

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -41,6 +41,7 @@
void grpc_do_security_handshake(grpc_exec_ctx *exec_ctx,
tsi_handshaker *handshaker,
grpc_security_connector *connector,
bool is_client_side,
grpc_endpoint *nonsecure_endpoint,
grpc_security_handshake_done_cb cb,
void *user_data);

@ -39,7 +39,7 @@
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
#include "src/core/security/base64.h"
#include "src/core/security/b64.h"
#include "src/core/support/string.h"
#include <openssl/bio.h>

@ -37,7 +37,7 @@
#include <string.h>
#include "src/core/httpcli/httpcli.h"
#include "src/core/security/base64.h"
#include "src/core/security/b64.h"
#include "src/core/tsi/ssl_types.h"
#include <grpc/support/alloc.h>

@ -33,22 +33,23 @@
#include "src/core/security/security_connector.h"
#include <stdbool.h>
#include <string.h>
#include <grpc/support/alloc.h>
#include <grpc/support/host_port.h>
#include <grpc/support/log.h>
#include <grpc/support/slice_buffer.h>
#include <grpc/support/string_util.h>
#include "src/core/security/credentials.h"
#include "src/core/security/handshake.h"
#include "src/core/security/secure_endpoint.h"
#include "src/core/security/security_context.h"
#include "src/core/support/env.h"
#include "src/core/support/file.h"
#include "src/core/support/load_file.h"
#include "src/core/support/string.h"
#include "src/core/transport/chttp2/alpn.h"
#include <grpc/support/alloc.h>
#include <grpc/support/host_port.h>
#include <grpc/support/log.h>
#include <grpc/support/slice_buffer.h>
#include <grpc/support/string_util.h>
#include "src/core/tsi/fake_transport_security.h"
#include "src/core/tsi/ssl_transport_security.h"
@ -110,31 +111,39 @@ const tsi_peer_property *tsi_peer_get_property_by_name(const tsi_peer *peer,
return NULL;
}
void grpc_security_connector_shutdown(grpc_exec_ctx *exec_ctx,
grpc_security_connector *connector) {
void grpc_server_security_connector_shutdown(
grpc_exec_ctx *exec_ctx, grpc_server_security_connector *connector) {
grpc_security_connector_handshake_list *tmp;
if (!connector->is_client_side) {
gpr_mu_lock(&connector->mu);
while (connector->handshaking_handshakes) {
tmp = connector->handshaking_handshakes;
grpc_security_handshake_shutdown(
exec_ctx, connector->handshaking_handshakes->handshake);
connector->handshaking_handshakes = tmp->next;
gpr_free(tmp);
}
gpr_mu_unlock(&connector->mu);
gpr_mu_lock(&connector->mu);
while (connector->handshaking_handshakes) {
tmp = connector->handshaking_handshakes;
grpc_security_handshake_shutdown(
exec_ctx, connector->handshaking_handshakes->handshake);
connector->handshaking_handshakes = tmp->next;
gpr_free(tmp);
}
gpr_mu_unlock(&connector->mu);
}
void grpc_security_connector_do_handshake(grpc_exec_ctx *exec_ctx,
grpc_security_connector *sc,
grpc_endpoint *nonsecure_endpoint,
grpc_security_handshake_done_cb cb,
void *user_data) {
void grpc_channel_security_connector_do_handshake(
grpc_exec_ctx *exec_ctx, grpc_channel_security_connector *sc,
grpc_endpoint *nonsecure_endpoint, grpc_security_handshake_done_cb cb,
void *user_data) {
if (sc == NULL || nonsecure_endpoint == NULL) {
cb(exec_ctx, user_data, GRPC_SECURITY_ERROR, NULL, NULL);
} else {
sc->do_handshake(exec_ctx, sc, nonsecure_endpoint, cb, user_data);
}
}
void grpc_server_security_connector_do_handshake(
grpc_exec_ctx *exec_ctx, grpc_server_security_connector *sc,
grpc_tcp_server_acceptor *acceptor, grpc_endpoint *nonsecure_endpoint,
grpc_security_handshake_done_cb cb, void *user_data) {
if (sc == NULL || nonsecure_endpoint == NULL) {
cb(exec_ctx, user_data, GRPC_SECURITY_ERROR, NULL, NULL);
} else {
sc->vtable->do_handshake(exec_ctx, sc, nonsecure_endpoint, cb, user_data);
sc->do_handshake(exec_ctx, sc, acceptor, nonsecure_endpoint, cb, user_data);
}
}
@ -248,7 +257,8 @@ static void fake_channel_destroy(grpc_security_connector *sc) {
}
static void fake_server_destroy(grpc_security_connector *sc) {
gpr_mu_destroy(&sc->mu);
grpc_server_security_connector *c = (grpc_server_security_connector *)sc;
gpr_mu_destroy(&c->mu);
gpr_free(sc);
}
@ -298,49 +308,52 @@ static void fake_channel_check_call_host(grpc_exec_ctx *exec_ctx,
}
static void fake_channel_do_handshake(grpc_exec_ctx *exec_ctx,
grpc_security_connector *sc,
grpc_channel_security_connector *sc,
grpc_endpoint *nonsecure_endpoint,
grpc_security_handshake_done_cb cb,
void *user_data) {
grpc_do_security_handshake(exec_ctx, tsi_create_fake_handshaker(1), sc,
nonsecure_endpoint, cb, user_data);
grpc_do_security_handshake(exec_ctx, tsi_create_fake_handshaker(1), &sc->base,
true, nonsecure_endpoint, cb, user_data);
}
static void fake_server_do_handshake(grpc_exec_ctx *exec_ctx,
grpc_security_connector *sc,
grpc_server_security_connector *sc,
grpc_tcp_server_acceptor *acceptor,
grpc_endpoint *nonsecure_endpoint,
grpc_security_handshake_done_cb cb,
void *user_data) {
grpc_do_security_handshake(exec_ctx, tsi_create_fake_handshaker(0), sc,
nonsecure_endpoint, cb, user_data);
grpc_do_security_handshake(exec_ctx, tsi_create_fake_handshaker(0), &sc->base,
false, nonsecure_endpoint, cb, user_data);
}
static grpc_security_connector_vtable fake_channel_vtable = {
fake_channel_destroy, fake_channel_do_handshake, fake_check_peer};
fake_channel_destroy, fake_check_peer};
static grpc_security_connector_vtable fake_server_vtable = {
fake_server_destroy, fake_server_do_handshake, fake_check_peer};
static grpc_security_connector_vtable fake_server_vtable = {fake_server_destroy,
fake_check_peer};
grpc_channel_security_connector *grpc_fake_channel_security_connector_create(
grpc_call_credentials *request_metadata_creds) {
grpc_channel_security_connector *c = gpr_malloc(sizeof(*c));
memset(c, 0, sizeof(*c));
gpr_ref_init(&c->base.refcount, 1);
c->base.is_client_side = 1;
c->base.url_scheme = GRPC_FAKE_SECURITY_URL_SCHEME;
c->base.vtable = &fake_channel_vtable;
c->request_metadata_creds = grpc_call_credentials_ref(request_metadata_creds);
c->check_call_host = fake_channel_check_call_host;
c->do_handshake = fake_channel_do_handshake;
return c;
}
grpc_security_connector *grpc_fake_server_security_connector_create(void) {
grpc_security_connector *c = gpr_malloc(sizeof(grpc_security_connector));
memset(c, 0, sizeof(grpc_security_connector));
gpr_ref_init(&c->refcount, 1);
c->is_client_side = 0;
c->vtable = &fake_server_vtable;
c->url_scheme = GRPC_FAKE_SECURITY_URL_SCHEME;
grpc_server_security_connector *grpc_fake_server_security_connector_create(
void) {
grpc_server_security_connector *c =
gpr_malloc(sizeof(grpc_server_security_connector));
memset(c, 0, sizeof(*c));
gpr_ref_init(&c->base.refcount, 1);
c->base.vtable = &fake_server_vtable;
c->base.url_scheme = GRPC_FAKE_SECURITY_URL_SCHEME;
c->do_handshake = fake_server_do_handshake;
gpr_mu_init(&c->mu);
return c;
}
@ -355,7 +368,7 @@ typedef struct {
} grpc_ssl_channel_security_connector;
typedef struct {
grpc_security_connector base;
grpc_server_security_connector base;
tsi_ssl_handshaker_factory *handshaker_factory;
} grpc_ssl_server_security_connector;
@ -378,12 +391,12 @@ static void ssl_server_destroy(grpc_security_connector *sc) {
if (c->handshaker_factory != NULL) {
tsi_ssl_handshaker_factory_destroy(c->handshaker_factory);
}
gpr_mu_destroy(&sc->mu);
gpr_mu_destroy(&c->base.mu);
gpr_free(sc);
}
static grpc_security_status ssl_create_handshaker(
tsi_ssl_handshaker_factory *handshaker_factory, int is_client,
tsi_ssl_handshaker_factory *handshaker_factory, bool is_client,
const char *peer_name, tsi_handshaker **handshaker) {
tsi_result result = TSI_OK;
if (handshaker_factory == NULL) return GRPC_SECURITY_ERROR;
@ -398,7 +411,7 @@ static grpc_security_status ssl_create_handshaker(
}
static void ssl_channel_do_handshake(grpc_exec_ctx *exec_ctx,
grpc_security_connector *sc,
grpc_channel_security_connector *sc,
grpc_endpoint *nonsecure_endpoint,
grpc_security_handshake_done_cb cb,
void *user_data) {
@ -406,20 +419,21 @@ static void ssl_channel_do_handshake(grpc_exec_ctx *exec_ctx,
(grpc_ssl_channel_security_connector *)sc;
tsi_handshaker *handshaker;
grpc_security_status status = ssl_create_handshaker(
c->handshaker_factory, 1,
c->handshaker_factory, true,
c->overridden_target_name != NULL ? c->overridden_target_name
: c->target_name,
&handshaker);
if (status != GRPC_SECURITY_OK) {
cb(exec_ctx, user_data, status, NULL, NULL);
} else {
grpc_do_security_handshake(exec_ctx, handshaker, sc, nonsecure_endpoint, cb,
user_data);
grpc_do_security_handshake(exec_ctx, handshaker, &sc->base, true,
nonsecure_endpoint, cb, user_data);
}
}
static void ssl_server_do_handshake(grpc_exec_ctx *exec_ctx,
grpc_security_connector *sc,
grpc_server_security_connector *sc,
grpc_tcp_server_acceptor *acceptor,
grpc_endpoint *nonsecure_endpoint,
grpc_security_handshake_done_cb cb,
void *user_data) {
@ -427,12 +441,12 @@ static void ssl_server_do_handshake(grpc_exec_ctx *exec_ctx,
(grpc_ssl_server_security_connector *)sc;
tsi_handshaker *handshaker;
grpc_security_status status =
ssl_create_handshaker(c->handshaker_factory, 0, NULL, &handshaker);
ssl_create_handshaker(c->handshaker_factory, false, NULL, &handshaker);
if (status != GRPC_SECURITY_OK) {
cb(exec_ctx, user_data, status, NULL, NULL);
} else {
grpc_do_security_handshake(exec_ctx, handshaker, sc, nonsecure_endpoint, cb,
user_data);
grpc_do_security_handshake(exec_ctx, handshaker, &sc->base, false,
nonsecure_endpoint, cb, user_data);
}
}
@ -603,10 +617,10 @@ static void ssl_channel_check_call_host(grpc_exec_ctx *exec_ctx,
}
static grpc_security_connector_vtable ssl_channel_vtable = {
ssl_channel_destroy, ssl_channel_do_handshake, ssl_channel_check_peer};
ssl_channel_destroy, ssl_channel_check_peer};
static grpc_security_connector_vtable ssl_server_vtable = {
ssl_server_destroy, ssl_server_do_handshake, ssl_server_check_peer};
ssl_server_destroy, ssl_server_check_peer};
static gpr_slice compute_default_pem_root_certs_once(void) {
gpr_slice result = gpr_empty_slice();
@ -700,11 +714,11 @@ grpc_security_status grpc_ssl_channel_security_connector_create(
gpr_ref_init(&c->base.base.refcount, 1);
c->base.base.vtable = &ssl_channel_vtable;
c->base.base.is_client_side = 1;
c->base.base.url_scheme = GRPC_SSL_URL_SCHEME;
c->base.request_metadata_creds =
grpc_call_credentials_ref(request_metadata_creds);
c->base.check_call_host = ssl_channel_check_call_host;
c->base.do_handshake = ssl_channel_do_handshake;
gpr_split_host_port(target_name, &c->target_name, &port);
gpr_free(port);
if (overridden_target_name != NULL) {
@ -735,7 +749,7 @@ error:
}
grpc_security_status grpc_ssl_server_security_connector_create(
const grpc_ssl_server_config *config, grpc_security_connector **sc) {
const grpc_ssl_server_config *config, grpc_server_security_connector **sc) {
size_t num_alpn_protocols = grpc_chttp2_num_alpn_versions();
const unsigned char **alpn_protocol_strings =
gpr_malloc(sizeof(const char *) * num_alpn_protocols);
@ -759,9 +773,9 @@ grpc_security_status grpc_ssl_server_security_connector_create(
c = gpr_malloc(sizeof(grpc_ssl_server_security_connector));
memset(c, 0, sizeof(grpc_ssl_server_security_connector));
gpr_ref_init(&c->base.refcount, 1);
c->base.url_scheme = GRPC_SSL_URL_SCHEME;
c->base.vtable = &ssl_server_vtable;
gpr_ref_init(&c->base.base.refcount, 1);
c->base.base.url_scheme = GRPC_SSL_URL_SCHEME;
c->base.base.vtable = &ssl_server_vtable;
result = tsi_create_ssl_server_handshaker_factory(
(const unsigned char **)config->pem_private_keys,
config->pem_private_keys_sizes,
@ -774,11 +788,12 @@ grpc_security_status grpc_ssl_server_security_connector_create(
if (result != TSI_OK) {
gpr_log(GPR_ERROR, "Handshaker factory creation failed with %s.",
tsi_result_to_string(result));
ssl_server_destroy(&c->base);
ssl_server_destroy(&c->base.base);
*sc = NULL;
goto error;
}
gpr_mu_init(&c->base.mu);
c->base.do_handshake = ssl_server_do_handshake;
*sc = &c->base;
gpr_free((void *)alpn_protocol_strings);
gpr_free(alpn_protocol_string_lengths);

@ -36,6 +36,7 @@
#include <grpc/grpc_security.h>
#include "src/core/iomgr/endpoint.h"
#include "src/core/iomgr/tcp_server.h"
#include "src/core/tsi/transport_security_interface.h"
/* --- status enum. --- */
@ -68,9 +69,6 @@ typedef void (*grpc_security_handshake_done_cb)(
typedef struct {
void (*destroy)(grpc_security_connector *sc);
void (*do_handshake)(grpc_exec_ctx *exec_ctx, grpc_security_connector *sc,
grpc_endpoint *nonsecure_endpoint,
grpc_security_handshake_done_cb cb, void *user_data);
void (*check_peer)(grpc_exec_ctx *exec_ctx, grpc_security_connector *sc,
tsi_peer peer, grpc_security_peer_check_cb cb,
void *user_data);
@ -84,13 +82,7 @@ typedef struct grpc_security_connector_handshake_list {
struct grpc_security_connector {
const grpc_security_connector_vtable *vtable;
gpr_refcount refcount;
int is_client_side;
const char *url_scheme;
/* Used on server side only. */
/* TODO(yangg): Create a grpc_server_security_connector with these. */
gpr_mu mu;
grpc_security_connector_handshake_list *handshaking_handshakes;
const grpc_channel_args *channel_args;
};
/* Refcounting. */
@ -113,13 +105,6 @@ grpc_security_connector *grpc_security_connector_ref(
void grpc_security_connector_unref(grpc_security_connector *policy);
#endif
/* Handshake. */
void grpc_security_connector_do_handshake(grpc_exec_ctx *exec_ctx,
grpc_security_connector *connector,
grpc_endpoint *nonsecure_endpoint,
grpc_security_handshake_done_cb cb,
void *user_data);
/* Check the peer. Callee takes ownership of the peer object.
The callback will include the resulting auth_context. */
void grpc_security_connector_check_peer(grpc_exec_ctx *exec_ctx,
@ -128,9 +113,6 @@ void grpc_security_connector_check_peer(grpc_exec_ctx *exec_ctx,
grpc_security_peer_check_cb cb,
void *user_data);
void grpc_security_connector_shutdown(grpc_exec_ctx *exec_ctx,
grpc_security_connector *connector);
/* Util to encapsulate the connector in a channel arg. */
grpc_arg grpc_security_connector_to_arg(grpc_security_connector *sc);
@ -153,12 +135,16 @@ typedef void (*grpc_security_call_host_check_cb)(grpc_exec_ctx *exec_ctx,
grpc_security_status status);
struct grpc_channel_security_connector {
grpc_security_connector base; /* requires is_client_side to be non 0. */
grpc_security_connector base;
grpc_call_credentials *request_metadata_creds;
void (*check_call_host)(grpc_exec_ctx *exec_ctx,
grpc_channel_security_connector *sc, const char *host,
grpc_auth_context *auth_context,
grpc_security_call_host_check_cb cb, void *user_data);
void (*do_handshake)(grpc_exec_ctx *exec_ctx,
grpc_channel_security_connector *sc,
grpc_endpoint *nonsecure_endpoint,
grpc_security_handshake_done_cb cb, void *user_data);
};
/* Checks that the host that will be set for a call is acceptable. */
@ -167,6 +153,39 @@ void grpc_channel_security_connector_check_call_host(
const char *host, grpc_auth_context *auth_context,
grpc_security_call_host_check_cb cb, void *user_data);
/* Handshake. */
void grpc_channel_security_connector_do_handshake(
grpc_exec_ctx *exec_ctx, grpc_channel_security_connector *connector,
grpc_endpoint *nonsecure_endpoint, grpc_security_handshake_done_cb cb,
void *user_data);
/* --- server_security_connector object. ---
A server security connector object represents away to configure the
underlying transport security mechanism on the server side. */
typedef struct grpc_server_security_connector grpc_server_security_connector;
struct grpc_server_security_connector {
grpc_security_connector base;
gpr_mu mu;
grpc_security_connector_handshake_list *handshaking_handshakes;
const grpc_channel_args *channel_args;
void (*do_handshake)(grpc_exec_ctx *exec_ctx,
grpc_server_security_connector *sc,
grpc_tcp_server_acceptor *acceptor,
grpc_endpoint *nonsecure_endpoint,
grpc_security_handshake_done_cb cb, void *user_data);
};
void grpc_server_security_connector_do_handshake(
grpc_exec_ctx *exec_ctx, grpc_server_security_connector *sc,
grpc_tcp_server_acceptor *acceptor, grpc_endpoint *nonsecure_endpoint,
grpc_security_handshake_done_cb cb, void *user_data);
void grpc_server_security_connector_shutdown(
grpc_exec_ctx *exec_ctx, grpc_server_security_connector *connector);
/* --- Creation security connectors. --- */
/* For TESTING ONLY!
@ -176,7 +195,8 @@ grpc_channel_security_connector *grpc_fake_channel_security_connector_create(
/* For TESTING ONLY!
Creates a fake connector that emulates real server security. */
grpc_security_connector *grpc_fake_server_security_connector_create(void);
grpc_server_security_connector *grpc_fake_server_security_connector_create(
void);
/* Config for ssl clients. */
typedef struct {
@ -231,7 +251,7 @@ typedef struct {
specific error code otherwise.
*/
grpc_security_status grpc_ssl_server_security_connector_create(
const grpc_ssl_server_config *config, grpc_security_connector **sc);
const grpc_ssl_server_config *config, grpc_server_security_connector **sc);
/* Util. */
const tsi_peer_property *tsi_peer_get_property_by_name(const tsi_peer *peer,

@ -55,7 +55,7 @@
typedef struct grpc_server_secure_state {
grpc_server *server;
grpc_tcp_server *tcp;
grpc_security_connector *sc;
grpc_server_security_connector *sc;
grpc_server_credentials *creds;
int is_shutdown;
gpr_mu mu;
@ -74,7 +74,7 @@ static void state_unref(grpc_server_secure_state *state) {
gpr_mu_lock(&state->mu);
gpr_mu_unlock(&state->mu);
/* clean up */
GRPC_SECURITY_CONNECTOR_UNREF(state->sc, "server");
GRPC_SECURITY_CONNECTOR_UNREF(&state->sc->base, "server");
grpc_server_credentials_unref(state->creds);
gpr_free(state);
}
@ -127,8 +127,8 @@ static void on_accept(grpc_exec_ctx *exec_ctx, void *statep, grpc_endpoint *tcp,
grpc_tcp_server_acceptor *acceptor) {
grpc_server_secure_state *state = statep;
state_ref(state);
grpc_security_connector_do_handshake(exec_ctx, state->sc, tcp,
on_secure_handshake_done, state);
grpc_server_security_connector_do_handshake(
exec_ctx, state->sc, acceptor, tcp, on_secure_handshake_done, state);
}
/* Server callback: start listening on our ports */
@ -145,7 +145,7 @@ static void destroy_done(grpc_exec_ctx *exec_ctx, void *statep, bool success) {
state->destroy_callback->cb(exec_ctx, state->destroy_callback->cb_arg,
success);
}
grpc_security_connector_shutdown(exec_ctx, state->sc);
grpc_server_security_connector_shutdown(exec_ctx, state->sc);
state_unref(state);
}
@ -173,7 +173,7 @@ int grpc_server_add_secure_http2_port(grpc_server *server, const char *addr,
int port_num = -1;
int port_temp;
grpc_security_status status = GRPC_SECURITY_ERROR;
grpc_security_connector *sc = NULL;
grpc_server_security_connector *sc = NULL;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
GRPC_API_TRACE(
@ -253,7 +253,7 @@ error:
grpc_tcp_server_unref(&exec_ctx, tcp);
} else {
if (sc) {
GRPC_SECURITY_CONNECTOR_UNREF(sc, "server");
GRPC_SECURITY_CONNECTOR_UNREF(&sc->base, "server");
}
if (state) {
gpr_free(state);

@ -43,7 +43,9 @@
#include "src/core/support/env.h"
#include <dlfcn.h>
#include <features.h>
#include <stdlib.h>
#include <string.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
@ -60,12 +62,22 @@ char *gpr_getenv(const char *name) {
const char *names[] = {"secure_getenv", "__secure_getenv", "getenv"};
for (size_t i = 0; getenv_func == NULL && i < GPR_ARRAY_SIZE(names); i++) {
getenv_func = (getenv_type)dlsym(RTLD_DEFAULT, names[i]);
if (getenv_func != NULL && strstr(names[i], "secure") == NULL) {
gpr_log(GPR_DEBUG,
"Warning: insecure environment read function '%s' used",
names[i]);
}
}
char *result = getenv_func(name);
return result == NULL ? result : gpr_strdup(result);
#else
#elif __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 17)
char *result = secure_getenv(name);
return result == NULL ? result : gpr_strdup(result);
#else
gpr_log(GPR_DEBUG, "Warning: insecure environment read function '%s' used",
"getenv");
char *result = getenv(name);
return result == NULL ? result : gpr_strdup(result);
#endif
}

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,7 +31,7 @@
*
*/
#include "src/core/support/file.h"
#include "src/core/support/load_file.h"
#include <errno.h>
#include <string.h>

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CORE_SUPPORT_FILE_H
#define GRPC_INTERNAL_CORE_SUPPORT_FILE_H
#ifndef GRPC_INTERNAL_CORE_SUPPORT_LOAD_FILE_H
#define GRPC_INTERNAL_CORE_SUPPORT_LOAD_FILE_H
#include <stdio.h>
@ -42,22 +42,14 @@
extern "C" {
#endif
/* File utility functions */
/* Loads the content of a file into a slice. add_null_terminator will add
a NULL terminator if non-zero. The success parameter, if not NULL,
will be set to 1 in case of success and 0 in case of failure. */
gpr_slice gpr_load_file(const char *filename, int add_null_terminator,
int *success);
/* Creates a temporary file from a prefix.
If tmp_filename is not NULL, *tmp_filename is assigned the name of the
created file and it is the responsibility of the caller to gpr_free it
unless an error occurs in which case it will be set to NULL. */
FILE *gpr_tmpfile(const char *prefix, char **tmp_filename);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_INTERNAL_CORE_SUPPORT_FILE_H */
#endif /* GRPC_INTERNAL_CORE_SUPPORT_LOAD_FILE_H */

@ -0,0 +1,55 @@
/*
*
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef GRPC_INTERNAL_CORE_SUPPORT_TMPFILE_H
#define GRPC_INTERNAL_CORE_SUPPORT_TMPFILE_H
#include <stdio.h>
#include <grpc/support/slice.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Creates a temporary file from a prefix.
If tmp_filename is not NULL, *tmp_filename is assigned the name of the
created file and it is the responsibility of the caller to gpr_free it
unless an error occurs in which case it will be set to NULL. */
FILE *gpr_tmpfile(const char *prefix, char **tmp_filename);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_INTERNAL_CORE_SUPPORT_TMPFILE_H */

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -35,7 +35,7 @@
#ifdef GPR_POSIX_FILE
#include "src/core/support/file.h"
#include "src/core/support/tmpfile.h"
#include <errno.h>
#include <stdlib.h>

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -44,8 +44,8 @@
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
#include "src/core/support/file.h"
#include "src/core/support/string_win32.h"
#include "src/core/support/tmpfile.h"
FILE *gpr_tmpfile(const char *prefix, char **tmp_filename_out) {
FILE *result = NULL;

@ -64,8 +64,9 @@ grpc_alarm *grpc_alarm_create(grpc_completion_queue *cq, gpr_timespec deadline,
alarm->tag = tag;
grpc_cq_begin_op(cq, tag);
grpc_timer_init(&exec_ctx, &alarm->alarm, deadline, alarm_cb, alarm,
gpr_now(GPR_CLOCK_MONOTONIC));
grpc_timer_init(&exec_ctx, &alarm->alarm,
gpr_convert_clock_type(deadline, GPR_CLOCK_MONOTONIC),
alarm_cb, alarm, gpr_now(GPR_CLOCK_MONOTONIC));
grpc_exec_ctx_finish(&exec_ctx);
return alarm;
}

@ -50,7 +50,7 @@
#include <grpc/support/time.h>
typedef struct {
grpc_pollset_worker *worker;
grpc_pollset_worker **worker;
void *tag;
} plucker;
@ -252,7 +252,7 @@ void grpc_cq_end_op(grpc_exec_ctx *exec_ctx, grpc_completion_queue *cc,
pluck_worker = NULL;
for (i = 0; i < cc->num_pluckers; i++) {
if (cc->pluckers[i].tag == tag) {
pluck_worker = cc->pluckers[i].worker;
pluck_worker = *cc->pluckers[i].worker;
break;
}
}
@ -275,7 +275,7 @@ void grpc_cq_end_op(grpc_exec_ctx *exec_ctx, grpc_completion_queue *cc,
grpc_event grpc_completion_queue_next(grpc_completion_queue *cc,
gpr_timespec deadline, void *reserved) {
grpc_event ret;
grpc_pollset_worker worker;
grpc_pollset_worker *worker = NULL;
int first_loop = 1;
gpr_timespec now;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
@ -348,7 +348,7 @@ grpc_event grpc_completion_queue_next(grpc_completion_queue *cc,
}
static int add_plucker(grpc_completion_queue *cc, void *tag,
grpc_pollset_worker *worker) {
grpc_pollset_worker **worker) {
if (cc->num_pluckers == GRPC_MAX_COMPLETION_QUEUE_PLUCKERS) {
return 0;
}
@ -359,7 +359,7 @@ static int add_plucker(grpc_completion_queue *cc, void *tag,
}
static void del_plucker(grpc_completion_queue *cc, void *tag,
grpc_pollset_worker *worker) {
grpc_pollset_worker **worker) {
int i;
for (i = 0; i < cc->num_pluckers; i++) {
if (cc->pluckers[i].tag == tag && cc->pluckers[i].worker == worker) {
@ -376,7 +376,7 @@ grpc_event grpc_completion_queue_pluck(grpc_completion_queue *cc, void *tag,
grpc_event ret;
grpc_cq_completion *c;
grpc_cq_completion *prev;
grpc_pollset_worker worker;
grpc_pollset_worker *worker = NULL;
gpr_timespec now;
int first_loop = 1;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;

@ -123,9 +123,9 @@ static void on_secure_handshake_done(grpc_exec_ctx *exec_ctx, void *arg,
static void on_initial_connect_string_sent(grpc_exec_ctx *exec_ctx, void *arg,
bool success) {
connector *c = arg;
grpc_security_connector_do_handshake(exec_ctx, &c->security_connector->base,
c->connecting_endpoint,
on_secure_handshake_done, c);
grpc_channel_security_connector_do_handshake(exec_ctx, c->security_connector,
c->connecting_endpoint,
on_secure_handshake_done, c);
}
static void connected(grpc_exec_ctx *exec_ctx, void *arg, bool success) {
@ -146,9 +146,8 @@ static void connected(grpc_exec_ctx *exec_ctx, void *arg, bool success) {
grpc_endpoint_write(exec_ctx, tcp, &c->initial_string_buffer,
&c->initial_string_sent);
} else {
grpc_security_connector_do_handshake(exec_ctx,
&c->security_connector->base, tcp,
on_secure_handshake_done, c);
grpc_channel_security_connector_do_handshake(
exec_ctx, c->security_connector, tcp, on_secure_handshake_done, c);
}
} else {
memset(c->result, 0, sizeof(*c->result));

@ -485,7 +485,8 @@ struct grpc_chttp2_stream {
/** Someone is unlocking the transport mutex: check to see if writes
are required, and schedule them if so */
int grpc_chttp2_unlocking_check_writes(grpc_chttp2_transport_global *global,
int grpc_chttp2_unlocking_check_writes(grpc_exec_ctx *exec_ctx,
grpc_chttp2_transport_global *global,
grpc_chttp2_transport_writing *writing,
int is_parsing);
void grpc_chttp2_perform_writes(
@ -568,8 +569,12 @@ void grpc_chttp2_list_add_writing_stalled_by_transport(
grpc_chttp2_transport_writing *transport_writing,
grpc_chttp2_stream_writing *stream_writing);
void grpc_chttp2_list_flush_writing_stalled_by_transport(
grpc_chttp2_transport_writing *transport_writing, bool is_window_available);
grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_writing *transport_writing,
bool is_window_available);
void grpc_chttp2_list_add_stalled_by_transport(
grpc_chttp2_transport_writing *transport_writing,
grpc_chttp2_stream_writing *stream_writing);
int grpc_chttp2_list_pop_stalled_by_transport(
grpc_chttp2_transport_global *transport_global,
grpc_chttp2_stream_global **stream_global);

@ -316,13 +316,16 @@ int grpc_chttp2_list_pop_check_read_ops(
void grpc_chttp2_list_add_writing_stalled_by_transport(
grpc_chttp2_transport_writing *transport_writing,
grpc_chttp2_stream_writing *stream_writing) {
stream_list_add(TRANSPORT_FROM_WRITING(transport_writing),
STREAM_FROM_WRITING(stream_writing),
grpc_chttp2_stream *stream = STREAM_FROM_WRITING(stream_writing);
if (!stream->included[GRPC_CHTTP2_LIST_WRITING_STALLED_BY_TRANSPORT]) {
GRPC_CHTTP2_STREAM_REF(&stream->global, "chttp2_writing_stalled");
}
stream_list_add(TRANSPORT_FROM_WRITING(transport_writing), stream,
GRPC_CHTTP2_LIST_WRITING_STALLED_BY_TRANSPORT);
}
void grpc_chttp2_list_flush_writing_stalled_by_transport(
grpc_chttp2_transport_writing *transport_writing,
grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_writing *transport_writing,
bool is_window_available) {
grpc_chttp2_stream *stream;
grpc_chttp2_transport *transport = TRANSPORT_FROM_WRITING(transport_writing);
@ -331,11 +334,22 @@ void grpc_chttp2_list_flush_writing_stalled_by_transport(
if (is_window_available) {
grpc_chttp2_list_add_writable_stream(&transport->global, &stream->global);
} else {
stream_list_add(transport, stream, GRPC_CHTTP2_LIST_STALLED_BY_TRANSPORT);
grpc_chttp2_list_add_stalled_by_transport(transport_writing,
&stream->writing);
}
GRPC_CHTTP2_STREAM_UNREF(exec_ctx, &stream->global,
"chttp2_writing_stalled");
}
}
void grpc_chttp2_list_add_stalled_by_transport(
grpc_chttp2_transport_writing *transport_writing,
grpc_chttp2_stream_writing *stream_writing) {
stream_list_add(TRANSPORT_FROM_WRITING(transport_writing),
STREAM_FROM_WRITING(stream_writing),
GRPC_CHTTP2_LIST_STALLED_BY_TRANSPORT);
}
int grpc_chttp2_list_pop_stalled_by_transport(
grpc_chttp2_transport_global *transport_global,
grpc_chttp2_stream_global **stream_global) {

@ -44,7 +44,7 @@ static void finalize_outbuf(grpc_exec_ctx *exec_ctx,
grpc_chttp2_transport_writing *transport_writing);
int grpc_chttp2_unlocking_check_writes(
grpc_chttp2_transport_global *transport_global,
grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_global *transport_global,
grpc_chttp2_transport_writing *transport_writing, int is_parsing) {
grpc_chttp2_stream_global *stream_global;
grpc_chttp2_stream_writing *stream_writing;
@ -76,8 +76,8 @@ int grpc_chttp2_unlocking_check_writes(
GRPC_CHTTP2_FLOW_MOVE_TRANSPORT("write", transport_writing, outgoing_window,
transport_global, outgoing_window);
bool is_window_available = transport_writing->outgoing_window > 0;
grpc_chttp2_list_flush_writing_stalled_by_transport(transport_writing,
is_window_available);
grpc_chttp2_list_flush_writing_stalled_by_transport(
exec_ctx, transport_writing, is_window_available);
/* for each grpc_chttp2_stream that's become writable, frame it's data
(according to available window sizes) and add to the output buffer */
@ -133,8 +133,8 @@ int grpc_chttp2_unlocking_check_writes(
GRPC_CHTTP2_STREAM_REF(stream_global, "chttp2_writing");
}
} else {
grpc_chttp2_list_add_writing_stalled_by_transport(transport_writing,
stream_writing);
grpc_chttp2_list_add_stalled_by_transport(transport_writing,
stream_writing);
}
}
if (stream_global->send_trailing_metadata) {

@ -598,7 +598,7 @@ static void lock(grpc_chttp2_transport *t) { gpr_mu_lock(&t->mu); }
static void unlock(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t) {
GPR_TIMER_BEGIN("unlock", 0);
if (!t->writing_active && !t->closed &&
grpc_chttp2_unlocking_check_writes(&t->global, &t->writing,
grpc_chttp2_unlocking_check_writes(exec_ctx, &t->global, &t->writing,
t->parsing_active)) {
t->writing_active = 1;
REF_TRANSPORT(t, "writing");

@ -272,27 +272,25 @@ class Server::SyncRequest GRPC_FINAL : public CompletionQueueTag {
grpc_completion_queue* cq_;
};
static grpc_server* CreateServer(const ChannelArguments& args) {
grpc_channel_args channel_args;
args.SetChannelArgs(&channel_args);
return grpc_server_create(&channel_args, nullptr);
}
static internal::GrpcLibraryInitializer g_gli_initializer;
Server::Server(ThreadPoolInterface* thread_pool, bool thread_pool_owned,
int max_message_size, const ChannelArguments& args)
int max_message_size, ChannelArguments* args)
: max_message_size_(max_message_size),
started_(false),
shutdown_(false),
num_running_cb_(0),
sync_methods_(new std::list<SyncRequest>),
has_generic_service_(false),
server_(CreateServer(args)),
server_(nullptr),
thread_pool_(thread_pool),
thread_pool_owned_(thread_pool_owned) {
g_gli_initializer.summon();
gpr_once_init(&g_once_init_callbacks, InitGlobalCallbacks);
global_callbacks_ = g_callbacks;
global_callbacks_->UpdateArguments(args);
grpc_channel_args channel_args;
args->SetChannelArgs(&channel_args);
server_ = grpc_server_create(&channel_args, nullptr);
grpc_server_register_completion_queue(server_, cq_.cq(), nullptr);
}

@ -103,7 +103,7 @@ std::unique_ptr<Server> ServerBuilder::BuildAndStart() {
args.SetInt(GRPC_COMPRESSION_ALGORITHM_STATE_ARG,
compression_options_.enabled_algorithms_bitset);
std::unique_ptr<Server> server(
new Server(thread_pool.release(), true, max_message_size_, args));
new Server(thread_pool.release(), true, max_message_size_, &args));
for (auto cq = cqs_.begin(); cq != cqs_.end(); ++cq) {
grpc_server_register_completion_queue(server->server_, (*cq)->cq(),
nullptr);

@ -56,7 +56,7 @@ namespace Grpc.Core.Internal
{
lock (staticLock)
{
var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(RootsPemResourceName);
var stream = typeof(DefaultSslRootsOverride).GetTypeInfo().Assembly.GetManifestResourceStream(RootsPemResourceName);
if (stream == null)
{
throw new IOException(string.Format("Error loading the embedded resource \"{0}\"", RootsPemResourceName));

@ -53,12 +53,18 @@ namespace Grpc.Core.Internal
static PlatformApis()
{
#if DNXCORE50
isLinux = RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
isMacOSX = RuntimeInformation.IsOSPlatform(OSPlatform.OSX);
isWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
#else
var platform = Environment.OSVersion.Platform;
// PlatformID.MacOSX is never returned, commonly used trick is to identify Mac is by using uname.
isMacOSX = (platform == PlatformID.Unix && GetUname() == "Darwin");
isLinux = (platform == PlatformID.Unix && !isMacOSX);
isWindows = (platform == PlatformID.Win32NT || platform == PlatformID.Win32S || platform == PlatformID.Win32Windows);
#endif
isMono = Type.GetType("Mono.Runtime") != null;
}

@ -36,7 +36,7 @@ using System.Text;
using System.Threading.Tasks;
using Grpc.Core;
using Grpc.Health.V1Alpha;
using Grpc.Health.V1;
using NUnit.Framework;
namespace Grpc.HealthCheck.Tests
@ -49,7 +49,7 @@ namespace Grpc.HealthCheck.Tests
const string Host = "localhost";
Server server;
Channel channel;
Grpc.Health.V1Alpha.Health.IHealthClient client;
Grpc.Health.V1.Health.IHealthClient client;
Grpc.HealthCheck.HealthServiceImpl serviceImpl;
[TestFixtureSetUp]
@ -59,13 +59,13 @@ namespace Grpc.HealthCheck.Tests
server = new Server
{
Services = { Grpc.Health.V1Alpha.Health.BindService(serviceImpl) },
Services = { Grpc.Health.V1.Health.BindService(serviceImpl) },
Ports = { { Host, ServerPort.PickUnused, ServerCredentials.Insecure } }
};
server.Start();
channel = new Channel(Host, server.Ports.Single().BoundPort, ChannelCredentials.Insecure);
client = Grpc.Health.V1Alpha.Health.NewClient(channel);
client = Grpc.Health.V1.Health.NewClient(channel);
}
[TestFixtureTearDown]
@ -79,16 +79,16 @@ namespace Grpc.HealthCheck.Tests
[Test]
public void ServiceIsRunning()
{
serviceImpl.SetStatus("", "", HealthCheckResponse.Types.ServingStatus.SERVING);
serviceImpl.SetStatus("", HealthCheckResponse.Types.ServingStatus.SERVING);
var response = client.Check(new HealthCheckRequest { Host = "", Service = "" });
var response = client.Check(new HealthCheckRequest { Service = "" });
Assert.AreEqual(HealthCheckResponse.Types.ServingStatus.SERVING, response.Status);
}
[Test]
public void ServiceDoesntExist()
{
Assert.Throws(Is.TypeOf(typeof(RpcException)).And.Property("Status").Property("StatusCode").EqualTo(StatusCode.NotFound), () => client.Check(new HealthCheckRequest { Host = "", Service = "nonexistent.service" }));
Assert.Throws(Is.TypeOf(typeof(RpcException)).And.Property("Status").Property("StatusCode").EqualTo(StatusCode.NotFound), () => client.Check(new HealthCheckRequest { Service = "nonexistent.service" }));
}
// TODO(jtattermusch): add test with timeout once timeouts are supported

@ -1,5 +1,5 @@
#region Copyright notice and license
// Copyright 2015, Google Inc.
// Copyright 2015-2016, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
@ -36,7 +36,7 @@ using System.Text;
using System.Threading.Tasks;
using Grpc.Core;
using Grpc.Health.V1Alpha;
using Grpc.Health.V1;
using NUnit.Framework;
namespace Grpc.HealthCheck.Tests
@ -50,58 +50,56 @@ namespace Grpc.HealthCheck.Tests
public void SetStatus()
{
var impl = new HealthServiceImpl();
impl.SetStatus("", "", HealthCheckResponse.Types.ServingStatus.SERVING);
Assert.AreEqual(HealthCheckResponse.Types.ServingStatus.SERVING, GetStatusHelper(impl, "", ""));
impl.SetStatus("", HealthCheckResponse.Types.ServingStatus.SERVING);
Assert.AreEqual(HealthCheckResponse.Types.ServingStatus.SERVING, GetStatusHelper(impl, ""));
impl.SetStatus("", "", HealthCheckResponse.Types.ServingStatus.NOT_SERVING);
Assert.AreEqual(HealthCheckResponse.Types.ServingStatus.NOT_SERVING, GetStatusHelper(impl, "", ""));
impl.SetStatus("", HealthCheckResponse.Types.ServingStatus.NOT_SERVING);
Assert.AreEqual(HealthCheckResponse.Types.ServingStatus.NOT_SERVING, GetStatusHelper(impl, ""));
impl.SetStatus("virtual-host", "", HealthCheckResponse.Types.ServingStatus.UNKNOWN);
Assert.AreEqual(HealthCheckResponse.Types.ServingStatus.UNKNOWN, GetStatusHelper(impl, "virtual-host", ""));
impl.SetStatus("", HealthCheckResponse.Types.ServingStatus.UNKNOWN);
Assert.AreEqual(HealthCheckResponse.Types.ServingStatus.UNKNOWN, GetStatusHelper(impl, ""));
impl.SetStatus("virtual-host", "grpc.test.TestService", HealthCheckResponse.Types.ServingStatus.SERVING);
Assert.AreEqual(HealthCheckResponse.Types.ServingStatus.SERVING, GetStatusHelper(impl, "virtual-host", "grpc.test.TestService"));
impl.SetStatus("grpc.test.TestService", HealthCheckResponse.Types.ServingStatus.SERVING);
Assert.AreEqual(HealthCheckResponse.Types.ServingStatus.SERVING, GetStatusHelper(impl, "grpc.test.TestService"));
}
[Test]
public void ClearStatus()
{
var impl = new HealthServiceImpl();
impl.SetStatus("", "", HealthCheckResponse.Types.ServingStatus.SERVING);
impl.SetStatus("virtual-host", "", HealthCheckResponse.Types.ServingStatus.UNKNOWN);
impl.SetStatus("", HealthCheckResponse.Types.ServingStatus.SERVING);
impl.SetStatus("grpc.test.TestService", HealthCheckResponse.Types.ServingStatus.UNKNOWN);
impl.ClearStatus("", "");
impl.ClearStatus("");
Assert.Throws(Is.TypeOf(typeof(RpcException)).And.Property("Status").Property("StatusCode").EqualTo(StatusCode.NotFound), () => GetStatusHelper(impl, "", ""));
Assert.AreEqual(HealthCheckResponse.Types.ServingStatus.UNKNOWN, GetStatusHelper(impl, "virtual-host", ""));
Assert.Throws(Is.TypeOf(typeof(RpcException)).And.Property("Status").Property("StatusCode").EqualTo(StatusCode.NotFound), () => GetStatusHelper(impl, ""));
Assert.AreEqual(HealthCheckResponse.Types.ServingStatus.UNKNOWN, GetStatusHelper(impl, "grpc.test.TestService"));
}
[Test]
public void ClearAll()
{
var impl = new HealthServiceImpl();
impl.SetStatus("", "", HealthCheckResponse.Types.ServingStatus.SERVING);
impl.SetStatus("virtual-host", "", HealthCheckResponse.Types.ServingStatus.UNKNOWN);
impl.SetStatus("", HealthCheckResponse.Types.ServingStatus.SERVING);
impl.SetStatus("grpc.test.TestService", HealthCheckResponse.Types.ServingStatus.UNKNOWN);
impl.ClearAll();
Assert.Throws(typeof(RpcException), () => GetStatusHelper(impl, "", ""));
Assert.Throws(typeof(RpcException), () => GetStatusHelper(impl, "virtual-host", ""));
Assert.Throws(typeof(RpcException), () => GetStatusHelper(impl, ""));
Assert.Throws(typeof(RpcException), () => GetStatusHelper(impl, "grpc.test.TestService"));
}
[Test]
public void NullsRejected()
{
var impl = new HealthServiceImpl();
Assert.Throws(typeof(ArgumentNullException), () => impl.SetStatus(null, "", HealthCheckResponse.Types.ServingStatus.SERVING));
Assert.Throws(typeof(ArgumentNullException), () => impl.SetStatus("", null, HealthCheckResponse.Types.ServingStatus.SERVING));
Assert.Throws(typeof(ArgumentNullException), () => impl.SetStatus(null, HealthCheckResponse.Types.ServingStatus.SERVING));
Assert.Throws(typeof(ArgumentNullException), () => impl.ClearStatus(null, ""));
Assert.Throws(typeof(ArgumentNullException), () => impl.ClearStatus("", null));
Assert.Throws(typeof(ArgumentNullException), () => impl.ClearStatus(null));
}
private static HealthCheckResponse.Types.ServingStatus GetStatusHelper(HealthServiceImpl impl, string host, string service)
private static HealthCheckResponse.Types.ServingStatus GetStatusHelper(HealthServiceImpl impl, string service)
{
return impl.Check(new HealthCheckRequest { Host = host, Service = service }, null).Result.Status;
return impl.Check(new HealthCheckRequest { Service = service }, null).Result.Status;
}
}
}

@ -4,7 +4,7 @@
<id>Grpc.HealthCheck</id>
<title>gRPC C# Healthchecking</title>
<summary>Implementation of gRPC health service</summary>
<description>Example implementation of grpc.health.v1alpha service that can be used for health-checking.</description>
<description>Example implementation of grpc.health.v1 service that can be used for health-checking.</description>
<version>$version$</version>
<authors>Google Inc.</authors>
<owners>grpc-packages</owners>

@ -7,7 +7,7 @@ using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace Grpc.Health.V1Alpha {
namespace Grpc.Health.V1 {
/// <summary>Holder for reflection information generated from health.proto</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@ -23,20 +23,19 @@ namespace Grpc.Health.V1Alpha {
static HealthReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"CgxoZWFsdGgucHJvdG8SE2dycGMuaGVhbHRoLnYxYWxwaGEiMwoSSGVhbHRo",
"Q2hlY2tSZXF1ZXN0EgwKBGhvc3QYASABKAkSDwoHc2VydmljZRgCIAEoCSKZ",
"AQoTSGVhbHRoQ2hlY2tSZXNwb25zZRJGCgZzdGF0dXMYASABKA4yNi5ncnBj",
"LmhlYWx0aC52MWFscGhhLkhlYWx0aENoZWNrUmVzcG9uc2UuU2VydmluZ1N0",
"YXR1cyI6Cg1TZXJ2aW5nU3RhdHVzEgsKB1VOS05PV04QABILCgdTRVJWSU5H",
"EAESDwoLTk9UX1NFUlZJTkcQAjJkCgZIZWFsdGgSWgoFQ2hlY2sSJy5ncnBj",
"LmhlYWx0aC52MWFscGhhLkhlYWx0aENoZWNrUmVxdWVzdBooLmdycGMuaGVh",
"bHRoLnYxYWxwaGEuSGVhbHRoQ2hlY2tSZXNwb25zZUIWqgITR3JwYy5IZWFs",
"dGguVjFBbHBoYWIGcHJvdG8z"));
"CgxoZWFsdGgucHJvdG8SDmdycGMuaGVhbHRoLnYxIiUKEkhlYWx0aENoZWNr",
"UmVxdWVzdBIPCgdzZXJ2aWNlGAEgASgJIpQBChNIZWFsdGhDaGVja1Jlc3Bv",
"bnNlEkEKBnN0YXR1cxgBIAEoDjIxLmdycGMuaGVhbHRoLnYxLkhlYWx0aENo",
"ZWNrUmVzcG9uc2UuU2VydmluZ1N0YXR1cyI6Cg1TZXJ2aW5nU3RhdHVzEgsK",
"B1VOS05PV04QABILCgdTRVJWSU5HEAESDwoLTk9UX1NFUlZJTkcQAjJaCgZI",
"ZWFsdGgSUAoFQ2hlY2sSIi5ncnBjLmhlYWx0aC52MS5IZWFsdGhDaGVja1Jl",
"cXVlc3QaIy5ncnBjLmhlYWx0aC52MS5IZWFsdGhDaGVja1Jlc3BvbnNlQhGq",
"Ag5HcnBjLkhlYWx0aC5WMWIGcHJvdG8z"));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedCodeInfo(null, new pbr::GeneratedCodeInfo[] {
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Health.V1Alpha.HealthCheckRequest), global::Grpc.Health.V1Alpha.HealthCheckRequest.Parser, new[]{ "Host", "Service" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Health.V1Alpha.HealthCheckResponse), global::Grpc.Health.V1Alpha.HealthCheckResponse.Parser, new[]{ "Status" }, null, new[]{ typeof(global::Grpc.Health.V1Alpha.HealthCheckResponse.Types.ServingStatus) }, null)
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Health.V1.HealthCheckRequest), global::Grpc.Health.V1.HealthCheckRequest.Parser, new[]{ "Service" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Health.V1.HealthCheckResponse), global::Grpc.Health.V1.HealthCheckResponse.Parser, new[]{ "Status" }, null, new[]{ typeof(global::Grpc.Health.V1.HealthCheckResponse.Types.ServingStatus) }, null)
}));
}
#endregion
@ -49,7 +48,7 @@ namespace Grpc.Health.V1Alpha {
public static pb::MessageParser<HealthCheckRequest> Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
get { return global::Grpc.Health.V1Alpha.HealthReflection.Descriptor.MessageTypes[0]; }
get { return global::Grpc.Health.V1.HealthReflection.Descriptor.MessageTypes[0]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
@ -63,7 +62,6 @@ namespace Grpc.Health.V1Alpha {
partial void OnConstruction();
public HealthCheckRequest(HealthCheckRequest other) : this() {
host_ = other.host_;
service_ = other.service_;
}
@ -71,18 +69,8 @@ namespace Grpc.Health.V1Alpha {
return new HealthCheckRequest(this);
}
/// <summary>Field number for the "host" field.</summary>
public const int HostFieldNumber = 1;
private string host_ = "";
public string Host {
get { return host_; }
set {
host_ = pb::Preconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "service" field.</summary>
public const int ServiceFieldNumber = 2;
public const int ServiceFieldNumber = 1;
private string service_ = "";
public string Service {
get { return service_; }
@ -102,14 +90,12 @@ namespace Grpc.Health.V1Alpha {
if (ReferenceEquals(other, this)) {
return true;
}
if (Host != other.Host) return false;
if (Service != other.Service) return false;
return true;
}
public override int GetHashCode() {
int hash = 1;
if (Host.Length != 0) hash ^= Host.GetHashCode();
if (Service.Length != 0) hash ^= Service.GetHashCode();
return hash;
}
@ -119,21 +105,14 @@ namespace Grpc.Health.V1Alpha {
}
public void WriteTo(pb::CodedOutputStream output) {
if (Host.Length != 0) {
output.WriteRawTag(10);
output.WriteString(Host);
}
if (Service.Length != 0) {
output.WriteRawTag(18);
output.WriteRawTag(10);
output.WriteString(Service);
}
}
public int CalculateSize() {
int size = 0;
if (Host.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Host);
}
if (Service.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Service);
}
@ -144,9 +123,6 @@ namespace Grpc.Health.V1Alpha {
if (other == null) {
return;
}
if (other.Host.Length != 0) {
Host = other.Host;
}
if (other.Service.Length != 0) {
Service = other.Service;
}
@ -160,10 +136,6 @@ namespace Grpc.Health.V1Alpha {
input.SkipLastField();
break;
case 10: {
Host = input.ReadString();
break;
}
case 18: {
Service = input.ReadString();
break;
}
@ -179,7 +151,7 @@ namespace Grpc.Health.V1Alpha {
public static pb::MessageParser<HealthCheckResponse> Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
get { return global::Grpc.Health.V1Alpha.HealthReflection.Descriptor.MessageTypes[1]; }
get { return global::Grpc.Health.V1.HealthReflection.Descriptor.MessageTypes[1]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
@ -202,8 +174,8 @@ namespace Grpc.Health.V1Alpha {
/// <summary>Field number for the "status" field.</summary>
public const int StatusFieldNumber = 1;
private global::Grpc.Health.V1Alpha.HealthCheckResponse.Types.ServingStatus status_ = global::Grpc.Health.V1Alpha.HealthCheckResponse.Types.ServingStatus.UNKNOWN;
public global::Grpc.Health.V1Alpha.HealthCheckResponse.Types.ServingStatus Status {
private global::Grpc.Health.V1.HealthCheckResponse.Types.ServingStatus status_ = global::Grpc.Health.V1.HealthCheckResponse.Types.ServingStatus.UNKNOWN;
public global::Grpc.Health.V1.HealthCheckResponse.Types.ServingStatus Status {
get { return status_; }
set {
status_ = value;
@ -227,7 +199,7 @@ namespace Grpc.Health.V1Alpha {
public override int GetHashCode() {
int hash = 1;
if (Status != global::Grpc.Health.V1Alpha.HealthCheckResponse.Types.ServingStatus.UNKNOWN) hash ^= Status.GetHashCode();
if (Status != global::Grpc.Health.V1.HealthCheckResponse.Types.ServingStatus.UNKNOWN) hash ^= Status.GetHashCode();
return hash;
}
@ -236,7 +208,7 @@ namespace Grpc.Health.V1Alpha {
}
public void WriteTo(pb::CodedOutputStream output) {
if (Status != global::Grpc.Health.V1Alpha.HealthCheckResponse.Types.ServingStatus.UNKNOWN) {
if (Status != global::Grpc.Health.V1.HealthCheckResponse.Types.ServingStatus.UNKNOWN) {
output.WriteRawTag(8);
output.WriteEnum((int) Status);
}
@ -244,7 +216,7 @@ namespace Grpc.Health.V1Alpha {
public int CalculateSize() {
int size = 0;
if (Status != global::Grpc.Health.V1Alpha.HealthCheckResponse.Types.ServingStatus.UNKNOWN) {
if (Status != global::Grpc.Health.V1.HealthCheckResponse.Types.ServingStatus.UNKNOWN) {
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Status);
}
return size;
@ -254,7 +226,7 @@ namespace Grpc.Health.V1Alpha {
if (other == null) {
return;
}
if (other.Status != global::Grpc.Health.V1Alpha.HealthCheckResponse.Types.ServingStatus.UNKNOWN) {
if (other.Status != global::Grpc.Health.V1.HealthCheckResponse.Types.ServingStatus.UNKNOWN) {
Status = other.Status;
}
}
@ -267,7 +239,7 @@ namespace Grpc.Health.V1Alpha {
input.SkipLastField();
break;
case 8: {
status_ = (global::Grpc.Health.V1Alpha.HealthCheckResponse.Types.ServingStatus) input.ReadEnum();
status_ = (global::Grpc.Health.V1.HealthCheckResponse.Types.ServingStatus) input.ReadEnum();
break;
}
}

@ -7,15 +7,15 @@ using System.Threading;
using System.Threading.Tasks;
using Grpc.Core;
namespace Grpc.Health.V1Alpha {
namespace Grpc.Health.V1 {
public static class Health
{
static readonly string __ServiceName = "grpc.health.v1alpha.Health";
static readonly string __ServiceName = "grpc.health.v1.Health";
static readonly Marshaller<global::Grpc.Health.V1Alpha.HealthCheckRequest> __Marshaller_HealthCheckRequest = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Health.V1Alpha.HealthCheckRequest.Parser.ParseFrom);
static readonly Marshaller<global::Grpc.Health.V1Alpha.HealthCheckResponse> __Marshaller_HealthCheckResponse = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Health.V1Alpha.HealthCheckResponse.Parser.ParseFrom);
static readonly Marshaller<global::Grpc.Health.V1.HealthCheckRequest> __Marshaller_HealthCheckRequest = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Health.V1.HealthCheckRequest.Parser.ParseFrom);
static readonly Marshaller<global::Grpc.Health.V1.HealthCheckResponse> __Marshaller_HealthCheckResponse = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Health.V1.HealthCheckResponse.Parser.ParseFrom);
static readonly Method<global::Grpc.Health.V1Alpha.HealthCheckRequest, global::Grpc.Health.V1Alpha.HealthCheckResponse> __Method_Check = new Method<global::Grpc.Health.V1Alpha.HealthCheckRequest, global::Grpc.Health.V1Alpha.HealthCheckResponse>(
static readonly Method<global::Grpc.Health.V1.HealthCheckRequest, global::Grpc.Health.V1.HealthCheckResponse> __Method_Check = new Method<global::Grpc.Health.V1.HealthCheckRequest, global::Grpc.Health.V1.HealthCheckResponse>(
MethodType.Unary,
__ServiceName,
"Check",
@ -25,22 +25,22 @@ namespace Grpc.Health.V1Alpha {
// service descriptor
public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
{
get { return global::Grpc.Health.V1Alpha.HealthReflection.Descriptor.Services[0]; }
get { return global::Grpc.Health.V1.HealthReflection.Descriptor.Services[0]; }
}
// client interface
public interface IHealthClient
{
global::Grpc.Health.V1Alpha.HealthCheckResponse Check(global::Grpc.Health.V1Alpha.HealthCheckRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
global::Grpc.Health.V1Alpha.HealthCheckResponse Check(global::Grpc.Health.V1Alpha.HealthCheckRequest request, CallOptions options);
AsyncUnaryCall<global::Grpc.Health.V1Alpha.HealthCheckResponse> CheckAsync(global::Grpc.Health.V1Alpha.HealthCheckRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
AsyncUnaryCall<global::Grpc.Health.V1Alpha.HealthCheckResponse> CheckAsync(global::Grpc.Health.V1Alpha.HealthCheckRequest request, CallOptions options);
global::Grpc.Health.V1.HealthCheckResponse Check(global::Grpc.Health.V1.HealthCheckRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
global::Grpc.Health.V1.HealthCheckResponse Check(global::Grpc.Health.V1.HealthCheckRequest request, CallOptions options);
AsyncUnaryCall<global::Grpc.Health.V1.HealthCheckResponse> CheckAsync(global::Grpc.Health.V1.HealthCheckRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
AsyncUnaryCall<global::Grpc.Health.V1.HealthCheckResponse> CheckAsync(global::Grpc.Health.V1.HealthCheckRequest request, CallOptions options);
}
// server-side interface
public interface IHealth
{
Task<global::Grpc.Health.V1Alpha.HealthCheckResponse> Check(global::Grpc.Health.V1Alpha.HealthCheckRequest request, ServerCallContext context);
Task<global::Grpc.Health.V1.HealthCheckResponse> Check(global::Grpc.Health.V1.HealthCheckRequest request, ServerCallContext context);
}
// client stub
@ -49,22 +49,22 @@ namespace Grpc.Health.V1Alpha {
public HealthClient(Channel channel) : base(channel)
{
}
public global::Grpc.Health.V1Alpha.HealthCheckResponse Check(global::Grpc.Health.V1Alpha.HealthCheckRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
public global::Grpc.Health.V1.HealthCheckResponse Check(global::Grpc.Health.V1.HealthCheckRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
{
var call = CreateCall(__Method_Check, new CallOptions(headers, deadline, cancellationToken));
return Calls.BlockingUnaryCall(call, request);
}
public global::Grpc.Health.V1Alpha.HealthCheckResponse Check(global::Grpc.Health.V1Alpha.HealthCheckRequest request, CallOptions options)
public global::Grpc.Health.V1.HealthCheckResponse Check(global::Grpc.Health.V1.HealthCheckRequest request, CallOptions options)
{
var call = CreateCall(__Method_Check, options);
return Calls.BlockingUnaryCall(call, request);
}
public AsyncUnaryCall<global::Grpc.Health.V1Alpha.HealthCheckResponse> CheckAsync(global::Grpc.Health.V1Alpha.HealthCheckRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
public AsyncUnaryCall<global::Grpc.Health.V1.HealthCheckResponse> CheckAsync(global::Grpc.Health.V1.HealthCheckRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
{
var call = CreateCall(__Method_Check, new CallOptions(headers, deadline, cancellationToken));
return Calls.AsyncUnaryCall(call, request);
}
public AsyncUnaryCall<global::Grpc.Health.V1Alpha.HealthCheckResponse> CheckAsync(global::Grpc.Health.V1Alpha.HealthCheckRequest request, CallOptions options)
public AsyncUnaryCall<global::Grpc.Health.V1.HealthCheckResponse> CheckAsync(global::Grpc.Health.V1.HealthCheckRequest request, CallOptions options)
{
var call = CreateCall(__Method_Check, options);
return Calls.AsyncUnaryCall(call, request);

@ -37,7 +37,7 @@ using System.Threading.Tasks;
using Grpc.Core;
using Grpc.Core.Utils;
using Grpc.Health.V1Alpha;
using Grpc.Health.V1;
namespace Grpc.HealthCheck
{
@ -48,44 +48,42 @@ namespace Grpc.HealthCheck
/// <code>
/// var serviceImpl = new HealthServiceImpl();
/// server = new Server();
/// server.AddServiceDefinition(Grpc.Health.V1Alpha.Health.BindService(serviceImpl));
/// server.AddServiceDefinition(Grpc.Health.V1.Health.BindService(serviceImpl));
/// </code>
/// </summary>
public class HealthServiceImpl : Grpc.Health.V1Alpha.Health.IHealth
public class HealthServiceImpl : Grpc.Health.V1.Health.IHealth
{
private readonly object myLock = new object();
private readonly Dictionary<Key, HealthCheckResponse.Types.ServingStatus> statusMap =
new Dictionary<Key, HealthCheckResponse.Types.ServingStatus>();
private readonly Dictionary<string, HealthCheckResponse.Types.ServingStatus> statusMap =
new Dictionary<string, HealthCheckResponse.Types.ServingStatus>();
/// <summary>
/// Sets the health status for given host and service.
/// Sets the health status for given service.
/// </summary>
/// <param name="host">The host. Cannot be null.</param>
/// <param name="service">The service. Cannot be null.</param>
/// <param name="status">the health status</param>
public void SetStatus(string host, string service, HealthCheckResponse.Types.ServingStatus status)
public void SetStatus(string service, HealthCheckResponse.Types.ServingStatus status)
{
lock (myLock)
{
statusMap[CreateKey(host, service)] = status;
statusMap[service] = status;
}
}
/// <summary>
/// Clears health status for given host and service.
/// Clears health status for given service.
/// </summary>
/// <param name="host">The host. Cannot be null.</param>
/// <param name="service">The service. Cannot be null.</param>
public void ClearStatus(string host, string service)
public void ClearStatus(string service)
{
lock (myLock)
{
statusMap.Remove(CreateKey(host, service));
statusMap.Remove(service);
}
}
/// <summary>
/// Clears statuses for all hosts and services.
/// Clears statuses for all services.
/// </summary>
public void ClearAll()
{
@ -105,11 +103,10 @@ namespace Grpc.HealthCheck
{
lock (myLock)
{
var host = request.Host;
var service = request.Service;
HealthCheckResponse.Types.ServingStatus status;
if (!statusMap.TryGetValue(CreateKey(host, service), out status))
if (!statusMap.TryGetValue(service, out status))
{
// TODO(jtattermusch): returning specific status from server handler is not supported yet.
throw new RpcException(new Status(StatusCode.NotFound, ""));
@ -117,22 +114,5 @@ namespace Grpc.HealthCheck
return Task.FromResult(new HealthCheckResponse { Status = status });
}
}
private static Key CreateKey(string host, string service)
{
return new Key(host, service);
}
private struct Key
{
public Key(string host, string service)
{
this.Host = GrpcPreconditions.CheckNotNull(host);
this.Service = GrpcPreconditions.CheckNotNull(service);
}
readonly string Host;
readonly string Service;
}
}
}

@ -38,7 +38,7 @@ namespace Grpc.Testing {
"LmdycGMudGVzdGluZy5EZXRlcm1pbmlzdGljUGFyYW1zSAASLAoGcGFyZXRv",
"GAUgASgLMhouZ3JwYy50ZXN0aW5nLlBhcmV0b1BhcmFtc0gAQgYKBGxvYWQi",
"QwoOU2VjdXJpdHlQYXJhbXMSEwoLdXNlX3Rlc3RfY2EYASABKAgSHAoUc2Vy",
"dmVyX2hvc3Rfb3ZlcnJpZGUYAiABKAkirwMKDENsaWVudENvbmZpZxIWCg5z",
"dmVyX2hvc3Rfb3ZlcnJpZGUYAiABKAki1gMKDENsaWVudENvbmZpZxIWCg5z",
"ZXJ2ZXJfdGFyZ2V0cxgBIAMoCRItCgtjbGllbnRfdHlwZRgCIAEoDjIYLmdy",
"cGMudGVzdGluZy5DbGllbnRUeXBlEjUKD3NlY3VyaXR5X3BhcmFtcxgDIAEo",
"CzIcLmdycGMudGVzdGluZy5TZWN1cml0eVBhcmFtcxIkChxvdXRzdGFuZGlu",
@ -48,24 +48,27 @@ namespace Grpc.Testing {
"GAogASgLMhguZ3JwYy50ZXN0aW5nLkxvYWRQYXJhbXMSMwoOcGF5bG9hZF9j",
"b25maWcYCyABKAsyGy5ncnBjLnRlc3RpbmcuUGF5bG9hZENvbmZpZxI3ChBo",
"aXN0b2dyYW1fcGFyYW1zGAwgASgLMh0uZ3JwYy50ZXN0aW5nLkhpc3RvZ3Jh",
"bVBhcmFtcyI4CgxDbGllbnRTdGF0dXMSKAoFc3RhdHMYASABKAsyGS5ncnBj",
"LnRlc3RpbmcuQ2xpZW50U3RhdHMiFQoETWFyaxINCgVyZXNldBgBIAEoCCJo",
"CgpDbGllbnRBcmdzEisKBXNldHVwGAEgASgLMhouZ3JwYy50ZXN0aW5nLkNs",
"aWVudENvbmZpZ0gAEiIKBG1hcmsYAiABKAsyEi5ncnBjLnRlc3RpbmcuTWFy",
"a0gAQgkKB2FyZ3R5cGUi9wEKDFNlcnZlckNvbmZpZxItCgtzZXJ2ZXJfdHlw",
"ZRgBIAEoDjIYLmdycGMudGVzdGluZy5TZXJ2ZXJUeXBlEjUKD3NlY3VyaXR5",
"X3BhcmFtcxgCIAEoCzIcLmdycGMudGVzdGluZy5TZWN1cml0eVBhcmFtcxIM",
"CgRob3N0GAMgASgJEgwKBHBvcnQYBCABKAUSHAoUYXN5bmNfc2VydmVyX3Ro",
"cmVhZHMYByABKAUSEgoKY29yZV9saW1pdBgIIAEoBRIzCg5wYXlsb2FkX2Nv",
"bmZpZxgJIAEoCzIbLmdycGMudGVzdGluZy5QYXlsb2FkQ29uZmlnImgKClNl",
"cnZlckFyZ3MSKwoFc2V0dXAYASABKAsyGi5ncnBjLnRlc3RpbmcuU2VydmVy",
"Q29uZmlnSAASIgoEbWFyaxgCIAEoCzISLmdycGMudGVzdGluZy5NYXJrSABC",
"CQoHYXJndHlwZSJVCgxTZXJ2ZXJTdGF0dXMSKAoFc3RhdHMYASABKAsyGS5n",
"cnBjLnRlc3RpbmcuU2VydmVyU3RhdHMSDAoEcG9ydBgCIAEoBRINCgVjb3Jl",
"cxgDIAEoBSovCgpDbGllbnRUeXBlEg8KC1NZTkNfQ0xJRU5UEAASEAoMQVNZ",
"TkNfQ0xJRU5UEAEqLwoKU2VydmVyVHlwZRIPCgtTWU5DX1NFUlZFUhAAEhAK",
"DEFTWU5DX1NFUlZFUhABKiMKB1JwY1R5cGUSCQoFVU5BUlkQABINCglTVFJF",
"QU1JTkcQAWIGcHJvdG8z"));
"bVBhcmFtcxIRCgljb3JlX2xpc3QYDSADKAUSEgoKY29yZV9saW1pdBgOIAEo",
"BSI4CgxDbGllbnRTdGF0dXMSKAoFc3RhdHMYASABKAsyGS5ncnBjLnRlc3Rp",
"bmcuQ2xpZW50U3RhdHMiFQoETWFyaxINCgVyZXNldBgBIAEoCCJoCgpDbGll",
"bnRBcmdzEisKBXNldHVwGAEgASgLMhouZ3JwYy50ZXN0aW5nLkNsaWVudENv",
"bmZpZ0gAEiIKBG1hcmsYAiABKAsyEi5ncnBjLnRlc3RpbmcuTWFya0gAQgkK",
"B2FyZ3R5cGUi/AEKDFNlcnZlckNvbmZpZxItCgtzZXJ2ZXJfdHlwZRgBIAEo",
"DjIYLmdycGMudGVzdGluZy5TZXJ2ZXJUeXBlEjUKD3NlY3VyaXR5X3BhcmFt",
"cxgCIAEoCzIcLmdycGMudGVzdGluZy5TZWN1cml0eVBhcmFtcxIMCgRwb3J0",
"GAQgASgFEhwKFGFzeW5jX3NlcnZlcl90aHJlYWRzGAcgASgFEhIKCmNvcmVf",
"bGltaXQYCCABKAUSMwoOcGF5bG9hZF9jb25maWcYCSABKAsyGy5ncnBjLnRl",
"c3RpbmcuUGF5bG9hZENvbmZpZxIRCgljb3JlX2xpc3QYCiADKAUiaAoKU2Vy",
"dmVyQXJncxIrCgVzZXR1cBgBIAEoCzIaLmdycGMudGVzdGluZy5TZXJ2ZXJD",
"b25maWdIABIiCgRtYXJrGAIgASgLMhIuZ3JwYy50ZXN0aW5nLk1hcmtIAEIJ",
"Cgdhcmd0eXBlIlUKDFNlcnZlclN0YXR1cxIoCgVzdGF0cxgBIAEoCzIZLmdy",
"cGMudGVzdGluZy5TZXJ2ZXJTdGF0cxIMCgRwb3J0GAIgASgFEg0KBWNvcmVz",
"GAMgASgFIg0KC0NvcmVSZXF1ZXN0Ih0KDENvcmVSZXNwb25zZRINCgVjb3Jl",
"cxgBIAEoBSIGCgRWb2lkKi8KCkNsaWVudFR5cGUSDwoLU1lOQ19DTElFTlQQ",
"ABIQCgxBU1lOQ19DTElFTlQQASpJCgpTZXJ2ZXJUeXBlEg8KC1NZTkNfU0VS",
"VkVSEAASEAoMQVNZTkNfU0VSVkVSEAESGAoUQVNZTkNfR0VORVJJQ19TRVJW",
"RVIQAiojCgdScGNUeXBlEgkKBVVOQVJZEAASDQoJU1RSRUFNSU5HEAFiBnBy",
"b3RvMw=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::Grpc.Testing.PayloadsReflection.Descriptor, global::Grpc.Testing.StatsReflection.Descriptor, },
new pbr::GeneratedCodeInfo(new[] {typeof(global::Grpc.Testing.ClientType), typeof(global::Grpc.Testing.ServerType), typeof(global::Grpc.Testing.RpcType), }, new pbr::GeneratedCodeInfo[] {
@ -76,13 +79,16 @@ namespace Grpc.Testing {
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ClosedLoopParams), global::Grpc.Testing.ClosedLoopParams.Parser, null, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.LoadParams), global::Grpc.Testing.LoadParams.Parser, new[]{ "ClosedLoop", "Poisson", "Uniform", "Determ", "Pareto" }, new[]{ "Load" }, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.SecurityParams), global::Grpc.Testing.SecurityParams.Parser, new[]{ "UseTestCa", "ServerHostOverride" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ClientConfig), global::Grpc.Testing.ClientConfig.Parser, new[]{ "ServerTargets", "ClientType", "SecurityParams", "OutstandingRpcsPerChannel", "ClientChannels", "AsyncClientThreads", "RpcType", "LoadParams", "PayloadConfig", "HistogramParams" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ClientConfig), global::Grpc.Testing.ClientConfig.Parser, new[]{ "ServerTargets", "ClientType", "SecurityParams", "OutstandingRpcsPerChannel", "ClientChannels", "AsyncClientThreads", "RpcType", "LoadParams", "PayloadConfig", "HistogramParams", "CoreList", "CoreLimit" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ClientStatus), global::Grpc.Testing.ClientStatus.Parser, new[]{ "Stats" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.Mark), global::Grpc.Testing.Mark.Parser, new[]{ "Reset" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ClientArgs), global::Grpc.Testing.ClientArgs.Parser, new[]{ "Setup", "Mark" }, new[]{ "Argtype" }, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ServerConfig), global::Grpc.Testing.ServerConfig.Parser, new[]{ "ServerType", "SecurityParams", "Host", "Port", "AsyncServerThreads", "CoreLimit", "PayloadConfig" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ServerConfig), global::Grpc.Testing.ServerConfig.Parser, new[]{ "ServerType", "SecurityParams", "Port", "AsyncServerThreads", "CoreLimit", "PayloadConfig", "CoreList" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ServerArgs), global::Grpc.Testing.ServerArgs.Parser, new[]{ "Setup", "Mark" }, new[]{ "Argtype" }, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ServerStatus), global::Grpc.Testing.ServerStatus.Parser, new[]{ "Stats", "Port", "Cores" }, null, null, null)
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.ServerStatus), global::Grpc.Testing.ServerStatus.Parser, new[]{ "Stats", "Port", "Cores" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.CoreRequest), global::Grpc.Testing.CoreRequest.Parser, null, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.CoreResponse), global::Grpc.Testing.CoreResponse.Parser, new[]{ "Cores" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Grpc.Testing.Void), global::Grpc.Testing.Void.Parser, null, null, null, null)
}));
}
#endregion
@ -97,6 +103,7 @@ namespace Grpc.Testing {
public enum ServerType {
SYNC_SERVER = 0,
ASYNC_SERVER = 1,
ASYNC_GENERIC_SERVER = 2,
}
public enum RpcType {
@ -1097,6 +1104,8 @@ namespace Grpc.Testing {
LoadParams = other.loadParams_ != null ? other.LoadParams.Clone() : null;
PayloadConfig = other.payloadConfig_ != null ? other.PayloadConfig.Clone() : null;
HistogramParams = other.histogramParams_ != null ? other.HistogramParams.Clone() : null;
coreList_ = other.coreList_.Clone();
coreLimit_ = other.coreLimit_;
}
public ClientConfig Clone() {
@ -1219,6 +1228,28 @@ namespace Grpc.Testing {
}
}
/// <summary>Field number for the "core_list" field.</summary>
public const int CoreListFieldNumber = 13;
private static readonly pb::FieldCodec<int> _repeated_coreList_codec
= pb::FieldCodec.ForInt32(106);
private readonly pbc::RepeatedField<int> coreList_ = new pbc::RepeatedField<int>();
/// <summary>
/// Specify the cores we should run the client on, if desired
/// </summary>
public pbc::RepeatedField<int> CoreList {
get { return coreList_; }
}
/// <summary>Field number for the "core_limit" field.</summary>
public const int CoreLimitFieldNumber = 14;
private int coreLimit_;
public int CoreLimit {
get { return coreLimit_; }
set {
coreLimit_ = value;
}
}
public override bool Equals(object other) {
return Equals(other as ClientConfig);
}
@ -1240,6 +1271,8 @@ namespace Grpc.Testing {
if (!object.Equals(LoadParams, other.LoadParams)) return false;
if (!object.Equals(PayloadConfig, other.PayloadConfig)) return false;
if (!object.Equals(HistogramParams, other.HistogramParams)) return false;
if(!coreList_.Equals(other.coreList_)) return false;
if (CoreLimit != other.CoreLimit) return false;
return true;
}
@ -1255,6 +1288,8 @@ namespace Grpc.Testing {
if (loadParams_ != null) hash ^= LoadParams.GetHashCode();
if (payloadConfig_ != null) hash ^= PayloadConfig.GetHashCode();
if (histogramParams_ != null) hash ^= HistogramParams.GetHashCode();
hash ^= coreList_.GetHashCode();
if (CoreLimit != 0) hash ^= CoreLimit.GetHashCode();
return hash;
}
@ -1300,6 +1335,11 @@ namespace Grpc.Testing {
output.WriteRawTag(98);
output.WriteMessage(HistogramParams);
}
coreList_.WriteTo(output, _repeated_coreList_codec);
if (CoreLimit != 0) {
output.WriteRawTag(112);
output.WriteInt32(CoreLimit);
}
}
public int CalculateSize() {
@ -1332,6 +1372,10 @@ namespace Grpc.Testing {
if (histogramParams_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(HistogramParams);
}
size += coreList_.CalculateSize(_repeated_coreList_codec);
if (CoreLimit != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(CoreLimit);
}
return size;
}
@ -1379,6 +1423,10 @@ namespace Grpc.Testing {
}
HistogramParams.MergeFrom(other.HistogramParams);
}
coreList_.Add(other.coreList_);
if (other.CoreLimit != 0) {
CoreLimit = other.CoreLimit;
}
}
public void MergeFrom(pb::CodedInputStream input) {
@ -1440,6 +1488,15 @@ namespace Grpc.Testing {
input.ReadMessage(histogramParams_);
break;
}
case 106:
case 104: {
coreList_.AddEntriesFrom(input, _repeated_coreList_codec);
break;
}
case 112: {
CoreLimit = input.ReadInt32();
break;
}
}
}
}
@ -1855,11 +1912,11 @@ namespace Grpc.Testing {
public ServerConfig(ServerConfig other) : this() {
serverType_ = other.serverType_;
SecurityParams = other.securityParams_ != null ? other.SecurityParams.Clone() : null;
host_ = other.host_;
port_ = other.port_;
asyncServerThreads_ = other.asyncServerThreads_;
coreLimit_ = other.coreLimit_;
PayloadConfig = other.payloadConfig_ != null ? other.PayloadConfig.Clone() : null;
coreList_ = other.coreList_.Clone();
}
public ServerConfig Clone() {
@ -1886,19 +1943,6 @@ namespace Grpc.Testing {
}
}
/// <summary>Field number for the "host" field.</summary>
public const int HostFieldNumber = 3;
private string host_ = "";
/// <summary>
/// Host on which to listen.
/// </summary>
public string Host {
get { return host_; }
set {
host_ = pb::Preconditions.CheckNotNull(value, "value");
}
}
/// <summary>Field number for the "port" field.</summary>
public const int PortFieldNumber = 4;
private int port_;
@ -1929,7 +1973,7 @@ namespace Grpc.Testing {
public const int CoreLimitFieldNumber = 8;
private int coreLimit_;
/// <summary>
/// restrict core usage, currently unused
/// Specify the number of cores to limit server to, if desired
/// </summary>
public int CoreLimit {
get { return coreLimit_; }
@ -1941,6 +1985,9 @@ namespace Grpc.Testing {
/// <summary>Field number for the "payload_config" field.</summary>
public const int PayloadConfigFieldNumber = 9;
private global::Grpc.Testing.PayloadConfig payloadConfig_;
/// <summary>
/// payload config, used in generic server
/// </summary>
public global::Grpc.Testing.PayloadConfig PayloadConfig {
get { return payloadConfig_; }
set {
@ -1948,6 +1995,18 @@ namespace Grpc.Testing {
}
}
/// <summary>Field number for the "core_list" field.</summary>
public const int CoreListFieldNumber = 10;
private static readonly pb::FieldCodec<int> _repeated_coreList_codec
= pb::FieldCodec.ForInt32(82);
private readonly pbc::RepeatedField<int> coreList_ = new pbc::RepeatedField<int>();
/// <summary>
/// Specify the cores we should run the server on, if desired
/// </summary>
public pbc::RepeatedField<int> CoreList {
get { return coreList_; }
}
public override bool Equals(object other) {
return Equals(other as ServerConfig);
}
@ -1961,11 +2020,11 @@ namespace Grpc.Testing {
}
if (ServerType != other.ServerType) return false;
if (!object.Equals(SecurityParams, other.SecurityParams)) return false;
if (Host != other.Host) return false;
if (Port != other.Port) return false;
if (AsyncServerThreads != other.AsyncServerThreads) return false;
if (CoreLimit != other.CoreLimit) return false;
if (!object.Equals(PayloadConfig, other.PayloadConfig)) return false;
if(!coreList_.Equals(other.coreList_)) return false;
return true;
}
@ -1973,11 +2032,11 @@ namespace Grpc.Testing {
int hash = 1;
if (ServerType != global::Grpc.Testing.ServerType.SYNC_SERVER) hash ^= ServerType.GetHashCode();
if (securityParams_ != null) hash ^= SecurityParams.GetHashCode();
if (Host.Length != 0) hash ^= Host.GetHashCode();
if (Port != 0) hash ^= Port.GetHashCode();
if (AsyncServerThreads != 0) hash ^= AsyncServerThreads.GetHashCode();
if (CoreLimit != 0) hash ^= CoreLimit.GetHashCode();
if (payloadConfig_ != null) hash ^= PayloadConfig.GetHashCode();
hash ^= coreList_.GetHashCode();
return hash;
}
@ -1994,10 +2053,6 @@ namespace Grpc.Testing {
output.WriteRawTag(18);
output.WriteMessage(SecurityParams);
}
if (Host.Length != 0) {
output.WriteRawTag(26);
output.WriteString(Host);
}
if (Port != 0) {
output.WriteRawTag(32);
output.WriteInt32(Port);
@ -2014,6 +2069,7 @@ namespace Grpc.Testing {
output.WriteRawTag(74);
output.WriteMessage(PayloadConfig);
}
coreList_.WriteTo(output, _repeated_coreList_codec);
}
public int CalculateSize() {
@ -2024,9 +2080,6 @@ namespace Grpc.Testing {
if (securityParams_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(SecurityParams);
}
if (Host.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Host);
}
if (Port != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(Port);
}
@ -2039,6 +2092,7 @@ namespace Grpc.Testing {
if (payloadConfig_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(PayloadConfig);
}
size += coreList_.CalculateSize(_repeated_coreList_codec);
return size;
}
@ -2055,9 +2109,6 @@ namespace Grpc.Testing {
}
SecurityParams.MergeFrom(other.SecurityParams);
}
if (other.Host.Length != 0) {
Host = other.Host;
}
if (other.Port != 0) {
Port = other.Port;
}
@ -2073,6 +2124,7 @@ namespace Grpc.Testing {
}
PayloadConfig.MergeFrom(other.PayloadConfig);
}
coreList_.Add(other.coreList_);
}
public void MergeFrom(pb::CodedInputStream input) {
@ -2093,10 +2145,6 @@ namespace Grpc.Testing {
input.ReadMessage(securityParams_);
break;
}
case 26: {
Host = input.ReadString();
break;
}
case 32: {
Port = input.ReadInt32();
break;
@ -2116,6 +2164,11 @@ namespace Grpc.Testing {
input.ReadMessage(payloadConfig_);
break;
}
case 82:
case 80: {
coreList_.AddEntriesFrom(input, _repeated_coreList_codec);
break;
}
}
}
}
@ -2347,7 +2400,7 @@ namespace Grpc.Testing {
public const int CoresFieldNumber = 3;
private int cores_;
/// <summary>
/// Number of cores on the server. See gpr_cpu_num_cores.
/// Number of cores available to the server
/// </summary>
public int Cores {
get { return cores_; }
@ -2460,6 +2513,264 @@ namespace Grpc.Testing {
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class CoreRequest : pb::IMessage<CoreRequest> {
private static readonly pb::MessageParser<CoreRequest> _parser = new pb::MessageParser<CoreRequest>(() => new CoreRequest());
public static pb::MessageParser<CoreRequest> Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[14]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
public CoreRequest() {
OnConstruction();
}
partial void OnConstruction();
public CoreRequest(CoreRequest other) : this() {
}
public CoreRequest Clone() {
return new CoreRequest(this);
}
public override bool Equals(object other) {
return Equals(other as CoreRequest);
}
public bool Equals(CoreRequest other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
return true;
}
public override int GetHashCode() {
int hash = 1;
return hash;
}
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
public void WriteTo(pb::CodedOutputStream output) {
}
public int CalculateSize() {
int size = 0;
return size;
}
public void MergeFrom(CoreRequest other) {
if (other == null) {
return;
}
}
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
input.SkipLastField();
break;
}
}
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class CoreResponse : pb::IMessage<CoreResponse> {
private static readonly pb::MessageParser<CoreResponse> _parser = new pb::MessageParser<CoreResponse>(() => new CoreResponse());
public static pb::MessageParser<CoreResponse> Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[15]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
public CoreResponse() {
OnConstruction();
}
partial void OnConstruction();
public CoreResponse(CoreResponse other) : this() {
cores_ = other.cores_;
}
public CoreResponse Clone() {
return new CoreResponse(this);
}
/// <summary>Field number for the "cores" field.</summary>
public const int CoresFieldNumber = 1;
private int cores_;
/// <summary>
/// Number of cores available on the server
/// </summary>
public int Cores {
get { return cores_; }
set {
cores_ = value;
}
}
public override bool Equals(object other) {
return Equals(other as CoreResponse);
}
public bool Equals(CoreResponse other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (Cores != other.Cores) return false;
return true;
}
public override int GetHashCode() {
int hash = 1;
if (Cores != 0) hash ^= Cores.GetHashCode();
return hash;
}
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
public void WriteTo(pb::CodedOutputStream output) {
if (Cores != 0) {
output.WriteRawTag(8);
output.WriteInt32(Cores);
}
}
public int CalculateSize() {
int size = 0;
if (Cores != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(Cores);
}
return size;
}
public void MergeFrom(CoreResponse other) {
if (other == null) {
return;
}
if (other.Cores != 0) {
Cores = other.Cores;
}
}
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
input.SkipLastField();
break;
case 8: {
Cores = input.ReadInt32();
break;
}
}
}
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class Void : pb::IMessage<Void> {
private static readonly pb::MessageParser<Void> _parser = new pb::MessageParser<Void>(() => new Void());
public static pb::MessageParser<Void> Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
get { return global::Grpc.Testing.ControlReflection.Descriptor.MessageTypes[16]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
public Void() {
OnConstruction();
}
partial void OnConstruction();
public Void(Void other) : this() {
}
public Void Clone() {
return new Void(this);
}
public override bool Equals(object other) {
return Equals(other as Void);
}
public bool Equals(Void other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
return true;
}
public override int GetHashCode() {
int hash = 1;
return hash;
}
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
public void WriteTo(pb::CodedOutputStream output) {
}
public int CalculateSize() {
int size = 0;
return size;
}
public void MergeFrom(Void other) {
if (other == null) {
return;
}
}
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
input.SkipLastField();
break;
}
}
}
}
#endregion
}

@ -1,6 +1,6 @@
#region Copyright notice and license
// Copyright 2015, Google Inc.
// Copyright 2015-2016, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
@ -85,24 +85,27 @@ namespace Grpc.IntegrationTesting
}
var workerServer = new QpsWorker(options);
workerServer.Run();
workerServer.RunAsync().Wait();
}
private void Run()
private async Task RunAsync()
{
string host = "0.0.0.0";
int port = options.DriverPort;
var tcs = new TaskCompletionSource<object>();
var workerServiceImpl = new WorkerServiceImpl(() => { Task.Run(() => tcs.SetResult(null)); });
var server = new Server
{
Services = { WorkerService.BindService(new WorkerServiceImpl()) },
Services = { WorkerService.BindService(workerServiceImpl) },
Ports = { new ServerPort(host, options.DriverPort, ServerCredentials.Insecure )}
};
int boundPort = server.Ports.Single().BoundPort;
Console.WriteLine("Running qps worker server on " + string.Format("{0}:{1}", host, boundPort));
server.Start();
server.ShutdownTask.Wait();
await tcs.Task;
await server.ShutdownAsync();
}
}
}

@ -1,6 +1,6 @@
#region Copyright notice and license
// Copyright 2015, Google Inc.
// Copyright 2015-2016, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
@ -48,7 +48,6 @@ namespace Grpc.IntegrationTesting
/// </summary>
public class RunnerClientServerTest
{
const string Host = "localhost";
IServerRunner serverRunner;
[TestFixtureSetUp]
@ -57,7 +56,6 @@ namespace Grpc.IntegrationTesting
var serverConfig = new ServerConfig
{
ServerType = ServerType.ASYNC_SERVER,
Host = Host,
PayloadConfig = new PayloadConfig
{
SimpleParams = new SimpleProtoParams
@ -83,7 +81,7 @@ namespace Grpc.IntegrationTesting
{
var config = new ClientConfig
{
ServerTargets = { string.Format("{0}:{1}", Host, serverRunner.BoundPort) },
ServerTargets = { string.Format("{0}:{1}", "localhost", serverRunner.BoundPort) },
RpcType = RpcType.UNARY,
LoadParams = new LoadParams { ClosedLoop = new ClosedLoopParams() },
PayloadConfig = new PayloadConfig

@ -65,7 +65,7 @@ namespace Grpc.IntegrationTesting
var server = new Server
{
Services = { BenchmarkService.BindService(new BenchmarkServiceImpl(responseSize)) },
Ports = { new ServerPort(config.Host, config.Port, credentials) }
Ports = { new ServerPort("[::]", config.Port, credentials) }
};
server.Start();

@ -29,11 +29,14 @@ namespace Grpc.Testing {
"QmVuY2htYXJrU2VydmljZRJGCglVbmFyeUNhbGwSGy5ncnBjLnRlc3Rpbmcu",
"U2ltcGxlUmVxdWVzdBocLmdycGMudGVzdGluZy5TaW1wbGVSZXNwb25zZRJO",
"Cg1TdHJlYW1pbmdDYWxsEhsuZ3JwYy50ZXN0aW5nLlNpbXBsZVJlcXVlc3Qa",
"HC5ncnBjLnRlc3RpbmcuU2ltcGxlUmVzcG9uc2UoATABMp0BCg1Xb3JrZXJT",
"HC5ncnBjLnRlc3RpbmcuU2ltcGxlUmVzcG9uc2UoATABMpcCCg1Xb3JrZXJT",
"ZXJ2aWNlEkUKCVJ1blNlcnZlchIYLmdycGMudGVzdGluZy5TZXJ2ZXJBcmdz",
"GhouZ3JwYy50ZXN0aW5nLlNlcnZlclN0YXR1cygBMAESRQoJUnVuQ2xpZW50",
"EhguZ3JwYy50ZXN0aW5nLkNsaWVudEFyZ3MaGi5ncnBjLnRlc3RpbmcuQ2xp",
"ZW50U3RhdHVzKAEwAWIGcHJvdG8z"));
"ZW50U3RhdHVzKAEwARJCCglDb3JlQ291bnQSGS5ncnBjLnRlc3RpbmcuQ29y",
"ZVJlcXVlc3QaGi5ncnBjLnRlc3RpbmcuQ29yZVJlc3BvbnNlEjQKClF1aXRX",
"b3JrZXISEi5ncnBjLnRlc3RpbmcuVm9pZBoSLmdycGMudGVzdGluZy5Wb2lk",
"YgZwcm90bzM="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::Grpc.Testing.MessagesReflection.Descriptor, global::Grpc.Testing.ControlReflection.Descriptor, },
new pbr::GeneratedCodeInfo(null, null));

@ -114,6 +114,9 @@ namespace Grpc.Testing {
static readonly Marshaller<global::Grpc.Testing.ServerStatus> __Marshaller_ServerStatus = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ServerStatus.Parser.ParseFrom);
static readonly Marshaller<global::Grpc.Testing.ClientArgs> __Marshaller_ClientArgs = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ClientArgs.Parser.ParseFrom);
static readonly Marshaller<global::Grpc.Testing.ClientStatus> __Marshaller_ClientStatus = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ClientStatus.Parser.ParseFrom);
static readonly Marshaller<global::Grpc.Testing.CoreRequest> __Marshaller_CoreRequest = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.CoreRequest.Parser.ParseFrom);
static readonly Marshaller<global::Grpc.Testing.CoreResponse> __Marshaller_CoreResponse = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.CoreResponse.Parser.ParseFrom);
static readonly Marshaller<global::Grpc.Testing.Void> __Marshaller_Void = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.Void.Parser.ParseFrom);
static readonly Method<global::Grpc.Testing.ServerArgs, global::Grpc.Testing.ServerStatus> __Method_RunServer = new Method<global::Grpc.Testing.ServerArgs, global::Grpc.Testing.ServerStatus>(
MethodType.DuplexStreaming,
@ -129,6 +132,20 @@ namespace Grpc.Testing {
__Marshaller_ClientArgs,
__Marshaller_ClientStatus);
static readonly Method<global::Grpc.Testing.CoreRequest, global::Grpc.Testing.CoreResponse> __Method_CoreCount = new Method<global::Grpc.Testing.CoreRequest, global::Grpc.Testing.CoreResponse>(
MethodType.Unary,
__ServiceName,
"CoreCount",
__Marshaller_CoreRequest,
__Marshaller_CoreResponse);
static readonly Method<global::Grpc.Testing.Void, global::Grpc.Testing.Void> __Method_QuitWorker = new Method<global::Grpc.Testing.Void, global::Grpc.Testing.Void>(
MethodType.Unary,
__ServiceName,
"QuitWorker",
__Marshaller_Void,
__Marshaller_Void);
// service descriptor
public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
{
@ -142,6 +159,14 @@ namespace Grpc.Testing {
AsyncDuplexStreamingCall<global::Grpc.Testing.ServerArgs, global::Grpc.Testing.ServerStatus> RunServer(CallOptions options);
AsyncDuplexStreamingCall<global::Grpc.Testing.ClientArgs, global::Grpc.Testing.ClientStatus> RunClient(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
AsyncDuplexStreamingCall<global::Grpc.Testing.ClientArgs, global::Grpc.Testing.ClientStatus> RunClient(CallOptions options);
global::Grpc.Testing.CoreResponse CoreCount(global::Grpc.Testing.CoreRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
global::Grpc.Testing.CoreResponse CoreCount(global::Grpc.Testing.CoreRequest request, CallOptions options);
AsyncUnaryCall<global::Grpc.Testing.CoreResponse> CoreCountAsync(global::Grpc.Testing.CoreRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
AsyncUnaryCall<global::Grpc.Testing.CoreResponse> CoreCountAsync(global::Grpc.Testing.CoreRequest request, CallOptions options);
global::Grpc.Testing.Void QuitWorker(global::Grpc.Testing.Void request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
global::Grpc.Testing.Void QuitWorker(global::Grpc.Testing.Void request, CallOptions options);
AsyncUnaryCall<global::Grpc.Testing.Void> QuitWorkerAsync(global::Grpc.Testing.Void request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
AsyncUnaryCall<global::Grpc.Testing.Void> QuitWorkerAsync(global::Grpc.Testing.Void request, CallOptions options);
}
// server-side interface
@ -149,6 +174,8 @@ namespace Grpc.Testing {
{
Task RunServer(IAsyncStreamReader<global::Grpc.Testing.ServerArgs> requestStream, IServerStreamWriter<global::Grpc.Testing.ServerStatus> responseStream, ServerCallContext context);
Task RunClient(IAsyncStreamReader<global::Grpc.Testing.ClientArgs> requestStream, IServerStreamWriter<global::Grpc.Testing.ClientStatus> responseStream, ServerCallContext context);
Task<global::Grpc.Testing.CoreResponse> CoreCount(global::Grpc.Testing.CoreRequest request, ServerCallContext context);
Task<global::Grpc.Testing.Void> QuitWorker(global::Grpc.Testing.Void request, ServerCallContext context);
}
// client stub
@ -177,6 +204,46 @@ namespace Grpc.Testing {
var call = CreateCall(__Method_RunClient, options);
return Calls.AsyncDuplexStreamingCall(call);
}
public global::Grpc.Testing.CoreResponse CoreCount(global::Grpc.Testing.CoreRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
{
var call = CreateCall(__Method_CoreCount, new CallOptions(headers, deadline, cancellationToken));
return Calls.BlockingUnaryCall(call, request);
}
public global::Grpc.Testing.CoreResponse CoreCount(global::Grpc.Testing.CoreRequest request, CallOptions options)
{
var call = CreateCall(__Method_CoreCount, options);
return Calls.BlockingUnaryCall(call, request);
}
public AsyncUnaryCall<global::Grpc.Testing.CoreResponse> CoreCountAsync(global::Grpc.Testing.CoreRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
{
var call = CreateCall(__Method_CoreCount, new CallOptions(headers, deadline, cancellationToken));
return Calls.AsyncUnaryCall(call, request);
}
public AsyncUnaryCall<global::Grpc.Testing.CoreResponse> CoreCountAsync(global::Grpc.Testing.CoreRequest request, CallOptions options)
{
var call = CreateCall(__Method_CoreCount, options);
return Calls.AsyncUnaryCall(call, request);
}
public global::Grpc.Testing.Void QuitWorker(global::Grpc.Testing.Void request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
{
var call = CreateCall(__Method_QuitWorker, new CallOptions(headers, deadline, cancellationToken));
return Calls.BlockingUnaryCall(call, request);
}
public global::Grpc.Testing.Void QuitWorker(global::Grpc.Testing.Void request, CallOptions options)
{
var call = CreateCall(__Method_QuitWorker, options);
return Calls.BlockingUnaryCall(call, request);
}
public AsyncUnaryCall<global::Grpc.Testing.Void> QuitWorkerAsync(global::Grpc.Testing.Void request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
{
var call = CreateCall(__Method_QuitWorker, new CallOptions(headers, deadline, cancellationToken));
return Calls.AsyncUnaryCall(call, request);
}
public AsyncUnaryCall<global::Grpc.Testing.Void> QuitWorkerAsync(global::Grpc.Testing.Void request, CallOptions options)
{
var call = CreateCall(__Method_QuitWorker, options);
return Calls.AsyncUnaryCall(call, request);
}
}
// creates service definition that can be registered with a server
@ -184,7 +251,9 @@ namespace Grpc.Testing {
{
return ServerServiceDefinition.CreateBuilder(__ServiceName)
.AddMethod(__Method_RunServer, serviceImpl.RunServer)
.AddMethod(__Method_RunClient, serviceImpl.RunClient).Build();
.AddMethod(__Method_RunClient, serviceImpl.RunClient)
.AddMethod(__Method_CoreCount, serviceImpl.CoreCount)
.AddMethod(__Method_QuitWorker, serviceImpl.QuitWorker).Build();
}
// creates a new client

@ -47,6 +47,13 @@ namespace Grpc.Testing
/// </summary>
public class WorkerServiceImpl : WorkerService.IWorkerService
{
readonly Action stopRequestHandler;
public WorkerServiceImpl(Action stopRequestHandler)
{
this.stopRequestHandler = GrpcPreconditions.CheckNotNull(stopRequestHandler);
}
public async Task RunServer(IAsyncStreamReader<ServerArgs> requestStream, IServerStreamWriter<ServerStatus> responseStream, ServerCallContext context)
{
GrpcPreconditions.CheckState(await requestStream.MoveNext());
@ -92,5 +99,16 @@ namespace Grpc.Testing
}
await runner.StopAsync();
}
public Task<CoreResponse> CoreCount(CoreRequest request, ServerCallContext context)
{
return Task.FromResult(new CoreResponse { Cores = Environment.ProcessorCount });
}
public Task<Void> QuitWorker(Void request, ServerCallContext context)
{
stopRequestHandler();
return Task.FromResult(new Void());
}
}
}

@ -12,9 +12,9 @@ Beta
PREREQUISITES
--------------
- Windows: .NET Framework 4.5+, Visual Studio 2013 or 2015.
- Linux: Mono 3.2.8+, MonoDevelop 5.9 with NuGet add-in installed.
- Mac OS X: [homebrew][], Xamarin Studio with NuGet add-in installed.
- Windows: .NET Framework 4.5+, Visual Studio 2013 or 2015
- Linux: Mono 4+, MonoDevelop 5.9+ (with NuGet add-in installed)
- Mac OS X: Xamarin Studio 5.9+
HOW TO USE
--------------
@ -24,66 +24,28 @@ HOW TO USE
- Open Visual Studio and start a new project/solution.
- Add NuGet package `Grpc` as a dependency (Project options -> Manage NuGet Packages).
That will also pull all the transitive dependencies (including the native libraries that
That will also pull all the transitive dependencies (including the gRPC native library that
gRPC C# is using internally).
**Linux (Debian)**
- Add [Debian jessie-backports][] to your `sources.list` file. Example:
```sh
echo "deb http://http.debian.net/debian jessie-backports main" | \
sudo tee -a /etc/apt/sources.list
```
- Install the gRPC Debian package
```sh
sudo apt-get update
sudo apt-get install libgrpc0
```
- gRPC C# depends on native shared library `libgrpc_csharp_ext.so` (Unix flavor of grpc_csharp_ext.dll).
This library is not part of the base gRPC debian package and needs to be installed manually from
a `.deb` file. Download the debian package `libgrpc_csharp_ext` from corresponding gRPC release on GitHub
and install it using `dpkg`.
```sh
# choose version corresponding to the version of libgrpc you've installed.
wget https://github.com/grpc/grpc/releases/download/release-0_11_0/libgrpc-csharp-ext0_0.11.0.0-1_amd64.deb
dpkg -i libgrpc-csharp-ext0_0.11.0.0-1_amd64.deb
```
- Open MonoDevelop and start a new project/solution.
- Add NuGet package `Grpc` as a dependency (Project -> Add NuGet packages).
That will also pull all the transitive dependencies (including the gRPC native library that
gRPC C# is using internally).
- NOTE: Currently, there are no debian packages for the latest version Protocol Buffers compiler (_protoc_)
and the gRPC _protoc_ plugin. You can install them using [gRPC Linuxbrew instructions][].
- NOTE: gRPC C# doesn't have a good story yet for shipping precompiled Linux version of Protocol Buffers compiler (_protoc_) and the gRPC _protoc_ plugin. You can install them using [gRPC Linuxbrew instructions][].
**Mac OS X**
- WARNING: As of now gRPC C# only works on 64bit version of Mono (because we don't compile
the native extension for C# in 32bit mode yet). That means your development experience
with Xamarin Studio on MacOS will not be great, as you won't be able to run your
code directly from Xamarin Studio (which requires 32bit version of Mono).
- Install [homebrew][]. Run the following command to install gRPC C# native dependencies.
```sh
$ curl -fsSL https://goo.gl/getgrpc | bash -
```
This will download and run the [gRPC install script][], then install the latest version of gRPC C core and native C# extension.
It also installs Protocol Buffers compiler (_protoc_) and the gRPC _protoc_ plugin for C#.
- Install 64-bit version of mono with command `brew install mono`.
- Open Xamarin Studio and start a new project/solution.
- Add NuGet package `Grpc` as a dependency (Project -> Add NuGet packages).
That will also pull all the transitive dependencies (including the gRPC native library that
gRPC C# is using internally).
- *You will be able to build your project in Xamarin Studio, but to run or test it,
you will need to run it under 64-bit version of Mono.*
- NOTE: gRPC C# doesn't have a good story yet for shipping precompiled Mac OS X version of Protocol Buffers compiler (_protoc_) and the gRPC _protoc_ plugin. You can install them using [gRPC Homebrew instructions][].
BUILD FROM SOURCE
-----------------
@ -94,7 +56,7 @@ If you are a user of gRPC C#, go to Usage section above.
**Windows**
- The grpc_csharp_ext native library needs to be built so you can build the gRPC C# solution. You can
either build the native solution in `vsprojects/grpc.sln` from Visual Studio manually, or you can use
either build the native solution in `vsprojects/grpc_csharp_ext.sln` from Visual Studio manually, or you can use
a convenience batch script that builds everything for you.
```
@ -102,30 +64,28 @@ If you are a user of gRPC C#, go to Usage section above.
> buildall.bat
```
- Open Grpc.sln using Visual Studio. NuGet dependencies will be restored
upon build (you need to have NuGet add-in installed).
- Open Grpc.sln using Visual Studio.
**Linux**
- The grpc_csharp_ext native library needs to be built so you can build the gRPC C# solution:
```sh
$ sudo apt-get install mono-devel
$ sudo apt-get install nunit nunit-console
# from the gRPC repository root
$ make CONFIG=dbg grpc_csharp_ext
```
You can use older versions of MonoDevelop, but then you might need to restore
NuGet dependencies manually (by `nuget restore`), because older versions of MonoDevelop
don't support NuGet add-in.
- Use MonoDevelop to open the solution Grpc.sln
**Mac OS X**
- Compile and install the gRPC C# extension library (that will be used via
P/Invoke from C#).
- The grpc_csharp_ext native library needs to be built so you can build the gRPC C# solution.
```sh
$ make grpc_csharp_ext
$ sudo make install_grpc_csharp_ext
# from the gRPC repository root
$ tools/run_tests/run_tests.py -c dbg -l csharp --build_only
```
- Use MonoDevelop to open the solution Grpc.sln
- Build the solution & run all the tests from test view.
- Use Xamarin Studio to open the solution Grpc.sln
RUNNING TESTS
-------------
@ -135,17 +95,9 @@ gRPC C# is using NUnit as the testing framework.
Under Visual Studio, make sure NUnit test adapter is installed (under "Extensions and Updates").
Then you should be able to run all the tests using Test Explorer.
Under Monodevelop, make sure you installed "NUnit support" in Add-in manager.
Under Monodevelop or Xamarin Studio, make sure you installed "NUnit support" in Add-in manager.
Then you should be able to run all the test from the Test View.
After building the solution, you can also run the tests from command line
using nunit-console tool.
```sh
# from Grpc.Core.Test/bin/Debug directory
$ nunit-console Grpc.Core.Tests.dll
```
gRPC team uses a Python script to simplify facilitate running tests for
different languages.
@ -176,27 +128,15 @@ CONTENTS
- Grpc.IntegrationTesting:
Cross-language gRPC implementation testing (interop testing).
TROUBLESHOOTING
THE NATIVE DEPENDENCY
---------------
### Problem: Unable to load DLL 'grpc_csharp_ext.dll'
Internally, gRPC C# uses a native library written in C (gRPC C core) and invokes its functionality via P/Invoke. `grpc_csharp_ext` library is a native extension library that facilitates this by wrapping some C core API into a form that's more digestible for P/Invoke. If you get the above error, it means that the native dependencies could not be located by the C# runtime (or they are incompatible with the current runtime, so they could not be loaded). The solution to this is environment specific.
- If you are developing on Windows in Visual Studio, the `grpc_csharp_ext.dll` that is shipped by gRPC nuget packages should be automatically copied to your build destination folder once you build. By adjusting project properties in your VS project file, you can influence which exact configuration of `grpc_csharp_ext.dll` will be used (based on VS version, bitness, debug/release configuration).
- If you are running your application that is using gRPC on Windows machine that doesn't have Visual Studio installed, you might need to install [Visual C++ 2013 redistributable](https://www.microsoft.com/en-us/download/details.aspx?id=40784) that contains some system .dll libraries that `grpc_csharp_ext.dll` depends on (see #905 for more details).
- On Linux (or Docker), you need to first install gRPC C core and `libgrpc_csharp_ext.so` shared libraries.
See [How to Use](#how-to-use) section for details how to install it.
Installation on a machine where your application is going to be deployed is no different.
- On Mac, you need to first install gRPC C core and `libgrpc_csharp_ext.dylib` shared libraries using Homebrew. See above for installation instruction.
Installation on a machine where your application is going to be deployed is no different.
Internally, gRPC C# uses a native library written in C (gRPC C core) and invokes its functionality via P/Invoke. `grpc_csharp_ext` library is a native extension library that facilitates this by wrapping some C core API into a form that's more digestible for P/Invoke.
- Possible cause for the problem is that the `grpc_csharp_ext` library is installed, but it has different bitness (32/64bit) than your C# runtime (in case you are using mono) or C# application.
Prior to version 0.13, installing `grpc_csharp_ext` was required to make gRPC work on Linux and MacOS. Starting with version 0.13, we have improved the packaging story significantly and precompiled versions of the native library for all supported platforms are now shipped with the NuGet package. Just installing the `Grpc` NuGet package should be the only step needed to use gRPC C#, regardless of your platform (Windows, Linux or Mac) and the bitness (32 or 64bit).
[gRPC Linuxbrew instructions]:https://github.com/grpc/homebrew-grpc#quick-install-linux
[gRPC Homebrew instructions]:https://github.com/grpc/homebrew-grpc#quick-install-linux
[homebrew]:http://brew.sh
[gRPC install script]:https://raw.githubusercontent.com/grpc/homebrew-grpc/master/scripts/install
[grpc.io]: http://www.grpc.io/docs/installation/csharp.html

@ -42,7 +42,7 @@ $PROTOC --plugin=$PLUGIN --csharp_out=$EXAMPLES_DIR --grpc_out=$EXAMPLES_DIR \
-I src/proto/math src/proto/math/math.proto
$PROTOC --plugin=$PLUGIN --csharp_out=$HEALTHCHECK_DIR --grpc_out=$HEALTHCHECK_DIR \
-I src/proto/grpc/health/v1alpha src/proto/grpc/health/v1alpha/health.proto
-I src/proto/grpc/health/v1 src/proto/grpc/health/v1/health.proto
$PROTOC --plugin=$PLUGIN --csharp_out=$TESTING_DIR --grpc_out=$TESTING_DIR \
-I . src/proto/grpc/testing/{control,empty,messages,payloads,services,stats,test}.proto

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -38,9 +38,9 @@ var grpc = require('../');
var _ = require('lodash');
var health_proto = grpc.load(__dirname +
'/../../proto/grpc/health/v1alpha/health.proto');
'/../../proto/grpc/health/v1/health.proto');
var HealthClient = health_proto.grpc.health.v1alpha.Health;
var HealthClient = health_proto.grpc.health.v1.Health;
function HealthImplementation(statusMap) {
this.statusMap = _.clone(statusMap);

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -35,6 +35,7 @@
#import <XCTest/XCTest.h>
#import <GRPCClient/GRPCCall.h>
#import <GRPCClient/GRPCCall+ChannelArg.h>
#import <GRPCClient/GRPCCall+OAuth2.h>
#import <GRPCClient/GRPCCall+Tests.h>
#import <ProtoRPC/ProtoMethod.h>
@ -45,6 +46,7 @@
static NSString * const kHostAddress = @"localhost:5050";
static NSString * const kPackage = @"grpc.testing";
static NSString * const kService = @"TestService";
static NSString * const kRemoteSSLHost = @"grpc-test.sandbox.googleapis.com";
static ProtoMethod *kInexistentMethod;
static ProtoMethod *kEmptyCallMethod;
@ -127,8 +129,7 @@ static ProtoMethod *kUnaryCallMethod;
XCTFail(@"Received unexpected response: %@", value);
} completionHandler:^(NSError *errorOrNil) {
XCTAssertNotNil(errorOrNil, @"Finished without error!");
// TODO(jcanizales): The server should return code 12 UNIMPLEMENTED, not 5 NOT FOUND.
XCTAssertEqual(errorOrNil.code, 5, @"Finished with unexpected error: %@", errorOrNil);
XCTAssertEqual(errorOrNil.code, 12, @"Finished with unexpected error: %@", errorOrNil);
[expectation fulfill];
}];
@ -191,7 +192,6 @@ static ProtoMethod *kUnaryCallMethod;
[self waitForExpectationsWithTimeout:8 handler:nil];
}
// TODO(jcanizales): Activate this test against the remote server.
- (void)testMetadata {
__weak XCTestExpectation *expectation = [self expectationWithDescription:@"RPC unauthorized."];
@ -200,7 +200,7 @@ static ProtoMethod *kUnaryCallMethod;
request.fillOauthScope = YES;
GRXWriter *requestsWriter = [GRXWriter writerWithValue:[request data]];
GRPCCall *call = [[GRPCCall alloc] initWithHost:kHostAddress
GRPCCall *call = [[GRPCCall alloc] initWithHost:kRemoteSSLHost
path:kUnaryCallMethod.HTTPPath
requestsWriter:requestsWriter];
@ -257,4 +257,40 @@ static ProtoMethod *kUnaryCallMethod;
[self waitForExpectationsWithTimeout:8 handler:nil];
}
// TODO(makarandd): Move to a different file that contains only unit tests
- (void)testExceptions {
// Try to set userAgentPrefix for host that is nil. This should cause
// an exception.
@try {
[GRPCCall setUserAgentPrefix:@"Foo" forHost:nil];
XCTFail(@"Did not receive an exception when host is nil");
} @catch(NSException *theException) {
NSLog(@"Received exception as expected: %@", theException.name);
}
// Try to set parameters to nil for GRPCCall. This should cause an exception
@try {
GRPCCall *call = [[GRPCCall alloc] initWithHost:nil
path:nil
requestsWriter:nil];
XCTFail(@"Did not receive an exception when parameters are nil");
} @catch(NSException *theException) {
NSLog(@"Received exception as expected: %@", theException.name);
}
// Set state to Finished by force
GRXWriter *requestsWriter = [GRXWriter emptyWriter];
[requestsWriter finishWithError:nil];
@try {
GRPCCall *call = [[GRPCCall alloc] initWithHost:kHostAddress
path:kUnaryCallMethod.HTTPPath
requestsWriter:requestsWriter];
XCTFail(@"Did not receive an exception when GRXWriter has incorrect state.");
} @catch(NSException *theException) {
NSLog(@"Received exception as expected: %@", theException.name);
}
}
@end

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -57,4 +57,15 @@ static NSString * const kLocalSSLHost = @"localhost:5051";
[super setUp];
}
- (void)testExceptions {
// Try to set userAgentPrefix for host that is nil. This should cause
// an exception.
@try {
[GRPCCall useTestCertsPath:nil testName:nil forHost:nil];
XCTFail(@"Did not receive an exception when parameters are nil");
} @catch(NSException *theException) {
NSLog(@"Received exception as expected: %@", theException.name);
}
}
@end

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -137,4 +137,24 @@
XCTAssertEqualObjects(handler.errorOrNil, anyError);
}
- (void)testBufferedPipeFinishWriteWhilePaused {
// Given:
CapturingSingleValueHandler *handler = [CapturingSingleValueHandler handler];
id<GRXWriteable> writeable = [GRXWriteable writeableWithSingleHandler:handler.block];
id anyValue = @7;
// If:
GRXBufferedPipe *pipe = [GRXBufferedPipe pipe];
// Write something, then finish
[pipe writeValue:anyValue];
[pipe writesFinishedWithError:nil];
// then start the writeable
[pipe startWithWriteable:writeable];
// Then:
XCTAssertEqual(handler.timesCalled, 1);
XCTAssertEqualObjects(handler.value, anyValue);
XCTAssertEqualObjects(handler.errorOrNil, nil);
}
@end

@ -29,12 +29,11 @@
syntax = "proto3";
package grpc.health.v1alpha;
option csharp_namespace = "Grpc.Health.V1Alpha";
package grpc.health.v1;
option csharp_namespace = "Grpc.Health.V1";
message HealthCheckRequest {
string host = 1;
string service = 2;
string service = 1;
}
message HealthCheckResponse {

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save