fetch and fix conflict

pull/6783/head
thinkerou 9 years ago
commit 39f72a18fe
  1. 4
      .gitignore
  2. 56
      .travis.yml
  3. 522
      BUILD
  4. 1292
      CMakeLists.txt
  5. 7
      CONTRIBUTING.md
  6. 2
      INSTALL.md
  7. 1
      MANIFEST.md
  8. 986
      Makefile
  9. 2
      PYTHON-MANIFEST.in
  10. 2
      Rakefile
  11. 6
      binding.gyp
  12. 171
      build.yaml
  13. 6
      config.m4
  14. 4
      doc/PROTOCOL-HTTP2.md
  15. 118
      doc/compression.md
  16. 6
      doc/cpp-style-guide.md
  17. 325
      doc/interop-test-descriptions.md
  18. 22
      doc/naming.md
  19. 2
      examples/cpp/README.md
  20. 2
      examples/cpp/cpptutorial.md
  21. 2
      examples/cpp/helloworld/README.md
  22. 2
      examples/cpp/helloworld/greeter_client.cc
  23. 2
      examples/csharp/helloworld/.nuget/packages.config
  24. 10
      examples/csharp/helloworld/Greeter/Greeter.csproj
  25. 10
      examples/csharp/helloworld/Greeter/Helloworld.cs
  26. 60
      examples/csharp/helloworld/Greeter/HelloworldGrpc.cs
  27. 6
      examples/csharp/helloworld/Greeter/packages.config
  28. 10
      examples/csharp/helloworld/GreeterClient/GreeterClient.csproj
  29. 2
      examples/csharp/helloworld/GreeterClient/Program.cs
  30. 6
      examples/csharp/helloworld/GreeterClient/packages.config
  31. 10
      examples/csharp/helloworld/GreeterServer/GreeterServer.csproj
  32. 6
      examples/csharp/helloworld/GreeterServer/packages.config
  33. 2
      examples/csharp/helloworld/generate_protos.bat
  34. 2
      examples/csharp/route_guide/.nuget/packages.config
  35. 16
      examples/csharp/route_guide/RouteGuide/RouteGuide.cs
  36. 10
      examples/csharp/route_guide/RouteGuide/RouteGuide.csproj
  37. 157
      examples/csharp/route_guide/RouteGuide/RouteGuideGrpc.cs
  38. 6
      examples/csharp/route_guide/RouteGuide/packages.config
  39. 2
      examples/csharp/route_guide/RouteGuideClient/Program.cs
  40. 10
      examples/csharp/route_guide/RouteGuideClient/RouteGuideClient.csproj
  41. 6
      examples/csharp/route_guide/RouteGuideClient/packages.config
  42. 10
      examples/csharp/route_guide/RouteGuideServer/RouteGuideServer.csproj
  43. 6
      examples/csharp/route_guide/RouteGuideServer/packages.config
  44. 2
      examples/csharp/route_guide/generate_protos.bat
  45. 2
      examples/node/README.md
  46. 28
      examples/objective-c/auth_sample/AuthSample.xcodeproj/project.pbxproj
  47. 91
      examples/objective-c/auth_sample/AuthSample.xcodeproj/xcshareddata/xcschemes/AuthSample.xcscheme
  48. 4
      examples/objective-c/auth_sample/AuthTestService.podspec
  49. 4
      examples/objective-c/helloworld/HelloWorld.podspec
  50. 24
      examples/objective-c/helloworld/HelloWorld.xcodeproj/project.pbxproj
  51. 91
      examples/objective-c/helloworld/HelloWorld.xcodeproj/xcshareddata/xcschemes/HelloWorld.xcscheme
  52. 2
      examples/objective-c/helloworld/README.md
  53. 108
      examples/objective-c/route_guide/Misc/Base.lproj/Main.storyboard
  54. 4
      examples/objective-c/route_guide/RouteGuide.podspec
  55. 18
      examples/objective-c/route_guide/RouteGuideClient.xcodeproj/project.pbxproj
  56. 91
      examples/objective-c/route_guide/RouteGuideClient.xcodeproj/xcshareddata/xcschemes/RouteGuideClient.xcscheme
  57. 98
      examples/objective-c/route_guide/ViewControllers.m
  58. 5
      examples/php/README.md
  59. 2
      examples/python/route_guide/route_guide_server.py
  60. 20
      gRPC.podspec
  61. 3
      grpc.def
  62. 13
      grpc.gemspec
  63. 2
      include/grpc++/ext/proto_server_reflection_plugin.h
  64. 13
      include/grpc++/impl/codegen/async_stream.h
  65. 2
      include/grpc++/impl/codegen/call.h
  66. 10
      include/grpc++/impl/codegen/client_context.h
  67. 15
      include/grpc++/impl/codegen/completion_queue.h
  68. 17
      include/grpc++/impl/codegen/config.h
  69. 48
      include/grpc++/impl/codegen/core_codegen.h
  70. 5
      include/grpc++/impl/codegen/core_codegen_interface.h
  71. 152
      include/grpc++/impl/codegen/impl/status_code_enum.h
  72. 17
      include/grpc++/impl/codegen/proto_utils.h
  73. 7
      include/grpc++/impl/codegen/server_context.h
  74. 11
      include/grpc++/impl/codegen/sync_stream.h
  75. 3
      include/grpc++/impl/server_builder_option.h
  76. 2
      include/grpc++/server_builder.h
  77. 2
      include/grpc++/support/byte_buffer.h
  78. 8
      include/grpc/grpc_posix.h
  79. 7
      include/grpc/impl/codegen/byte_buffer.h
  80. 2
      include/grpc/impl/codegen/grpc_types.h
  81. 1
      include/grpc/impl/codegen/port_platform.h
  82. 5
      include/grpc/support/avl.h
  83. 2
      package.json
  84. 43
      package.xml
  85. 58
      setup.py
  86. 7
      src/compiler/cpp_generator.cc
  87. 25
      src/compiler/csharp_generator.cc
  88. 3
      src/compiler/generator_helpers.h
  89. 14
      src/compiler/node_generator.cc
  90. 3
      src/compiler/python_generator.cc
  91. 1
      src/compiler/python_generator.h
  92. 2
      src/compiler/python_plugin.cc
  93. 9
      src/core/ext/census/grpc_filter.c
  94. 41
      src/core/ext/client_config/channel_connectivity.c
  95. 95
      src/core/ext/client_config/client_channel.c
  96. 2
      src/core/ext/client_config/connector.h
  97. 11
      src/core/ext/client_config/lb_policy.c
  98. 8
      src/core/ext/client_config/lb_policy.h
  99. 67
      src/core/ext/client_config/subchannel.c
  100. 2
      src/core/ext/client_config/subchannel.h
  101. Some files were not shown because too many files have changed in this diff Show More

4
.gitignore vendored

@ -5,13 +5,15 @@ libs
objs objs
# Python items # Python items
cython_debug/
python_build/ python_build/
.coverage* .coverage*
.eggs .eggs
.tox
htmlcov/ htmlcov/
dist/ dist/
*.egg *.egg
py27/
py34/
# Node installation output # Node installation output
^node_modules ^node_modules

@ -5,6 +5,34 @@ env:
- CONFIG=opt - CONFIG=opt
- TEST=objc - TEST=objc
- JOBS=1 - JOBS=1
matrix:
- SCHEME="RxLibraryUnitTests" WORKSPACE="Tests.xcworkspace"
TEST_PATH="src/objective-c/tests" BUILD_ONLY="false"
INTEROP_SERVER="false"
- SCHEME="InteropTestsLocalSSL" WORKSPACE="Tests.xcworkspace"
TEST_PATH="src/objective-c/tests" BUILD_ONLY="false" INTEROP_SERVER="true"
- SCHEME="InteropTestsLocalCleartext" WORKSPACE="Tests.xcworkspace"
TEST_PATH="src/objective-c/tests" BUILD_ONLY="false"
INTEROP_SERVER="true"
# TODO(jcanizales): Investigate why they time out:
# - SCHEME="InteropTestsRemote" WORKSPACE="Tests.xcworkspace"
# TEST_PATH="src/objective-c/tests" BUILD_ONLY="false"
# INTEROP_SERVER="true"
- SCHEME="HelloWorld" WORKSPACE="HelloWorld.xcworkspace"
TEST_PATH="examples/objective-c/helloworld" BUILD_ONLY="true"
INTEROP_SERVER="false"
- SCHEME="RouteGuideClient" WORKSPACE="RouteGuideClient.xcworkspace"
TEST_PATH="examples/objective-c/route_guide" BUILD_ONLY="true"
INTEROP_SERVER="false"
- SCHEME="AuthSample" WORKSPACE="AuthSample.xcworkspace"
TEST_PATH="examples/objective-c/auth_sample" BUILD_ONLY="true"
INTEROP_SERVER="false"
- SCHEME="Sample" WORKSPACE="Sample.xcworkspace"
TEST_PATH="src/objective-c/examples/Sample" BUILD_ONLY="true"
INTEROP_SERVER="false"
- SCHEME="SwiftSample" WORKSPACE="SwiftSample.xcworkspace"
TEST_PATH="src/objective-c/examples/SwiftSample" BUILD_ONLY="true"
INTEROP_SERVER="false"
before_install: before_install:
- pod --version - pod --version
- gem uninstall cocoapods -a - gem uninstall cocoapods -a
@ -16,20 +44,24 @@ before_install:
- popd - popd
install: install:
- make grpc_objective_c_plugin - make grpc_objective_c_plugin
- pushd src/objective-c/tests - install bins/opt/grpc_objective_c_plugin /usr/local/bin/protoc-gen-objcgrpc
- install bins/opt/protobuf/protoc /usr/local/bin/protoc
- pushd $TEST_PATH
- pod install - pod install
- popd - popd
before_script: before_script:
- make interop_server - if [ "${INTEROP_SERVER}" = "true" ]; then
- bins/$CONFIG/interop_server --port=5050 & make interop_server;
- bins/$CONFIG/interop_server --port=5051 --use_tls & (bins/$CONFIG/interop_server --port=5050 &);
xcode_workspace: src/objective-c/tests/Tests.xcworkspace (bins/$CONFIG/interop_server --port=5051 --use_tls &);
xcode_scheme: fi
- RxLibraryUnitTests script:
- InteropTestsLocalSSL - if [ "${BUILD_ONLY}" = "true" ]; then
- InteropTestsLocalCleartext xctool -workspace "$TEST_PATH/$WORKSPACE" -scheme "$SCHEME"
# TODO(jcanizales): Investigate why they time out: -sdk iphonesimulator9.3 build;
# - InteropTestsRemote else
xcode_sdk: iphonesimulator9.3 xctool -workspace "$TEST_PATH/$WORKSPACE" -scheme "$SCHEME"
-sdk iphonesimulator9.3 test;
fi
notifications: notifications:
email: false email: false

522
BUILD

@ -49,7 +49,6 @@ cc_library(
"src/core/lib/support/backoff.h", "src/core/lib/support/backoff.h",
"src/core/lib/support/block_annotate.h", "src/core/lib/support/block_annotate.h",
"src/core/lib/support/env.h", "src/core/lib/support/env.h",
"src/core/lib/support/load_file.h",
"src/core/lib/support/murmur_hash.h", "src/core/lib/support/murmur_hash.h",
"src/core/lib/support/stack_lockfree.h", "src/core/lib/support/stack_lockfree.h",
"src/core/lib/support/string.h", "src/core/lib/support/string.h",
@ -72,7 +71,6 @@ cc_library(
"src/core/lib/support/env_windows.c", "src/core/lib/support/env_windows.c",
"src/core/lib/support/histogram.c", "src/core/lib/support/histogram.c",
"src/core/lib/support/host_port.c", "src/core/lib/support/host_port.c",
"src/core/lib/support/load_file.c",
"src/core/lib/support/log.c", "src/core/lib/support/log.c",
"src/core/lib/support/log_android.c", "src/core/lib/support/log_android.c",
"src/core/lib/support/log_linux.c", "src/core/lib/support/log_linux.c",
@ -178,6 +176,8 @@ cc_library(
"src/core/lib/iomgr/closure.h", "src/core/lib/iomgr/closure.h",
"src/core/lib/iomgr/endpoint.h", "src/core/lib/iomgr/endpoint.h",
"src/core/lib/iomgr/endpoint_pair.h", "src/core/lib/iomgr/endpoint_pair.h",
"src/core/lib/iomgr/error.h",
"src/core/lib/iomgr/ev_epoll_linux.h",
"src/core/lib/iomgr/ev_poll_and_epoll_posix.h", "src/core/lib/iomgr/ev_poll_and_epoll_posix.h",
"src/core/lib/iomgr/ev_poll_posix.h", "src/core/lib/iomgr/ev_poll_posix.h",
"src/core/lib/iomgr/ev_posix.h", "src/core/lib/iomgr/ev_posix.h",
@ -187,6 +187,8 @@ cc_library(
"src/core/lib/iomgr/iomgr.h", "src/core/lib/iomgr/iomgr.h",
"src/core/lib/iomgr/iomgr_internal.h", "src/core/lib/iomgr/iomgr_internal.h",
"src/core/lib/iomgr/iomgr_posix.h", "src/core/lib/iomgr/iomgr_posix.h",
"src/core/lib/iomgr/load_file.h",
"src/core/lib/iomgr/network_status_tracker.h",
"src/core/lib/iomgr/polling_entity.h", "src/core/lib/iomgr/polling_entity.h",
"src/core/lib/iomgr/pollset.h", "src/core/lib/iomgr/pollset.h",
"src/core/lib/iomgr/pollset_set.h", "src/core/lib/iomgr/pollset_set.h",
@ -228,7 +230,6 @@ cc_library(
"src/core/lib/surface/init.h", "src/core/lib/surface/init.h",
"src/core/lib/surface/lame_client.h", "src/core/lib/surface/lame_client.h",
"src/core/lib/surface/server.h", "src/core/lib/surface/server.h",
"src/core/lib/surface/surface_trace.h",
"src/core/lib/transport/byte_stream.h", "src/core/lib/transport/byte_stream.h",
"src/core/lib/transport/connectivity_state.h", "src/core/lib/transport/connectivity_state.h",
"src/core/lib/transport/metadata.h", "src/core/lib/transport/metadata.h",
@ -274,6 +275,7 @@ cc_library(
"src/core/lib/security/transport/handshake.h", "src/core/lib/security/transport/handshake.h",
"src/core/lib/security/transport/secure_endpoint.h", "src/core/lib/security/transport/secure_endpoint.h",
"src/core/lib/security/transport/security_connector.h", "src/core/lib/security/transport/security_connector.h",
"src/core/lib/security/transport/tsi_error.h",
"src/core/lib/security/util/b64.h", "src/core/lib/security/util/b64.h",
"src/core/lib/security/util/json_util.h", "src/core/lib/security/util/json_util.h",
"src/core/lib/tsi/fake_transport_security.h", "src/core/lib/tsi/fake_transport_security.h",
@ -326,6 +328,8 @@ cc_library(
"src/core/lib/iomgr/endpoint.c", "src/core/lib/iomgr/endpoint.c",
"src/core/lib/iomgr/endpoint_pair_posix.c", "src/core/lib/iomgr/endpoint_pair_posix.c",
"src/core/lib/iomgr/endpoint_pair_windows.c", "src/core/lib/iomgr/endpoint_pair_windows.c",
"src/core/lib/iomgr/error.c",
"src/core/lib/iomgr/ev_epoll_linux.c",
"src/core/lib/iomgr/ev_poll_and_epoll_posix.c", "src/core/lib/iomgr/ev_poll_and_epoll_posix.c",
"src/core/lib/iomgr/ev_poll_posix.c", "src/core/lib/iomgr/ev_poll_posix.c",
"src/core/lib/iomgr/ev_posix.c", "src/core/lib/iomgr/ev_posix.c",
@ -335,6 +339,8 @@ cc_library(
"src/core/lib/iomgr/iomgr.c", "src/core/lib/iomgr/iomgr.c",
"src/core/lib/iomgr/iomgr_posix.c", "src/core/lib/iomgr/iomgr_posix.c",
"src/core/lib/iomgr/iomgr_windows.c", "src/core/lib/iomgr/iomgr_windows.c",
"src/core/lib/iomgr/load_file.c",
"src/core/lib/iomgr/network_status_tracker.c",
"src/core/lib/iomgr/polling_entity.c", "src/core/lib/iomgr/polling_entity.c",
"src/core/lib/iomgr/pollset_set_windows.c", "src/core/lib/iomgr/pollset_set_windows.c",
"src/core/lib/iomgr/pollset_windows.c", "src/core/lib/iomgr/pollset_windows.c",
@ -437,6 +443,7 @@ cc_library(
"src/core/lib/security/transport/secure_endpoint.c", "src/core/lib/security/transport/secure_endpoint.c",
"src/core/lib/security/transport/security_connector.c", "src/core/lib/security/transport/security_connector.c",
"src/core/lib/security/transport/server_auth_filter.c", "src/core/lib/security/transport/server_auth_filter.c",
"src/core/lib/security/transport/tsi_error.c",
"src/core/lib/security/util/b64.c", "src/core/lib/security/util/b64.c",
"src/core/lib/security/util/json_util.c", "src/core/lib/security/util/json_util.c",
"src/core/lib/surface/init_secure.c", "src/core/lib/surface/init_secure.c",
@ -556,6 +563,8 @@ cc_library(
"src/core/lib/iomgr/closure.h", "src/core/lib/iomgr/closure.h",
"src/core/lib/iomgr/endpoint.h", "src/core/lib/iomgr/endpoint.h",
"src/core/lib/iomgr/endpoint_pair.h", "src/core/lib/iomgr/endpoint_pair.h",
"src/core/lib/iomgr/error.h",
"src/core/lib/iomgr/ev_epoll_linux.h",
"src/core/lib/iomgr/ev_poll_and_epoll_posix.h", "src/core/lib/iomgr/ev_poll_and_epoll_posix.h",
"src/core/lib/iomgr/ev_poll_posix.h", "src/core/lib/iomgr/ev_poll_posix.h",
"src/core/lib/iomgr/ev_posix.h", "src/core/lib/iomgr/ev_posix.h",
@ -565,6 +574,8 @@ cc_library(
"src/core/lib/iomgr/iomgr.h", "src/core/lib/iomgr/iomgr.h",
"src/core/lib/iomgr/iomgr_internal.h", "src/core/lib/iomgr/iomgr_internal.h",
"src/core/lib/iomgr/iomgr_posix.h", "src/core/lib/iomgr/iomgr_posix.h",
"src/core/lib/iomgr/load_file.h",
"src/core/lib/iomgr/network_status_tracker.h",
"src/core/lib/iomgr/polling_entity.h", "src/core/lib/iomgr/polling_entity.h",
"src/core/lib/iomgr/pollset.h", "src/core/lib/iomgr/pollset.h",
"src/core/lib/iomgr/pollset_set.h", "src/core/lib/iomgr/pollset_set.h",
@ -606,7 +617,6 @@ cc_library(
"src/core/lib/surface/init.h", "src/core/lib/surface/init.h",
"src/core/lib/surface/lame_client.h", "src/core/lib/surface/lame_client.h",
"src/core/lib/surface/server.h", "src/core/lib/surface/server.h",
"src/core/lib/surface/surface_trace.h",
"src/core/lib/transport/byte_stream.h", "src/core/lib/transport/byte_stream.h",
"src/core/lib/transport/connectivity_state.h", "src/core/lib/transport/connectivity_state.h",
"src/core/lib/transport/metadata.h", "src/core/lib/transport/metadata.h",
@ -669,6 +679,7 @@ cc_library(
"src/core/lib/security/transport/handshake.h", "src/core/lib/security/transport/handshake.h",
"src/core/lib/security/transport/secure_endpoint.h", "src/core/lib/security/transport/secure_endpoint.h",
"src/core/lib/security/transport/security_connector.h", "src/core/lib/security/transport/security_connector.h",
"src/core/lib/security/transport/tsi_error.h",
"src/core/lib/security/util/b64.h", "src/core/lib/security/util/b64.h",
"src/core/lib/security/util/json_util.h", "src/core/lib/security/util/json_util.h",
"src/core/lib/tsi/fake_transport_security.h", "src/core/lib/tsi/fake_transport_security.h",
@ -694,6 +705,8 @@ cc_library(
"src/core/lib/iomgr/endpoint.c", "src/core/lib/iomgr/endpoint.c",
"src/core/lib/iomgr/endpoint_pair_posix.c", "src/core/lib/iomgr/endpoint_pair_posix.c",
"src/core/lib/iomgr/endpoint_pair_windows.c", "src/core/lib/iomgr/endpoint_pair_windows.c",
"src/core/lib/iomgr/error.c",
"src/core/lib/iomgr/ev_epoll_linux.c",
"src/core/lib/iomgr/ev_poll_and_epoll_posix.c", "src/core/lib/iomgr/ev_poll_and_epoll_posix.c",
"src/core/lib/iomgr/ev_poll_posix.c", "src/core/lib/iomgr/ev_poll_posix.c",
"src/core/lib/iomgr/ev_posix.c", "src/core/lib/iomgr/ev_posix.c",
@ -703,6 +716,8 @@ cc_library(
"src/core/lib/iomgr/iomgr.c", "src/core/lib/iomgr/iomgr.c",
"src/core/lib/iomgr/iomgr_posix.c", "src/core/lib/iomgr/iomgr_posix.c",
"src/core/lib/iomgr/iomgr_windows.c", "src/core/lib/iomgr/iomgr_windows.c",
"src/core/lib/iomgr/load_file.c",
"src/core/lib/iomgr/network_status_tracker.c",
"src/core/lib/iomgr/polling_entity.c", "src/core/lib/iomgr/polling_entity.c",
"src/core/lib/iomgr/pollset_set_windows.c", "src/core/lib/iomgr/pollset_set_windows.c",
"src/core/lib/iomgr/pollset_windows.c", "src/core/lib/iomgr/pollset_windows.c",
@ -827,6 +842,7 @@ cc_library(
"src/core/lib/security/transport/secure_endpoint.c", "src/core/lib/security/transport/secure_endpoint.c",
"src/core/lib/security/transport/security_connector.c", "src/core/lib/security/transport/security_connector.c",
"src/core/lib/security/transport/server_auth_filter.c", "src/core/lib/security/transport/server_auth_filter.c",
"src/core/lib/security/transport/tsi_error.c",
"src/core/lib/security/util/b64.c", "src/core/lib/security/util/b64.c",
"src/core/lib/security/util/json_util.c", "src/core/lib/security/util/json_util.c",
"src/core/lib/surface/init_secure.c", "src/core/lib/surface/init_secure.c",
@ -899,6 +915,8 @@ cc_library(
"src/core/lib/iomgr/closure.h", "src/core/lib/iomgr/closure.h",
"src/core/lib/iomgr/endpoint.h", "src/core/lib/iomgr/endpoint.h",
"src/core/lib/iomgr/endpoint_pair.h", "src/core/lib/iomgr/endpoint_pair.h",
"src/core/lib/iomgr/error.h",
"src/core/lib/iomgr/ev_epoll_linux.h",
"src/core/lib/iomgr/ev_poll_and_epoll_posix.h", "src/core/lib/iomgr/ev_poll_and_epoll_posix.h",
"src/core/lib/iomgr/ev_poll_posix.h", "src/core/lib/iomgr/ev_poll_posix.h",
"src/core/lib/iomgr/ev_posix.h", "src/core/lib/iomgr/ev_posix.h",
@ -908,6 +926,8 @@ cc_library(
"src/core/lib/iomgr/iomgr.h", "src/core/lib/iomgr/iomgr.h",
"src/core/lib/iomgr/iomgr_internal.h", "src/core/lib/iomgr/iomgr_internal.h",
"src/core/lib/iomgr/iomgr_posix.h", "src/core/lib/iomgr/iomgr_posix.h",
"src/core/lib/iomgr/load_file.h",
"src/core/lib/iomgr/network_status_tracker.h",
"src/core/lib/iomgr/polling_entity.h", "src/core/lib/iomgr/polling_entity.h",
"src/core/lib/iomgr/pollset.h", "src/core/lib/iomgr/pollset.h",
"src/core/lib/iomgr/pollset_set.h", "src/core/lib/iomgr/pollset_set.h",
@ -949,7 +969,6 @@ cc_library(
"src/core/lib/surface/init.h", "src/core/lib/surface/init.h",
"src/core/lib/surface/lame_client.h", "src/core/lib/surface/lame_client.h",
"src/core/lib/surface/server.h", "src/core/lib/surface/server.h",
"src/core/lib/surface/surface_trace.h",
"src/core/lib/transport/byte_stream.h", "src/core/lib/transport/byte_stream.h",
"src/core/lib/transport/connectivity_state.h", "src/core/lib/transport/connectivity_state.h",
"src/core/lib/transport/metadata.h", "src/core/lib/transport/metadata.h",
@ -1025,6 +1044,8 @@ cc_library(
"src/core/lib/iomgr/endpoint.c", "src/core/lib/iomgr/endpoint.c",
"src/core/lib/iomgr/endpoint_pair_posix.c", "src/core/lib/iomgr/endpoint_pair_posix.c",
"src/core/lib/iomgr/endpoint_pair_windows.c", "src/core/lib/iomgr/endpoint_pair_windows.c",
"src/core/lib/iomgr/error.c",
"src/core/lib/iomgr/ev_epoll_linux.c",
"src/core/lib/iomgr/ev_poll_and_epoll_posix.c", "src/core/lib/iomgr/ev_poll_and_epoll_posix.c",
"src/core/lib/iomgr/ev_poll_posix.c", "src/core/lib/iomgr/ev_poll_posix.c",
"src/core/lib/iomgr/ev_posix.c", "src/core/lib/iomgr/ev_posix.c",
@ -1034,6 +1055,8 @@ cc_library(
"src/core/lib/iomgr/iomgr.c", "src/core/lib/iomgr/iomgr.c",
"src/core/lib/iomgr/iomgr_posix.c", "src/core/lib/iomgr/iomgr_posix.c",
"src/core/lib/iomgr/iomgr_windows.c", "src/core/lib/iomgr/iomgr_windows.c",
"src/core/lib/iomgr/load_file.c",
"src/core/lib/iomgr/network_status_tracker.c",
"src/core/lib/iomgr/polling_entity.c", "src/core/lib/iomgr/polling_entity.c",
"src/core/lib/iomgr/pollset_set_windows.c", "src/core/lib/iomgr/pollset_set_windows.c",
"src/core/lib/iomgr/pollset_windows.c", "src/core/lib/iomgr/pollset_windows.c",
@ -1202,26 +1225,6 @@ cc_library(
cc_library(
name = "grpc_zookeeper",
srcs = [
"src/core/ext/resolver/zookeeper/zookeeper_resolver.c",
],
hdrs = [
"include/grpc/grpc_zookeeper.h",
],
includes = [
"include",
".",
],
deps = [
":gpr",
":grpc",
],
)
cc_library( cc_library(
name = "grpc++", name = "grpc++",
srcs = [ srcs = [
@ -1232,6 +1235,109 @@ cc_library(
"src/cpp/client/create_channel_internal.h", "src/cpp/client/create_channel_internal.h",
"src/cpp/server/dynamic_thread_pool.h", "src/cpp/server/dynamic_thread_pool.h",
"src/cpp/server/thread_pool_interface.h", "src/cpp/server/thread_pool_interface.h",
"src/core/lib/channel/channel_args.h",
"src/core/lib/channel/channel_stack.h",
"src/core/lib/channel/channel_stack_builder.h",
"src/core/lib/channel/compress_filter.h",
"src/core/lib/channel/connected_channel.h",
"src/core/lib/channel/context.h",
"src/core/lib/channel/http_client_filter.h",
"src/core/lib/channel/http_server_filter.h",
"src/core/lib/compression/algorithm_metadata.h",
"src/core/lib/compression/message_compress.h",
"src/core/lib/debug/trace.h",
"src/core/lib/http/format_request.h",
"src/core/lib/http/httpcli.h",
"src/core/lib/http/parser.h",
"src/core/lib/iomgr/closure.h",
"src/core/lib/iomgr/endpoint.h",
"src/core/lib/iomgr/endpoint_pair.h",
"src/core/lib/iomgr/error.h",
"src/core/lib/iomgr/ev_epoll_linux.h",
"src/core/lib/iomgr/ev_poll_and_epoll_posix.h",
"src/core/lib/iomgr/ev_poll_posix.h",
"src/core/lib/iomgr/ev_posix.h",
"src/core/lib/iomgr/exec_ctx.h",
"src/core/lib/iomgr/executor.h",
"src/core/lib/iomgr/iocp_windows.h",
"src/core/lib/iomgr/iomgr.h",
"src/core/lib/iomgr/iomgr_internal.h",
"src/core/lib/iomgr/iomgr_posix.h",
"src/core/lib/iomgr/load_file.h",
"src/core/lib/iomgr/network_status_tracker.h",
"src/core/lib/iomgr/polling_entity.h",
"src/core/lib/iomgr/pollset.h",
"src/core/lib/iomgr/pollset_set.h",
"src/core/lib/iomgr/pollset_set_windows.h",
"src/core/lib/iomgr/pollset_windows.h",
"src/core/lib/iomgr/resolve_address.h",
"src/core/lib/iomgr/sockaddr.h",
"src/core/lib/iomgr/sockaddr_posix.h",
"src/core/lib/iomgr/sockaddr_utils.h",
"src/core/lib/iomgr/sockaddr_windows.h",
"src/core/lib/iomgr/socket_utils_posix.h",
"src/core/lib/iomgr/socket_windows.h",
"src/core/lib/iomgr/tcp_client.h",
"src/core/lib/iomgr/tcp_posix.h",
"src/core/lib/iomgr/tcp_server.h",
"src/core/lib/iomgr/tcp_windows.h",
"src/core/lib/iomgr/time_averaged_stats.h",
"src/core/lib/iomgr/timer.h",
"src/core/lib/iomgr/timer_heap.h",
"src/core/lib/iomgr/udp_server.h",
"src/core/lib/iomgr/unix_sockets_posix.h",
"src/core/lib/iomgr/wakeup_fd_pipe.h",
"src/core/lib/iomgr/wakeup_fd_posix.h",
"src/core/lib/iomgr/workqueue.h",
"src/core/lib/iomgr/workqueue_posix.h",
"src/core/lib/iomgr/workqueue_windows.h",
"src/core/lib/json/json.h",
"src/core/lib/json/json_common.h",
"src/core/lib/json/json_reader.h",
"src/core/lib/json/json_writer.h",
"src/core/lib/surface/api_trace.h",
"src/core/lib/surface/call.h",
"src/core/lib/surface/call_test_only.h",
"src/core/lib/surface/channel.h",
"src/core/lib/surface/channel_init.h",
"src/core/lib/surface/channel_stack_type.h",
"src/core/lib/surface/completion_queue.h",
"src/core/lib/surface/event_string.h",
"src/core/lib/surface/init.h",
"src/core/lib/surface/lame_client.h",
"src/core/lib/surface/server.h",
"src/core/lib/transport/byte_stream.h",
"src/core/lib/transport/connectivity_state.h",
"src/core/lib/transport/metadata.h",
"src/core/lib/transport/metadata_batch.h",
"src/core/lib/transport/static_metadata.h",
"src/core/lib/transport/transport.h",
"src/core/lib/transport/transport_impl.h",
"src/core/lib/security/context/security_context.h",
"src/core/lib/security/credentials/composite/composite_credentials.h",
"src/core/lib/security/credentials/credentials.h",
"src/core/lib/security/credentials/fake/fake_credentials.h",
"src/core/lib/security/credentials/google_default/google_default_credentials.h",
"src/core/lib/security/credentials/iam/iam_credentials.h",
"src/core/lib/security/credentials/jwt/json_token.h",
"src/core/lib/security/credentials/jwt/jwt_credentials.h",
"src/core/lib/security/credentials/jwt/jwt_verifier.h",
"src/core/lib/security/credentials/oauth2/oauth2_credentials.h",
"src/core/lib/security/credentials/plugin/plugin_credentials.h",
"src/core/lib/security/credentials/ssl/ssl_credentials.h",
"src/core/lib/security/transport/auth_filters.h",
"src/core/lib/security/transport/handshake.h",
"src/core/lib/security/transport/secure_endpoint.h",
"src/core/lib/security/transport/security_connector.h",
"src/core/lib/security/transport/tsi_error.h",
"src/core/lib/security/util/b64.h",
"src/core/lib/security/util/json_util.h",
"src/core/ext/transport/chttp2/alpn/alpn.h",
"src/core/lib/tsi/fake_transport_security.h",
"src/core/lib/tsi/ssl_transport_security.h",
"src/core/lib/tsi/ssl_types.h",
"src/core/lib/tsi/transport_security.h",
"src/core/lib/tsi/transport_security_interface.h",
"src/cpp/client/secure_credentials.cc", "src/cpp/client/secure_credentials.cc",
"src/cpp/common/auth_property_iterator.cc", "src/cpp/common/auth_property_iterator.cc",
"src/cpp/common/secure_auth_context.cc", "src/cpp/common/secure_auth_context.cc",
@ -1264,6 +1370,122 @@ cc_library(
"src/cpp/util/status.cc", "src/cpp/util/status.cc",
"src/cpp/util/string_ref.cc", "src/cpp/util/string_ref.cc",
"src/cpp/util/time.cc", "src/cpp/util/time.cc",
"src/core/lib/channel/channel_args.c",
"src/core/lib/channel/channel_stack.c",
"src/core/lib/channel/channel_stack_builder.c",
"src/core/lib/channel/compress_filter.c",
"src/core/lib/channel/connected_channel.c",
"src/core/lib/channel/http_client_filter.c",
"src/core/lib/channel/http_server_filter.c",
"src/core/lib/compression/compression.c",
"src/core/lib/compression/message_compress.c",
"src/core/lib/debug/trace.c",
"src/core/lib/http/format_request.c",
"src/core/lib/http/httpcli.c",
"src/core/lib/http/parser.c",
"src/core/lib/iomgr/closure.c",
"src/core/lib/iomgr/endpoint.c",
"src/core/lib/iomgr/endpoint_pair_posix.c",
"src/core/lib/iomgr/endpoint_pair_windows.c",
"src/core/lib/iomgr/error.c",
"src/core/lib/iomgr/ev_epoll_linux.c",
"src/core/lib/iomgr/ev_poll_and_epoll_posix.c",
"src/core/lib/iomgr/ev_poll_posix.c",
"src/core/lib/iomgr/ev_posix.c",
"src/core/lib/iomgr/exec_ctx.c",
"src/core/lib/iomgr/executor.c",
"src/core/lib/iomgr/iocp_windows.c",
"src/core/lib/iomgr/iomgr.c",
"src/core/lib/iomgr/iomgr_posix.c",
"src/core/lib/iomgr/iomgr_windows.c",
"src/core/lib/iomgr/load_file.c",
"src/core/lib/iomgr/network_status_tracker.c",
"src/core/lib/iomgr/polling_entity.c",
"src/core/lib/iomgr/pollset_set_windows.c",
"src/core/lib/iomgr/pollset_windows.c",
"src/core/lib/iomgr/resolve_address_posix.c",
"src/core/lib/iomgr/resolve_address_windows.c",
"src/core/lib/iomgr/sockaddr_utils.c",
"src/core/lib/iomgr/socket_utils_common_posix.c",
"src/core/lib/iomgr/socket_utils_linux.c",
"src/core/lib/iomgr/socket_utils_posix.c",
"src/core/lib/iomgr/socket_windows.c",
"src/core/lib/iomgr/tcp_client_posix.c",
"src/core/lib/iomgr/tcp_client_windows.c",
"src/core/lib/iomgr/tcp_posix.c",
"src/core/lib/iomgr/tcp_server_posix.c",
"src/core/lib/iomgr/tcp_server_windows.c",
"src/core/lib/iomgr/tcp_windows.c",
"src/core/lib/iomgr/time_averaged_stats.c",
"src/core/lib/iomgr/timer.c",
"src/core/lib/iomgr/timer_heap.c",
"src/core/lib/iomgr/udp_server.c",
"src/core/lib/iomgr/unix_sockets_posix.c",
"src/core/lib/iomgr/unix_sockets_posix_noop.c",
"src/core/lib/iomgr/wakeup_fd_eventfd.c",
"src/core/lib/iomgr/wakeup_fd_nospecial.c",
"src/core/lib/iomgr/wakeup_fd_pipe.c",
"src/core/lib/iomgr/wakeup_fd_posix.c",
"src/core/lib/iomgr/workqueue_posix.c",
"src/core/lib/iomgr/workqueue_windows.c",
"src/core/lib/json/json.c",
"src/core/lib/json/json_reader.c",
"src/core/lib/json/json_string.c",
"src/core/lib/json/json_writer.c",
"src/core/lib/surface/alarm.c",
"src/core/lib/surface/api_trace.c",
"src/core/lib/surface/byte_buffer.c",
"src/core/lib/surface/byte_buffer_reader.c",
"src/core/lib/surface/call.c",
"src/core/lib/surface/call_details.c",
"src/core/lib/surface/call_log_batch.c",
"src/core/lib/surface/channel.c",
"src/core/lib/surface/channel_init.c",
"src/core/lib/surface/channel_ping.c",
"src/core/lib/surface/channel_stack_type.c",
"src/core/lib/surface/completion_queue.c",
"src/core/lib/surface/event_string.c",
"src/core/lib/surface/lame_client.c",
"src/core/lib/surface/metadata_array.c",
"src/core/lib/surface/server.c",
"src/core/lib/surface/validate_metadata.c",
"src/core/lib/surface/version.c",
"src/core/lib/transport/byte_stream.c",
"src/core/lib/transport/connectivity_state.c",
"src/core/lib/transport/metadata.c",
"src/core/lib/transport/metadata_batch.c",
"src/core/lib/transport/static_metadata.c",
"src/core/lib/transport/transport.c",
"src/core/lib/transport/transport_op_string.c",
"src/core/lib/http/httpcli_security_connector.c",
"src/core/lib/security/context/security_context.c",
"src/core/lib/security/credentials/composite/composite_credentials.c",
"src/core/lib/security/credentials/credentials.c",
"src/core/lib/security/credentials/credentials_metadata.c",
"src/core/lib/security/credentials/fake/fake_credentials.c",
"src/core/lib/security/credentials/google_default/credentials_posix.c",
"src/core/lib/security/credentials/google_default/credentials_windows.c",
"src/core/lib/security/credentials/google_default/google_default_credentials.c",
"src/core/lib/security/credentials/iam/iam_credentials.c",
"src/core/lib/security/credentials/jwt/json_token.c",
"src/core/lib/security/credentials/jwt/jwt_credentials.c",
"src/core/lib/security/credentials/jwt/jwt_verifier.c",
"src/core/lib/security/credentials/oauth2/oauth2_credentials.c",
"src/core/lib/security/credentials/plugin/plugin_credentials.c",
"src/core/lib/security/credentials/ssl/ssl_credentials.c",
"src/core/lib/security/transport/client_auth_filter.c",
"src/core/lib/security/transport/handshake.c",
"src/core/lib/security/transport/secure_endpoint.c",
"src/core/lib/security/transport/security_connector.c",
"src/core/lib/security/transport/server_auth_filter.c",
"src/core/lib/security/transport/tsi_error.c",
"src/core/lib/security/util/b64.c",
"src/core/lib/security/util/json_util.c",
"src/core/lib/surface/init_secure.c",
"src/core/ext/transport/chttp2/alpn/alpn.c",
"src/core/lib/tsi/fake_transport_security.c",
"src/core/lib/tsi/ssl_transport_security.c",
"src/core/lib/tsi/transport_security.c",
"src/cpp/codegen/codegen_init.cc", "src/cpp/codegen/codegen_init.cc",
], ],
hdrs = [ hdrs = [
@ -1365,6 +1587,14 @@ cc_library(
"include/grpc/impl/codegen/sync_posix.h", "include/grpc/impl/codegen/sync_posix.h",
"include/grpc/impl/codegen/sync_windows.h", "include/grpc/impl/codegen/sync_windows.h",
"include/grpc/impl/codegen/time.h", "include/grpc/impl/codegen/time.h",
"include/grpc/byte_buffer.h",
"include/grpc/byte_buffer_reader.h",
"include/grpc/compression.h",
"include/grpc/grpc.h",
"include/grpc/grpc_posix.h",
"include/grpc/status.h",
"include/grpc/grpc_security.h",
"include/grpc/grpc_security_constants.h",
], ],
includes = [ includes = [
"include", "include",
@ -1374,6 +1604,7 @@ cc_library(
"//external:libssl", "//external:libssl",
"//external:protobuf_clib", "//external:protobuf_clib",
":grpc", ":grpc",
":gpr",
], ],
) )
@ -1463,6 +1694,109 @@ cc_library(
"src/cpp/client/create_channel_internal.h", "src/cpp/client/create_channel_internal.h",
"src/cpp/server/dynamic_thread_pool.h", "src/cpp/server/dynamic_thread_pool.h",
"src/cpp/server/thread_pool_interface.h", "src/cpp/server/thread_pool_interface.h",
"src/core/lib/channel/channel_args.h",
"src/core/lib/channel/channel_stack.h",
"src/core/lib/channel/channel_stack_builder.h",
"src/core/lib/channel/compress_filter.h",
"src/core/lib/channel/connected_channel.h",
"src/core/lib/channel/context.h",
"src/core/lib/channel/http_client_filter.h",
"src/core/lib/channel/http_server_filter.h",
"src/core/lib/compression/algorithm_metadata.h",
"src/core/lib/compression/message_compress.h",
"src/core/lib/debug/trace.h",
"src/core/lib/http/format_request.h",
"src/core/lib/http/httpcli.h",
"src/core/lib/http/parser.h",
"src/core/lib/iomgr/closure.h",
"src/core/lib/iomgr/endpoint.h",
"src/core/lib/iomgr/endpoint_pair.h",
"src/core/lib/iomgr/error.h",
"src/core/lib/iomgr/ev_epoll_linux.h",
"src/core/lib/iomgr/ev_poll_and_epoll_posix.h",
"src/core/lib/iomgr/ev_poll_posix.h",
"src/core/lib/iomgr/ev_posix.h",
"src/core/lib/iomgr/exec_ctx.h",
"src/core/lib/iomgr/executor.h",
"src/core/lib/iomgr/iocp_windows.h",
"src/core/lib/iomgr/iomgr.h",
"src/core/lib/iomgr/iomgr_internal.h",
"src/core/lib/iomgr/iomgr_posix.h",
"src/core/lib/iomgr/load_file.h",
"src/core/lib/iomgr/network_status_tracker.h",
"src/core/lib/iomgr/polling_entity.h",
"src/core/lib/iomgr/pollset.h",
"src/core/lib/iomgr/pollset_set.h",
"src/core/lib/iomgr/pollset_set_windows.h",
"src/core/lib/iomgr/pollset_windows.h",
"src/core/lib/iomgr/resolve_address.h",
"src/core/lib/iomgr/sockaddr.h",
"src/core/lib/iomgr/sockaddr_posix.h",
"src/core/lib/iomgr/sockaddr_utils.h",
"src/core/lib/iomgr/sockaddr_windows.h",
"src/core/lib/iomgr/socket_utils_posix.h",
"src/core/lib/iomgr/socket_windows.h",
"src/core/lib/iomgr/tcp_client.h",
"src/core/lib/iomgr/tcp_posix.h",
"src/core/lib/iomgr/tcp_server.h",
"src/core/lib/iomgr/tcp_windows.h",
"src/core/lib/iomgr/time_averaged_stats.h",
"src/core/lib/iomgr/timer.h",
"src/core/lib/iomgr/timer_heap.h",
"src/core/lib/iomgr/udp_server.h",
"src/core/lib/iomgr/unix_sockets_posix.h",
"src/core/lib/iomgr/wakeup_fd_pipe.h",
"src/core/lib/iomgr/wakeup_fd_posix.h",
"src/core/lib/iomgr/workqueue.h",
"src/core/lib/iomgr/workqueue_posix.h",
"src/core/lib/iomgr/workqueue_windows.h",
"src/core/lib/json/json.h",
"src/core/lib/json/json_common.h",
"src/core/lib/json/json_reader.h",
"src/core/lib/json/json_writer.h",
"src/core/lib/surface/api_trace.h",
"src/core/lib/surface/call.h",
"src/core/lib/surface/call_test_only.h",
"src/core/lib/surface/channel.h",
"src/core/lib/surface/channel_init.h",
"src/core/lib/surface/channel_stack_type.h",
"src/core/lib/surface/completion_queue.h",
"src/core/lib/surface/event_string.h",
"src/core/lib/surface/init.h",
"src/core/lib/surface/lame_client.h",
"src/core/lib/surface/server.h",
"src/core/lib/transport/byte_stream.h",
"src/core/lib/transport/connectivity_state.h",
"src/core/lib/transport/metadata.h",
"src/core/lib/transport/metadata_batch.h",
"src/core/lib/transport/static_metadata.h",
"src/core/lib/transport/transport.h",
"src/core/lib/transport/transport_impl.h",
"src/core/lib/security/context/security_context.h",
"src/core/lib/security/credentials/composite/composite_credentials.h",
"src/core/lib/security/credentials/credentials.h",
"src/core/lib/security/credentials/fake/fake_credentials.h",
"src/core/lib/security/credentials/google_default/google_default_credentials.h",
"src/core/lib/security/credentials/iam/iam_credentials.h",
"src/core/lib/security/credentials/jwt/json_token.h",
"src/core/lib/security/credentials/jwt/jwt_credentials.h",
"src/core/lib/security/credentials/jwt/jwt_verifier.h",
"src/core/lib/security/credentials/oauth2/oauth2_credentials.h",
"src/core/lib/security/credentials/plugin/plugin_credentials.h",
"src/core/lib/security/credentials/ssl/ssl_credentials.h",
"src/core/lib/security/transport/auth_filters.h",
"src/core/lib/security/transport/handshake.h",
"src/core/lib/security/transport/secure_endpoint.h",
"src/core/lib/security/transport/security_connector.h",
"src/core/lib/security/transport/tsi_error.h",
"src/core/lib/security/util/b64.h",
"src/core/lib/security/util/json_util.h",
"src/core/ext/transport/chttp2/alpn/alpn.h",
"src/core/lib/tsi/fake_transport_security.h",
"src/core/lib/tsi/ssl_transport_security.h",
"src/core/lib/tsi/ssl_types.h",
"src/core/lib/tsi/transport_security.h",
"src/core/lib/tsi/transport_security_interface.h",
"src/cpp/common/insecure_create_auth_context.cc", "src/cpp/common/insecure_create_auth_context.cc",
"src/cpp/client/channel.cc", "src/cpp/client/channel.cc",
"src/cpp/client/client_context.cc", "src/cpp/client/client_context.cc",
@ -1490,6 +1824,122 @@ cc_library(
"src/cpp/util/status.cc", "src/cpp/util/status.cc",
"src/cpp/util/string_ref.cc", "src/cpp/util/string_ref.cc",
"src/cpp/util/time.cc", "src/cpp/util/time.cc",
"src/core/lib/channel/channel_args.c",
"src/core/lib/channel/channel_stack.c",
"src/core/lib/channel/channel_stack_builder.c",
"src/core/lib/channel/compress_filter.c",
"src/core/lib/channel/connected_channel.c",
"src/core/lib/channel/http_client_filter.c",
"src/core/lib/channel/http_server_filter.c",
"src/core/lib/compression/compression.c",
"src/core/lib/compression/message_compress.c",
"src/core/lib/debug/trace.c",
"src/core/lib/http/format_request.c",
"src/core/lib/http/httpcli.c",
"src/core/lib/http/parser.c",
"src/core/lib/iomgr/closure.c",
"src/core/lib/iomgr/endpoint.c",
"src/core/lib/iomgr/endpoint_pair_posix.c",
"src/core/lib/iomgr/endpoint_pair_windows.c",
"src/core/lib/iomgr/error.c",
"src/core/lib/iomgr/ev_epoll_linux.c",
"src/core/lib/iomgr/ev_poll_and_epoll_posix.c",
"src/core/lib/iomgr/ev_poll_posix.c",
"src/core/lib/iomgr/ev_posix.c",
"src/core/lib/iomgr/exec_ctx.c",
"src/core/lib/iomgr/executor.c",
"src/core/lib/iomgr/iocp_windows.c",
"src/core/lib/iomgr/iomgr.c",
"src/core/lib/iomgr/iomgr_posix.c",
"src/core/lib/iomgr/iomgr_windows.c",
"src/core/lib/iomgr/load_file.c",
"src/core/lib/iomgr/network_status_tracker.c",
"src/core/lib/iomgr/polling_entity.c",
"src/core/lib/iomgr/pollset_set_windows.c",
"src/core/lib/iomgr/pollset_windows.c",
"src/core/lib/iomgr/resolve_address_posix.c",
"src/core/lib/iomgr/resolve_address_windows.c",
"src/core/lib/iomgr/sockaddr_utils.c",
"src/core/lib/iomgr/socket_utils_common_posix.c",
"src/core/lib/iomgr/socket_utils_linux.c",
"src/core/lib/iomgr/socket_utils_posix.c",
"src/core/lib/iomgr/socket_windows.c",
"src/core/lib/iomgr/tcp_client_posix.c",
"src/core/lib/iomgr/tcp_client_windows.c",
"src/core/lib/iomgr/tcp_posix.c",
"src/core/lib/iomgr/tcp_server_posix.c",
"src/core/lib/iomgr/tcp_server_windows.c",
"src/core/lib/iomgr/tcp_windows.c",
"src/core/lib/iomgr/time_averaged_stats.c",
"src/core/lib/iomgr/timer.c",
"src/core/lib/iomgr/timer_heap.c",
"src/core/lib/iomgr/udp_server.c",
"src/core/lib/iomgr/unix_sockets_posix.c",
"src/core/lib/iomgr/unix_sockets_posix_noop.c",
"src/core/lib/iomgr/wakeup_fd_eventfd.c",
"src/core/lib/iomgr/wakeup_fd_nospecial.c",
"src/core/lib/iomgr/wakeup_fd_pipe.c",
"src/core/lib/iomgr/wakeup_fd_posix.c",
"src/core/lib/iomgr/workqueue_posix.c",
"src/core/lib/iomgr/workqueue_windows.c",
"src/core/lib/json/json.c",
"src/core/lib/json/json_reader.c",
"src/core/lib/json/json_string.c",
"src/core/lib/json/json_writer.c",
"src/core/lib/surface/alarm.c",
"src/core/lib/surface/api_trace.c",
"src/core/lib/surface/byte_buffer.c",
"src/core/lib/surface/byte_buffer_reader.c",
"src/core/lib/surface/call.c",
"src/core/lib/surface/call_details.c",
"src/core/lib/surface/call_log_batch.c",
"src/core/lib/surface/channel.c",
"src/core/lib/surface/channel_init.c",
"src/core/lib/surface/channel_ping.c",
"src/core/lib/surface/channel_stack_type.c",
"src/core/lib/surface/completion_queue.c",
"src/core/lib/surface/event_string.c",
"src/core/lib/surface/lame_client.c",
"src/core/lib/surface/metadata_array.c",
"src/core/lib/surface/server.c",
"src/core/lib/surface/validate_metadata.c",
"src/core/lib/surface/version.c",
"src/core/lib/transport/byte_stream.c",
"src/core/lib/transport/connectivity_state.c",
"src/core/lib/transport/metadata.c",
"src/core/lib/transport/metadata_batch.c",
"src/core/lib/transport/static_metadata.c",
"src/core/lib/transport/transport.c",
"src/core/lib/transport/transport_op_string.c",
"src/core/lib/http/httpcli_security_connector.c",
"src/core/lib/security/context/security_context.c",
"src/core/lib/security/credentials/composite/composite_credentials.c",
"src/core/lib/security/credentials/credentials.c",
"src/core/lib/security/credentials/credentials_metadata.c",
"src/core/lib/security/credentials/fake/fake_credentials.c",
"src/core/lib/security/credentials/google_default/credentials_posix.c",
"src/core/lib/security/credentials/google_default/credentials_windows.c",
"src/core/lib/security/credentials/google_default/google_default_credentials.c",
"src/core/lib/security/credentials/iam/iam_credentials.c",
"src/core/lib/security/credentials/jwt/json_token.c",
"src/core/lib/security/credentials/jwt/jwt_credentials.c",
"src/core/lib/security/credentials/jwt/jwt_verifier.c",
"src/core/lib/security/credentials/oauth2/oauth2_credentials.c",
"src/core/lib/security/credentials/plugin/plugin_credentials.c",
"src/core/lib/security/credentials/ssl/ssl_credentials.c",
"src/core/lib/security/transport/client_auth_filter.c",
"src/core/lib/security/transport/handshake.c",
"src/core/lib/security/transport/secure_endpoint.c",
"src/core/lib/security/transport/security_connector.c",
"src/core/lib/security/transport/server_auth_filter.c",
"src/core/lib/security/transport/tsi_error.c",
"src/core/lib/security/util/b64.c",
"src/core/lib/security/util/json_util.c",
"src/core/lib/surface/init_secure.c",
"src/core/ext/transport/chttp2/alpn/alpn.c",
"src/core/lib/tsi/fake_transport_security.c",
"src/core/lib/tsi/ssl_transport_security.c",
"src/core/lib/tsi/transport_security.c",
"src/cpp/codegen/codegen_init.cc", "src/cpp/codegen/codegen_init.cc",
], ],
hdrs = [ hdrs = [
@ -1591,6 +2041,14 @@ cc_library(
"include/grpc/impl/codegen/sync_posix.h", "include/grpc/impl/codegen/sync_posix.h",
"include/grpc/impl/codegen/sync_windows.h", "include/grpc/impl/codegen/sync_windows.h",
"include/grpc/impl/codegen/time.h", "include/grpc/impl/codegen/time.h",
"include/grpc/byte_buffer.h",
"include/grpc/byte_buffer_reader.h",
"include/grpc/compression.h",
"include/grpc/grpc.h",
"include/grpc/grpc_posix.h",
"include/grpc/status.h",
"include/grpc/grpc_security.h",
"include/grpc/grpc_security_constants.h",
], ],
includes = [ includes = [
"include", "include",
@ -1600,7 +2058,6 @@ cc_library(
"//external:protobuf_clib", "//external:protobuf_clib",
":gpr", ":gpr",
":grpc_unsecure", ":grpc_unsecure",
":grpc",
], ],
) )
@ -1683,7 +2140,6 @@ objc_library(
"src/core/lib/support/env_windows.c", "src/core/lib/support/env_windows.c",
"src/core/lib/support/histogram.c", "src/core/lib/support/histogram.c",
"src/core/lib/support/host_port.c", "src/core/lib/support/host_port.c",
"src/core/lib/support/load_file.c",
"src/core/lib/support/log.c", "src/core/lib/support/log.c",
"src/core/lib/support/log_android.c", "src/core/lib/support/log_android.c",
"src/core/lib/support/log_linux.c", "src/core/lib/support/log_linux.c",
@ -1762,7 +2218,6 @@ objc_library(
"src/core/lib/support/backoff.h", "src/core/lib/support/backoff.h",
"src/core/lib/support/block_annotate.h", "src/core/lib/support/block_annotate.h",
"src/core/lib/support/env.h", "src/core/lib/support/env.h",
"src/core/lib/support/load_file.h",
"src/core/lib/support/murmur_hash.h", "src/core/lib/support/murmur_hash.h",
"src/core/lib/support/stack_lockfree.h", "src/core/lib/support/stack_lockfree.h",
"src/core/lib/support/string.h", "src/core/lib/support/string.h",
@ -1802,6 +2257,8 @@ objc_library(
"src/core/lib/iomgr/endpoint.c", "src/core/lib/iomgr/endpoint.c",
"src/core/lib/iomgr/endpoint_pair_posix.c", "src/core/lib/iomgr/endpoint_pair_posix.c",
"src/core/lib/iomgr/endpoint_pair_windows.c", "src/core/lib/iomgr/endpoint_pair_windows.c",
"src/core/lib/iomgr/error.c",
"src/core/lib/iomgr/ev_epoll_linux.c",
"src/core/lib/iomgr/ev_poll_and_epoll_posix.c", "src/core/lib/iomgr/ev_poll_and_epoll_posix.c",
"src/core/lib/iomgr/ev_poll_posix.c", "src/core/lib/iomgr/ev_poll_posix.c",
"src/core/lib/iomgr/ev_posix.c", "src/core/lib/iomgr/ev_posix.c",
@ -1811,6 +2268,8 @@ objc_library(
"src/core/lib/iomgr/iomgr.c", "src/core/lib/iomgr/iomgr.c",
"src/core/lib/iomgr/iomgr_posix.c", "src/core/lib/iomgr/iomgr_posix.c",
"src/core/lib/iomgr/iomgr_windows.c", "src/core/lib/iomgr/iomgr_windows.c",
"src/core/lib/iomgr/load_file.c",
"src/core/lib/iomgr/network_status_tracker.c",
"src/core/lib/iomgr/polling_entity.c", "src/core/lib/iomgr/polling_entity.c",
"src/core/lib/iomgr/pollset_set_windows.c", "src/core/lib/iomgr/pollset_set_windows.c",
"src/core/lib/iomgr/pollset_windows.c", "src/core/lib/iomgr/pollset_windows.c",
@ -1913,6 +2372,7 @@ objc_library(
"src/core/lib/security/transport/secure_endpoint.c", "src/core/lib/security/transport/secure_endpoint.c",
"src/core/lib/security/transport/security_connector.c", "src/core/lib/security/transport/security_connector.c",
"src/core/lib/security/transport/server_auth_filter.c", "src/core/lib/security/transport/server_auth_filter.c",
"src/core/lib/security/transport/tsi_error.c",
"src/core/lib/security/util/b64.c", "src/core/lib/security/util/b64.c",
"src/core/lib/security/util/json_util.c", "src/core/lib/security/util/json_util.c",
"src/core/lib/surface/init_secure.c", "src/core/lib/surface/init_secure.c",
@ -2011,6 +2471,8 @@ objc_library(
"src/core/lib/iomgr/closure.h", "src/core/lib/iomgr/closure.h",
"src/core/lib/iomgr/endpoint.h", "src/core/lib/iomgr/endpoint.h",
"src/core/lib/iomgr/endpoint_pair.h", "src/core/lib/iomgr/endpoint_pair.h",
"src/core/lib/iomgr/error.h",
"src/core/lib/iomgr/ev_epoll_linux.h",
"src/core/lib/iomgr/ev_poll_and_epoll_posix.h", "src/core/lib/iomgr/ev_poll_and_epoll_posix.h",
"src/core/lib/iomgr/ev_poll_posix.h", "src/core/lib/iomgr/ev_poll_posix.h",
"src/core/lib/iomgr/ev_posix.h", "src/core/lib/iomgr/ev_posix.h",
@ -2020,6 +2482,8 @@ objc_library(
"src/core/lib/iomgr/iomgr.h", "src/core/lib/iomgr/iomgr.h",
"src/core/lib/iomgr/iomgr_internal.h", "src/core/lib/iomgr/iomgr_internal.h",
"src/core/lib/iomgr/iomgr_posix.h", "src/core/lib/iomgr/iomgr_posix.h",
"src/core/lib/iomgr/load_file.h",
"src/core/lib/iomgr/network_status_tracker.h",
"src/core/lib/iomgr/polling_entity.h", "src/core/lib/iomgr/polling_entity.h",
"src/core/lib/iomgr/pollset.h", "src/core/lib/iomgr/pollset.h",
"src/core/lib/iomgr/pollset_set.h", "src/core/lib/iomgr/pollset_set.h",
@ -2061,7 +2525,6 @@ objc_library(
"src/core/lib/surface/init.h", "src/core/lib/surface/init.h",
"src/core/lib/surface/lame_client.h", "src/core/lib/surface/lame_client.h",
"src/core/lib/surface/server.h", "src/core/lib/surface/server.h",
"src/core/lib/surface/surface_trace.h",
"src/core/lib/transport/byte_stream.h", "src/core/lib/transport/byte_stream.h",
"src/core/lib/transport/connectivity_state.h", "src/core/lib/transport/connectivity_state.h",
"src/core/lib/transport/metadata.h", "src/core/lib/transport/metadata.h",
@ -2107,6 +2570,7 @@ objc_library(
"src/core/lib/security/transport/handshake.h", "src/core/lib/security/transport/handshake.h",
"src/core/lib/security/transport/secure_endpoint.h", "src/core/lib/security/transport/secure_endpoint.h",
"src/core/lib/security/transport/security_connector.h", "src/core/lib/security/transport/security_connector.h",
"src/core/lib/security/transport/tsi_error.h",
"src/core/lib/security/util/b64.h", "src/core/lib/security/util/b64.h",
"src/core/lib/security/util/json_util.h", "src/core/lib/security/util/json_util.h",
"src/core/lib/tsi/fake_transport_security.h", "src/core/lib/tsi/fake_transport_security.h",

File diff suppressed because it is too large Load Diff

@ -53,6 +53,13 @@ To know about the list of available commands, do this:
`./tools/run_tests/run_tests.py -h` `./tools/run_tests/run_tests.py -h`
If you are running tests for ObjC on osx, follow these steps before running tests:
* install Xcode command-line tools by running
`sudo xcode-select --install`
* install macports from https://www.macports.org/install.php
* install autoconf, automake, libtool, gflags, cmake using macports
* restart your terminal window or run source ~/.bash_profile to pick up the new PATH changes.
## Adding or removing source code ## Adding or removing source code
Each language uses its own build system to work. Currently, the root's Makefile Each language uses its own build system to work. Currently, the root's Makefile

@ -49,7 +49,7 @@ For developers who are interested to contribute, here is how to compile the
gRPC C Core library. gRPC C Core library.
```sh ```sh
$ git clone https://github.com/grpc/grpc.git $ git clone -b $(curl -L http://grpc.io/release) https://github.com/grpc/grpc
$ cd grpc $ cd grpc
$ git submodule update --init $ git submodule update --init
$ make $ make

@ -19,7 +19,6 @@
* [requirements.txt](requirements.txt) * [requirements.txt](requirements.txt)
* [setup.cfg](setup.cfg) * [setup.cfg](setup.cfg)
* [setup.py](setup.py) * [setup.py](setup.py)
* [tox.ini](tox.ini)
* [PYTHON-MANIFEST.in](PYTHON-MANIFEST.in) * [PYTHON-MANIFEST.in](PYTHON-MANIFEST.in)
## Ruby ## Ruby

File diff suppressed because it is too large Load Diff

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

@ -77,7 +77,7 @@ task 'dlls' do
grpc_config = ENV['GRPC_CONFIG'] || 'opt' grpc_config = ENV['GRPC_CONFIG'] || 'opt'
verbose = ENV['V'] || '0' verbose = ENV['V'] || '0'
env = 'CPPFLAGS="-D_WIN32_WINNT=0x600 -DUNICODE -D_UNICODE" ' env = 'CPPFLAGS="-D_WIN32_WINNT=0x600 -DUNICODE -D_UNICODE -Wno-unused-variable -Wno-unused-result" '
env += 'LDFLAGS=-static ' env += 'LDFLAGS=-static '
env += 'SYSTEM=MINGW32 ' env += 'SYSTEM=MINGW32 '
env += 'EMBED_ZLIB=true ' env += 'EMBED_ZLIB=true '

@ -510,7 +510,6 @@
'src/core/lib/support/env_windows.c', 'src/core/lib/support/env_windows.c',
'src/core/lib/support/histogram.c', 'src/core/lib/support/histogram.c',
'src/core/lib/support/host_port.c', 'src/core/lib/support/host_port.c',
'src/core/lib/support/load_file.c',
'src/core/lib/support/log.c', 'src/core/lib/support/log.c',
'src/core/lib/support/log_android.c', 'src/core/lib/support/log_android.c',
'src/core/lib/support/log_linux.c', 'src/core/lib/support/log_linux.c',
@ -581,6 +580,8 @@
'src/core/lib/iomgr/endpoint.c', 'src/core/lib/iomgr/endpoint.c',
'src/core/lib/iomgr/endpoint_pair_posix.c', 'src/core/lib/iomgr/endpoint_pair_posix.c',
'src/core/lib/iomgr/endpoint_pair_windows.c', 'src/core/lib/iomgr/endpoint_pair_windows.c',
'src/core/lib/iomgr/error.c',
'src/core/lib/iomgr/ev_epoll_linux.c',
'src/core/lib/iomgr/ev_poll_and_epoll_posix.c', 'src/core/lib/iomgr/ev_poll_and_epoll_posix.c',
'src/core/lib/iomgr/ev_poll_posix.c', 'src/core/lib/iomgr/ev_poll_posix.c',
'src/core/lib/iomgr/ev_posix.c', 'src/core/lib/iomgr/ev_posix.c',
@ -590,6 +591,8 @@
'src/core/lib/iomgr/iomgr.c', 'src/core/lib/iomgr/iomgr.c',
'src/core/lib/iomgr/iomgr_posix.c', 'src/core/lib/iomgr/iomgr_posix.c',
'src/core/lib/iomgr/iomgr_windows.c', 'src/core/lib/iomgr/iomgr_windows.c',
'src/core/lib/iomgr/load_file.c',
'src/core/lib/iomgr/network_status_tracker.c',
'src/core/lib/iomgr/polling_entity.c', 'src/core/lib/iomgr/polling_entity.c',
'src/core/lib/iomgr/pollset_set_windows.c', 'src/core/lib/iomgr/pollset_set_windows.c',
'src/core/lib/iomgr/pollset_windows.c', 'src/core/lib/iomgr/pollset_windows.c',
@ -692,6 +695,7 @@
'src/core/lib/security/transport/secure_endpoint.c', 'src/core/lib/security/transport/secure_endpoint.c',
'src/core/lib/security/transport/security_connector.c', 'src/core/lib/security/transport/security_connector.c',
'src/core/lib/security/transport/server_auth_filter.c', 'src/core/lib/security/transport/server_auth_filter.c',
'src/core/lib/security/transport/tsi_error.c',
'src/core/lib/security/util/b64.c', 'src/core/lib/security/util/b64.c',
'src/core/lib/security/util/json_util.c', 'src/core/lib/security/util/json_util.c',
'src/core/lib/surface/init_secure.c', 'src/core/lib/surface/init_secure.c',

@ -7,7 +7,7 @@ settings:
'#3': Use "-preN" suffixes to identify pre-release versions '#3': Use "-preN" suffixes to identify pre-release versions
'#4': Per-language overrides are possible with (eg) ruby_version tag here '#4': Per-language overrides are possible with (eg) ruby_version tag here
'#5': See the expand_version.py for all the quirks here '#5': See the expand_version.py for all the quirks here
version: 0.15.0-dev version: 0.16.0-dev
filegroups: filegroups:
- name: census - name: census
public_headers: public_headers:
@ -70,7 +70,6 @@ filegroups:
- src/core/lib/support/backoff.h - src/core/lib/support/backoff.h
- src/core/lib/support/block_annotate.h - src/core/lib/support/block_annotate.h
- src/core/lib/support/env.h - src/core/lib/support/env.h
- src/core/lib/support/load_file.h
- src/core/lib/support/murmur_hash.h - src/core/lib/support/murmur_hash.h
- src/core/lib/support/stack_lockfree.h - src/core/lib/support/stack_lockfree.h
- src/core/lib/support/string.h - src/core/lib/support/string.h
@ -94,7 +93,6 @@ filegroups:
- src/core/lib/support/env_windows.c - src/core/lib/support/env_windows.c
- src/core/lib/support/histogram.c - src/core/lib/support/histogram.c
- src/core/lib/support/host_port.c - src/core/lib/support/host_port.c
- src/core/lib/support/load_file.c
- src/core/lib/support/log.c - src/core/lib/support/log.c
- src/core/lib/support/log_android.c - src/core/lib/support/log_android.c
- src/core/lib/support/log_linux.c - src/core/lib/support/log_linux.c
@ -143,11 +141,6 @@ filegroups:
- include/grpc/impl/codegen/sync_posix.h - include/grpc/impl/codegen/sync_posix.h
- include/grpc/impl/codegen/sync_windows.h - include/grpc/impl/codegen/sync_windows.h
- include/grpc/impl/codegen/time.h - include/grpc/impl/codegen/time.h
- name: grpc++_codegen_base_src
src:
- src/cpp/codegen/codegen_init.cc
uses:
- grpc++_codegen_base
- name: grpc_base - name: grpc_base
public_headers: public_headers:
- include/grpc/byte_buffer.h - include/grpc/byte_buffer.h
@ -174,6 +167,8 @@ filegroups:
- src/core/lib/iomgr/closure.h - src/core/lib/iomgr/closure.h
- src/core/lib/iomgr/endpoint.h - src/core/lib/iomgr/endpoint.h
- src/core/lib/iomgr/endpoint_pair.h - src/core/lib/iomgr/endpoint_pair.h
- src/core/lib/iomgr/error.h
- src/core/lib/iomgr/ev_epoll_linux.h
- src/core/lib/iomgr/ev_poll_and_epoll_posix.h - src/core/lib/iomgr/ev_poll_and_epoll_posix.h
- src/core/lib/iomgr/ev_poll_posix.h - src/core/lib/iomgr/ev_poll_posix.h
- src/core/lib/iomgr/ev_posix.h - src/core/lib/iomgr/ev_posix.h
@ -183,6 +178,8 @@ filegroups:
- src/core/lib/iomgr/iomgr.h - src/core/lib/iomgr/iomgr.h
- src/core/lib/iomgr/iomgr_internal.h - src/core/lib/iomgr/iomgr_internal.h
- src/core/lib/iomgr/iomgr_posix.h - src/core/lib/iomgr/iomgr_posix.h
- src/core/lib/iomgr/load_file.h
- src/core/lib/iomgr/network_status_tracker.h
- src/core/lib/iomgr/polling_entity.h - src/core/lib/iomgr/polling_entity.h
- src/core/lib/iomgr/pollset.h - src/core/lib/iomgr/pollset.h
- src/core/lib/iomgr/pollset_set.h - src/core/lib/iomgr/pollset_set.h
@ -224,7 +221,6 @@ filegroups:
- src/core/lib/surface/init.h - src/core/lib/surface/init.h
- src/core/lib/surface/lame_client.h - src/core/lib/surface/lame_client.h
- src/core/lib/surface/server.h - src/core/lib/surface/server.h
- src/core/lib/surface/surface_trace.h
- src/core/lib/transport/byte_stream.h - src/core/lib/transport/byte_stream.h
- src/core/lib/transport/connectivity_state.h - src/core/lib/transport/connectivity_state.h
- src/core/lib/transport/metadata.h - src/core/lib/transport/metadata.h
@ -250,6 +246,8 @@ filegroups:
- src/core/lib/iomgr/endpoint.c - src/core/lib/iomgr/endpoint.c
- src/core/lib/iomgr/endpoint_pair_posix.c - src/core/lib/iomgr/endpoint_pair_posix.c
- src/core/lib/iomgr/endpoint_pair_windows.c - src/core/lib/iomgr/endpoint_pair_windows.c
- src/core/lib/iomgr/error.c
- src/core/lib/iomgr/ev_epoll_linux.c
- src/core/lib/iomgr/ev_poll_and_epoll_posix.c - src/core/lib/iomgr/ev_poll_and_epoll_posix.c
- src/core/lib/iomgr/ev_poll_posix.c - src/core/lib/iomgr/ev_poll_posix.c
- src/core/lib/iomgr/ev_posix.c - src/core/lib/iomgr/ev_posix.c
@ -259,6 +257,8 @@ filegroups:
- src/core/lib/iomgr/iomgr.c - src/core/lib/iomgr/iomgr.c
- src/core/lib/iomgr/iomgr_posix.c - src/core/lib/iomgr/iomgr_posix.c
- src/core/lib/iomgr/iomgr_windows.c - src/core/lib/iomgr/iomgr_windows.c
- src/core/lib/iomgr/load_file.c
- src/core/lib/iomgr/network_status_tracker.c
- src/core/lib/iomgr/polling_entity.c - src/core/lib/iomgr/polling_entity.c
- src/core/lib/iomgr/pollset_set_windows.c - src/core/lib/iomgr/pollset_set_windows.c
- src/core/lib/iomgr/pollset_windows.c - src/core/lib/iomgr/pollset_windows.c
@ -442,6 +442,7 @@ filegroups:
- src/core/lib/security/transport/handshake.h - src/core/lib/security/transport/handshake.h
- src/core/lib/security/transport/secure_endpoint.h - src/core/lib/security/transport/secure_endpoint.h
- src/core/lib/security/transport/security_connector.h - src/core/lib/security/transport/security_connector.h
- src/core/lib/security/transport/tsi_error.h
- src/core/lib/security/util/b64.h - src/core/lib/security/util/b64.h
- src/core/lib/security/util/json_util.h - src/core/lib/security/util/json_util.h
src: src:
@ -466,6 +467,7 @@ filegroups:
- src/core/lib/security/transport/secure_endpoint.c - src/core/lib/security/transport/secure_endpoint.c
- src/core/lib/security/transport/security_connector.c - src/core/lib/security/transport/security_connector.c
- src/core/lib/security/transport/server_auth_filter.c - src/core/lib/security/transport/server_auth_filter.c
- src/core/lib/security/transport/tsi_error.c
- src/core/lib/security/util/b64.c - src/core/lib/security/util/b64.c
- src/core/lib/security/util/json_util.c - src/core/lib/security/util/json_util.c
- src/core/lib/surface/init_secure.c - src/core/lib/surface/init_secure.c
@ -710,10 +712,10 @@ filegroups:
- src/cpp/util/status.cc - src/cpp/util/status.cc
- src/cpp/util/string_ref.cc - src/cpp/util/string_ref.cc
- src/cpp/util/time.cc - src/cpp/util/time.cc
deps:
- grpc
uses: uses:
- grpc++_codegen_base - grpc++_codegen_base
- grpc_base
- grpc_secure
- name: grpc++_codegen_base - name: grpc++_codegen_base
language: c++ language: c++
public_headers: public_headers:
@ -749,6 +751,12 @@ filegroups:
- include/grpc++/impl/codegen/time.h - include/grpc++/impl/codegen/time.h
uses: uses:
- grpc_codegen - grpc_codegen
- name: grpc++_codegen_base_src
language: c++
src:
- src/cpp/codegen/codegen_init.cc
uses:
- grpc++_codegen_base
- name: grpc++_codegen_proto - name: grpc++_codegen_proto
language: c++ language: c++
public_headers: public_headers:
@ -897,21 +905,6 @@ libs:
generate_plugin_registry: true generate_plugin_registry: true
secure: false secure: false
vs_project_guid: '{46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}' vs_project_guid: '{46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}'
- name: grpc_zookeeper
build: all
language: c
public_headers:
- include/grpc/grpc_zookeeper.h
src:
- src/core/ext/resolver/zookeeper/zookeeper_resolver.c
deps:
- gpr
- grpc
external_deps:
- zookeeper
platforms:
- linux
secure: false
- name: reconnect_server - name: reconnect_server
build: private build: private
language: c language: c
@ -1128,7 +1121,7 @@ libs:
- src/proto/grpc/testing/empty.proto - src/proto/grpc/testing/empty.proto
- src/proto/grpc/testing/messages.proto - src/proto/grpc/testing/messages.proto
- src/proto/grpc/testing/test.proto - src/proto/grpc/testing/test.proto
- test/cpp/interop/server_main.cc - test/cpp/interop/interop_server.cc
deps: deps:
- interop_server_helper - interop_server_helper
- grpc++_test_util - grpc++_test_util
@ -1249,6 +1242,17 @@ targets:
- test/core/end2end/fuzzers/api_fuzzer_corpus - test/core/end2end/fuzzers/api_fuzzer_corpus
dict: test/core/end2end/fuzzers/api_fuzzer.dictionary dict: test/core/end2end/fuzzers/api_fuzzer.dictionary
maxlen: 2048 maxlen: 2048
- name: bad_server_response_test
build: test
language: c
src:
- test/core/end2end/bad_server_response_test.c
deps:
- test_tcp_server
- grpc_test_util
- grpc
- gpr_test_util
- gpr
- name: bin_decoder_test - name: bin_decoder_test
build: test build: test
language: c language: c
@ -1405,6 +1409,18 @@ targets:
- grpc - grpc
- gpr_test_util - gpr_test_util
- gpr - gpr
- name: ev_epoll_linux_test
build: test
language: c
src:
- test/core/iomgr/ev_epoll_linux_test.c
deps:
- grpc_test_util
- grpc
- gpr_test_util
- gpr
platforms:
- linux
- name: fd_conservation_posix_test - name: fd_conservation_posix_test
build: test build: test
language: c language: c
@ -1456,7 +1472,7 @@ targets:
- gpr_test_util - gpr_test_util
- gpr - gpr
- name: fling_stream_test - name: fling_stream_test
cpu_cost: 2 cpu_cost: 1.5
build: test build: test
language: c language: c
src: src:
@ -1471,7 +1487,7 @@ targets:
- linux - linux
- posix - posix
- name: fling_test - name: fling_test
cpu_cost: 2 cpu_cost: 1.5
build: test build: test
language: c language: c
src: src:
@ -1570,14 +1586,6 @@ targets:
deps: deps:
- gpr_test_util - gpr_test_util
- gpr - gpr
- name: gpr_load_file_test
build: test
language: c
src:
- test/core/support/load_file_test.c
deps:
- gpr_test_util
- gpr
- name: gpr_log_test - name: gpr_log_test
build: test build: test
language: c language: c
@ -1603,7 +1611,7 @@ targets:
- gpr_test_util - gpr_test_util
- gpr - gpr
- name: gpr_stack_lockfree_test - name: gpr_stack_lockfree_test
cpu_cost: 10 cpu_cost: 7
build: test build: test
language: c language: c
src: src:
@ -1727,10 +1735,9 @@ targets:
src: src:
- test/core/security/create_jwt.c - test/core/security/create_jwt.c
deps: deps:
- grpc_test_util
- grpc - grpc
- gpr_test_util
- gpr - gpr
secure: true
- name: grpc_credentials_test - name: grpc_credentials_test
build: test build: test
language: c language: c
@ -1742,7 +1749,8 @@ targets:
- gpr_test_util - gpr_test_util
- gpr - gpr
- name: grpc_fetch_oauth2 - name: grpc_fetch_oauth2
build: tool build: test
run: false
language: c language: c
src: src:
- test/core/security/fetch_oauth2.c - test/core/security/fetch_oauth2.c
@ -1791,9 +1799,7 @@ targets:
src: src:
- test/core/security/print_google_default_creds_token.c - test/core/security/print_google_default_creds_token.c
deps: deps:
- grpc_test_util
- grpc - grpc
- gpr_test_util
- gpr - gpr
- name: grpc_security_connector_test - name: grpc_security_connector_test
build: test build: test
@ -1811,9 +1817,7 @@ targets:
src: src:
- test/core/security/verify_jwt.c - test/core/security/verify_jwt.c
deps: deps:
- grpc_test_util
- grpc - grpc
- gpr_test_util
- gpr - gpr
- name: hpack_parser_fuzzer_test - name: hpack_parser_fuzzer_test
build: fuzzer build: fuzzer
@ -1849,11 +1853,21 @@ targets:
- grpc - grpc
- gpr_test_util - gpr_test_util
- gpr - gpr
- name: http_fuzzer_test - name: http_parser_test
build: test
language: c
src:
- test/core/http/parser_test.c
deps:
- grpc_test_util
- grpc
- gpr_test_util
- gpr
- name: http_request_fuzzer_test
build: fuzzer build: fuzzer
language: c language: c
src: src:
- test/core/http/fuzzer.c - test/core/http/request_fuzzer.c
deps: deps:
- grpc_test_util - grpc_test_util
- grpc - grpc
@ -1862,16 +1876,19 @@ targets:
corpus_dirs: corpus_dirs:
- test/core/http/corpus - test/core/http/corpus
maxlen: 2048 maxlen: 2048
- name: http_parser_test - name: http_response_fuzzer_test
build: test build: fuzzer
language: c language: c
src: src:
- test/core/http/parser_test.c - test/core/http/response_fuzzer.c
deps: deps:
- grpc_test_util - grpc_test_util
- grpc - grpc
- gpr_test_util - gpr_test_util
- gpr - gpr
corpus_dirs:
- test/core/http/corpus
maxlen: 2048
- name: httpcli_format_request_test - name: httpcli_format_request_test
build: test build: test
language: c language: c
@ -1954,6 +1971,7 @@ targets:
- gpr_test_util - gpr_test_util
- gpr - gpr
- name: invalid_call_argument_test - name: invalid_call_argument_test
cpu_cost: 0.1
build: test build: test
language: c language: c
src: src:
@ -2037,6 +2055,16 @@ targets:
- grpc - grpc
- gpr_test_util - gpr_test_util
- gpr - gpr
- name: load_file_test
build: test
language: c
src:
- test/core/iomgr/load_file_test.c
deps:
- grpc_test_util
- grpc
- gpr_test_util
- gpr
- name: low_level_ping_pong_benchmark - name: low_level_ping_pong_benchmark
build: benchmark build: benchmark
language: c language: c
@ -2157,6 +2185,16 @@ targets:
- grpc - grpc
- gpr_test_util - gpr_test_util
- gpr - gpr
- name: sequential_connectivity_test
build: test
language: c
src:
- test/core/surface/sequential_connectivity_test.c
deps:
- grpc_test_util
- grpc
- gpr_test_util
- gpr
- name: server_chttp2_test - name: server_chttp2_test
build: test build: test
language: c language: c
@ -2253,7 +2291,7 @@ targets:
- linux - linux
- posix - posix
- name: tcp_posix_test - name: tcp_posix_test
cpu_cost: 0.5 cpu_cost: 0.2
build: test build: test
language: c language: c
src: src:
@ -2321,16 +2359,6 @@ targets:
- grpc - grpc
- gpr_test_util - gpr_test_util
- gpr - gpr
- name: timers_test
build: test
language: c
src:
- test/core/profiling/timers_test.c
deps:
- grpc_test_util
- grpc
- gpr_test_util
- gpr
- name: transport_connectivity_state_test - name: transport_connectivity_state_test
build: test build: test
language: c language: c
@ -3104,26 +3132,6 @@ targets:
- grpc - grpc
- gpr_test_util - gpr_test_util
- gpr - gpr
- name: zookeeper_test
gtest: true
build: test
run: false
language: c++
src:
- src/proto/grpc/testing/echo.proto
- test/cpp/end2end/zookeeper_test.cc
deps:
- grpc++_test_util
- grpc_test_util
- grpc++
- grpc_zookeeper
- grpc
- gpr_test_util
- gpr
external_deps:
- zookeeper
platforms:
- linux
- name: public_headers_must_be_c89 - name: public_headers_must_be_c89
build: test build: test
language: c89 language: c89
@ -3274,6 +3282,7 @@ configs:
CPPFLAGS: -O0 -fsanitize=thread -fno-omit-frame-pointer -Wno-unused-command-line-argument CPPFLAGS: -O0 -fsanitize=thread -fno-omit-frame-pointer -Wno-unused-command-line-argument
-DGPR_NO_DIRECT_SYSCALLS -DGPR_NO_DIRECT_SYSCALLS
CXX: clang++ CXX: clang++
DEFINES: GRPC_TSAN
LD: clang LD: clang
LDFLAGS: -fsanitize=thread LDFLAGS: -fsanitize=thread
LDXX: clang++ LDXX: clang++

@ -51,7 +51,6 @@ if test "$PHP_GRPC" != "no"; then
src/core/lib/support/env_windows.c \ src/core/lib/support/env_windows.c \
src/core/lib/support/histogram.c \ src/core/lib/support/histogram.c \
src/core/lib/support/host_port.c \ src/core/lib/support/host_port.c \
src/core/lib/support/load_file.c \
src/core/lib/support/log.c \ src/core/lib/support/log.c \
src/core/lib/support/log_android.c \ src/core/lib/support/log_android.c \
src/core/lib/support/log_linux.c \ src/core/lib/support/log_linux.c \
@ -100,6 +99,8 @@ if test "$PHP_GRPC" != "no"; then
src/core/lib/iomgr/endpoint.c \ src/core/lib/iomgr/endpoint.c \
src/core/lib/iomgr/endpoint_pair_posix.c \ src/core/lib/iomgr/endpoint_pair_posix.c \
src/core/lib/iomgr/endpoint_pair_windows.c \ src/core/lib/iomgr/endpoint_pair_windows.c \
src/core/lib/iomgr/error.c \
src/core/lib/iomgr/ev_epoll_linux.c \
src/core/lib/iomgr/ev_poll_and_epoll_posix.c \ src/core/lib/iomgr/ev_poll_and_epoll_posix.c \
src/core/lib/iomgr/ev_poll_posix.c \ src/core/lib/iomgr/ev_poll_posix.c \
src/core/lib/iomgr/ev_posix.c \ src/core/lib/iomgr/ev_posix.c \
@ -109,6 +110,8 @@ if test "$PHP_GRPC" != "no"; then
src/core/lib/iomgr/iomgr.c \ src/core/lib/iomgr/iomgr.c \
src/core/lib/iomgr/iomgr_posix.c \ src/core/lib/iomgr/iomgr_posix.c \
src/core/lib/iomgr/iomgr_windows.c \ src/core/lib/iomgr/iomgr_windows.c \
src/core/lib/iomgr/load_file.c \
src/core/lib/iomgr/network_status_tracker.c \
src/core/lib/iomgr/polling_entity.c \ src/core/lib/iomgr/polling_entity.c \
src/core/lib/iomgr/pollset_set_windows.c \ src/core/lib/iomgr/pollset_set_windows.c \
src/core/lib/iomgr/pollset_windows.c \ src/core/lib/iomgr/pollset_windows.c \
@ -211,6 +214,7 @@ if test "$PHP_GRPC" != "no"; then
src/core/lib/security/transport/secure_endpoint.c \ src/core/lib/security/transport/secure_endpoint.c \
src/core/lib/security/transport/security_connector.c \ src/core/lib/security/transport/security_connector.c \
src/core/lib/security/transport/server_auth_filter.c \ src/core/lib/security/transport/server_auth_filter.c \
src/core/lib/security/transport/tsi_error.c \
src/core/lib/security/util/b64.c \ src/core/lib/security/util/b64.c \
src/core/lib/security/util/json_util.c \ src/core/lib/security/util/json_util.c \
src/core/lib/surface/init_secure.c \ src/core/lib/surface/init_secure.c \

@ -38,7 +38,7 @@ Request-Headers are delivered as HTTP2 headers in HEADERS + CONTINUATION frames.
* **Nanosecond** → "n" * **Nanosecond** → "n"
* **Content-Type** → "content-type" "application/grpc" [("+proto" / "+json" / {_custom_})] * **Content-Type** → "content-type" "application/grpc" [("+proto" / "+json" / {_custom_})]
* **Content-Coding** → "identity" / "gzip" / "deflate" / "snappy" / {_custom_} * **Content-Coding** → "identity" / "gzip" / "deflate" / "snappy" / {_custom_}
* **Message-Encoding** → "grpc-encoding" Content-Coding * <a name="message-encoding"></a>**Message-Encoding** → "grpc-encoding" Content-Coding
* **Message-Accept-Encoding** → "grpc-accept-encoding" Content-Coding \*("," Content-Coding) * **Message-Accept-Encoding** → "grpc-accept-encoding" Content-Coding \*("," Content-Coding)
* **User-Agent** → "user-agent" {_structured user-agent string_} * **User-Agent** → "user-agent" {_structured user-agent string_}
* **Message-Type** → "grpc-message-type" {_type name for message schema_} * **Message-Type** → "grpc-message-type" {_type name for message schema_}
@ -83,7 +83,7 @@ binary values' lengths being post-Base64.
The repeated sequence of **Length-Prefixed-Message** items is delivered in DATA frames The repeated sequence of **Length-Prefixed-Message** items is delivered in DATA frames
* **Length-Prefixed-Message** → Compressed-Flag Message-Length Message * **Length-Prefixed-Message** → Compressed-Flag Message-Length Message
* **Compressed-Flag** → 0 / 1 # encoded as 1 byte unsigned integer * <a name="compressed-flag"></a>**Compressed-Flag** → 0 / 1 # encoded as 1 byte unsigned integer
* **Message-Length** → {_length of Message_} # encoded as 4 byte unsigned integer * **Message-Length** → {_length of Message_} # encoded as 4 byte unsigned integer
* **Message** → \*{binary octet} * **Message** → \*{binary octet}

@ -0,0 +1,118 @@
## **gRPC Compression**
The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD",
"SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be
interpreted as described in [RFC 2119](http://www.ietf.org/rfc/rfc2119.txt).
### Intent
Compression is used to reduce the amount of bandwidth used between peers. The
compression supported by gRPC acts _at the individual message level_, taking
_message_ [as defined in the wire format
document](PROTOCOL-HTTP2.md).
The implementation supports different compression algorithms. A _default
compression level_, to be used in the absence of message-specific settings, MAY
be specified for during channel creation.
The ability to control compression settings per call and to enable/disable
compression on a per message basis MAY be used to prevent CRIME/BEAST attacks.
It also allows for asymmetric compression communication, whereby a response MAY
be compressed differently, if at all.
### Specification
Compression MAY be configured by the Client Application by calling the
appropriate API method. There are two scenarios where compression MAY be
configured:
+ At channel creation time, which sets the channel default compression and
therefore the compression that SHALL be used in the absence of per-RPC
compression configuration.
+ At response time, via:
+ For unary RPCs, the {Client,Server}Context instance.
+ For streaming RPCs, the {Client,Server}Writer instance. In this case,
configuration is reduced to disabling compression altogether.
### Compression Method Asymmetry Between Peers
A gRPC peer MAY choose to respond using a different compression method to that
of the request, including not performing any compression, regardless of channel
and RPC settings (for example, if compression would result in small or negative
gains).
When a message from a client compressed with an unsupported algorithm is
processed by a server, it WILL result in an `UNIMPLEMENTED` error status on the
server. The server will then include in its response a `grpc-accept-encoding`
header specifying the algorithms it does accept. If an `UNIMPLEMENTED` error
status is returned from the server despite having used one of the algorithms
from the `grpc-accept-encoding` header, the cause MUST NOT be related to
compression. Data sent from a server compressed with an algorithm not supported
by the client WILL result in an `INTERNAL` error status on the client side.
Note that a peer MAY choose to not disclose all the encodings it supports.
However, if it receives a message compressed in an undisclosed but supported
encoding, it MUST include said encoding in the response's `grpc-accept-encoding
h`eader.
For every message a server is requested to compress using an algorithm it knows
the client doesn't support (as indicated by the last `grpc-accept-encoding`
header received from the client), it SHALL send the message uncompressed.
### Specific Disabling of Compression
If the user (through the previously described mechanisms) requests to disable
compression the next message MUST be sent uncompressed. This is instrumental in
preventing BEAST/CRIME attacks. This applies to both the the unary and streaming
cases.
### Compression Levels and Algorithms
The set of supported algorithm is implementation dependent. In order to simplify
the public API and to operate seamlessly across implementations (both in terms
of languages but also different version of the same one), we introduce the idea
of _compression levels_ (such as "low", "medium", "high").
Levels map to concrete algorithms and/or their settings (such as "low" mapping
to "gzip -3" and "high" mapping to "gzip -9") automatically depending on what a
peer is known to support. A server is always aware of what its clients support,
as clients disclose it in their Message-Accept-Encoding header as part of their
initial call. A client doesn't a priori (presently) know which algorithms a
server supports. This issue can be addressed with an initial negotiation of
capabilities or an automatic retry mechanism. These features will be implemented
in the future. Currently however, compression levels are only supported at the
server side, which is aware of the client's capabilities through the incoming
Message-Accept-Encoding header.
### Propagation to child RPCs
The inheritance of the compression configuration by child RPCs is left up to the
implementation. Note that in the absence of changes to the parent channel, its
configuration will be used.
### Test cases
1. When a compression level is not specified for either the channel or the
message, the default channel level _none_ is considered: data MUST NOT be
compressed.
1. When per-RPC compression configuration isn't present for a message, the
channel compression configuration MUST be used.
1. When a compression method (including no compression) is specified for an
outgoing message, the message MUST be compressed accordingly.
1. A message compressed by a client in a way not supported by its server MUST
fail with status `UNIMPLEMENTED`, its associated description indicating the
unsupported condition as well as the supported ones. The returned
`grpc-accept-encoding` header MUST NOT contain the compression method
(encoding) used.
1. A message compressed by a server in a way not supported by its client MUST
fail with status `INTERNAL`, its associated description indicating the
unsupported condition as well as the supported ones. The returned
`grpc-accept-encoding` header MUST NOT contain the compression method
(encoding) used.
1. An ill-constructed message with its [Compressed-Flag
bit](PROTOCOL-HTTP2.md#compressed-flag)
set but lacking a
"[grpc-encoding](PROTOCOL-HTTP2.md#message-encoding)"
entry different from _identity_ in its metadata MUST fail with `INTERNAL`
status, its associated description indicating the invalid Compressed-Flag
condition.

@ -53,6 +53,12 @@ default capture). Other C++ functional features such as
(../include/grpc++/impl/codegen/config.h). Instead, pointers should (../include/grpc++/impl/codegen/config.h). Instead, pointers should
be checked for validity using their implicit conversion to `bool`. be checked for validity using their implicit conversion to `bool`.
In other words, use `if (p)` rather than `if (p != nullptr)` In other words, use `if (p)` rather than `if (p != nullptr)`
- Do not initialize global/static pointer variables to `nullptr`. Just let
the compiler implicitly initialize them to `nullptr` (which it will
definitely do). The reason is that `nullptr` is an actual object in
our implementation rather than just a constant pointer value, so
static/global constructors will be called in a potentially
undesirable sequence.
- Do not use `final` or `override` as these are not supported by some - Do not use `final` or `override` as these are not supported by some
compilers. Instead use `GRPC_FINAL` and `GRPC_OVERRIDE` . These compilers. Instead use `GRPC_FINAL` and `GRPC_OVERRIDE` . These
compile down to the traditional C++ forms for compilers that support compile down to the traditional C++ forms for compilers that support

@ -30,8 +30,7 @@ Clients should accept these arguments:
[ca.pem](https://github.com/grpc/grpc/blob/master/src/core/lib/tsi/test_creds/ca.pem) [ca.pem](https://github.com/grpc/grpc/blob/master/src/core/lib/tsi/test_creds/ca.pem)
as the CA root as the CA root
* --default_service_account=ACCOUNT_EMAIL * --default_service_account=ACCOUNT_EMAIL
* Email of the GCE default service account. Only applicable * Email of the GCE default service account.
for compute_engine_creds test.
* --oauth_scope=SCOPE * --oauth_scope=SCOPE
* OAuth scope. For example, "https://www.googleapis.com/auth/xapi.zoo" * OAuth scope. For example, "https://www.googleapis.com/auth/xapi.zoo"
* --service_account_key_file=PATH * --service_account_key_file=PATH
@ -68,14 +67,12 @@ control (even if compression is enabled on the channel).
Server features: Server features:
* [UnaryCall][] * [UnaryCall][]
* [Compressable Payload][]
Procedure: Procedure:
1. Client calls UnaryCall with: 1. Client calls UnaryCall with:
``` ```
{ {
response_type: COMPRESSABLE
response_size: 314159 response_size: 314159
payload:{ payload:{
body: 271828 bytes of zeros body: 271828 bytes of zeros
@ -85,56 +82,106 @@ Procedure:
Client asserts: Client asserts:
* call was successful * call was successful
* response payload type is COMPRESSABLE
* response payload body is 314159 bytes in size * response payload body is 314159 bytes in size
* clients are free to assert that the response payload body contents are zero * clients are free to assert that the response payload body contents are zero
and comparing the entire response message against a golden response and comparing the entire response message against a golden response
### large_compressed_unary ### client_compressed_unary
This test verifies compressed unary calls succeed in sending messages. It
sends one unary request for every payload type, with and without requesting a
compressed response from the server.
In all scenarios, whether compression was actually performed is determined by
the compression bit in the response's message flags.
This test verifies the client can compress unary messages by sending two unary
calls, for compressed and uncompressed payloads. It also sends an initial
probing request to verify whether the server supports the [CompressedRequest][]
feature by checking if the probing call fails with an `INVALID_ARGUMENT` status.
Server features: Server features:
* [UnaryCall][] * [UnaryCall][]
* [Compressable Payload][] * [CompressedRequest][]
* [Uncompressable Payload][]
Procedure: Procedure:
1. Client calls UnaryCall with: 1. Client calls UnaryCall with the feature probe, an *uncompressed* message:
```
{
expect_compressed:{
value: true
}
response_size: 314159
payload:{
body: 271828 bytes of zeros
}
}
```
1. Client calls UnaryCall with the *compressed* message:
``` ```
{ {
request_compressed_response: bool expect_compressed:{
response_type: COMPRESSABLE value: true
}
response_size: 314159 response_size: 314159
payload:{ payload:{
body: 271828 bytes of zeros body: 271828 bytes of zeros
} }
} }
``` ```
1. Client calls UnaryCall with the *uncompressed* message:
```
{
expect_compressed:{
value: false
}
response_size: 314159
payload:{
body: 271828 bytes of zeros
}
}
```
Client asserts: Client asserts:
* call was successful * First call failed with `INVALID_ARGUMENT` status.
* response payload type is COMPRESSABLE * Subsequent calls were successful.
* if `request_compressed_response` is false, the response MUST NOT have the * Response payload body is 314159 bytes in size.
compressed message flag set. * Clients are free to assert that the response payload body contents are
* if `request_compressed_response` is true, the response MUST have the zeros and comparing the entire response message against a golden response.
compressed message flag set.
* response payload body is 314159 bytes in size
* clients are free to assert that the response payload body contents are
zero and comparing the entire response message against a golden response
2. Client calls UnaryCall with: ### server_compressed_unary
This test verifies the server can compress unary messages. It sends two unary
requests, expecting the server's response to be compressed or not according to
the `response_compressed` boolean.
Whether compression was actually performed is determined by the compression bit
in the response's message flags. *Note that some languages may not have access
to the message flags*.
Server features:
* [UnaryCall][]
* [CompressedResponse][]
Procedure:
1. Client calls UnaryCall with `SimpleRequest`:
``` ```
{ {
request_compressed_response: bool response_compressed:{
response_type: UNCOMPRESSABLE value: true
}
response_size: 314159
payload:{
body: 271828 bytes of zeros
}
}
```
```
{
response_compressed:{
value: false
}
response_size: 314159 response_size: 314159
payload:{ payload:{
body: 271828 bytes of zeros body: 271828 bytes of zeros
@ -143,11 +190,13 @@ Procedure:
``` ```
Client asserts: Client asserts:
* call was successful * call was successful
* response payload type is UNCOMPRESSABLE * when `response_compressed` is true, the response MUST have the
* the response MAY have the compressed message flag set. Some compressed message flag set.
implementations will choose to compress the payload even when the output * when `response_compressed` is false, the response MUST NOT have
size if larger than the input. the compressed message flag set.
* response payload body is 314159 bytes in size * response payload body is 314159 bytes in size in both cases.
* clients are free to assert that the response payload body contents are
zero and comparing the entire response message against a golden response
### client_streaming ### client_streaming
@ -156,7 +205,6 @@ This test verifies that client-only streaming succeeds.
Server features: Server features:
* [StreamingInputCall][] * [StreamingInputCall][]
* [Compressable Payload][]
Procedure: Procedure:
1. Client calls StreamingInputCall 1. Client calls StreamingInputCall
@ -206,65 +254,81 @@ Client asserts:
* call was successful * call was successful
* response aggregated_payload_size is 74922 * response aggregated_payload_size is 74922
### server_streaming
This test verifies that server-only streaming succeeds. ### client_compressed_streaming
Server features: This test verifies the client can compress requests on per-message basis by
* [StreamingOutputCall][] performing a two-request streaming call. It also sends an initial probing
* [Compressable Payload][] request to verify whether the server supports the [CompressedRequest][] feature
by checking if the probing call fails with an `INVALID_ARGUMENT` status.
Procedure: Procedure:
1. Client calls StreamingOutputCall with: 1. Client calls `StreamingInputCall` and sends the following feature-probing
*uncompressed* `StreamingInputCallRequest` message
``` ```
{ {
response_type:COMPRESSABLE expect_compressed:{
response_parameters:{ value: true
size: 31415
} }
response_parameters:{ payload:{
size: 59 body: 27182 bytes of zeros
} }
response_parameters:{
size: 2653
} }
response_parameters:{ ```
size: 58979 If the call fails with `INVALID_ARGUMENT`, the test fails. Otherwise, we
continue.
1. Client calls `StreamingInputCall` again, sending the *compressed* message
```
{
expect_compressed:{
value: true
}
payload:{
body: 27182 bytes of zeros
} }
} }
``` ```
1. And finally, the *uncompressed* message
```
{
expect_compressed:{
value: false
}
payload:{
body: 45904 bytes of zeros
}
}
```
1. Client half-closes
Client asserts: Client asserts:
* call was successful * First call fails with `INVALID_ARGUMENT`.
* exactly four responses * Next calls succeeds.
* response payloads are COMPRESSABLE * Response aggregated payload size is 73086.
* response payload bodies are sized (in order): 31415, 9, 2653, 58979
* clients are free to assert that the response payload body contents are zero
and comparing the entire response messages against golden responses
### server_compressed_streaming
This test verifies that server-only compressed streaming succeeds. ### server_streaming
This test verifies that server-only streaming succeeds.
Server features: Server features:
* [StreamingOutputCall][] * [StreamingOutputCall][]
* [Compressable Payload][]
* [Uncompressable Payload][]
Procedure: Procedure:
1. Client calls StreamingOutputCall with: 1. Client calls StreamingOutputCall with `StreamingOutputCallRequest`:
``` ```
{ {
request_compressed_response: bool
response_type:COMPRESSABLE
response_parameters:{ response_parameters:{
size: 31415 size: 31415
} }
response_parameters:{ response_parameters:{
size: 59 size: 9
} }
response_parameters:{ response_parameters:{
size: 2653 size: 2653
@ -278,47 +342,50 @@ Procedure:
Client asserts: Client asserts:
* call was successful * call was successful
* exactly four responses * exactly four responses
* response payloads are COMPRESSABLE * response payload bodies are sized (in order): 31415, 9, 2653, 58979
* if `request_compressed_response` is false, the response's messages MUST * clients are free to assert that the response payload body contents are zero
NOT have the compressed message flag set. and comparing the entire response messages against golden responses
* if `request_compressed_response` is true, the response's messages MUST
have the compressed message flag set. ### server_compressed_streaming
* response payload bodies are sized (in order): 31415, 59, 2653, 58979
* clients are free to assert that the response payload body contents are
zero and comparing the entire response messages against golden responses
This test verifies that the server can compress streaming messages and disable
compression on individual messages.
2. Client calls StreamingOutputCall with: Server features:
* [StreamingOutputCall][]
* [CompressedResponse][]
Procedure:
1. Client calls StreamingOutputCall with `StreamingOutputCallRequest`:
``` ```
{ {
request_compressed_response: bool
response_type:UNCOMPRESSABLE
response_parameters:{ response_parameters:{
size: 31415 compressed: {
value: true
} }
response_parameters:{ size: 31415
size: 59
} }
response_parameters:{ response_parameters:{
size: 2653 compressed: {
value: false
} }
response_parameters:{ size: 92653
size: 58979
} }
} }
``` ```
Client asserts: Client asserts:
* call was successful * call was successful
* exactly four responses * exactly two responses
* response payloads are UNCOMPRESSABLE * when `response_compressed` is false, the response's messages MUST
* the response MAY have the compressed message flag set. Some NOT have the compressed message flag set.
implementations will choose to compress the payload even when the output * when `response_compressed` is true, the response's messages MUST
size if larger than the input. have the compressed message flag set.
* response payload bodies are sized (in order): 31415, 59, 2653, 58979 * response payload bodies are sized (in order): 31415, 92653
* clients are free to assert that the body of the responses are identical to * clients are free to assert that the response payload body contents are
the golden uncompressable data at `test/cpp/interop/rnd.dat`. zero and comparing the entire response messages against golden responses
### ping_pong ### ping_pong
@ -327,14 +394,12 @@ This test verifies that full duplex bidi is supported.
Server features: Server features:
* [FullDuplexCall][] * [FullDuplexCall][]
* [Compressable Payload][]
Procedure: Procedure:
1. Client calls FullDuplexCall with: 1. Client calls FullDuplexCall with:
``` ```
{ {
response_type: COMPRESSABLE
response_parameters:{ response_parameters:{
size: 31415 size: 31415
} }
@ -348,9 +413,8 @@ Procedure:
``` ```
{ {
response_type: COMPRESSABLE
response_parameters:{ response_parameters:{
size: 59 size: 9
} }
payload:{ payload:{
body: 8 bytes of zeros body: 8 bytes of zeros
@ -362,7 +426,6 @@ Procedure:
``` ```
{ {
response_type: COMPRESSABLE
response_parameters:{ response_parameters:{
size: 2653 size: 2653
} }
@ -376,7 +439,6 @@ Procedure:
``` ```
{ {
response_type: COMPRESSABLE
response_parameters:{ response_parameters:{
size: 58979 size: 58979
} }
@ -391,7 +453,6 @@ Procedure:
Client asserts: Client asserts:
* call was successful * call was successful
* exactly four responses * exactly four responses
* response payloads are COMPRESSABLE
* response payload bodies are sized (in order): 31415, 9, 2653, 58979 * response payload bodies are sized (in order): 31415, 9, 2653, 58979
* clients are free to assert that the response payload body contents are zero * clients are free to assert that the response payload body contents are zero
and comparing the entire response messages against golden responses and comparing the entire response messages against golden responses
@ -421,12 +482,12 @@ with desired oauth scope.
The test uses `--default_service_account` with GCE service account email and The test uses `--default_service_account` with GCE service account email and
`--oauth_scope` with the OAuth scope to use. For testing against `--oauth_scope` with the OAuth scope to use. For testing against
grpc-test.sandbox.googleapis.com, "https://www.googleapis.com/auth/xapi.zoo" should grpc-test.sandbox.googleapis.com, "https://www.googleapis.com/auth/xapi.zoo"
should
be passed in as `--oauth_scope`. be passed in as `--oauth_scope`.
Server features: Server features:
* [UnaryCall][] * [UnaryCall][]
* [Compressable Payload][]
* [Echo Authenticated Username][] * [Echo Authenticated Username][]
* [Echo OAuth Scope][] * [Echo OAuth Scope][]
@ -436,7 +497,6 @@ Procedure:
``` ```
{ {
response_type: COMPRESSABLE
response_size: 314159 response_size: 314159
payload:{ payload:{
body: 271828 bytes of zeros body: 271828 bytes of zeros
@ -448,7 +508,8 @@ Procedure:
Client asserts: Client asserts:
* call was successful * call was successful
* received SimpleResponse.username equals the value of `--default_service_account` flag * received SimpleResponse.username equals the value of
`--default_service_account` flag
* received SimpleResponse.oauth_scope is in `--oauth_scope` * received SimpleResponse.oauth_scope is in `--oauth_scope`
* response payload body is 314159 bytes in size * response payload body is 314159 bytes in size
* clients are free to assert that the response payload body contents are zero * clients are free to assert that the response payload body contents are zero
@ -469,7 +530,6 @@ variable GOOGLE_APPLICATION_CREDENTIALS.
Server features: Server features:
* [UnaryCall][] * [UnaryCall][]
* [Compressable Payload][]
* [Echo Authenticated Username][] * [Echo Authenticated Username][]
* [Echo OAuth Scope][] * [Echo OAuth Scope][]
@ -479,7 +539,6 @@ Procedure:
``` ```
{ {
response_type: COMPRESSABLE
response_size: 314159 response_size: 314159
payload:{ payload:{
body: 271828 bytes of zeros body: 271828 bytes of zeros
@ -492,7 +551,8 @@ Client asserts:
* call was successful * call was successful
* received SimpleResponse.username is not empty and is in the json key file used * received SimpleResponse.username is not empty and is in the json key file used
by the auth library. The client can optionally check the username matches the by the auth library. The client can optionally check the username matches the
email address in the key file or equals the value of `--default_service_account` flag. email address in the key file or equals the value of `--default_service_account`
flag.
* response payload body is 314159 bytes in size * response payload body is 314159 bytes in size
* clients are free to assert that the response payload body contents are zero * clients are free to assert that the response payload body contents are zero
and comparing the entire response message against a golden response and comparing the entire response message against a golden response
@ -518,18 +578,18 @@ variable GOOGLE_APPLICATION_CREDENTIALS, *OR* if GCE credentials is used to
fetch the token, `--default_service_account` can be used to pass in GCE service fetch the token, `--default_service_account` can be used to pass in GCE service
account email. account email.
- uses the flag `--oauth_scope` for the oauth scope. For testing against - uses the flag `--oauth_scope` for the oauth scope. For testing against
grpc-test.sandbox.googleapis.com, "https://www.googleapis.com/auth/xapi.zoo" should grpc-test.sandbox.googleapis.com, "https://www.googleapis.com/auth/xapi.zoo"
be passed as the `--oauth_scope`. should be passed as the `--oauth_scope`.
Server features: Server features:
* [UnaryCall][] * [UnaryCall][]
* [Compressable Payload][]
* [Echo Authenticated Username][] * [Echo Authenticated Username][]
* [Echo OAuth Scope][] * [Echo OAuth Scope][]
Procedure: Procedure:
1. Client uses the auth library to obtain an authorization token 1. Client uses the auth library to obtain an authorization token
2. Client configures the channel to use AccessTokenCredentials with the access token obtained in step 1 2. Client configures the channel to use AccessTokenCredentials with the access
token obtained in step 1
3. Client calls UnaryCall with the following message 3. Client calls UnaryCall with the following message
``` ```
@ -550,8 +610,8 @@ json key file or GCE default service account email.
Similar to the other auth tests, this test is only for cloud-to-prod path. Similar to the other auth tests, this test is only for cloud-to-prod path.
This test verifies unary calls succeed in sending messages using a JWT or a service account This test verifies unary calls succeed in sending messages using a JWT or a
credentials set on the RPC. service account credentials set on the RPC.
The test The test
- uses the flag `--service_account_key_file` with the path to a json key file - uses the flag `--service_account_key_file` with the path to a json key file
@ -565,7 +625,6 @@ against grpc-test.sandbox.googleapis.com, oauth scope
Server features: Server features:
* [UnaryCall][] * [UnaryCall][]
* [Compressable Payload][]
* [Echo Authenticated Username][] * [Echo Authenticated Username][]
* [Echo OAuth Scope][] * [Echo OAuth Scope][]
@ -596,7 +655,6 @@ by the server.
Server features: Server features:
* [UnaryCall][] * [UnaryCall][]
* [FullDuplexCall][] * [FullDuplexCall][]
* [Compressable Payload][]
* [Echo Metadata][] * [Echo Metadata][]
Procedure: Procedure:
@ -611,7 +669,6 @@ Procedure:
``` ```
{ {
response_type: COMPRESSABLE
response_size: 314159 response_size: 314159
payload:{ payload:{
body: 271828 bytes of zeros body: 271828 bytes of zeros
@ -630,7 +687,6 @@ Procedure:
``` ```
{ {
response_type: COMPRESSABLE
response_size: 314159 response_size: 314159
payload:{ payload:{
body: 271828 bytes of zeros body: 271828 bytes of zeros
@ -736,14 +792,12 @@ from the server.
Server features: Server features:
* [FullDuplexCall][] * [FullDuplexCall][]
* [Compressable Payload][]
Procedure: Procedure:
1. Client starts FullDuplexCall with 1. Client starts FullDuplexCall with
``` ```
{ {
response_type: COMPRESSABLE
response_parameters:{ response_parameters:{
size: 31415 size: 31415
} }
@ -887,6 +941,21 @@ payload body of size `SimpleRequest.response_size` bytes and type as appropriate
for the `SimpleRequest.response_type`. If the server does not support the for the `SimpleRequest.response_type`. If the server does not support the
`response_type`, then it should fail the RPC with `INVALID_ARGUMENT`. `response_type`, then it should fail the RPC with `INVALID_ARGUMENT`.
### CompressedResponse
[CompressedResponse]: #compressedresponse
When the client sets `response_compressed` to true, the server's response is
sent back compressed. Note that `response_compressed` is present on both
`SimpleRequest` (unary) and `StreamingOutputCallRequest` (streaming).
### CompressedRequest
[CompressedRequest]: #compressedrequest
When the client sets `expect_compressed` to true, the server expects the client
request to be compressed. If it's not, it fails the RPC with `INVALID_ARGUMENT`.
Note that `response_compressed` is present on both `SimpleRequest` (unary) and
`StreamingOutputCallRequest` (streaming).
### StreamingInputCall ### StreamingInputCall
[StreamingInputCall]: #streaminginputcall [StreamingInputCall]: #streaminginputcall
@ -898,8 +967,8 @@ request payload bodies received.
[StreamingOutputCall]: #streamingoutputcall [StreamingOutputCall]: #streamingoutputcall
Server implements StreamingOutputCall by replying, in order, with one Server implements StreamingOutputCall by replying, in order, with one
StreamingOutputCallResponses for each ResponseParameters in StreamingOutputCallResponse for each ResponseParameters in
StreamingOutputCallRequest. Each StreamingOutputCallResponses should have a StreamingOutputCallRequest. Each StreamingOutputCallResponse should have a
payload body of size ResponseParameters.size bytes, as specified by its payload body of size ResponseParameters.size bytes, as specified by its
respective ResponseParameters. After sending all responses, it closes with OK. respective ResponseParameters. After sending all responses, it closes with OK.
@ -907,26 +976,12 @@ respective ResponseParameters. After sending all responses, it closes with OK.
[FullDuplexCall]: #fullduplexcall [FullDuplexCall]: #fullduplexcall
Server implements FullDuplexCall by replying, in order, with one Server implements FullDuplexCall by replying, in order, with one
StreamingOutputCallResponses for each ResponseParameters in each StreamingOutputCallResponse for each ResponseParameters in each
StreamingOutputCallRequest. Each StreamingOutputCallResponses should have a StreamingOutputCallRequest. Each StreamingOutputCallResponse should have a
payload body of size ResponseParameters.size bytes, as specified by its payload body of size ResponseParameters.size bytes, as specified by its
respective ResponseParameters. After receiving half close and sending all respective ResponseParameters. After receiving half close and sending all
responses, it closes with OK. responses, it closes with OK.
### Compressable Payload
[Compressable Payload]: #compressable-payload
When the client requests COMPRESSABLE payload, the response includes a payload
of the size requested containing all zeros and the payload type is
COMPRESSABLE.
### Uncompressable Payload
[Uncompressable Payload]: #uncompressable-payload
When the client requests UNCOMPRESSABLE payload, the response includes a payload
of the size requested containing uncompressable data and the payload type is
UNCOMPRESSABLE.
### Echo Status ### Echo Status
[Echo Status]: #echo-status [Echo Status]: #echo-status
When the client sends a response_status in the request payload, the server closes When the client sends a response_status in the request payload, the server closes

@ -16,8 +16,6 @@ Here, scheme indicates the name-system to be used. Example schemes to be support
* `dns` * `dns`
* `zookeeper`
* `etcd` * `etcd`
Authority indicates some scheme-specific bootstrap information, e.g., for DNS, the authority may include the IP[:port] of the DNS server to use. Often, a DNS name may used as the authority, since the ability to resolve DNS names is already built into all gRPC client libraries. Authority indicates some scheme-specific bootstrap information, e.g., for DNS, the authority may include the IP[:port] of the DNS server to use. Often, a DNS name may used as the authority, since the ability to resolve DNS names is already built into all gRPC client libraries.
@ -30,23 +28,3 @@ The gRPC client library will switch on the scheme to pick the right resolver plu
Resolvers should be able to contact the authority and get a resolution that they return back to the gRPC client library. The returned contents include a list of IP:port, an optional config and optional auth config data to be used for channel authentication. The plugin API allows the resolvers to continuously watch an endpoint_name and return updated resolutions as needed. Resolvers should be able to contact the authority and get a resolution that they return back to the gRPC client library. The returned contents include a list of IP:port, an optional config and optional auth config data to be used for channel authentication. The plugin API allows the resolvers to continuously watch an endpoint_name and return updated resolutions as needed.
## Zookeeper
Apache [ZooKeeper](https://zookeeper.apache.org/) is a popular solution for building name-systems. Curator is a service discovery system built on to of ZooKeeper. We propose to organize names hierarchically as `/path/service/instance` similar to Apache Curator.
A fully-qualified ZooKeeper name used to construct a gRPC channel will look as follows:
```
zookeeper://host:port/path/service/instance
```
Here `zookeeper` is the scheme identifying the name-system. `host:port` identifies an authoritative name-server for this scheme (i.e., a Zookeeper server). The host can be an IP address or a DNS name.
Finally `/path/service/instance` is the Zookeeper name to be resolved.
## Service Registration
Service providers can register their services in Zookeeper by using a Zookeeper client.
Each service is a zookeeper node, and each instance is a child node of the corresponding service. For example, a MySQL service may have multiple instances, `/mysql/1`, `/mysql/2`, `/mysql/3`. The name of the service or instance, as well as an optional path is specified by the service provider.
The data in service nodes is empty. Each instance node stores its address in the format of `host:port`, where host can be either hostname or IP address.

@ -14,7 +14,7 @@ following command:
```sh ```sh
$ git clone https://github.com/grpc/grpc.git $ git clone -b $(curl -L http://grpc.io/release) https://github.com/grpc/grpc
``` ```
Change your current directory to examples/cpp/helloworld Change your current directory to examples/cpp/helloworld

@ -20,7 +20,7 @@ With gRPC we can define our service once in a .proto file and implement clients
The example code for our tutorial is in [examples/cpp/route_guide](route_guide). To download the example, clone this repository by running the following command: The example code for our tutorial is in [examples/cpp/route_guide](route_guide). To download the example, clone this repository by running the following command:
```shell ```shell
$ git clone https://github.com/grpc/grpc.git $ git clone -b $(curl -L http://grpc.io/release) https://github.com/grpc/grpc
``` ```
Then change your current directory to `examples/cpp/route_guide`: Then change your current directory to `examples/cpp/route_guide`:

@ -12,7 +12,7 @@ following command:
```sh ```sh
$ git clone https://github.com/grpc/grpc.git $ git clone -b $(curl -L http://grpc.io/release) https://github.com/grpc/grpc
``` ```
Change your current directory to examples/cpp/helloworld Change your current directory to examples/cpp/helloworld

@ -72,6 +72,8 @@ class GreeterClient {
if (status.ok()) { if (status.ok()) {
return reply.message(); return reply.message();
} else { } else {
std::cout << status.error_code() << ": " << status.error_message()
<< std::endl;
return "RPC failed"; return "RPC failed";
} }
} }

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

@ -10,7 +10,7 @@
<RootNamespace>Greeter</RootNamespace> <RootNamespace>Greeter</RootNamespace>
<AssemblyName>Greeter</AssemblyName> <AssemblyName>Greeter</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<NuGetPackageImportStamp>745ac60f</NuGetPackageImportStamp> <NuGetPackageImportStamp>2669b4f2</NuGetPackageImportStamp>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@ -33,11 +33,11 @@
<ItemGroup> <ItemGroup>
<Reference Include="Google.Protobuf, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL"> <Reference Include="Google.Protobuf, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Google.Protobuf.3.0.0-beta2\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath> <HintPath>..\packages\Google.Protobuf.3.0.0-beta3\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
</Reference> </Reference>
<Reference Include="Grpc.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL"> <Reference Include="Grpc.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Grpc.Core.0.14.0\lib\net45\Grpc.Core.dll</HintPath> <HintPath>..\packages\Grpc.Core.0.15.0\lib\net45\Grpc.Core.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Interactive.Async, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <Reference Include="System.Interactive.Async, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
@ -61,11 +61,11 @@
<None Include="packages.config" /> <None Include="packages.config" />
</ItemGroup> </ItemGroup>
<ItemGroup /> <ItemGroup />
<Import Project="..\packages\Grpc.Core.0.14.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.0.14.0\build\net45\Grpc.Core.targets')" /> <Import Project="..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup> <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> <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> </PropertyGroup>
<Error Condition="!Exists('..\packages\Grpc.Core.0.14.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.0.14.0\build\net45\Grpc.Core.targets'))" /> <Error Condition="!Exists('..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets'))" />
</Target> </Target>
</Project> </Project>

@ -31,9 +31,9 @@ namespace Helloworld {
"cm90bzM=")); "cm90bzM="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { }, new pbr::FileDescriptor[] { },
new pbr::GeneratedCodeInfo(null, new pbr::GeneratedCodeInfo[] { new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedCodeInfo(typeof(global::Helloworld.HelloRequest), global::Helloworld.HelloRequest.Parser, new[]{ "Name" }, null, null, null), new pbr::GeneratedClrTypeInfo(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) new pbr::GeneratedClrTypeInfo(typeof(global::Helloworld.HelloReply), global::Helloworld.HelloReply.Parser, new[]{ "Message" }, null, null, null)
})); }));
} }
#endregion #endregion
@ -76,7 +76,7 @@ namespace Helloworld {
public string Name { public string Name {
get { return name_; } get { return name_; }
set { set {
name_ = pb::Preconditions.CheckNotNull(value, "value"); name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
} }
} }
@ -182,7 +182,7 @@ namespace Helloworld {
public string Message { public string Message {
get { return message_; } get { return message_; }
set { set {
message_ = pb::Preconditions.CheckNotNull(value, "value"); message_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
} }
} }

@ -61,38 +61,6 @@ namespace Helloworld {
get { return global::Helloworld.HelloworldReflection.Descriptor.Services[0]; } get { return global::Helloworld.HelloworldReflection.Descriptor.Services[0]; }
} }
/// <summary>Client for Greeter</summary>
[System.Obsolete("Client side interfaced will be removed in the next release. Use client class directly.")]
public interface IGreeterClient
{
/// <summary>
/// Sends a greeting
/// </summary>
global::Helloworld.HelloReply SayHello(global::Helloworld.HelloRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Sends a greeting
/// </summary>
global::Helloworld.HelloReply SayHello(global::Helloworld.HelloRequest request, CallOptions options);
/// <summary>
/// Sends a greeting
/// </summary>
AsyncUnaryCall<global::Helloworld.HelloReply> SayHelloAsync(global::Helloworld.HelloRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Sends a greeting
/// </summary>
AsyncUnaryCall<global::Helloworld.HelloReply> SayHelloAsync(global::Helloworld.HelloRequest request, CallOptions options);
}
/// <summary>Interface of server-side implementations of Greeter</summary>
[System.Obsolete("Service implementations should inherit from the generated abstract base class instead.")]
public interface IGreeter
{
/// <summary>
/// Sends a greeting
/// </summary>
global::System.Threading.Tasks.Task<global::Helloworld.HelloReply> SayHello(global::Helloworld.HelloRequest request, ServerCallContext context);
}
/// <summary>Base class for server-side implementations of Greeter</summary> /// <summary>Base class for server-side implementations of Greeter</summary>
public abstract class GreeterBase public abstract class GreeterBase
{ {
@ -107,13 +75,15 @@ namespace Helloworld {
} }
/// <summary>Client for Greeter</summary> /// <summary>Client for Greeter</summary>
#pragma warning disable 0618 public class GreeterClient : ClientBase<GreeterClient>
public class GreeterClient : ClientBase<GreeterClient>, IGreeterClient
#pragma warning restore 0618
{ {
/// <summary>Creates a new client for Greeter</summary>
/// <param name="channel">The channel to use to make remote calls.</param>
public GreeterClient(Channel channel) : base(channel) public GreeterClient(Channel channel) : base(channel)
{ {
} }
/// <summary>Creates a new client for Greeter that uses a custom <c>CallInvoker</c>.</summary>
/// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
public GreeterClient(CallInvoker callInvoker) : base(callInvoker) public GreeterClient(CallInvoker callInvoker) : base(callInvoker)
{ {
} }
@ -122,6 +92,7 @@ namespace Helloworld {
{ {
} }
/// <summary>Protected constructor to allow creation of configured clients.</summary> /// <summary>Protected constructor to allow creation of configured clients.</summary>
/// <param name="configuration">The client configuration.</param>
protected GreeterClient(ClientBaseConfiguration configuration) : base(configuration) protected GreeterClient(ClientBaseConfiguration configuration) : base(configuration)
{ {
} }
@ -160,27 +131,10 @@ namespace Helloworld {
} }
} }
/// <summary>Creates a new client for Greeter</summary>
public static GreeterClient NewClient(Channel channel)
{
return new GreeterClient(channel);
}
/// <summary>Creates service definition that can be registered with a server</summary>
#pragma warning disable 0618
public static ServerServiceDefinition BindService(IGreeter serviceImpl)
#pragma warning restore 0618
{
return ServerServiceDefinition.CreateBuilder(__ServiceName)
.AddMethod(__Method_SayHello, serviceImpl.SayHello).Build();
}
/// <summary>Creates service definition that can be registered with a server</summary> /// <summary>Creates service definition that can be registered with a server</summary>
#pragma warning disable 0618
public static ServerServiceDefinition BindService(GreeterBase serviceImpl) public static ServerServiceDefinition BindService(GreeterBase serviceImpl)
#pragma warning restore 0618
{ {
return ServerServiceDefinition.CreateBuilder(__ServiceName) return ServerServiceDefinition.CreateBuilder()
.AddMethod(__Method_SayHello, serviceImpl.SayHello).Build(); .AddMethod(__Method_SayHello, serviceImpl.SayHello).Build();
} }

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Google.Protobuf" version="3.0.0-beta2" targetFramework="net45" /> <package id="Google.Protobuf" version="3.0.0-beta3" targetFramework="net45" />
<package id="Grpc" version="0.14.0" targetFramework="net45" /> <package id="Grpc" version="0.15.0" targetFramework="net45" />
<package id="Grpc.Core" version="0.14.0" targetFramework="net45" /> <package id="Grpc.Core" version="0.15.0" targetFramework="net45" />
<package id="Ix-Async" version="1.2.5" targetFramework="net45" /> <package id="Ix-Async" version="1.2.5" targetFramework="net45" />
</packages> </packages>

@ -10,7 +10,7 @@
<RootNamespace>GreeterClient</RootNamespace> <RootNamespace>GreeterClient</RootNamespace>
<AssemblyName>GreeterClient</AssemblyName> <AssemblyName>GreeterClient</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<NuGetPackageImportStamp>63b59176</NuGetPackageImportStamp> <NuGetPackageImportStamp>5e942a7d</NuGetPackageImportStamp>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@ -33,11 +33,11 @@
<ItemGroup> <ItemGroup>
<Reference Include="Google.Protobuf, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL"> <Reference Include="Google.Protobuf, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Google.Protobuf.3.0.0-beta2\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath> <HintPath>..\packages\Google.Protobuf.3.0.0-beta3\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
</Reference> </Reference>
<Reference Include="Grpc.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL"> <Reference Include="Grpc.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Grpc.Core.0.14.0\lib\net45\Grpc.Core.dll</HintPath> <HintPath>..\packages\Grpc.Core.0.15.0\lib\net45\Grpc.Core.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Interactive.Async, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <Reference Include="System.Interactive.Async, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
@ -59,11 +59,11 @@
<ItemGroup> <ItemGroup>
<None Include="packages.config" /> <None Include="packages.config" />
</ItemGroup> </ItemGroup>
<Import Project="..\packages\Grpc.Core.0.14.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.0.14.0\build\net45\Grpc.Core.targets')" /> <Import Project="..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup> <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> <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> </PropertyGroup>
<Error Condition="!Exists('..\packages\Grpc.Core.0.14.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.0.14.0\build\net45\Grpc.Core.targets'))" /> <Error Condition="!Exists('..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets'))" />
</Target> </Target>
</Project> </Project>

@ -39,7 +39,7 @@ namespace GreeterClient
{ {
Channel channel = new Channel("127.0.0.1:50051", ChannelCredentials.Insecure); Channel channel = new Channel("127.0.0.1:50051", ChannelCredentials.Insecure);
var client = Greeter.NewClient(channel); var client = new Greeter.GreeterClient(channel);
String user = "you"; String user = "you";
var reply = client.SayHello(new HelloRequest { Name = user }); var reply = client.SayHello(new HelloRequest { Name = user });

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Google.Protobuf" version="3.0.0-beta2" targetFramework="net45" /> <package id="Google.Protobuf" version="3.0.0-beta3" targetFramework="net45" />
<package id="Grpc" version="0.14.0" targetFramework="net45" /> <package id="Grpc" version="0.15.0" targetFramework="net45" />
<package id="Grpc.Core" version="0.14.0" targetFramework="net45" /> <package id="Grpc.Core" version="0.15.0" targetFramework="net45" />
<package id="Ix-Async" version="1.2.5" targetFramework="net45" /> <package id="Ix-Async" version="1.2.5" targetFramework="net45" />
</packages> </packages>

@ -10,7 +10,7 @@
<RootNamespace>GreeterServer</RootNamespace> <RootNamespace>GreeterServer</RootNamespace>
<AssemblyName>GreeterServer</AssemblyName> <AssemblyName>GreeterServer</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<NuGetPackageImportStamp>25ac2e80</NuGetPackageImportStamp> <NuGetPackageImportStamp>9c7b2963</NuGetPackageImportStamp>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@ -33,11 +33,11 @@
<ItemGroup> <ItemGroup>
<Reference Include="Google.Protobuf, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL"> <Reference Include="Google.Protobuf, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Google.Protobuf.3.0.0-beta2\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath> <HintPath>..\packages\Google.Protobuf.3.0.0-beta3\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
</Reference> </Reference>
<Reference Include="Grpc.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL"> <Reference Include="Grpc.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Grpc.Core.0.14.0\lib\net45\Grpc.Core.dll</HintPath> <HintPath>..\packages\Grpc.Core.0.15.0\lib\net45\Grpc.Core.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Interactive.Async, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <Reference Include="System.Interactive.Async, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
@ -59,11 +59,11 @@
<ItemGroup> <ItemGroup>
<None Include="packages.config" /> <None Include="packages.config" />
</ItemGroup> </ItemGroup>
<Import Project="..\packages\Grpc.Core.0.14.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.0.14.0\build\net45\Grpc.Core.targets')" /> <Import Project="..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup> <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> <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> </PropertyGroup>
<Error Condition="!Exists('..\packages\Grpc.Core.0.14.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.0.14.0\build\net45\Grpc.Core.targets'))" /> <Error Condition="!Exists('..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets'))" />
</Target> </Target>
</Project> </Project>

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Google.Protobuf" version="3.0.0-beta2" targetFramework="net45" /> <package id="Google.Protobuf" version="3.0.0-beta3" targetFramework="net45" />
<package id="Grpc" version="0.14.0" targetFramework="net45" /> <package id="Grpc" version="0.15.0" targetFramework="net45" />
<package id="Grpc.Core" version="0.14.0" targetFramework="net45" /> <package id="Grpc.Core" version="0.15.0" targetFramework="net45" />
<package id="Ix-Async" version="1.2.5" targetFramework="net45" /> <package id="Ix-Async" version="1.2.5" targetFramework="net45" />
</packages> </packages>

@ -34,7 +34,7 @@ setlocal
@rem enter this directory @rem enter this directory
cd /d %~dp0 cd /d %~dp0
set TOOLS_PATH=packages\Grpc.Tools.0.14.0\tools\windows_x86 set TOOLS_PATH=packages\Grpc.Tools.0.15.0\tools\windows_x86
%TOOLS_PATH%\protoc.exe -I../../protos --csharp_out Greeter ../../protos/helloworld.proto --grpc_out Greeter --plugin=protoc-gen-grpc=%TOOLS_PATH%\grpc_csharp_plugin.exe %TOOLS_PATH%\protoc.exe -I../../protos --csharp_out Greeter ../../protos/helloworld.proto --grpc_out Greeter --plugin=protoc-gen-grpc=%TOOLS_PATH%\grpc_csharp_plugin.exe

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

@ -41,12 +41,12 @@ namespace Routeguide {
"ZUIPUm91dGVHdWlkZVByb3RvUAGiAgNSVEdiBnByb3RvMw==")); "ZUIPUm91dGVHdWlkZVByb3RvUAGiAgNSVEdiBnByb3RvMw=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { }, new pbr::FileDescriptor[] { },
new pbr::GeneratedCodeInfo(null, new pbr::GeneratedCodeInfo[] { new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedCodeInfo(typeof(global::Routeguide.Point), global::Routeguide.Point.Parser, new[]{ "Latitude", "Longitude" }, null, null, null), new pbr::GeneratedClrTypeInfo(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::GeneratedClrTypeInfo(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::GeneratedClrTypeInfo(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::GeneratedClrTypeInfo(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) new pbr::GeneratedClrTypeInfo(typeof(global::Routeguide.RouteSummary), global::Routeguide.RouteSummary.Parser, new[]{ "PointCount", "FeatureCount", "Distance", "ElapsedTime" }, null, null, null)
})); }));
} }
#endregion #endregion
@ -383,7 +383,7 @@ namespace Routeguide {
public string Name { public string Name {
get { return name_; } get { return name_; }
set { set {
name_ = pb::Preconditions.CheckNotNull(value, "value"); name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
} }
} }
@ -541,7 +541,7 @@ namespace Routeguide {
public string Message { public string Message {
get { return message_; } get { return message_; }
set { set {
message_ = pb::Preconditions.CheckNotNull(value, "value"); message_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
} }
} }

@ -11,7 +11,7 @@
<AssemblyName>RouteGuide</AssemblyName> <AssemblyName>RouteGuide</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<NuGetPackageImportStamp>0a9fcb7a</NuGetPackageImportStamp> <NuGetPackageImportStamp>de2137f9</NuGetPackageImportStamp>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@ -33,11 +33,11 @@
<ItemGroup> <ItemGroup>
<Reference Include="Google.Protobuf, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL"> <Reference Include="Google.Protobuf, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Google.Protobuf.3.0.0-beta2\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath> <HintPath>..\packages\Google.Protobuf.3.0.0-beta3\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
</Reference> </Reference>
<Reference Include="Grpc.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL"> <Reference Include="Grpc.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Grpc.Core.0.14.0\lib\net45\Grpc.Core.dll</HintPath> <HintPath>..\packages\Grpc.Core.0.15.0\lib\net45\Grpc.Core.dll</HintPath>
</Reference> </Reference>
<Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
@ -74,12 +74,12 @@
</None> </None>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\Grpc.Core.0.14.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.0.14.0\build\net45\Grpc.Core.targets')" /> <Import Project="..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup> <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> <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> </PropertyGroup>
<Error Condition="!Exists('..\packages\Grpc.Core.0.14.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.0.14.0\build\net45\Grpc.Core.targets'))" /> <Error Condition="!Exists('..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets'))" />
</Target> </Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- 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. Other similar extension points exist, see Microsoft.Common.targets.

@ -85,132 +85,6 @@ namespace Routeguide {
get { return global::Routeguide.RouteGuideReflection.Descriptor.Services[0]; } get { return global::Routeguide.RouteGuideReflection.Descriptor.Services[0]; }
} }
/// <summary>Client for RouteGuide</summary>
[System.Obsolete("Client side interfaced will be removed in the next release. Use client class directly.")]
public interface IRouteGuideClient
{
/// <summary>
/// A simple RPC.
///
/// Obtains the feature at a given position.
///
/// A feature with an empty name is returned if there's no feature at the given
/// position.
/// </summary>
global::Routeguide.Feature GetFeature(global::Routeguide.Point request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// A simple RPC.
///
/// Obtains the feature at a given position.
///
/// A feature with an empty name is returned if there's no feature at the given
/// position.
/// </summary>
global::Routeguide.Feature GetFeature(global::Routeguide.Point request, CallOptions options);
/// <summary>
/// A simple RPC.
///
/// Obtains the feature at a given position.
///
/// A feature with an empty name is returned if there's no feature at the given
/// position.
/// </summary>
AsyncUnaryCall<global::Routeguide.Feature> GetFeatureAsync(global::Routeguide.Point request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// A simple RPC.
///
/// Obtains the feature at a given position.
///
/// A feature with an empty name is returned if there's no feature at the given
/// position.
/// </summary>
AsyncUnaryCall<global::Routeguide.Feature> GetFeatureAsync(global::Routeguide.Point request, CallOptions options);
/// <summary>
/// A server-to-client streaming RPC.
///
/// Obtains the Features available within the given Rectangle. Results are
/// streamed rather than returned at once (e.g. in a response message with a
/// repeated field), as the rectangle may cover a large area and contain a
/// huge number of features.
/// </summary>
AsyncServerStreamingCall<global::Routeguide.Feature> ListFeatures(global::Routeguide.Rectangle request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// A server-to-client streaming RPC.
///
/// Obtains the Features available within the given Rectangle. Results are
/// streamed rather than returned at once (e.g. in a response message with a
/// repeated field), as the rectangle may cover a large area and contain a
/// huge number of features.
/// </summary>
AsyncServerStreamingCall<global::Routeguide.Feature> ListFeatures(global::Routeguide.Rectangle request, CallOptions options);
/// <summary>
/// A client-to-server streaming RPC.
///
/// Accepts a stream of Points on a route being traversed, returning a
/// RouteSummary when traversal is completed.
/// </summary>
AsyncClientStreamingCall<global::Routeguide.Point, global::Routeguide.RouteSummary> RecordRoute(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// A client-to-server streaming RPC.
///
/// Accepts a stream of Points on a route being traversed, returning a
/// RouteSummary when traversal is completed.
/// </summary>
AsyncClientStreamingCall<global::Routeguide.Point, global::Routeguide.RouteSummary> RecordRoute(CallOptions options);
/// <summary>
/// A Bidirectional streaming RPC.
///
/// Accepts a stream of RouteNotes sent while a route is being traversed,
/// while receiving other RouteNotes (e.g. from other users).
/// </summary>
AsyncDuplexStreamingCall<global::Routeguide.RouteNote, global::Routeguide.RouteNote> RouteChat(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// A Bidirectional streaming RPC.
///
/// Accepts a stream of RouteNotes sent while a route is being traversed,
/// while receiving other RouteNotes (e.g. from other users).
/// </summary>
AsyncDuplexStreamingCall<global::Routeguide.RouteNote, global::Routeguide.RouteNote> RouteChat(CallOptions options);
}
/// <summary>Interface of server-side implementations of RouteGuide</summary>
[System.Obsolete("Service implementations should inherit from the generated abstract base class instead.")]
public interface IRouteGuide
{
/// <summary>
/// A simple RPC.
///
/// Obtains the feature at a given position.
///
/// A feature with an empty name is returned if there's no feature at the given
/// position.
/// </summary>
global::System.Threading.Tasks.Task<global::Routeguide.Feature> GetFeature(global::Routeguide.Point request, ServerCallContext context);
/// <summary>
/// A server-to-client streaming RPC.
///
/// Obtains the Features available within the given Rectangle. Results are
/// streamed rather than returned at once (e.g. in a response message with a
/// repeated field), as the rectangle may cover a large area and contain a
/// huge number of features.
/// </summary>
global::System.Threading.Tasks.Task ListFeatures(global::Routeguide.Rectangle request, IServerStreamWriter<global::Routeguide.Feature> responseStream, ServerCallContext context);
/// <summary>
/// A client-to-server streaming RPC.
///
/// Accepts a stream of Points on a route being traversed, returning a
/// RouteSummary when traversal is completed.
/// </summary>
global::System.Threading.Tasks.Task<global::Routeguide.RouteSummary> RecordRoute(IAsyncStreamReader<global::Routeguide.Point> requestStream, ServerCallContext context);
/// <summary>
/// A Bidirectional streaming RPC.
///
/// Accepts a stream of RouteNotes sent while a route is being traversed,
/// while receiving other RouteNotes (e.g. from other users).
/// </summary>
global::System.Threading.Tasks.Task RouteChat(IAsyncStreamReader<global::Routeguide.RouteNote> requestStream, IServerStreamWriter<global::Routeguide.RouteNote> responseStream, ServerCallContext context);
}
/// <summary>Base class for server-side implementations of RouteGuide</summary> /// <summary>Base class for server-side implementations of RouteGuide</summary>
public abstract class RouteGuideBase public abstract class RouteGuideBase
{ {
@ -265,13 +139,15 @@ namespace Routeguide {
} }
/// <summary>Client for RouteGuide</summary> /// <summary>Client for RouteGuide</summary>
#pragma warning disable 0618 public class RouteGuideClient : ClientBase<RouteGuideClient>
public class RouteGuideClient : ClientBase<RouteGuideClient>, IRouteGuideClient
#pragma warning restore 0618
{ {
/// <summary>Creates a new client for RouteGuide</summary>
/// <param name="channel">The channel to use to make remote calls.</param>
public RouteGuideClient(Channel channel) : base(channel) public RouteGuideClient(Channel channel) : base(channel)
{ {
} }
/// <summary>Creates a new client for RouteGuide that uses a custom <c>CallInvoker</c>.</summary>
/// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
public RouteGuideClient(CallInvoker callInvoker) : base(callInvoker) public RouteGuideClient(CallInvoker callInvoker) : base(callInvoker)
{ {
} }
@ -280,6 +156,7 @@ namespace Routeguide {
{ {
} }
/// <summary>Protected constructor to allow creation of configured clients.</summary> /// <summary>Protected constructor to allow creation of configured clients.</summary>
/// <param name="configuration">The client configuration.</param>
protected RouteGuideClient(ClientBaseConfiguration configuration) : base(configuration) protected RouteGuideClient(ClientBaseConfiguration configuration) : base(configuration)
{ {
} }
@ -402,30 +279,10 @@ namespace Routeguide {
} }
} }
/// <summary>Creates a new client for RouteGuide</summary>
public static RouteGuideClient NewClient(Channel channel)
{
return new RouteGuideClient(channel);
}
/// <summary>Creates service definition that can be registered with a server</summary>
#pragma warning disable 0618
public static ServerServiceDefinition BindService(IRouteGuide serviceImpl)
#pragma warning restore 0618
{
return ServerServiceDefinition.CreateBuilder(__ServiceName)
.AddMethod(__Method_GetFeature, serviceImpl.GetFeature)
.AddMethod(__Method_ListFeatures, serviceImpl.ListFeatures)
.AddMethod(__Method_RecordRoute, serviceImpl.RecordRoute)
.AddMethod(__Method_RouteChat, serviceImpl.RouteChat).Build();
}
/// <summary>Creates service definition that can be registered with a server</summary> /// <summary>Creates service definition that can be registered with a server</summary>
#pragma warning disable 0618
public static ServerServiceDefinition BindService(RouteGuideBase serviceImpl) public static ServerServiceDefinition BindService(RouteGuideBase serviceImpl)
#pragma warning restore 0618
{ {
return ServerServiceDefinition.CreateBuilder(__ServiceName) return ServerServiceDefinition.CreateBuilder()
.AddMethod(__Method_GetFeature, serviceImpl.GetFeature) .AddMethod(__Method_GetFeature, serviceImpl.GetFeature)
.AddMethod(__Method_ListFeatures, serviceImpl.ListFeatures) .AddMethod(__Method_ListFeatures, serviceImpl.ListFeatures)
.AddMethod(__Method_RecordRoute, serviceImpl.RecordRoute) .AddMethod(__Method_RecordRoute, serviceImpl.RecordRoute)

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Google.Protobuf" version="3.0.0-beta2" targetFramework="net45" /> <package id="Google.Protobuf" version="3.0.0-beta3" targetFramework="net45" />
<package id="Grpc" version="0.14.0" targetFramework="net45" /> <package id="Grpc" version="0.15.0" targetFramework="net45" />
<package id="Grpc.Core" version="0.14.0" targetFramework="net45" /> <package id="Grpc.Core" version="0.15.0" targetFramework="net45" />
<package id="Ix-Async" version="1.2.5" targetFramework="net45" /> <package id="Ix-Async" version="1.2.5" targetFramework="net45" />
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" /> <package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
</packages> </packages>

@ -231,7 +231,7 @@ namespace Routeguide
static void Main(string[] args) static void Main(string[] args)
{ {
var channel = new Channel("127.0.0.1:50052", ChannelCredentials.Insecure); var channel = new Channel("127.0.0.1:50052", ChannelCredentials.Insecure);
var client = new RouteGuideClient(RouteGuide.NewClient(channel)); var client = new RouteGuideClient(new RouteGuide.RouteGuideClient(channel));
// Looking for a valid feature // Looking for a valid feature
client.GetFeature(409146138, -746188906); client.GetFeature(409146138, -746188906);

@ -11,7 +11,7 @@
<AssemblyName>RouteGuideClient</AssemblyName> <AssemblyName>RouteGuideClient</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<NuGetPackageImportStamp>8ef088f0</NuGetPackageImportStamp> <NuGetPackageImportStamp>b880049a</NuGetPackageImportStamp>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
@ -35,11 +35,11 @@
<ItemGroup> <ItemGroup>
<Reference Include="Google.Protobuf, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL"> <Reference Include="Google.Protobuf, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Google.Protobuf.3.0.0-beta2\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath> <HintPath>..\packages\Google.Protobuf.3.0.0-beta3\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
</Reference> </Reference>
<Reference Include="Grpc.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL"> <Reference Include="Grpc.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Grpc.Core.0.14.0\lib\net45\Grpc.Core.dll</HintPath> <HintPath>..\packages\Grpc.Core.0.15.0\lib\net45\Grpc.Core.dll</HintPath>
</Reference> </Reference>
<Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
@ -71,12 +71,12 @@
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\Grpc.Core.0.14.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.0.14.0\build\net45\Grpc.Core.targets')" /> <Import Project="..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup> <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> <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> </PropertyGroup>
<Error Condition="!Exists('..\packages\Grpc.Core.0.14.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.0.14.0\build\net45\Grpc.Core.targets'))" /> <Error Condition="!Exists('..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets'))" />
</Target> </Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- 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. Other similar extension points exist, see Microsoft.Common.targets.

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Google.Protobuf" version="3.0.0-beta2" targetFramework="net45" /> <package id="Google.Protobuf" version="3.0.0-beta3" targetFramework="net45" />
<package id="Grpc" version="0.14.0" targetFramework="net45" /> <package id="Grpc" version="0.15.0" targetFramework="net45" />
<package id="Grpc.Core" version="0.14.0" targetFramework="net45" /> <package id="Grpc.Core" version="0.15.0" targetFramework="net45" />
<package id="Ix-Async" version="1.2.5" targetFramework="net45" /> <package id="Ix-Async" version="1.2.5" targetFramework="net45" />
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" /> <package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
</packages> </packages>

@ -11,7 +11,7 @@
<AssemblyName>RouteGuideServer</AssemblyName> <AssemblyName>RouteGuideServer</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<NuGetPackageImportStamp>d5246467</NuGetPackageImportStamp> <NuGetPackageImportStamp>946ecc79</NuGetPackageImportStamp>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
@ -35,11 +35,11 @@
<ItemGroup> <ItemGroup>
<Reference Include="Google.Protobuf, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL"> <Reference Include="Google.Protobuf, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Google.Protobuf.3.0.0-beta2\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath> <HintPath>..\packages\Google.Protobuf.3.0.0-beta3\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath>
</Reference> </Reference>
<Reference Include="Grpc.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL"> <Reference Include="Grpc.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Grpc.Core.0.14.0\lib\net45\Grpc.Core.dll</HintPath> <HintPath>..\packages\Grpc.Core.0.15.0\lib\net45\Grpc.Core.dll</HintPath>
</Reference> </Reference>
<Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
@ -72,12 +72,12 @@
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\Grpc.Core.0.14.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.0.14.0\build\net45\Grpc.Core.targets')" /> <Import Project="..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup> <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> <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> </PropertyGroup>
<Error Condition="!Exists('..\packages\Grpc.Core.0.14.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.0.14.0\build\net45\Grpc.Core.targets'))" /> <Error Condition="!Exists('..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets'))" />
</Target> </Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- 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. Other similar extension points exist, see Microsoft.Common.targets.

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Google.Protobuf" version="3.0.0-beta2" targetFramework="net45" /> <package id="Google.Protobuf" version="3.0.0-beta3" targetFramework="net45" />
<package id="Grpc" version="0.14.0" targetFramework="net45" /> <package id="Grpc" version="0.15.0" targetFramework="net45" />
<package id="Grpc.Core" version="0.14.0" targetFramework="net45" /> <package id="Grpc.Core" version="0.15.0" targetFramework="net45" />
<package id="Ix-Async" version="1.2.5" targetFramework="net45" /> <package id="Ix-Async" version="1.2.5" targetFramework="net45" />
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" /> <package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
</packages> </packages>

@ -34,7 +34,7 @@ setlocal
@rem enter this directory @rem enter this directory
cd /d %~dp0 cd /d %~dp0
set TOOLS_PATH=packages\Grpc.Tools.0.14.0\tools\windows_x86 set TOOLS_PATH=packages\Grpc.Tools.0.15.0\tools\windows_x86
%TOOLS_PATH%\protoc.exe -I../../protos --csharp_out RouteGuide ../../protos/route_guide.proto --grpc_out RouteGuide --plugin=protoc-gen-grpc=%TOOLS_PATH%\grpc_csharp_plugin.exe %TOOLS_PATH%\protoc.exe -I../../protos --csharp_out RouteGuide ../../protos/route_guide.proto --grpc_out RouteGuide --plugin=protoc-gen-grpc=%TOOLS_PATH%\grpc_csharp_plugin.exe

@ -12,7 +12,7 @@ INSTALL
```sh ```sh
$ # Get the gRPC repository $ # Get the gRPC repository
$ export REPO_ROOT=grpc # REPO root can be any directory of your choice $ export REPO_ROOT=grpc # REPO root can be any directory of your choice
$ git clone https://github.com/grpc/grpc.git $REPO_ROOT $ git clone -b $(curl -L http://grpc.io/release) https://github.com/grpc/grpc $REPO_ROOT
$ cd $REPO_ROOT $ cd $REPO_ROOT
$ cd examples/node $ cd examples/node

@ -116,11 +116,12 @@
isa = PBXNativeTarget; isa = PBXNativeTarget;
buildConfigurationList = 63E1E9A21B28CB2100EF0978 /* Build configuration list for PBXNativeTarget "AuthSample" */; buildConfigurationList = 63E1E9A21B28CB2100EF0978 /* Build configuration list for PBXNativeTarget "AuthSample" */;
buildPhases = ( buildPhases = (
DAABBA7B5788A39108D7CA83 /* Check Pods Manifest.lock */, DAABBA7B5788A39108D7CA83 /* [CP] Check Pods Manifest.lock */,
63E1E9781B28CB2000EF0978 /* Sources */, 63E1E9781B28CB2000EF0978 /* Sources */,
63E1E9791B28CB2000EF0978 /* Frameworks */, 63E1E9791B28CB2000EF0978 /* Frameworks */,
63E1E97A1B28CB2000EF0978 /* Resources */, 63E1E97A1B28CB2000EF0978 /* Resources */,
AEFCCC69DD59CE8F6EB769D7 /* Copy Pods Resources */, AEFCCC69DD59CE8F6EB769D7 /* [CP] Copy Pods Resources */,
D24F6598302C412D4B863D6F /* [CP] Embed Pods Frameworks */,
); );
buildRules = ( buildRules = (
); );
@ -177,14 +178,14 @@
/* End PBXResourcesBuildPhase section */ /* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */
AEFCCC69DD59CE8F6EB769D7 /* Copy Pods Resources */ = { AEFCCC69DD59CE8F6EB769D7 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
); );
inputPaths = ( inputPaths = (
); );
name = "Copy Pods Resources"; name = "[CP] Copy Pods Resources";
outputPaths = ( outputPaths = (
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
@ -192,14 +193,29 @@
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-AuthSample/Pods-AuthSample-resources.sh\"\n"; shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-AuthSample/Pods-AuthSample-resources.sh\"\n";
showEnvVarsInLog = 0; showEnvVarsInLog = 0;
}; };
DAABBA7B5788A39108D7CA83 /* Check Pods Manifest.lock */ = { D24F6598302C412D4B863D6F /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
); );
inputPaths = ( inputPaths = (
); );
name = "Check Pods Manifest.lock"; name = "[CP] Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-AuthSample/Pods-AuthSample-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
DAABBA7B5788A39108D7CA83 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = ( outputPaths = (
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;

@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0730"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "63E1E97B1B28CB2000EF0978"
BuildableName = "AuthSample.app"
BlueprintName = "AuthSample"
ReferencedContainer = "container:AuthSample.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "63E1E97B1B28CB2000EF0978"
BuildableName = "AuthSample.app"
BlueprintName = "AuthSample"
ReferencedContainer = "container:AuthSample.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "63E1E97B1B28CB2000EF0978"
BuildableName = "AuthSample.app"
BlueprintName = "AuthSample"
ReferencedContainer = "container:AuthSample.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "63E1E97B1B28CB2000EF0978"
BuildableName = "AuthSample.app"
BlueprintName = "AuthSample"
ReferencedContainer = "container:AuthSample.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

@ -2,6 +2,10 @@ Pod::Spec.new do |s|
s.name = "AuthTestService" s.name = "AuthTestService"
s.version = "0.0.1" s.version = "0.0.1"
s.license = "New BSD" s.license = "New BSD"
s.authors = { 'gRPC contributors' => 'grpc-io@googlegroups.com' }
s.homepage = "http://www.grpc.io/"
s.summary = "AuthTestService example"
s.source = { :git => 'https://github.com/grpc/grpc.git' }
s.ios.deployment_target = "7.1" s.ios.deployment_target = "7.1"
s.osx.deployment_target = "10.9" s.osx.deployment_target = "10.9"

@ -2,6 +2,10 @@ Pod::Spec.new do |s|
s.name = "HelloWorld" s.name = "HelloWorld"
s.version = "0.0.1" s.version = "0.0.1"
s.license = "New BSD" s.license = "New BSD"
s.authors = { 'gRPC contributors' => 'grpc-io@googlegroups.com' }
s.homepage = "http://www.grpc.io/"
s.summary = "HelloWorld example"
s.source = { :git => 'https://github.com/grpc/grpc.git' }
s.ios.deployment_target = "7.1" s.ios.deployment_target = "7.1"
s.osx.deployment_target = "10.9" s.osx.deployment_target = "10.9"

@ -7,7 +7,6 @@
objects = { objects = {
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
3EF35C14BDC2B65E21837F02 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 43AB08B32839A6700EA00DD4 /* libPods.a */; };
5E3690661B2A23800040F884 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E3690651B2A23800040F884 /* main.m */; }; 5E3690661B2A23800040F884 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E3690651B2A23800040F884 /* main.m */; };
5E3690691B2A23800040F884 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E3690681B2A23800040F884 /* AppDelegate.m */; }; 5E3690691B2A23800040F884 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E3690681B2A23800040F884 /* AppDelegate.m */; };
5E36906C1B2A23800040F884 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E36906B1B2A23800040F884 /* ViewController.m */; }; 5E36906C1B2A23800040F884 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E36906B1B2A23800040F884 /* ViewController.m */; };
@ -18,7 +17,6 @@
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
0C432EF610DB15C0F47A66BB /* Pods-HelloWorld.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HelloWorld.release.xcconfig"; path = "Pods/Target Support Files/Pods-HelloWorld/Pods-HelloWorld.release.xcconfig"; sourceTree = "<group>"; }; 0C432EF610DB15C0F47A66BB /* Pods-HelloWorld.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HelloWorld.release.xcconfig"; path = "Pods/Target Support Files/Pods-HelloWorld/Pods-HelloWorld.release.xcconfig"; sourceTree = "<group>"; };
43AB08B32839A6700EA00DD4 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
5E3690601B2A23800040F884 /* HelloWorld.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HelloWorld.app; sourceTree = BUILT_PRODUCTS_DIR; }; 5E3690601B2A23800040F884 /* HelloWorld.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HelloWorld.app; sourceTree = BUILT_PRODUCTS_DIR; };
5E3690641B2A23800040F884 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; 5E3690641B2A23800040F884 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
5E3690651B2A23800040F884 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; }; 5E3690651B2A23800040F884 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
@ -37,7 +35,6 @@
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
EF61CF6AE2536A31D47F0E63 /* libPods-HelloWorld.a in Frameworks */, EF61CF6AE2536A31D47F0E63 /* libPods-HelloWorld.a in Frameworks */,
3EF35C14BDC2B65E21837F02 /* libPods.a in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@ -88,7 +85,6 @@
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
6B4E1F55F8A2EC95A0E7EE88 /* libPods-HelloWorld.a */, 6B4E1F55F8A2EC95A0E7EE88 /* libPods-HelloWorld.a */,
43AB08B32839A6700EA00DD4 /* libPods.a */,
); );
name = Frameworks; name = Frameworks;
sourceTree = "<group>"; sourceTree = "<group>";
@ -109,12 +105,12 @@
isa = PBXNativeTarget; isa = PBXNativeTarget;
buildConfigurationList = 5E3690831B2A23810040F884 /* Build configuration list for PBXNativeTarget "HelloWorld" */; buildConfigurationList = 5E3690831B2A23810040F884 /* Build configuration list for PBXNativeTarget "HelloWorld" */;
buildPhases = ( buildPhases = (
ACF9162361FB8F24C70657DE /* Check Pods Manifest.lock */, ACF9162361FB8F24C70657DE /* [CP] Check Pods Manifest.lock */,
5E36905C1B2A23800040F884 /* Sources */, 5E36905C1B2A23800040F884 /* Sources */,
5E36905D1B2A23800040F884 /* Frameworks */, 5E36905D1B2A23800040F884 /* Frameworks */,
5E36905E1B2A23800040F884 /* Resources */, 5E36905E1B2A23800040F884 /* Resources */,
4C7D815378D98AB3BFC1A7D5 /* Copy Pods Resources */, 4C7D815378D98AB3BFC1A7D5 /* [CP] Copy Pods Resources */,
BB76529986A8BFAF19A385B1 /* Embed Pods Frameworks */, BB76529986A8BFAF19A385B1 /* [CP] Embed Pods Frameworks */,
); );
buildRules = ( buildRules = (
); );
@ -170,14 +166,14 @@
/* End PBXResourcesBuildPhase section */ /* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */
4C7D815378D98AB3BFC1A7D5 /* Copy Pods Resources */ = { 4C7D815378D98AB3BFC1A7D5 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
); );
inputPaths = ( inputPaths = (
); );
name = "Copy Pods Resources"; name = "[CP] Copy Pods Resources";
outputPaths = ( outputPaths = (
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
@ -185,14 +181,14 @@
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-HelloWorld/Pods-HelloWorld-resources.sh\"\n"; shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-HelloWorld/Pods-HelloWorld-resources.sh\"\n";
showEnvVarsInLog = 0; showEnvVarsInLog = 0;
}; };
ACF9162361FB8F24C70657DE /* Check Pods Manifest.lock */ = { ACF9162361FB8F24C70657DE /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
); );
inputPaths = ( inputPaths = (
); );
name = "Check Pods Manifest.lock"; name = "[CP] Check Pods Manifest.lock";
outputPaths = ( outputPaths = (
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
@ -200,19 +196,19 @@
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
showEnvVarsInLog = 0; showEnvVarsInLog = 0;
}; };
BB76529986A8BFAF19A385B1 /* Embed Pods Frameworks */ = { BB76529986A8BFAF19A385B1 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
); );
inputPaths = ( inputPaths = (
); );
name = "Embed Pods Frameworks"; name = "[CP] Embed Pods Frameworks";
outputPaths = ( outputPaths = (
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh\"\n"; shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-HelloWorld/Pods-HelloWorld-frameworks.sh\"\n";
showEnvVarsInLog = 0; showEnvVarsInLog = 0;
}; };
/* End PBXShellScriptBuildPhase section */ /* End PBXShellScriptBuildPhase section */

@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0730"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "5E36905F1B2A23800040F884"
BuildableName = "HelloWorld.app"
BlueprintName = "HelloWorld"
ReferencedContainer = "container:HelloWorld.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "5E36905F1B2A23800040F884"
BuildableName = "HelloWorld.app"
BlueprintName = "HelloWorld"
ReferencedContainer = "container:HelloWorld.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "5E36905F1B2A23800040F884"
BuildableName = "HelloWorld.app"
BlueprintName = "HelloWorld"
ReferencedContainer = "container:HelloWorld.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "5E36905F1B2A23800040F884"
BuildableName = "HelloWorld.app"
BlueprintName = "HelloWorld"
ReferencedContainer = "container:HelloWorld.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

@ -16,7 +16,7 @@ this repository to your local machine by running the following commands:
```sh ```sh
$ git clone https://github.com/grpc/grpc.git $ git clone -b $(curl -L http://grpc.io/release) https://github.com/grpc/grpc
$ cd grpc $ cd grpc
$ git submodule update --init $ git submodule update --init
``` ```

@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="7702" systemVersion="14D131" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="49e-Tb-3d3"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10116" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="49e-Tb-3d3">
<dependencies> <dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7701"/> <deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies> </dependencies>
<scenes> <scenes>
<!--Get Feature--> <!--Get Feature-->
@ -16,33 +17,35 @@
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/> <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="Get Feature Demo" textAlignment="center" lineBreakMode="tailTruncation" minimumFontSize="10" translatesAutoresizingMaskIntoConstraints="NO" id="KQZ-1w-vlD"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" misplaced="YES" text="Execution log:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="au7-AW-5ov">
<rect key="frame" x="150" y="279" width="299" height="42"/> <rect key="frame" x="16" y="0.0" width="257" height="61"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> <fontDescription key="fontDescription" type="system" pointSize="17"/>
<fontDescription key="fontDescription" name="Helvetica" family="Helvetica" pointSize="36"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="See ViewControllers.m and this app's log in XCode" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="A5M-7J-77L"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2ga-Gd-X9q">
<rect key="frame" x="136" y="329" width="329" height="17"/> <rect key="frame" x="20" y="82" width="560" height="437"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/> <accessibility key="accessibilityConfiguration">
<accessibilityTraits key="traits" link="YES"/>
</accessibility>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
</subviews> </subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints> <constraints>
<constraint firstAttribute="centerX" secondItem="KQZ-1w-vlD" secondAttribute="centerX" id="6BV-lF-sBN"/> <constraint firstItem="au7-AW-5ov" firstAttribute="centerX" secondItem="tsR-hK-woN" secondAttribute="centerX" constant="20" id="JAX-zf-Z1I"/>
<constraint firstItem="A5M-7J-77L" firstAttribute="top" secondItem="KQZ-1w-vlD" secondAttribute="bottom" constant="8" symbolic="YES" id="cfb-er-3JN"/>
<constraint firstItem="A5M-7J-77L" firstAttribute="centerX" secondItem="KQZ-1w-vlD" secondAttribute="centerX" id="e1l-AV-tCB"/>
<constraint firstAttribute="centerY" secondItem="KQZ-1w-vlD" secondAttribute="centerY" id="exm-UA-ej4"/>
</constraints> </constraints>
</view> </view>
<tabBarItem key="tabBarItem" title="Get Feature" image="first" id="acW-dT-cKf"/> <tabBarItem key="tabBarItem" title="Get Feature" image="first" id="acW-dT-cKf"/>
<connections>
<outlet property="outputLabel" destination="2ga-Gd-X9q" id="yXF-xa-kbD"/>
</connections>
</viewController> </viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="W5J-7L-Pyd" sceneMemberID="firstResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="W5J-7L-Pyd" sceneMemberID="firstResponder"/>
</objects> </objects>
<point key="canvasLocation" x="718" y="-660"/> <point key="canvasLocation" x="733" y="-653"/>
</scene> </scene>
<!--List Features--> <!--List Features-->
<scene sceneID="wg7-f3-ORb"> <scene sceneID="wg7-f3-ORb">
@ -56,29 +59,35 @@
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/> <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="List Features Demo" textAlignment="center" lineBreakMode="tailTruncation" minimumFontSize="10" translatesAutoresizingMaskIntoConstraints="NO" id="zEq-FU-wV5"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8mE-gq-NQc">
<rect key="frame" x="143" y="279" width="315" height="42"/> <rect key="frame" x="20" y="114" width="560" height="437"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> <accessibility key="accessibilityConfiguration">
<fontDescription key="fontDescription" name="Helvetica" family="Helvetica" pointSize="36"/> <accessibilityTraits key="traits" link="YES"/>
</accessibility>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="See ViewControllers.m and this app's log in XCode" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="NDk-cv-Gan"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" misplaced="YES" text="Execution log:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DbB-M0-xs2">
<rect key="frame" x="136" y="329" width="329" height="17"/> <rect key="frame" x="50" y="12" width="257" height="61"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/> <fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
</subviews> </subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<accessibility key="accessibilityConfiguration">
<accessibilityTraits key="traits" staticText="YES"/>
</accessibility>
<constraints> <constraints>
<constraint firstItem="NDk-cv-Gan" firstAttribute="top" secondItem="zEq-FU-wV5" secondAttribute="bottom" constant="8" symbolic="YES" id="Day-4N-Vmt"/> <constraint firstItem="DbB-M0-xs2" firstAttribute="centerX" secondItem="QS5-Rx-YEW" secondAttribute="centerX" constant="20" id="UDo-WG-7i3"/>
<constraint firstItem="NDk-cv-Gan" firstAttribute="centerX" secondItem="zEq-FU-wV5" secondAttribute="centerX" id="JgO-Fn-dHn"/> <constraint firstItem="DbB-M0-xs2" firstAttribute="centerX" secondItem="QS5-Rx-YEW" secondAttribute="centerX" constant="20" id="W7v-LC-HjP"/>
<constraint firstAttribute="centerX" secondItem="zEq-FU-wV5" secondAttribute="centerX" id="qqM-NS-xev"/>
<constraint firstAttribute="centerY" secondItem="zEq-FU-wV5" secondAttribute="centerY" id="qzY-Ky-pLD"/>
</constraints> </constraints>
</view> </view>
<tabBarItem key="tabBarItem" title="List Features" image="second" id="cPa-gy-q4n"/> <tabBarItem key="tabBarItem" title="List Features" image="second" id="cPa-gy-q4n"/>
<connections>
<outlet property="outputLabel" destination="8mE-gq-NQc" id="6rw-Kd-21X"/>
</connections>
</viewController> </viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="4Nw-L8-lE0" sceneMemberID="firstResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="4Nw-L8-lE0" sceneMemberID="firstResponder"/>
</objects> </objects>
@ -117,29 +126,32 @@
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/> <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="Record Route Demo" textAlignment="center" lineBreakMode="tailTruncation" minimumFontSize="10" translatesAutoresizingMaskIntoConstraints="NO" id="Nqv-Vr-o8P"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" misplaced="YES" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9wL-iS-tp8">
<rect key="frame" x="136" y="279" width="329" height="42"/> <rect key="frame" x="20" y="114" width="560" height="437"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> <accessibility key="accessibilityConfiguration">
<fontDescription key="fontDescription" name="Helvetica" family="Helvetica" pointSize="36"/> <accessibilityTraits key="traits" link="YES"/>
</accessibility>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="See ViewControllers.m and this app's log in XCode" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xjS-0N-tLe"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" misplaced="YES" text="Execution log:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5qv-tY-qxl">
<rect key="frame" x="136" y="329" width="329" height="17"/> <rect key="frame" x="30" y="10" width="257" height="61"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/> <fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
</subviews> </subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints> <constraints>
<constraint firstAttribute="centerX" secondItem="Nqv-Vr-o8P" secondAttribute="centerX" id="1wf-uc-57y"/> <constraint firstItem="9wL-iS-tp8" firstAttribute="centerX" secondItem="Wvj-mg-YnO" secondAttribute="centerX" constant="20" id="7TX-Jm-662"/>
<constraint firstItem="xjS-0N-tLe" firstAttribute="centerX" secondItem="Nqv-Vr-o8P" secondAttribute="centerX" id="Gnh-rN-EQ3"/> <constraint firstItem="5qv-tY-qxl" firstAttribute="centerX" secondItem="Wvj-mg-YnO" secondAttribute="centerX" id="mRS-9u-c2a"/>
<constraint firstItem="xjS-0N-tLe" firstAttribute="top" secondItem="Nqv-Vr-o8P" secondAttribute="bottom" constant="8" symbolic="YES" id="Xhj-u3-th9"/>
<constraint firstAttribute="centerY" secondItem="Nqv-Vr-o8P" secondAttribute="centerY" id="xqU-v8-Bb3"/>
</constraints> </constraints>
</view> </view>
<tabBarItem key="tabBarItem" title="Record Route" image="first" id="PLK-Jm-UyM"/> <tabBarItem key="tabBarItem" title="Record Route" image="first" id="PLK-Jm-UyM"/>
<connections>
<outlet property="outputLabel" destination="9wL-iS-tp8" id="xhd-zm-66g"/>
</connections>
</viewController> </viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="9RW-dt-a4q" sceneMemberID="firstResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="9RW-dt-a4q" sceneMemberID="firstResponder"/>
</objects> </objects>
@ -157,29 +169,31 @@
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/> <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="Route Chat Demo" textAlignment="center" lineBreakMode="tailTruncation" minimumFontSize="10" translatesAutoresizingMaskIntoConstraints="NO" id="zUL-Bo-wJt"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" misplaced="YES" text="Execution log:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="BxD-G9-xhU">
<rect key="frame" x="156" y="279" width="289" height="42"/> <rect key="frame" x="20" y="10" width="257" height="61"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> <fontDescription key="fontDescription" type="system" pointSize="17"/>
<fontDescription key="fontDescription" name="Helvetica" family="Helvetica" pointSize="36"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="See ViewControllers.m and this app's log in XCode" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="CgS-1q-Od9"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="131-U2-Ogk">
<rect key="frame" x="136" y="329" width="329" height="17"/> <rect key="frame" x="20" y="114" width="560" height="437"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/> <accessibility key="accessibilityConfiguration">
<accessibilityTraits key="traits" link="YES"/>
</accessibility>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
</subviews> </subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints> <constraints>
<constraint firstAttribute="centerY" secondItem="zUL-Bo-wJt" secondAttribute="centerY" id="5hM-q1-ZjM"/> <constraint firstItem="BxD-G9-xhU" firstAttribute="centerX" secondItem="c9d-af-OMP" secondAttribute="centerX" id="wSw-7t-wxX"/>
<constraint firstItem="CgS-1q-Od9" firstAttribute="top" secondItem="zUL-Bo-wJt" secondAttribute="bottom" constant="8" symbolic="YES" id="AqI-Ra-a5O"/>
<constraint firstItem="CgS-1q-Od9" firstAttribute="centerX" secondItem="zUL-Bo-wJt" secondAttribute="centerX" id="K8f-KI-bc6"/>
<constraint firstAttribute="centerX" secondItem="zUL-Bo-wJt" secondAttribute="centerX" id="n8b-x8-Yze"/>
</constraints> </constraints>
</view> </view>
<tabBarItem key="tabBarItem" title="Route Chat" image="second" id="p2G-IC-yAR"/> <tabBarItem key="tabBarItem" title="Route Chat" image="second" id="p2G-IC-yAR"/>
<connections>
<outlet property="outputLabel" destination="131-U2-Ogk" id="fNw-M5-x1D"/>
</connections>
</viewController> </viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="yUz-se-Cfi" sceneMemberID="firstResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="yUz-se-Cfi" sceneMemberID="firstResponder"/>
</objects> </objects>

@ -2,6 +2,10 @@ Pod::Spec.new do |s|
s.name = "RouteGuide" s.name = "RouteGuide"
s.version = "0.0.1" s.version = "0.0.1"
s.license = "New BSD" s.license = "New BSD"
s.authors = { 'gRPC contributors' => 'grpc-io@googlegroups.com' }
s.homepage = "http://www.grpc.io/"
s.summary = "RouteGuide example"
s.source = { :git => 'https://github.com/grpc/grpc.git' }
s.ios.deployment_target = "7.1" s.ios.deployment_target = "7.1"
s.osx.deployment_target = "10.9" s.osx.deployment_target = "10.9"

@ -116,12 +116,12 @@
isa = PBXNativeTarget; isa = PBXNativeTarget;
buildConfigurationList = 632527A31B1D0396003073D9 /* Build configuration list for PBXNativeTarget "RouteGuideClient" */; buildConfigurationList = 632527A31B1D0396003073D9 /* Build configuration list for PBXNativeTarget "RouteGuideClient" */;
buildPhases = ( buildPhases = (
C6FC30AD2376EC04317237C5 /* Check Pods Manifest.lock */, C6FC30AD2376EC04317237C5 /* [CP] Check Pods Manifest.lock */,
632527791B1D0395003073D9 /* Sources */, 632527791B1D0395003073D9 /* Sources */,
6325277A1B1D0395003073D9 /* Frameworks */, 6325277A1B1D0395003073D9 /* Frameworks */,
6325277B1B1D0395003073D9 /* Resources */, 6325277B1B1D0395003073D9 /* Resources */,
FFE0BCF30339E7A50A989EAB /* Copy Pods Resources */, FFE0BCF30339E7A50A989EAB /* [CP] Copy Pods Resources */,
B5388EC5A25E89021740B916 /* Embed Pods Frameworks */, B5388EC5A25E89021740B916 /* [CP] Embed Pods Frameworks */,
); );
buildRules = ( buildRules = (
); );
@ -178,14 +178,14 @@
/* End PBXResourcesBuildPhase section */ /* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */
B5388EC5A25E89021740B916 /* Embed Pods Frameworks */ = { B5388EC5A25E89021740B916 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
); );
inputPaths = ( inputPaths = (
); );
name = "Embed Pods Frameworks"; name = "[CP] Embed Pods Frameworks";
outputPaths = ( outputPaths = (
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
@ -193,14 +193,14 @@
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-RouteGuideClient/Pods-RouteGuideClient-frameworks.sh\"\n"; shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-RouteGuideClient/Pods-RouteGuideClient-frameworks.sh\"\n";
showEnvVarsInLog = 0; showEnvVarsInLog = 0;
}; };
C6FC30AD2376EC04317237C5 /* Check Pods Manifest.lock */ = { C6FC30AD2376EC04317237C5 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
); );
inputPaths = ( inputPaths = (
); );
name = "Check Pods Manifest.lock"; name = "[CP] Check Pods Manifest.lock";
outputPaths = ( outputPaths = (
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
@ -208,14 +208,14 @@
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
showEnvVarsInLog = 0; showEnvVarsInLog = 0;
}; };
FFE0BCF30339E7A50A989EAB /* Copy Pods Resources */ = { FFE0BCF30339E7A50A989EAB /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
); );
inputPaths = ( inputPaths = (
); );
name = "Copy Pods Resources"; name = "[CP] Copy Pods Resources";
outputPaths = ( outputPaths = (
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;

@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0730"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6325277C1B1D0395003073D9"
BuildableName = "RouteGuideClient.app"
BlueprintName = "RouteGuideClient"
ReferencedContainer = "container:RouteGuideClient.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6325277C1B1D0395003073D9"
BuildableName = "RouteGuideClient.app"
BlueprintName = "RouteGuideClient"
ReferencedContainer = "container:RouteGuideClient.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6325277C1B1D0395003073D9"
BuildableName = "RouteGuideClient.app"
BlueprintName = "RouteGuideClient"
ReferencedContainer = "container:RouteGuideClient.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6325277C1B1D0395003073D9"
BuildableName = "RouteGuideClient.app"
BlueprintName = "RouteGuideClient"
ReferencedContainer = "container:RouteGuideClient.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

@ -80,20 +80,30 @@ static NSString * const kHostAddress = @"localhost:50051";
* Run the getFeature demo. Calls getFeature with a point known to have a feature and a point known * Run the getFeature demo. Calls getFeature with a point known to have a feature and a point known
* not to have a feature. * not to have a feature.
*/ */
@interface GetFeatureViewController : UIViewController { @interface GetFeatureViewController : UIViewController
RTGRouteGuide *service;
} @property (weak, nonatomic) IBOutlet UILabel *outputLabel;
@end @end
@implementation GetFeatureViewController @implementation GetFeatureViewController {
RTGRouteGuide *_service;
}
- (void)execRequest { - (void)execRequest {
void (^handler)(RTGFeature *response, NSError *error) = ^(RTGFeature *response, NSError *error) { void (^handler)(RTGFeature *response, NSError *error) = ^(RTGFeature *response, NSError *error) {
// TODO(makdharma): Remove boilerplate by consolidating into one log function.
if (response.name.length) { if (response.name.length) {
NSString *str =[NSString stringWithFormat:@"%@\nFound feature called %@ at %@.", self.outputLabel.text, response.location, response.name];
self.outputLabel.text = str;
NSLog(@"Found feature called %@ at %@.", response.name, response.location); NSLog(@"Found feature called %@ at %@.", response.name, response.location);
} else if (response) { } else if (response) {
NSString *str =[NSString stringWithFormat:@"%@\nFound no features at %@", self.outputLabel.text,response.location];
self.outputLabel.text = str;
NSLog(@"Found no features at %@", response.location); NSLog(@"Found no features at %@", response.location);
} else { } else {
NSString *str =[NSString stringWithFormat:@"%@\nRPC error: %@", self.outputLabel.text, error];
self.outputLabel.text = str;
NSLog(@"RPC error: %@", error); NSLog(@"RPC error: %@", error);
} }
}; };
@ -102,8 +112,8 @@ static NSString * const kHostAddress = @"localhost:50051";
point.latitude = 409146138; point.latitude = 409146138;
point.longitude = -746188906; point.longitude = -746188906;
[service getFeatureWithRequest:point handler:handler]; [_service getFeatureWithRequest:point handler:handler];
[service getFeatureWithRequest:[RTGPoint message] handler:handler]; [_service getFeatureWithRequest:[RTGPoint message] handler:handler];
} }
- (void)viewDidLoad { - (void)viewDidLoad {
@ -112,10 +122,13 @@ static NSString * const kHostAddress = @"localhost:50051";
// This only needs to be done once per host, before creating service objects for that host. // This only needs to be done once per host, before creating service objects for that host.
[GRPCCall useInsecureConnectionsForHost:kHostAddress]; [GRPCCall useInsecureConnectionsForHost:kHostAddress];
service = [[RTGRouteGuide alloc] initWithHost:kHostAddress]; _service = [[RTGRouteGuide alloc] initWithHost:kHostAddress];
} }
- (void)viewDidAppear:(BOOL)animated { - (void)viewDidAppear:(BOOL)animated {
self.outputLabel.text = @"RPC log:";
self.outputLabel.numberOfLines = 0;
self.outputLabel.font = [UIFont fontWithName:@"Helvetica Neue" size:8.0];
[self execRequest]; [self execRequest];
} }
@ -128,13 +141,15 @@ static NSString * const kHostAddress = @"localhost:50051";
* Run the listFeatures demo. Calls listFeatures with a rectangle containing all of the features in * Run the listFeatures demo. Calls listFeatures with a rectangle containing all of the features in
* the pre-generated database. Prints each response as it comes in. * the pre-generated database. Prints each response as it comes in.
*/ */
@interface ListFeaturesViewController : UIViewController { @interface ListFeaturesViewController : UIViewController
RTGRouteGuide *service;
} @property (weak, nonatomic) IBOutlet UILabel *outputLabel;
@end @end
@implementation ListFeaturesViewController @implementation ListFeaturesViewController {
RTGRouteGuide *_service;
}
- (void)execRequest { - (void)execRequest {
RTGRectangle *rectangle = [RTGRectangle message]; RTGRectangle *rectangle = [RTGRectangle message];
@ -144,11 +159,15 @@ static NSString * const kHostAddress = @"localhost:50051";
rectangle.hi.longitude = -745E6; rectangle.hi.longitude = -745E6;
NSLog(@"Looking for features between %@ and %@", rectangle.lo, rectangle.hi); NSLog(@"Looking for features between %@ and %@", rectangle.lo, rectangle.hi);
[service listFeaturesWithRequest:rectangle [_service listFeaturesWithRequest:rectangle
eventHandler:^(BOOL done, RTGFeature *response, NSError *error) { eventHandler:^(BOOL done, RTGFeature *response, NSError *error) {
if (response) { if (response) {
NSString *str =[NSString stringWithFormat:@"%@\nFound feature at %@ called %@.", self.outputLabel.text, response.location, response.name];
self.outputLabel.text = str;
NSLog(@"Found feature at %@ called %@.", response.location, response.name); NSLog(@"Found feature at %@ called %@.", response.location, response.name);
} else if (error) { } else if (error) {
NSString *str =[NSString stringWithFormat:@"%@\nRPC error: %@", self.outputLabel.text, error];
self.outputLabel.text = str;
NSLog(@"RPC error: %@", error); NSLog(@"RPC error: %@", error);
} }
}]; }];
@ -157,10 +176,13 @@ static NSString * const kHostAddress = @"localhost:50051";
- (void)viewDidLoad { - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
service = [[RTGRouteGuide alloc] initWithHost:kHostAddress]; _service = [[RTGRouteGuide alloc] initWithHost:kHostAddress];
} }
- (void)viewDidAppear:(BOOL)animated { - (void)viewDidAppear:(BOOL)animated {
self.outputLabel.text = @"RPC log:";
self.outputLabel.numberOfLines = 0;
self.outputLabel.font = [UIFont fontWithName:@"Helvetica Neue" size:8.0];
[self execRequest]; [self execRequest];
} }
@ -174,13 +196,15 @@ static NSString * const kHostAddress = @"localhost:50051";
* database with a variable delay in between. Prints the statistics when they are sent from the * database with a variable delay in between. Prints the statistics when they are sent from the
* server. * server.
*/ */
@interface RecordRouteViewController : UIViewController { @interface RecordRouteViewController : UIViewController
RTGRouteGuide *service;
} @property (weak, nonatomic) IBOutlet UILabel *outputLabel;
@end @end
@implementation RecordRouteViewController @implementation RecordRouteViewController {
RTGRouteGuide *_service;
}
- (void)execRequest { - (void)execRequest {
NSString *dataBasePath = [NSBundle.mainBundle pathForResource:@"route_guide_db" NSString *dataBasePath = [NSBundle.mainBundle pathForResource:@"route_guide_db"
@ -192,18 +216,28 @@ static NSString * const kHostAddress = @"localhost:50051";
RTGPoint *location = [RTGPoint message]; RTGPoint *location = [RTGPoint message];
location.longitude = [((NSNumber *) feature[@"location"][@"longitude"]) intValue]; location.longitude = [((NSNumber *) feature[@"location"][@"longitude"]) intValue];
location.latitude = [((NSNumber *) feature[@"location"][@"latitude"]) intValue]; location.latitude = [((NSNumber *) feature[@"location"][@"latitude"]) intValue];
NSString *str =[NSString stringWithFormat:@"%@\nVisiting point %@", self.outputLabel.text, location];
self.outputLabel.text = str;
NSLog(@"Visiting point %@", location); NSLog(@"Visiting point %@", location);
return location; return location;
}]; }];
[service recordRouteWithRequestsWriter:locations [_service recordRouteWithRequestsWriter:locations
handler:^(RTGRouteSummary *response, NSError *error) { handler:^(RTGRouteSummary *response, NSError *error) {
if (response) { if (response) {
NSString *str =[NSString stringWithFormat:
@"%@\nFinished trip with %i points\nPassed %i features\n"
"Travelled %i meters\nIt took %i seconds",
self.outputLabel.text, response.pointCount, response.featureCount,
response.distance, response.elapsedTime];
self.outputLabel.text = str;
NSLog(@"Finished trip with %i points", response.pointCount); NSLog(@"Finished trip with %i points", response.pointCount);
NSLog(@"Passed %i features", response.featureCount); NSLog(@"Passed %i features", response.featureCount);
NSLog(@"Travelled %i meters", response.distance); NSLog(@"Travelled %i meters", response.distance);
NSLog(@"It took %i seconds", response.elapsedTime); NSLog(@"It took %i seconds", response.elapsedTime);
} else { } else {
NSString *str =[NSString stringWithFormat:@"%@\nRPC error: %@", self.outputLabel.text, error];
self.outputLabel.text = str;
NSLog(@"RPC error: %@", error); NSLog(@"RPC error: %@", error);
} }
}]; }];
@ -212,10 +246,13 @@ static NSString * const kHostAddress = @"localhost:50051";
- (void)viewDidLoad { - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
service = [[RTGRouteGuide alloc] initWithHost:kHostAddress]; _service = [[RTGRouteGuide alloc] initWithHost:kHostAddress];
} }
- (void)viewDidAppear:(BOOL)animated { - (void)viewDidAppear:(BOOL)animated {
self.outputLabel.text = @"RPC log:";
self.outputLabel.numberOfLines = 0;
self.outputLabel.font = [UIFont fontWithName:@"Helvetica Neue" size:8.0];
[self execRequest]; [self execRequest];
} }
@ -228,13 +265,15 @@ static NSString * const kHostAddress = @"localhost:50051";
* Run the routeChat demo. Send some chat messages, and print any chat messages that are sent from * Run the routeChat demo. Send some chat messages, and print any chat messages that are sent from
* the server. * the server.
*/ */
@interface RouteChatViewController : UIViewController { @interface RouteChatViewController : UIViewController
RTGRouteGuide *service;
} @property (weak, nonatomic) IBOutlet UILabel *outputLabel;
@end @end
@implementation RouteChatViewController @implementation RouteChatViewController {
RTGRouteGuide *_service;
}
- (void)execRequest { - (void)execRequest {
NSArray *notes = @[[RTGRouteNote noteWithMessage:@"First message" latitude:0 longitude:0], NSArray *notes = @[[RTGRouteNote noteWithMessage:@"First message" latitude:0 longitude:0],
@ -246,11 +285,16 @@ static NSString * const kHostAddress = @"localhost:50051";
return note; return note;
}]; }];
[service routeChatWithRequestsWriter:notesWriter [_service routeChatWithRequestsWriter:notesWriter
eventHandler:^(BOOL done, RTGRouteNote *note, NSError *error) { eventHandler:^(BOOL done, RTGRouteNote *note, NSError *error) {
if (note) { if (note) {
NSString *str =[NSString stringWithFormat:@"%@\nGot message %@ at %@",
self.outputLabel.text, note.message, note.location];
self.outputLabel.text = str;
NSLog(@"Got message %@ at %@", note.message, note.location); NSLog(@"Got message %@ at %@", note.message, note.location);
} else if (error) { } else if (error) {
NSString *str =[NSString stringWithFormat:@"%@\nRPC error: %@", self.outputLabel.text, error];
self.outputLabel.text = str;
NSLog(@"RPC error: %@", error); NSLog(@"RPC error: %@", error);
} }
if (done) { if (done) {
@ -262,10 +306,14 @@ static NSString * const kHostAddress = @"localhost:50051";
- (void)viewDidLoad { - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
service = [[RTGRouteGuide alloc] initWithHost:kHostAddress]; _service = [[RTGRouteGuide alloc] initWithHost:kHostAddress];
} }
- (void)viewDidAppear:(BOOL)animated { - (void)viewDidAppear:(BOOL)animated {
// TODO(makarandd): Set these properties through UI builder
self.outputLabel.text = @"RPC log:";
self.outputLabel.numberOfLines = 0;
self.outputLabel.font = [UIFont fontWithName:@"Helvetica Neue" size:8.0];
[self execRequest]; [self execRequest];
} }

@ -17,7 +17,7 @@ INSTALL
- Clone this repository - Clone this repository
```sh ```sh
$ git clone https://github.com/grpc/grpc.git $ git clone -b $(curl -L http://grpc.io/release) https://github.com/grpc/grpc
``` ```
- Install composer - Install composer
@ -37,7 +37,8 @@ TRY IT!
``` ```
$ cd examples/node $ cd examples/node
$ npm install $ npm install
$ nodejs greeter_server.js $ cd dynamic_codegen or cd static_codegen
$ node greeter_server.js
``` ```
- Run the client - Run the client

@ -51,7 +51,7 @@ def get_distance(start, end):
coord_factor = 10000000.0 coord_factor = 10000000.0
lat_1 = start.latitude / coord_factor lat_1 = start.latitude / coord_factor
lat_2 = end.latitude / coord_factor lat_2 = end.latitude / coord_factor
lon_1 = start.latitude / coord_factor lon_1 = start.longitude / coord_factor
lon_2 = end.longitude / coord_factor lon_2 = end.longitude / coord_factor
lat_rad_1 = math.radians(lat_1) lat_rad_1 = math.radians(lat_1)
lat_rad_2 = math.radians(lat_2) lat_rad_2 = math.radians(lat_2)

@ -68,7 +68,6 @@ Pod::Spec.new do |s|
'src/core/lib/support/backoff.h', 'src/core/lib/support/backoff.h',
'src/core/lib/support/block_annotate.h', 'src/core/lib/support/block_annotate.h',
'src/core/lib/support/env.h', 'src/core/lib/support/env.h',
'src/core/lib/support/load_file.h',
'src/core/lib/support/murmur_hash.h', 'src/core/lib/support/murmur_hash.h',
'src/core/lib/support/stack_lockfree.h', 'src/core/lib/support/stack_lockfree.h',
'src/core/lib/support/string.h', 'src/core/lib/support/string.h',
@ -133,7 +132,6 @@ Pod::Spec.new do |s|
'src/core/lib/support/env_windows.c', 'src/core/lib/support/env_windows.c',
'src/core/lib/support/histogram.c', 'src/core/lib/support/histogram.c',
'src/core/lib/support/host_port.c', 'src/core/lib/support/host_port.c',
'src/core/lib/support/load_file.c',
'src/core/lib/support/log.c', 'src/core/lib/support/log.c',
'src/core/lib/support/log_android.c', 'src/core/lib/support/log_android.c',
'src/core/lib/support/log_linux.c', 'src/core/lib/support/log_linux.c',
@ -181,6 +179,8 @@ Pod::Spec.new do |s|
'src/core/lib/iomgr/closure.h', 'src/core/lib/iomgr/closure.h',
'src/core/lib/iomgr/endpoint.h', 'src/core/lib/iomgr/endpoint.h',
'src/core/lib/iomgr/endpoint_pair.h', 'src/core/lib/iomgr/endpoint_pair.h',
'src/core/lib/iomgr/error.h',
'src/core/lib/iomgr/ev_epoll_linux.h',
'src/core/lib/iomgr/ev_poll_and_epoll_posix.h', 'src/core/lib/iomgr/ev_poll_and_epoll_posix.h',
'src/core/lib/iomgr/ev_poll_posix.h', 'src/core/lib/iomgr/ev_poll_posix.h',
'src/core/lib/iomgr/ev_posix.h', 'src/core/lib/iomgr/ev_posix.h',
@ -190,6 +190,8 @@ Pod::Spec.new do |s|
'src/core/lib/iomgr/iomgr.h', 'src/core/lib/iomgr/iomgr.h',
'src/core/lib/iomgr/iomgr_internal.h', 'src/core/lib/iomgr/iomgr_internal.h',
'src/core/lib/iomgr/iomgr_posix.h', 'src/core/lib/iomgr/iomgr_posix.h',
'src/core/lib/iomgr/load_file.h',
'src/core/lib/iomgr/network_status_tracker.h',
'src/core/lib/iomgr/polling_entity.h', 'src/core/lib/iomgr/polling_entity.h',
'src/core/lib/iomgr/pollset.h', 'src/core/lib/iomgr/pollset.h',
'src/core/lib/iomgr/pollset_set.h', 'src/core/lib/iomgr/pollset_set.h',
@ -231,7 +233,6 @@ Pod::Spec.new do |s|
'src/core/lib/surface/init.h', 'src/core/lib/surface/init.h',
'src/core/lib/surface/lame_client.h', 'src/core/lib/surface/lame_client.h',
'src/core/lib/surface/server.h', 'src/core/lib/surface/server.h',
'src/core/lib/surface/surface_trace.h',
'src/core/lib/transport/byte_stream.h', 'src/core/lib/transport/byte_stream.h',
'src/core/lib/transport/connectivity_state.h', 'src/core/lib/transport/connectivity_state.h',
'src/core/lib/transport/metadata.h', 'src/core/lib/transport/metadata.h',
@ -277,6 +278,7 @@ Pod::Spec.new do |s|
'src/core/lib/security/transport/handshake.h', 'src/core/lib/security/transport/handshake.h',
'src/core/lib/security/transport/secure_endpoint.h', 'src/core/lib/security/transport/secure_endpoint.h',
'src/core/lib/security/transport/security_connector.h', 'src/core/lib/security/transport/security_connector.h',
'src/core/lib/security/transport/tsi_error.h',
'src/core/lib/security/util/b64.h', 'src/core/lib/security/util/b64.h',
'src/core/lib/security/util/json_util.h', 'src/core/lib/security/util/json_util.h',
'src/core/lib/tsi/fake_transport_security.h', 'src/core/lib/tsi/fake_transport_security.h',
@ -363,6 +365,8 @@ Pod::Spec.new do |s|
'src/core/lib/iomgr/endpoint.c', 'src/core/lib/iomgr/endpoint.c',
'src/core/lib/iomgr/endpoint_pair_posix.c', 'src/core/lib/iomgr/endpoint_pair_posix.c',
'src/core/lib/iomgr/endpoint_pair_windows.c', 'src/core/lib/iomgr/endpoint_pair_windows.c',
'src/core/lib/iomgr/error.c',
'src/core/lib/iomgr/ev_epoll_linux.c',
'src/core/lib/iomgr/ev_poll_and_epoll_posix.c', 'src/core/lib/iomgr/ev_poll_and_epoll_posix.c',
'src/core/lib/iomgr/ev_poll_posix.c', 'src/core/lib/iomgr/ev_poll_posix.c',
'src/core/lib/iomgr/ev_posix.c', 'src/core/lib/iomgr/ev_posix.c',
@ -372,6 +376,8 @@ Pod::Spec.new do |s|
'src/core/lib/iomgr/iomgr.c', 'src/core/lib/iomgr/iomgr.c',
'src/core/lib/iomgr/iomgr_posix.c', 'src/core/lib/iomgr/iomgr_posix.c',
'src/core/lib/iomgr/iomgr_windows.c', 'src/core/lib/iomgr/iomgr_windows.c',
'src/core/lib/iomgr/load_file.c',
'src/core/lib/iomgr/network_status_tracker.c',
'src/core/lib/iomgr/polling_entity.c', 'src/core/lib/iomgr/polling_entity.c',
'src/core/lib/iomgr/pollset_set_windows.c', 'src/core/lib/iomgr/pollset_set_windows.c',
'src/core/lib/iomgr/pollset_windows.c', 'src/core/lib/iomgr/pollset_windows.c',
@ -474,6 +480,7 @@ Pod::Spec.new do |s|
'src/core/lib/security/transport/secure_endpoint.c', 'src/core/lib/security/transport/secure_endpoint.c',
'src/core/lib/security/transport/security_connector.c', 'src/core/lib/security/transport/security_connector.c',
'src/core/lib/security/transport/server_auth_filter.c', 'src/core/lib/security/transport/server_auth_filter.c',
'src/core/lib/security/transport/tsi_error.c',
'src/core/lib/security/util/b64.c', 'src/core/lib/security/util/b64.c',
'src/core/lib/security/util/json_util.c', 'src/core/lib/security/util/json_util.c',
'src/core/lib/surface/init_secure.c', 'src/core/lib/surface/init_secure.c',
@ -531,7 +538,6 @@ Pod::Spec.new do |s|
'src/core/lib/support/backoff.h', 'src/core/lib/support/backoff.h',
'src/core/lib/support/block_annotate.h', 'src/core/lib/support/block_annotate.h',
'src/core/lib/support/env.h', 'src/core/lib/support/env.h',
'src/core/lib/support/load_file.h',
'src/core/lib/support/murmur_hash.h', 'src/core/lib/support/murmur_hash.h',
'src/core/lib/support/stack_lockfree.h', 'src/core/lib/support/stack_lockfree.h',
'src/core/lib/support/string.h', 'src/core/lib/support/string.h',
@ -556,6 +562,8 @@ Pod::Spec.new do |s|
'src/core/lib/iomgr/closure.h', 'src/core/lib/iomgr/closure.h',
'src/core/lib/iomgr/endpoint.h', 'src/core/lib/iomgr/endpoint.h',
'src/core/lib/iomgr/endpoint_pair.h', 'src/core/lib/iomgr/endpoint_pair.h',
'src/core/lib/iomgr/error.h',
'src/core/lib/iomgr/ev_epoll_linux.h',
'src/core/lib/iomgr/ev_poll_and_epoll_posix.h', 'src/core/lib/iomgr/ev_poll_and_epoll_posix.h',
'src/core/lib/iomgr/ev_poll_posix.h', 'src/core/lib/iomgr/ev_poll_posix.h',
'src/core/lib/iomgr/ev_posix.h', 'src/core/lib/iomgr/ev_posix.h',
@ -565,6 +573,8 @@ Pod::Spec.new do |s|
'src/core/lib/iomgr/iomgr.h', 'src/core/lib/iomgr/iomgr.h',
'src/core/lib/iomgr/iomgr_internal.h', 'src/core/lib/iomgr/iomgr_internal.h',
'src/core/lib/iomgr/iomgr_posix.h', 'src/core/lib/iomgr/iomgr_posix.h',
'src/core/lib/iomgr/load_file.h',
'src/core/lib/iomgr/network_status_tracker.h',
'src/core/lib/iomgr/polling_entity.h', 'src/core/lib/iomgr/polling_entity.h',
'src/core/lib/iomgr/pollset.h', 'src/core/lib/iomgr/pollset.h',
'src/core/lib/iomgr/pollset_set.h', 'src/core/lib/iomgr/pollset_set.h',
@ -606,7 +616,6 @@ Pod::Spec.new do |s|
'src/core/lib/surface/init.h', 'src/core/lib/surface/init.h',
'src/core/lib/surface/lame_client.h', 'src/core/lib/surface/lame_client.h',
'src/core/lib/surface/server.h', 'src/core/lib/surface/server.h',
'src/core/lib/surface/surface_trace.h',
'src/core/lib/transport/byte_stream.h', 'src/core/lib/transport/byte_stream.h',
'src/core/lib/transport/connectivity_state.h', 'src/core/lib/transport/connectivity_state.h',
'src/core/lib/transport/metadata.h', 'src/core/lib/transport/metadata.h',
@ -652,6 +661,7 @@ Pod::Spec.new do |s|
'src/core/lib/security/transport/handshake.h', 'src/core/lib/security/transport/handshake.h',
'src/core/lib/security/transport/secure_endpoint.h', 'src/core/lib/security/transport/secure_endpoint.h',
'src/core/lib/security/transport/security_connector.h', 'src/core/lib/security/transport/security_connector.h',
'src/core/lib/security/transport/tsi_error.h',
'src/core/lib/security/util/b64.h', 'src/core/lib/security/util/b64.h',
'src/core/lib/security/util/json_util.h', 'src/core/lib/security/util/json_util.h',
'src/core/lib/tsi/fake_transport_security.h', 'src/core/lib/tsi/fake_transport_security.h',

@ -90,6 +90,7 @@ EXPORTS
grpc_call_error_to_string grpc_call_error_to_string
grpc_insecure_channel_create_from_fd grpc_insecure_channel_create_from_fd
grpc_server_add_insecure_channel_from_fd grpc_server_add_insecure_channel_from_fd
grpc_use_signal
grpc_auth_property_iterator_next grpc_auth_property_iterator_next
grpc_auth_context_property_iterator grpc_auth_context_property_iterator
grpc_auth_context_peer_identity grpc_auth_context_peer_identity
@ -222,6 +223,8 @@ EXPORTS
gpr_avl_add gpr_avl_add
gpr_avl_remove gpr_avl_remove
gpr_avl_get gpr_avl_get
gpr_avl_maybe_get
gpr_avl_is_empty
gpr_cmdline_create gpr_cmdline_create
gpr_cmdline_add_int gpr_cmdline_add_int
gpr_cmdline_add_flag gpr_cmdline_add_flag

@ -89,7 +89,6 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/support/backoff.h ) s.files += %w( src/core/lib/support/backoff.h )
s.files += %w( src/core/lib/support/block_annotate.h ) s.files += %w( src/core/lib/support/block_annotate.h )
s.files += %w( src/core/lib/support/env.h ) s.files += %w( src/core/lib/support/env.h )
s.files += %w( src/core/lib/support/load_file.h )
s.files += %w( src/core/lib/support/murmur_hash.h ) s.files += %w( src/core/lib/support/murmur_hash.h )
s.files += %w( src/core/lib/support/stack_lockfree.h ) s.files += %w( src/core/lib/support/stack_lockfree.h )
s.files += %w( src/core/lib/support/string.h ) s.files += %w( src/core/lib/support/string.h )
@ -112,7 +111,6 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/support/env_windows.c ) s.files += %w( src/core/lib/support/env_windows.c )
s.files += %w( src/core/lib/support/histogram.c ) s.files += %w( src/core/lib/support/histogram.c )
s.files += %w( src/core/lib/support/host_port.c ) s.files += %w( src/core/lib/support/host_port.c )
s.files += %w( src/core/lib/support/load_file.c )
s.files += %w( src/core/lib/support/log.c ) s.files += %w( src/core/lib/support/log.c )
s.files += %w( src/core/lib/support/log_android.c ) s.files += %w( src/core/lib/support/log_android.c )
s.files += %w( src/core/lib/support/log_linux.c ) s.files += %w( src/core/lib/support/log_linux.c )
@ -190,6 +188,8 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/iomgr/closure.h ) s.files += %w( src/core/lib/iomgr/closure.h )
s.files += %w( src/core/lib/iomgr/endpoint.h ) s.files += %w( src/core/lib/iomgr/endpoint.h )
s.files += %w( src/core/lib/iomgr/endpoint_pair.h ) s.files += %w( src/core/lib/iomgr/endpoint_pair.h )
s.files += %w( src/core/lib/iomgr/error.h )
s.files += %w( src/core/lib/iomgr/ev_epoll_linux.h )
s.files += %w( src/core/lib/iomgr/ev_poll_and_epoll_posix.h ) s.files += %w( src/core/lib/iomgr/ev_poll_and_epoll_posix.h )
s.files += %w( src/core/lib/iomgr/ev_poll_posix.h ) s.files += %w( src/core/lib/iomgr/ev_poll_posix.h )
s.files += %w( src/core/lib/iomgr/ev_posix.h ) s.files += %w( src/core/lib/iomgr/ev_posix.h )
@ -199,6 +199,8 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/iomgr/iomgr.h ) s.files += %w( src/core/lib/iomgr/iomgr.h )
s.files += %w( src/core/lib/iomgr/iomgr_internal.h ) s.files += %w( src/core/lib/iomgr/iomgr_internal.h )
s.files += %w( src/core/lib/iomgr/iomgr_posix.h ) s.files += %w( src/core/lib/iomgr/iomgr_posix.h )
s.files += %w( src/core/lib/iomgr/load_file.h )
s.files += %w( src/core/lib/iomgr/network_status_tracker.h )
s.files += %w( src/core/lib/iomgr/polling_entity.h ) s.files += %w( src/core/lib/iomgr/polling_entity.h )
s.files += %w( src/core/lib/iomgr/pollset.h ) s.files += %w( src/core/lib/iomgr/pollset.h )
s.files += %w( src/core/lib/iomgr/pollset_set.h ) s.files += %w( src/core/lib/iomgr/pollset_set.h )
@ -240,7 +242,6 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/surface/init.h ) s.files += %w( src/core/lib/surface/init.h )
s.files += %w( src/core/lib/surface/lame_client.h ) s.files += %w( src/core/lib/surface/lame_client.h )
s.files += %w( src/core/lib/surface/server.h ) s.files += %w( src/core/lib/surface/server.h )
s.files += %w( src/core/lib/surface/surface_trace.h )
s.files += %w( src/core/lib/transport/byte_stream.h ) s.files += %w( src/core/lib/transport/byte_stream.h )
s.files += %w( src/core/lib/transport/connectivity_state.h ) s.files += %w( src/core/lib/transport/connectivity_state.h )
s.files += %w( src/core/lib/transport/metadata.h ) s.files += %w( src/core/lib/transport/metadata.h )
@ -286,6 +287,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/security/transport/handshake.h ) s.files += %w( src/core/lib/security/transport/handshake.h )
s.files += %w( src/core/lib/security/transport/secure_endpoint.h ) s.files += %w( src/core/lib/security/transport/secure_endpoint.h )
s.files += %w( src/core/lib/security/transport/security_connector.h ) s.files += %w( src/core/lib/security/transport/security_connector.h )
s.files += %w( src/core/lib/security/transport/tsi_error.h )
s.files += %w( src/core/lib/security/util/b64.h ) s.files += %w( src/core/lib/security/util/b64.h )
s.files += %w( src/core/lib/security/util/json_util.h ) s.files += %w( src/core/lib/security/util/json_util.h )
s.files += %w( src/core/lib/tsi/fake_transport_security.h ) s.files += %w( src/core/lib/tsi/fake_transport_security.h )
@ -342,6 +344,8 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/iomgr/endpoint.c ) s.files += %w( src/core/lib/iomgr/endpoint.c )
s.files += %w( src/core/lib/iomgr/endpoint_pair_posix.c ) s.files += %w( src/core/lib/iomgr/endpoint_pair_posix.c )
s.files += %w( src/core/lib/iomgr/endpoint_pair_windows.c ) s.files += %w( src/core/lib/iomgr/endpoint_pair_windows.c )
s.files += %w( src/core/lib/iomgr/error.c )
s.files += %w( src/core/lib/iomgr/ev_epoll_linux.c )
s.files += %w( src/core/lib/iomgr/ev_poll_and_epoll_posix.c ) s.files += %w( src/core/lib/iomgr/ev_poll_and_epoll_posix.c )
s.files += %w( src/core/lib/iomgr/ev_poll_posix.c ) s.files += %w( src/core/lib/iomgr/ev_poll_posix.c )
s.files += %w( src/core/lib/iomgr/ev_posix.c ) s.files += %w( src/core/lib/iomgr/ev_posix.c )
@ -351,6 +355,8 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/iomgr/iomgr.c ) s.files += %w( src/core/lib/iomgr/iomgr.c )
s.files += %w( src/core/lib/iomgr/iomgr_posix.c ) s.files += %w( src/core/lib/iomgr/iomgr_posix.c )
s.files += %w( src/core/lib/iomgr/iomgr_windows.c ) s.files += %w( src/core/lib/iomgr/iomgr_windows.c )
s.files += %w( src/core/lib/iomgr/load_file.c )
s.files += %w( src/core/lib/iomgr/network_status_tracker.c )
s.files += %w( src/core/lib/iomgr/polling_entity.c ) s.files += %w( src/core/lib/iomgr/polling_entity.c )
s.files += %w( src/core/lib/iomgr/pollset_set_windows.c ) s.files += %w( src/core/lib/iomgr/pollset_set_windows.c )
s.files += %w( src/core/lib/iomgr/pollset_windows.c ) s.files += %w( src/core/lib/iomgr/pollset_windows.c )
@ -453,6 +459,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/security/transport/secure_endpoint.c ) s.files += %w( src/core/lib/security/transport/secure_endpoint.c )
s.files += %w( src/core/lib/security/transport/security_connector.c ) s.files += %w( src/core/lib/security/transport/security_connector.c )
s.files += %w( src/core/lib/security/transport/server_auth_filter.c ) s.files += %w( src/core/lib/security/transport/server_auth_filter.c )
s.files += %w( src/core/lib/security/transport/tsi_error.c )
s.files += %w( src/core/lib/security/util/b64.c ) s.files += %w( src/core/lib/security/util/b64.c )
s.files += %w( src/core/lib/security/util/json_util.c ) s.files += %w( src/core/lib/security/util/json_util.c )
s.files += %w( src/core/lib/surface/init_secure.c ) s.files += %w( src/core/lib/surface/init_secure.c )

@ -56,7 +56,7 @@ class ProtoServerReflectionPlugin : public ::grpc::ServerBuilderPlugin {
bool has_sync_methods() const GRPC_OVERRIDE; bool has_sync_methods() const GRPC_OVERRIDE;
private: private:
std::shared_ptr<::grpc::ProtoServerReflection> reflection_service_; std::shared_ptr<grpc::ProtoServerReflection> reflection_service_;
}; };
// Add proto reflection plugin to ServerBuilder. This function should be called // Add proto reflection plugin to ServerBuilder. This function should be called

@ -52,11 +52,14 @@ class ClientAsyncStreamingInterface {
/// Request notification of the reading of the initial metadata. Completion /// Request notification of the reading of the initial metadata. Completion
/// will be notified by \a tag on the associated completion queue. /// will be notified by \a tag on the associated completion queue.
/// This call is optional, but if it is used, it cannot be used concurrently
/// with or after the \a Read method.
/// ///
/// \param[in] tag Tag identifying this request. /// \param[in] tag Tag identifying this request.
virtual void ReadInitialMetadata(void* tag) = 0; virtual void ReadInitialMetadata(void* tag) = 0;
/// Request notification completion. /// Indicate that the stream is to be finished and request notification
/// Should not be used concurrently with other operations
/// ///
/// \param[out] status To be updated with the operation status. /// \param[out] status To be updated with the operation status.
/// \param[in] tag Tag identifying this request. /// \param[in] tag Tag identifying this request.
@ -71,6 +74,11 @@ class AsyncReaderInterface {
/// Read a message of type \a R into \a msg. Completion will be notified by \a /// Read a message of type \a R into \a msg. Completion will be notified by \a
/// tag on the associated completion queue. /// tag on the associated completion queue.
/// This is thread-safe with respect to \a Write or \a WritesDone methods. It
/// should not be called concurrently with other streaming APIs
/// on the same stream. It is not meaningful to call it concurrently
/// with another \a Read on the same stream since reads on the same stream
/// are delivered in order.
/// ///
/// \param[out] msg Where to eventually store the read message. /// \param[out] msg Where to eventually store the read message.
/// \param[in] tag The tag identifying the operation. /// \param[in] tag The tag identifying the operation.
@ -88,6 +96,7 @@ class AsyncWriterInterface {
/// Only one write may be outstanding at any given time. This means that /// Only one write may be outstanding at any given time. This means that
/// after calling Write, one must wait to receive \a tag from the completion /// after calling Write, one must wait to receive \a tag from the completion
/// queue BEFORE calling Write again. /// queue BEFORE calling Write again.
/// This is thread-safe with respect to \a Read
/// ///
/// \param[in] msg The message to be written. /// \param[in] msg The message to be written.
/// \param[in] tag The tag identifying the operation. /// \param[in] tag The tag identifying the operation.
@ -158,6 +167,7 @@ class ClientAsyncWriterInterface : public ClientAsyncStreamingInterface,
public AsyncWriterInterface<W> { public AsyncWriterInterface<W> {
public: public:
/// Signal the client is done with the writes. /// Signal the client is done with the writes.
/// Thread-safe with respect to \a Read
/// ///
/// \param[in] tag The tag identifying the operation. /// \param[in] tag The tag identifying the operation.
virtual void WritesDone(void* tag) = 0; virtual void WritesDone(void* tag) = 0;
@ -229,6 +239,7 @@ class ClientAsyncReaderWriterInterface : public ClientAsyncStreamingInterface,
public AsyncReaderInterface<R> { public AsyncReaderInterface<R> {
public: public:
/// Signal the client is done with the writes. /// Signal the client is done with the writes.
/// Thread-safe with respect to \a Read
/// ///
/// \param[in] tag The tag identifying the operation. /// \param[in] tag The tag identifying the operation.
virtual void WritesDone(void* tag) = 0; virtual void WritesDone(void* tag) = 0;

@ -337,7 +337,7 @@ class DeserializeFuncType GRPC_FINAL : public DeserializeFunc {
return SerializationTraits<R>::Deserialize(buf, message_, max_message_size); return SerializationTraits<R>::Deserialize(buf, message_, max_message_size);
} }
~DeserializeFuncType() override {} ~DeserializeFuncType() GRPC_OVERRIDE {}
private: private:
R* message_; // Not a managed pointer because management is external to this R* message_; // Not a managed pointer because management is external to this

@ -193,7 +193,7 @@ class ClientContext {
/// ///
/// \return A multimap of initial metadata key-value pairs from the server. /// \return A multimap of initial metadata key-value pairs from the server.
const std::multimap<grpc::string_ref, grpc::string_ref>& const std::multimap<grpc::string_ref, grpc::string_ref>&
GetServerInitialMetadata() { GetServerInitialMetadata() const {
GPR_CODEGEN_ASSERT(initial_metadata_received_); GPR_CODEGEN_ASSERT(initial_metadata_received_);
return recv_initial_metadata_; return recv_initial_metadata_;
} }
@ -205,7 +205,7 @@ class ClientContext {
/// ///
/// \return A multimap of metadata trailing key-value pairs from the server. /// \return A multimap of metadata trailing key-value pairs from the server.
const std::multimap<grpc::string_ref, grpc::string_ref>& const std::multimap<grpc::string_ref, grpc::string_ref>&
GetServerTrailingMetadata() { GetServerTrailingMetadata() const {
// TODO(yangg) check finished // TODO(yangg) check finished
return trailing_metadata_; return trailing_metadata_;
} }
@ -230,13 +230,13 @@ class ClientContext {
#ifndef GRPC_CXX0X_NO_CHRONO #ifndef GRPC_CXX0X_NO_CHRONO
/// Return the deadline for the client call. /// Return the deadline for the client call.
std::chrono::system_clock::time_point deadline() { std::chrono::system_clock::time_point deadline() const {
return Timespec2Timepoint(deadline_); return Timespec2Timepoint(deadline_);
} }
#endif // !GRPC_CXX0X_NO_CHRONO #endif // !GRPC_CXX0X_NO_CHRONO
/// Return a \a gpr_timespec representation of the client call's deadline. /// Return a \a gpr_timespec representation of the client call's deadline.
gpr_timespec raw_deadline() { return deadline_; } gpr_timespec raw_deadline() const { return deadline_; }
/// Set the per call authority header (see /// Set the per call authority header (see
/// https://tools.ietf.org/html/rfc7540#section-8.1.2.3). /// https://tools.ietf.org/html/rfc7540#section-8.1.2.3).
@ -337,7 +337,7 @@ class ClientContext {
const InputMessage& request, const InputMessage& request,
OutputMessage* result); OutputMessage* result);
grpc_call* call() { return call_; } grpc_call* call() const { return call_; }
void set_call(grpc_call* call, const std::shared_ptr<Channel>& channel); void set_call(grpc_call* call, const std::shared_ptr<Channel>& channel);
uint32_t initial_metadata_flags() const { uint32_t initial_metadata_flags() const {

@ -31,8 +31,19 @@
* *
*/ */
/// A completion queue implements a concurrent producer-consumer queue, with two /// A completion queue implements a concurrent producer-consumer queue, with
/// main methods, \a Next and \a AsyncNext. /// two main API-exposed methods: \a Next and \a AsyncNext. These
/// methods are the essential component of the gRPC C++ asynchronous API.
/// There is also a \a Shutdown method to indicate that a given completion queue
/// will no longer have regular events. This must be called before the
/// completion queue is destroyed.
/// All completion queue APIs are thread-safe and may be used concurrently with
/// any other completion queue API invocation; it is acceptable to have
/// multiple threads calling \a Next or \a AsyncNext on the same or different
/// completion queues, or to call these methods concurrently with a \a Shutdown
/// elsewhere.
/// \remark{All other API calls on completion queue should be completed before
/// a completion queue destructor is called.}
#ifndef GRPCXX_IMPL_CODEGEN_COMPLETION_QUEUE_H #ifndef GRPCXX_IMPL_CODEGEN_COMPLETION_QUEUE_H
#define GRPCXX_IMPL_CODEGEN_COMPLETION_QUEUE_H #define GRPCXX_IMPL_CODEGEN_COMPLETION_QUEUE_H

@ -54,6 +54,7 @@
// nullptr was added in gcc 4.6 // nullptr was added in gcc 4.6
#if (__GNUC__ * 100 + __GNUC_MINOR__ < 406) #if (__GNUC__ * 100 + __GNUC_MINOR__ < 406)
#define GRPC_CXX0X_NO_NULLPTR 1 #define GRPC_CXX0X_NO_NULLPTR 1
#define GRPC_CXX0X_LIMITED_TOSTRING 1
#endif #endif
// final and override were added in gcc 4.7 // final and override were added in gcc 4.7
#if (__GNUC__ * 100 + __GNUC_MINOR__ < 407) #if (__GNUC__ * 100 + __GNUC_MINOR__ < 407)
@ -78,6 +79,7 @@
#endif #endif
#ifdef GRPC_CXX0X_NO_NULLPTR #ifdef GRPC_CXX0X_NO_NULLPTR
#include <functional>
#include <memory> #include <memory>
namespace grpc { namespace grpc {
const class { const class {
@ -95,6 +97,10 @@ const class {
return std::shared_ptr<T>(static_cast<T *>(0)); return std::shared_ptr<T>(static_cast<T *>(0));
} }
operator bool() const { return false; } operator bool() const { return false; }
template <class F>
operator std::function<F>() const {
return std::function<F>();
}
private: private:
void operator&() const = delete; void operator&() const = delete;
@ -111,6 +117,17 @@ namespace grpc {
typedef GRPC_CUSTOM_STRING string; typedef GRPC_CUSTOM_STRING string;
#ifdef GRPC_CXX0X_LIMITED_TOSTRING
inline grpc::string to_string(const int x) {
return std::to_string(static_cast<const long long int>(x));
}
inline grpc::string to_string(const unsigned int x) {
return std::to_string(static_cast<const long long unsigned int>(x));
}
#else
using std::to_string;
#endif
} // namespace grpc } // namespace grpc
#endif // GRPCXX_IMPL_CODEGEN_CONFIG_H #endif // GRPCXX_IMPL_CODEGEN_CONFIG_H

@ -42,42 +42,44 @@ namespace grpc {
/// Implementation of the core codegen interface. /// Implementation of the core codegen interface.
class CoreCodegen : public CoreCodegenInterface { class CoreCodegen : public CoreCodegenInterface {
private: private:
grpc_completion_queue* grpc_completion_queue_create(void* reserved) override; grpc_completion_queue* grpc_completion_queue_create(void* reserved)
void grpc_completion_queue_destroy(grpc_completion_queue* cq) override; GRPC_OVERRIDE;
void grpc_completion_queue_destroy(grpc_completion_queue* cq) GRPC_OVERRIDE;
grpc_event grpc_completion_queue_pluck(grpc_completion_queue* cq, void* tag, grpc_event grpc_completion_queue_pluck(grpc_completion_queue* cq, void* tag,
gpr_timespec deadline, gpr_timespec deadline,
void* reserved) override; void* reserved) GRPC_OVERRIDE;
void* gpr_malloc(size_t size) override; void* gpr_malloc(size_t size) GRPC_OVERRIDE;
void gpr_free(void* p) override; void gpr_free(void* p) GRPC_OVERRIDE;
void grpc_byte_buffer_destroy(grpc_byte_buffer* bb) override; void grpc_byte_buffer_destroy(grpc_byte_buffer* bb) GRPC_OVERRIDE;
void grpc_byte_buffer_reader_init(grpc_byte_buffer_reader* reader, int grpc_byte_buffer_reader_init(grpc_byte_buffer_reader* reader,
grpc_byte_buffer* buffer) override; grpc_byte_buffer* buffer) GRPC_OVERRIDE;
void grpc_byte_buffer_reader_destroy( void grpc_byte_buffer_reader_destroy(grpc_byte_buffer_reader* reader)
grpc_byte_buffer_reader* reader) override; GRPC_OVERRIDE;
int grpc_byte_buffer_reader_next(grpc_byte_buffer_reader* reader, int grpc_byte_buffer_reader_next(grpc_byte_buffer_reader* reader,
gpr_slice* slice) override; gpr_slice* slice) GRPC_OVERRIDE;
grpc_byte_buffer* grpc_raw_byte_buffer_create(gpr_slice* slice, grpc_byte_buffer* grpc_raw_byte_buffer_create(gpr_slice* slice,
size_t nslices) override; size_t nslices) GRPC_OVERRIDE;
gpr_slice gpr_slice_malloc(size_t length) override; gpr_slice gpr_slice_malloc(size_t length) GRPC_OVERRIDE;
void gpr_slice_unref(gpr_slice slice) override; void gpr_slice_unref(gpr_slice slice) GRPC_OVERRIDE;
gpr_slice gpr_slice_split_tail(gpr_slice* s, size_t split) override; gpr_slice gpr_slice_split_tail(gpr_slice* s, size_t split) GRPC_OVERRIDE;
void gpr_slice_buffer_add(gpr_slice_buffer* sb, gpr_slice slice) override; void gpr_slice_buffer_add(gpr_slice_buffer* sb,
void gpr_slice_buffer_pop(gpr_slice_buffer* sb) override; gpr_slice slice) GRPC_OVERRIDE;
void gpr_slice_buffer_pop(gpr_slice_buffer* sb) GRPC_OVERRIDE;
void grpc_metadata_array_init(grpc_metadata_array* array) override; void grpc_metadata_array_init(grpc_metadata_array* array) GRPC_OVERRIDE;
void grpc_metadata_array_destroy(grpc_metadata_array* array) override; void grpc_metadata_array_destroy(grpc_metadata_array* array) GRPC_OVERRIDE;
gpr_timespec gpr_inf_future(gpr_clock_type type) override; gpr_timespec gpr_inf_future(gpr_clock_type type) GRPC_OVERRIDE;
virtual const Status& ok() override; virtual const Status& ok() GRPC_OVERRIDE;
virtual const Status& cancelled() override; virtual const Status& cancelled() GRPC_OVERRIDE;
void assert_fail(const char* failed_assertion) override; void assert_fail(const char* failed_assertion) GRPC_OVERRIDE;
}; };
} // namespace grpc } // namespace grpc

@ -65,8 +65,9 @@ class CoreCodegenInterface {
virtual void grpc_byte_buffer_destroy(grpc_byte_buffer* bb) = 0; virtual void grpc_byte_buffer_destroy(grpc_byte_buffer* bb) = 0;
virtual void grpc_byte_buffer_reader_init(grpc_byte_buffer_reader* reader, virtual int grpc_byte_buffer_reader_init(grpc_byte_buffer_reader* reader,
grpc_byte_buffer* buffer) = 0; grpc_byte_buffer* buffer)
GRPC_MUST_USE_RESULT = 0;
virtual void grpc_byte_buffer_reader_destroy( virtual void grpc_byte_buffer_reader_destroy(
grpc_byte_buffer_reader* reader) = 0; grpc_byte_buffer_reader* reader) = 0;
virtual int grpc_byte_buffer_reader_next(grpc_byte_buffer_reader* reader, virtual int grpc_byte_buffer_reader_next(grpc_byte_buffer_reader* reader,

@ -1,152 +0,0 @@
/*
*
* Copyright 2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef GRPCXX_IMPL_CODEGEN_IMPL_STATUS_CODE_ENUM_H
#define GRPCXX_IMPL_CODEGEN_IMPL_STATUS_CODE_ENUM_H
namespace grpc {
enum StatusCode {
/// Not an error; returned on success.
OK = 0,
/// The operation was cancelled (typically by the caller).
CANCELLED = 1,
/// Unknown error. An example of where this error may be returned is if a
/// Status value received from another address space belongs to an error-space
/// that is not known in this address space. Also errors raised by APIs that
/// do not return enough error information may be converted to this error.
UNKNOWN = 2,
/// Client specified an invalid argument. Note that this differs from
/// FAILED_PRECONDITION. INVALID_ARGUMENT indicates arguments that are
/// problematic regardless of the state of the system (e.g., a malformed file
/// name).
INVALID_ARGUMENT = 3,
/// Deadline expired before operation could complete. For operations that
/// change the state of the system, this error may be returned even if the
/// operation has completed successfully. For example, a successful response
/// from a server could have been delayed long enough for the deadline to
/// expire.
DEADLINE_EXCEEDED = 4,
/// Some requested entity (e.g., file or directory) was not found.
NOT_FOUND = 5,
/// Some entity that we attempted to create (e.g., file or directory) already
/// exists.
ALREADY_EXISTS = 6,
/// The caller does not have permission to execute the specified operation.
/// PERMISSION_DENIED must not be used for rejections caused by exhausting
/// some resource (use RESOURCE_EXHAUSTED instead for those errors).
/// PERMISSION_DENIED must not be used if the caller can not be identified
/// (use UNAUTHENTICATED instead for those errors).
PERMISSION_DENIED = 7,
/// The request does not have valid authentication credentials for the
/// operation.
UNAUTHENTICATED = 16,
/// Some resource has been exhausted, perhaps a per-user quota, or perhaps the
/// entire file system is out of space.
RESOURCE_EXHAUSTED = 8,
/// Operation was rejected because the system is not in a state required for
/// the operation's execution. For example, directory to be deleted may be
/// non-empty, an rmdir operation is applied to a non-directory, etc.
///
/// A litmus test that may help a service implementor in deciding
/// between FAILED_PRECONDITION, ABORTED, and UNAVAILABLE:
/// (a) Use UNAVAILABLE if the client can retry just the failing call.
/// (b) Use ABORTED if the client should retry at a higher-level
/// (e.g., restarting a read-modify-write sequence).
/// (c) Use FAILED_PRECONDITION if the client should not retry until
/// the system state has been explicitly fixed. E.g., if an "rmdir"
/// fails because the directory is non-empty, FAILED_PRECONDITION
/// should be returned since the client should not retry unless
/// they have first fixed up the directory by deleting files from it.
/// (d) Use FAILED_PRECONDITION if the client performs conditional
/// REST Get/Update/Delete on a resource and the resource on the
/// server does not match the condition. E.g., conflicting
/// read-modify-write on the same resource.
FAILED_PRECONDITION = 9,
/// The operation was aborted, typically due to a concurrency issue like
/// sequencer check failures, transaction aborts, etc.
///
/// See litmus test above for deciding between FAILED_PRECONDITION, ABORTED,
/// and UNAVAILABLE.
ABORTED = 10,
/// Operation was attempted past the valid range. E.g., seeking or reading
/// past end of file.
///
/// Unlike INVALID_ARGUMENT, this error indicates a problem that may be fixed
/// if the system state changes. For example, a 32-bit file system will
/// generate INVALID_ARGUMENT if asked to read at an offset that is not in the
/// range [0,2^32-1], but it will generate OUT_OF_RANGE if asked to read from
/// an offset past the current file size.
///
/// There is a fair bit of overlap between FAILED_PRECONDITION and
/// OUT_OF_RANGE. We recommend using OUT_OF_RANGE (the more specific error)
/// when it applies so that callers who are iterating through a space can
/// easily look for an OUT_OF_RANGE error to detect when they are done.
OUT_OF_RANGE = 11,
/// Operation is not implemented or not supported/enabled in this service.
UNIMPLEMENTED = 12,
/// Internal errors. Means some invariants expected by underlying System has
/// been broken. If you see one of these errors, Something is very broken.
INTERNAL = 13,
/// The service is currently unavailable. This is a most likely a transient
/// condition and may be corrected by retrying with a backoff.
///
/// See litmus test above for deciding between FAILED_PRECONDITION, ABORTED,
/// and UNAVAILABLE.
UNAVAILABLE = 14,
/// Unrecoverable data loss or corruption.
DATA_LOSS = 15,
/// Force users to include a default branch:
DO_NOT_USE = -1
};
} // namespace grpc
#endif // GRPCXX_IMPL_CODEGEN_IMPL_STATUS_CODE_ENUM_H

@ -111,14 +111,21 @@ class GrpcBufferReader GRPC_FINAL
: public ::grpc::protobuf::io::ZeroCopyInputStream { : public ::grpc::protobuf::io::ZeroCopyInputStream {
public: public:
explicit GrpcBufferReader(grpc_byte_buffer* buffer) explicit GrpcBufferReader(grpc_byte_buffer* buffer)
: byte_count_(0), backup_count_(0) { : byte_count_(0), backup_count_(0), status_() {
g_core_codegen_interface->grpc_byte_buffer_reader_init(&reader_, buffer); if (!g_core_codegen_interface->grpc_byte_buffer_reader_init(&reader_,
buffer)) {
status_ = Status(StatusCode::INTERNAL,
"Couldn't initialize byte buffer reader");
}
} }
~GrpcBufferReader() GRPC_OVERRIDE { ~GrpcBufferReader() GRPC_OVERRIDE {
g_core_codegen_interface->grpc_byte_buffer_reader_destroy(&reader_); g_core_codegen_interface->grpc_byte_buffer_reader_destroy(&reader_);
} }
bool Next(const void** data, int* size) GRPC_OVERRIDE { bool Next(const void** data, int* size) GRPC_OVERRIDE {
if (!status_.ok()) {
return false;
}
if (backup_count_ > 0) { if (backup_count_ > 0) {
*data = GPR_SLICE_START_PTR(slice_) + GPR_SLICE_LENGTH(slice_) - *data = GPR_SLICE_START_PTR(slice_) + GPR_SLICE_LENGTH(slice_) -
backup_count_; backup_count_;
@ -139,6 +146,8 @@ class GrpcBufferReader GRPC_FINAL
return true; return true;
} }
Status status() const { return status_; }
void BackUp(int count) GRPC_OVERRIDE { backup_count_ = count; } void BackUp(int count) GRPC_OVERRIDE { backup_count_ = count; }
bool Skip(int count) GRPC_OVERRIDE { bool Skip(int count) GRPC_OVERRIDE {
@ -165,6 +174,7 @@ class GrpcBufferReader GRPC_FINAL
int64_t backup_count_; int64_t backup_count_;
grpc_byte_buffer_reader reader_; grpc_byte_buffer_reader reader_;
gpr_slice slice_; gpr_slice slice_;
Status status_;
}; };
} // namespace internal } // namespace internal
@ -202,6 +212,9 @@ class SerializationTraits<T, typename std::enable_if<std::is_base_of<
Status result = g_core_codegen_interface->ok(); Status result = g_core_codegen_interface->ok();
{ {
internal::GrpcBufferReader reader(buffer); internal::GrpcBufferReader reader(buffer);
if (!reader.status().ok()) {
return reader.status();
}
::grpc::protobuf::io::CodedInputStream decoder(&reader); ::grpc::protobuf::io::CodedInputStream decoder(&reader);
if (max_message_size > 0) { if (max_message_size > 0) {
decoder.SetTotalBytesLimit(max_message_size, max_message_size); decoder.SetTotalBytesLimit(max_message_size, max_message_size);

@ -94,12 +94,12 @@ class ServerContext {
~ServerContext(); ~ServerContext();
#ifndef GRPC_CXX0X_NO_CHRONO #ifndef GRPC_CXX0X_NO_CHRONO
std::chrono::system_clock::time_point deadline() { std::chrono::system_clock::time_point deadline() const {
return Timespec2Timepoint(deadline_); return Timespec2Timepoint(deadline_);
} }
#endif // !GRPC_CXX0X_NO_CHRONO #endif // !GRPC_CXX0X_NO_CHRONO
gpr_timespec raw_deadline() { return deadline_; } gpr_timespec raw_deadline() const { return deadline_; }
void AddInitialMetadata(const grpc::string& key, const grpc::string& value); void AddInitialMetadata(const grpc::string& key, const grpc::string& value);
void AddTrailingMetadata(const grpc::string& key, const grpc::string& value); void AddTrailingMetadata(const grpc::string& key, const grpc::string& value);
@ -122,7 +122,8 @@ class ServerContext {
// was called. // was called.
void TryCancel() const; void TryCancel() const;
const std::multimap<grpc::string_ref, grpc::string_ref>& client_metadata() { const std::multimap<grpc::string_ref, grpc::string_ref>& client_metadata()
const {
return client_metadata_; return client_metadata_;
} }

@ -71,6 +71,9 @@ class ReaderInterface {
virtual ~ReaderInterface() {} virtual ~ReaderInterface() {}
/// Blocking read a message and parse to \a msg. Returns \a true on success. /// Blocking read a message and parse to \a msg. Returns \a true on success.
/// This is thread-safe with respect to \a Write or \WritesDone methods on
/// the same stream. It should not be called concurrently with another \a
/// Read on the same stream as the order of delivery will not be defined.
/// ///
/// \param[out] msg The read message. /// \param[out] msg The read message.
/// ///
@ -87,6 +90,7 @@ class WriterInterface {
virtual ~WriterInterface() {} virtual ~WriterInterface() {}
/// Blocking write \a msg to the stream with options. /// Blocking write \a msg to the stream with options.
/// This is thread-safe with respect to \a Read
/// ///
/// \param msg The message to be written to the stream. /// \param msg The message to be written to the stream.
/// \param options Options affecting the write operation. /// \param options Options affecting the write operation.
@ -95,6 +99,7 @@ class WriterInterface {
virtual bool Write(const W& msg, const WriteOptions& options) = 0; virtual bool Write(const W& msg, const WriteOptions& options) = 0;
/// Blocking write \a msg to the stream with default options. /// Blocking write \a msg to the stream with default options.
/// This is thread-safe with respect to \a Read
/// ///
/// \param msg The message to be written to the stream. /// \param msg The message to be written to the stream.
/// ///
@ -174,7 +179,8 @@ class ClientWriterInterface : public ClientStreamingInterface,
public WriterInterface<W> { public WriterInterface<W> {
public: public:
/// Half close writing from the client. /// Half close writing from the client.
/// Block until writes are completed. /// Block until currently-pending writes are completed.
/// Thread safe with respect to \a Read operations only
/// ///
/// \return Whether the writes were successful. /// \return Whether the writes were successful.
virtual bool WritesDone() = 0; virtual bool WritesDone() = 0;
@ -257,7 +263,8 @@ class ClientReaderWriterInterface : public ClientStreamingInterface,
/// the metadata will be available in ClientContext after the first read. /// the metadata will be available in ClientContext after the first read.
virtual void WaitForInitialMetadata() = 0; virtual void WaitForInitialMetadata() = 0;
/// Block until writes are completed. /// Block until currently-pending writes are completed.
/// Thread-safe with respect to \a Read
/// ///
/// \return Whether the writes were successful. /// \return Whether the writes were successful.
virtual bool WritesDone() = 0; virtual bool WritesDone() = 0;

@ -50,8 +50,7 @@ class ServerBuilderOption {
virtual void UpdateArguments(ChannelArguments* args) = 0; virtual void UpdateArguments(ChannelArguments* args) = 0;
/// Alter the ServerBuilderPlugin map that will be added into ServerBuilder. /// Alter the ServerBuilderPlugin map that will be added into ServerBuilder.
virtual void UpdatePlugins( virtual void UpdatePlugins(
std::map<grpc::string, std::unique_ptr<ServerBuilderPlugin> >* std::vector<std::unique_ptr<ServerBuilderPlugin>>* plugins) = 0;
plugins) = 0;
}; };
} // namespace grpc } // namespace grpc

@ -174,7 +174,7 @@ class ServerBuilder {
std::vector<Port> ports_; std::vector<Port> ports_;
std::vector<ServerCompletionQueue*> cqs_; std::vector<ServerCompletionQueue*> cqs_;
std::shared_ptr<ServerCredentials> creds_; std::shared_ptr<ServerCredentials> creds_;
std::map<grpc::string, std::unique_ptr<ServerBuilderPlugin>> plugins_; std::vector<std::unique_ptr<ServerBuilderPlugin>> plugins_;
AsyncGenericService* generic_service_; AsyncGenericService* generic_service_;
struct { struct {
bool is_set; bool is_set;

@ -64,7 +64,7 @@ class ByteBuffer GRPC_FINAL {
ByteBuffer& operator=(const ByteBuffer&); ByteBuffer& operator=(const ByteBuffer&);
/// Dump (read) the buffer contents into \a slices. /// Dump (read) the buffer contents into \a slices.
void Dump(std::vector<Slice>* slices) const; Status Dump(std::vector<Slice>* slices) const;
/// Remove all data. /// Remove all data.
void Clear(); void Clear();

@ -63,6 +63,14 @@ GRPCAPI void grpc_server_add_insecure_channel_from_fd(grpc_server *server,
grpc_completion_queue *cq, grpc_completion_queue *cq,
int fd); int fd);
/** GRPC Core POSIX library may internally use signals to optimize some work.
The library uses (SIGRTMIN + 2) signal by default. Use this API to instruct
the library to use a different signal i.e 'signum' instead.
Note:
- To prevent GRPC library from using any signals, pass a 'signum' of -1
- This API is optional but if called, it MUST be called before grpc_init() */
GRPCAPI void grpc_use_signal(int signum);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

@ -1,6 +1,6 @@
/* /*
* *
* Copyright 2015, Google Inc. * Copyright 2015-2016, Google Inc.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -93,8 +93,9 @@ GRPCAPI void grpc_byte_buffer_destroy(grpc_byte_buffer *byte_buffer);
struct grpc_byte_buffer_reader; struct grpc_byte_buffer_reader;
typedef struct grpc_byte_buffer_reader grpc_byte_buffer_reader; typedef struct grpc_byte_buffer_reader grpc_byte_buffer_reader;
/** Initialize \a reader to read over \a buffer */ /** Initialize \a reader to read over \a buffer.
GRPCAPI void grpc_byte_buffer_reader_init(grpc_byte_buffer_reader *reader, * Returns 1 upon success, 0 otherwise. */
GRPCAPI int grpc_byte_buffer_reader_init(grpc_byte_buffer_reader *reader,
grpc_byte_buffer *buffer); grpc_byte_buffer *buffer);
/** Cleanup and destroy \a reader */ /** Cleanup and destroy \a reader */

@ -156,6 +156,8 @@ typedef struct {
#define GRPC_SSL_TARGET_NAME_OVERRIDE_ARG "grpc.ssl_target_name_override" #define GRPC_SSL_TARGET_NAME_OVERRIDE_ARG "grpc.ssl_target_name_override"
/* Maximum metadata size */ /* Maximum metadata size */
#define GRPC_ARG_MAX_METADATA_SIZE "grpc.max_metadata_size" #define GRPC_ARG_MAX_METADATA_SIZE "grpc.max_metadata_size"
/** If non-zero, allow the use of SO_REUSEPORT if it's available (default 1) */
#define GRPC_ARG_ALLOW_REUSEPORT "grpc.so_reuseport"
/** Result of a grpc call. If the caller satisfies the prerequisites of a /** Result of a grpc call. If the caller satisfies the prerequisites of a
particular operation, the grpc_call_error returned will be GRPC_CALL_OK. particular operation, the grpc_call_error returned will be GRPC_CALL_OK.

@ -207,6 +207,7 @@
#ifdef __GLIBC_PREREQ #ifdef __GLIBC_PREREQ
#if __GLIBC_PREREQ(2, 9) #if __GLIBC_PREREQ(2, 9)
#define GPR_LINUX_EVENTFD 1 #define GPR_LINUX_EVENTFD 1
#define GPR_LINUX_EPOLL 1
#endif #endif
#if __GLIBC_PREREQ(2, 10) #if __GLIBC_PREREQ(2, 10)
#define GPR_LINUX_SOCKETUTILS 1 #define GPR_LINUX_SOCKETUTILS 1

@ -88,5 +88,10 @@ GPRAPI gpr_avl gpr_avl_remove(gpr_avl avl, void *key);
does not mutate avl. does not mutate avl.
returns NULL if key is not found. */ returns NULL if key is not found. */
GPRAPI void *gpr_avl_get(gpr_avl avl, void *key); GPRAPI void *gpr_avl_get(gpr_avl avl, void *key);
/** Return 1 if avl contains key, 0 otherwise; if it has the key, sets *value to
its value*/
GPRAPI int gpr_avl_maybe_get(gpr_avl avl, void *key, void **value);
/** Return 1 if avl is empty, 0 otherwise */
GPRAPI int gpr_avl_is_empty(gpr_avl avl);
#endif /* GRPC_SUPPORT_AVL_H */ #endif /* GRPC_SUPPORT_AVL_H */

@ -1,6 +1,6 @@
{ {
"name": "grpc", "name": "grpc",
"version": "0.15.0-dev", "version": "0.16.0-dev",
"author": "Google Inc.", "author": "Google Inc.",
"description": "gRPC Library for Node", "description": "gRPC Library for Node",
"homepage": "http://www.grpc.io/", "homepage": "http://www.grpc.io/",

@ -10,11 +10,11 @@
<email>grpc-packages@google.com</email> <email>grpc-packages@google.com</email>
<active>yes</active> <active>yes</active>
</lead> </lead>
<date>2016-05-19</date> <date>2016-06-30</date>
<time>16:06:07</time> <time>16:06:07</time>
<version> <version>
<release>0.15.0</release> <release>0.16.0</release>
<api>0.15.0</api> <api>0.16.0</api>
</version> </version>
<stability> <stability>
<release>beta</release> <release>beta</release>
@ -22,7 +22,7 @@
</stability> </stability>
<license>BSD</license> <license>BSD</license>
<notes> <notes>
- TBD - Fix shutdown hang problem #4017
</notes> </notes>
<contents> <contents>
<dir baseinstalldir="/" name="/"> <dir baseinstalldir="/" name="/">
@ -96,7 +96,6 @@
<file baseinstalldir="/" name="src/core/lib/support/backoff.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/backoff.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/block_annotate.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/block_annotate.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/env.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/env.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/load_file.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/murmur_hash.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/murmur_hash.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/stack_lockfree.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/stack_lockfree.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/string.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/string.h" role="src" />
@ -119,7 +118,6 @@
<file baseinstalldir="/" name="src/core/lib/support/env_windows.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/env_windows.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/histogram.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/histogram.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/host_port.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/host_port.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/load_file.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/log.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/log.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/log_android.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/log_android.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/log_linux.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/log_linux.c" role="src" />
@ -197,6 +195,8 @@
<file baseinstalldir="/" name="src/core/lib/iomgr/closure.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/closure.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/endpoint.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/endpoint.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/endpoint_pair.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/endpoint_pair.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/error.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/ev_epoll_linux.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/ev_poll_and_epoll_posix.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/ev_poll_and_epoll_posix.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/ev_poll_posix.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/ev_poll_posix.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/ev_posix.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/ev_posix.h" role="src" />
@ -206,6 +206,8 @@
<file baseinstalldir="/" name="src/core/lib/iomgr/iomgr.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/iomgr.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/iomgr_internal.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/iomgr_internal.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/iomgr_posix.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/iomgr_posix.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/load_file.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/network_status_tracker.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/polling_entity.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/polling_entity.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/pollset.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/pollset.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/pollset_set.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/pollset_set.h" role="src" />
@ -247,7 +249,6 @@
<file baseinstalldir="/" name="src/core/lib/surface/init.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/surface/init.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/surface/lame_client.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/surface/lame_client.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/surface/server.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/surface/server.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/surface/surface_trace.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/transport/byte_stream.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/transport/byte_stream.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/transport/connectivity_state.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/transport/connectivity_state.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/transport/metadata.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/transport/metadata.h" role="src" />
@ -293,6 +294,7 @@
<file baseinstalldir="/" name="src/core/lib/security/transport/handshake.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/security/transport/handshake.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/security/transport/secure_endpoint.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/security/transport/secure_endpoint.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/security/transport/security_connector.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/security/transport/security_connector.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/security/transport/tsi_error.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/security/util/b64.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/security/util/b64.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/security/util/json_util.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/security/util/json_util.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/tsi/fake_transport_security.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/tsi/fake_transport_security.h" role="src" />
@ -349,6 +351,8 @@
<file baseinstalldir="/" name="src/core/lib/iomgr/endpoint.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/endpoint.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/endpoint_pair_posix.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/endpoint_pair_posix.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/endpoint_pair_windows.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/endpoint_pair_windows.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/error.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/ev_epoll_linux.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/ev_poll_and_epoll_posix.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/ev_poll_and_epoll_posix.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/ev_poll_posix.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/ev_poll_posix.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/ev_posix.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/ev_posix.c" role="src" />
@ -358,6 +362,8 @@
<file baseinstalldir="/" name="src/core/lib/iomgr/iomgr.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/iomgr.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/iomgr_posix.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/iomgr_posix.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/iomgr_windows.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/iomgr_windows.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/load_file.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/network_status_tracker.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/polling_entity.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/polling_entity.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/pollset_set_windows.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/pollset_set_windows.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/pollset_windows.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/pollset_windows.c" role="src" />
@ -460,6 +466,7 @@
<file baseinstalldir="/" name="src/core/lib/security/transport/secure_endpoint.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/security/transport/secure_endpoint.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/security/transport/security_connector.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/security/transport/security_connector.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/security/transport/server_auth_filter.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/security/transport/server_auth_filter.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/security/transport/tsi_error.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/security/util/b64.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/security/util/b64.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/security/util/json_util.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/security/util/json_util.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/surface/init_secure.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/surface/init_secure.c" role="src" />
@ -1027,6 +1034,7 @@ Update to wrap gRPC C Core version 0.10.0
<license>BSD</license> <license>BSD</license>
<notes> <notes>
- Simplify gRPC PHP installation #4517 - Simplify gRPC PHP installation #4517
- Wrap gRPC core library version 0.13
</notes> </notes>
</release> </release>
<release> <release>
@ -1056,13 +1064,14 @@ Update to wrap gRPC C Core version 0.10.0
<date>2016-04-19</date> <date>2016-04-19</date>
<license>BSD</license> <license>BSD</license>
<notes> <notes>
- wrap grpc C core version 0.14.0
- destroy grpc_byte_buffer after startBatch #6096 - destroy grpc_byte_buffer after startBatch #6096
</notes> </notes>
</release> </release>
<release> <release>
<version> <version>
<release>0.14.2</release> <release>0.15.0</release>
<api>0.14.2</api> <api>0.15.0</api>
</version> </version>
<stability> <stability>
<release>beta</release> <release>beta</release>
@ -1072,6 +1081,22 @@ Update to wrap gRPC C Core version 0.10.0
<license>BSD</license> <license>BSD</license>
<notes> <notes>
- Updated functions with TSRM macros for ZTS support #6607 - Updated functions with TSRM macros for ZTS support #6607
- Load default roots.pem via grpc_set_ssl_roots_override_callback #6848
</notes>
</release>
<release>
<version>
<release>0.15.1</release>
<api>0.15.1</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<date>2016-06-30</date>
<license>BSD</license>
<notes>
- Fix shutdown hang problem #4017
</notes> </notes>
</release> </release>
</changelog> </changelog>

@ -31,6 +31,7 @@
import os import os
import os.path import os.path
import shlex
import shutil import shutil
import sys import sys
import sysconfig import sysconfig
@ -71,10 +72,6 @@ BUILD_WITH_CYTHON = os.environ.get('GRPC_PYTHON_BUILD_WITH_CYTHON', False)
ENABLE_CYTHON_TRACING = os.environ.get( ENABLE_CYTHON_TRACING = os.environ.get(
'GRPC_PYTHON_ENABLE_CYTHON_TRACING', False) 'GRPC_PYTHON_ENABLE_CYTHON_TRACING', False)
# Environment variable to determine whether or not to include the test files in
# the installation.
INSTALL_TESTS = os.environ.get('GRPC_PYTHON_INSTALL_TESTS', False)
CYTHON_EXTENSION_PACKAGE_NAMES = () CYTHON_EXTENSION_PACKAGE_NAMES = ()
CYTHON_EXTENSION_MODULE_NAMES = ('grpc._cython.cygrpc',) CYTHON_EXTENSION_MODULE_NAMES = ('grpc._cython.cygrpc',)
@ -99,8 +96,9 @@ if not "win32" in sys.platform:
DEFINE_MACROS = (('OPENSSL_NO_ASM', 1), ('_WIN32_WINNT', 0x600), ('GPR_BACKWARDS_COMPATIBILITY_MODE', 1),) DEFINE_MACROS = (('OPENSSL_NO_ASM', 1), ('_WIN32_WINNT', 0x600), ('GPR_BACKWARDS_COMPATIBILITY_MODE', 1),)
LDFLAGS = () LDFLAGS = shlex.split(os.environ.get('GRPC_PYTHON_LDFLAGS', ''))
CFLAGS = () CFLAGS = shlex.split(os.environ.get('GRPC_PYTHON_CFLAGS', ''))
if "linux" in sys.platform: if "linux" in sys.platform:
LDFLAGS += ('-Wl,-wrap,memcpy',) LDFLAGS += ('-Wl,-wrap,memcpy',)
if "linux" in sys.platform or "darwin" in sys.platform: if "linux" in sys.platform or "darwin" in sys.platform:
@ -165,7 +163,7 @@ PACKAGE_DIRECTORIES = {
} }
INSTALL_REQUIRES = ( INSTALL_REQUIRES = (
'six>=1.10', 'six>=1.5.2',
'enum34>=1.0.4', 'enum34>=1.0.4',
'futures>=2.2.0', 'futures>=2.2.0',
# TODO(atash): eventually split the grpcio package into a metapackage # TODO(atash): eventually split the grpcio package into a metapackage
@ -173,20 +171,18 @@ INSTALL_REQUIRES = (
'protobuf>=3.0.0a3', 'protobuf>=3.0.0a3',
) )
SETUP_REQUIRES = ( SETUP_REQUIRES = INSTALL_REQUIRES + (
'sphinx>=1.3', 'sphinx>=1.3',
'sphinx_rtd_theme>=0.1.8' 'sphinx_rtd_theme>=0.1.8',
) + INSTALL_REQUIRES 'six>=1.10',
)
COMMAND_CLASS = { COMMAND_CLASS = {
'doc': commands.SphinxDocumentation, 'doc': commands.SphinxDocumentation,
'build_proto_modules': commands.BuildProtoModules,
'build_project_metadata': commands.BuildProjectMetadata, 'build_project_metadata': commands.BuildProjectMetadata,
'build_py': commands.BuildPy, 'build_py': commands.BuildPy,
'build_ext': commands.BuildExt, 'build_ext': commands.BuildExt,
'gather': commands.Gather, 'gather': commands.Gather,
'run_interop': commands.RunInterop,
'test_lite': commands.TestLite
} }
# Ensure that package data is copied over before any commands have been run: # Ensure that package data is copied over before any commands have been run:
@ -197,32 +193,6 @@ except OSError:
pass pass
shutil.copyfile('etc/roots.pem', os.path.join(credentials_dir, 'roots.pem')) shutil.copyfile('etc/roots.pem', os.path.join(credentials_dir, 'roots.pem'))
TEST_PACKAGE_DATA = {
'tests.interop': [
'credentials/ca.pem',
'credentials/server1.key',
'credentials/server1.pem',
],
'tests.protoc_plugin': [
'protoc_plugin_test.proto',
],
'tests.unit': [
'credentials/ca.pem',
'credentials/server1.key',
'credentials/server1.pem',
],
}
TESTS_REQUIRE = (
'oauth2client>=2.1.0',
'protobuf>=3.0.0a3',
'coverage>=4.0',
) + INSTALL_REQUIRES
TEST_SUITE = 'tests'
TEST_LOADER = 'tests:Loader'
TEST_RUNNER = 'tests:Runner'
PACKAGE_DATA = { PACKAGE_DATA = {
# Binaries that may or may not be present in the final installation, but are # Binaries that may or may not be present in the final installation, but are
# mentioned here for completeness. # mentioned here for completeness.
@ -232,12 +202,7 @@ PACKAGE_DATA = {
'_windows/grpc_c.64.python', '_windows/grpc_c.64.python',
], ],
} }
if INSTALL_TESTS:
PACKAGE_DATA = dict(PACKAGE_DATA, **TEST_PACKAGE_DATA)
PACKAGES = setuptools.find_packages(PYTHON_STEM) PACKAGES = setuptools.find_packages(PYTHON_STEM)
else:
PACKAGES = setuptools.find_packages(
PYTHON_STEM, exclude=['tests', 'tests.*'])
setuptools.setup( setuptools.setup(
name='grpcio', name='grpcio',
@ -246,13 +211,8 @@ setuptools.setup(
ext_modules=CYTHON_EXTENSION_MODULES, ext_modules=CYTHON_EXTENSION_MODULES,
packages=list(PACKAGES), packages=list(PACKAGES),
package_dir=PACKAGE_DIRECTORIES, package_dir=PACKAGE_DIRECTORIES,
namespace_packages=['grpc'],
package_data=PACKAGE_DATA, package_data=PACKAGE_DATA,
install_requires=INSTALL_REQUIRES, install_requires=INSTALL_REQUIRES,
setup_requires=SETUP_REQUIRES, setup_requires=SETUP_REQUIRES,
cmdclass=COMMAND_CLASS, cmdclass=COMMAND_CLASS,
tests_require=TESTS_REQUIRE,
test_suite=TEST_SUITE,
test_loader=TEST_LOADER,
test_runner=TEST_RUNNER,
) )

@ -73,9 +73,10 @@ void PrintIncludes(Printer *printer, const std::vector<grpc::string>& headers, c
vars["l"] = params.use_system_headers ? '<' : '"'; vars["l"] = params.use_system_headers ? '<' : '"';
vars["r"] = params.use_system_headers ? '>' : '"'; vars["r"] = params.use_system_headers ? '>' : '"';
if (!params.grpc_search_path.empty()) { auto& s = params.grpc_search_path;
vars["l"] += params.grpc_search_path; if (!s.empty()) {
if (params.grpc_search_path.back() != '/') { vars["l"] += s;
if (s[s.size()-1] != '/') {
vars["l"] += '/'; vars["l"] += '/';
} }
} }

@ -333,10 +333,16 @@ void GenerateClientStub(Printer* out, const ServiceDescriptor *service) {
out->Indent(); out->Indent();
// constructors // constructors
out->Print("/// <summary>Creates a new client for $servicename$</summary>\n"
"/// <param name=\"channel\">The channel to use to make remote calls.</param>\n",
"servicename", GetServiceClassName(service));
out->Print("public $name$(Channel channel) : base(channel)\n", out->Print("public $name$(Channel channel) : base(channel)\n",
"name", GetClientClassName(service)); "name", GetClientClassName(service));
out->Print("{\n"); out->Print("{\n");
out->Print("}\n"); out->Print("}\n");
out->Print("/// <summary>Creates a new client for $servicename$ that uses a custom <c>CallInvoker</c>.</summary>\n"
"/// <param name=\"callInvoker\">The callInvoker to use to make remote calls.</param>\n",
"servicename", GetServiceClassName(service));
out->Print("public $name$(CallInvoker callInvoker) : base(callInvoker)\n", out->Print("public $name$(CallInvoker callInvoker) : base(callInvoker)\n",
"name", GetClientClassName(service)); "name", GetClientClassName(service));
out->Print("{\n"); out->Print("{\n");
@ -347,8 +353,8 @@ void GenerateClientStub(Printer* out, const ServiceDescriptor *service) {
"name", GetClientClassName(service)); "name", GetClientClassName(service));
out->Print("{\n"); out->Print("{\n");
out->Print("}\n"); out->Print("}\n");
out->Print("///<summary>Protected constructor to allow creation of configured" out->Print("/// <summary>Protected constructor to allow creation of configured clients.</summary>\n"
" clients.</summary>\n"); "/// <param name=\"configuration\">The client configuration.</param>\n");
out->Print("protected $name$(ClientBaseConfiguration configuration)" out->Print("protected $name$(ClientBaseConfiguration configuration)"
" : base(configuration)\n", " : base(configuration)\n",
"name", GetClientClassName(service)); "name", GetClientClassName(service));
@ -485,20 +491,6 @@ void GenerateBindServiceMethod(Printer* out, const ServiceDescriptor *service) {
out->Print("\n"); out->Print("\n");
} }
void GenerateNewStubMethods(Printer* out, const ServiceDescriptor *service) {
out->Print("/// <summary>Creates a new client for $servicename$</summary>\n",
"servicename", GetServiceClassName(service));
out->Print("public static $classname$ NewClient(Channel channel)\n",
"classname", GetClientClassName(service));
out->Print("{\n");
out->Indent();
out->Print("return new $classname$(channel);\n", "classname",
GetClientClassName(service));
out->Outdent();
out->Print("}\n");
out->Print("\n");
}
void GenerateService(Printer* out, const ServiceDescriptor *service, void GenerateService(Printer* out, const ServiceDescriptor *service,
bool generate_client, bool generate_server, bool generate_client, bool generate_server,
bool internal_access) { bool internal_access) {
@ -524,7 +516,6 @@ void GenerateService(Printer* out, const ServiceDescriptor *service,
} }
if (generate_client) { if (generate_client) {
GenerateClientStub(out, service); GenerateClientStub(out, service);
GenerateNewStubMethods(out, service);
} }
if (generate_server) { if (generate_server) {
GenerateBindServiceMethod(out, service); GenerateBindServiceMethod(out, service);

@ -253,7 +253,8 @@ inline void GetComment(const grpc::protobuf::FileDescriptor *desc,
inline grpc::string GenerateCommentsWithPrefix( inline grpc::string GenerateCommentsWithPrefix(
const std::vector<grpc::string> &in, const grpc::string &prefix) { const std::vector<grpc::string> &in, const grpc::string &prefix) {
std::ostringstream oss; std::ostringstream oss;
for (const grpc::string &elem : in) { for (auto it = in.begin(); it != in.end(); it++) {
const grpc::string& elem = *it;
if (elem.empty()) { if (elem.empty()) {
oss << prefix << "\n"; oss << prefix << "\n";
} else if (elem[0] == ' ') { } else if (elem[0] == ' ') {

@ -74,8 +74,16 @@ grpc::string GetJSMessageFilename(const grpc::string& filename) {
// Given a filename like foo/bar/baz.proto, returns the root directory // Given a filename like foo/bar/baz.proto, returns the root directory
// path ../../ // path ../../
grpc::string GetRootPath(const grpc::string& filename) { grpc::string GetRootPath(const grpc::string& from_filename,
size_t slashes = std::count(filename.begin(), filename.end(), '/'); const grpc::string& to_filename) {
if (to_filename.find("google/protobuf") == 0) {
// Well-known types (.proto files in the google/protobuf directory) are
// assumed to come from the 'google-protobuf' npm package. We may want to
// generalize this exception later by letting others put generated code in
// their own npm packages.
return "google-protobuf/";
}
size_t slashes = std::count(from_filename.begin(), from_filename.end(), '/');
if (slashes == 0) { if (slashes == 0) {
return "./"; return "./";
} }
@ -90,7 +98,7 @@ grpc::string GetRootPath(const grpc::string& filename) {
// from_file, assuming that both paths are relative to the same directory // from_file, assuming that both paths are relative to the same directory
grpc::string GetRelativePath(const grpc::string& from_file, grpc::string GetRelativePath(const grpc::string& from_file,
const grpc::string& to_file) { const grpc::string& to_file) {
return GetRootPath(from_file) + to_file; return GetRootPath(from_file, to_file) + to_file;
} }
/* Finds all message types used in all services in the file, and returns them /* Finds all message types used in all services in the file, and returns them

@ -66,6 +66,9 @@ using std::vector;
namespace grpc_python_generator { namespace grpc_python_generator {
GeneratorConfiguration::GeneratorConfiguration()
: grpc_package_root("grpc"), beta_package_root("grpc.beta") {}
PythonGrpcGenerator::PythonGrpcGenerator(const GeneratorConfiguration& config) PythonGrpcGenerator::PythonGrpcGenerator(const GeneratorConfiguration& config)
: config_(config) {} : config_(config) {}

@ -43,6 +43,7 @@ namespace grpc_python_generator {
// Data pertaining to configuration of the generator with respect to anything // Data pertaining to configuration of the generator with respect to anything
// that may be used internally at Google. // that may be used internally at Google.
struct GeneratorConfiguration { struct GeneratorConfiguration {
GeneratorConfiguration();
grpc::string grpc_package_root; grpc::string grpc_package_root;
grpc::string beta_package_root; grpc::string beta_package_root;
}; };

@ -38,8 +38,6 @@
int main(int argc, char* argv[]) { int main(int argc, char* argv[]) {
grpc_python_generator::GeneratorConfiguration config; grpc_python_generator::GeneratorConfiguration config;
config.grpc_package_root = "grpc";
config.beta_package_root = "grpc.beta";
grpc_python_generator::PythonGrpcGenerator generator(config); grpc_python_generator::PythonGrpcGenerator generator(config);
return grpc::protobuf::compiler::PluginMain(argc, argv, &generator); return grpc::protobuf::compiler::PluginMain(argc, argv, &generator);
} }

@ -45,6 +45,7 @@
#include "src/core/ext/census/census_interface.h" #include "src/core/ext/census/census_interface.h"
#include "src/core/ext/census/census_rpc_stats.h" #include "src/core/ext/census/census_rpc_stats.h"
#include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/channel/channel_stack.h"
#include "src/core/lib/profiling/timers.h"
#include "src/core/lib/transport/static_metadata.h" #include "src/core/lib/transport/static_metadata.h"
typedef struct call_data { typedef struct call_data {
@ -91,14 +92,16 @@ static void client_start_transport_op(grpc_exec_ctx *exec_ctx,
} }
static void server_on_done_recv(grpc_exec_ctx *exec_ctx, void *ptr, static void server_on_done_recv(grpc_exec_ctx *exec_ctx, void *ptr,
bool success) { grpc_error *error) {
GPR_TIMER_BEGIN("census-server:server_on_done_recv", 0);
grpc_call_element *elem = ptr; grpc_call_element *elem = ptr;
call_data *calld = elem->call_data; call_data *calld = elem->call_data;
channel_data *chand = elem->channel_data; channel_data *chand = elem->channel_data;
if (success) { if (error == GRPC_ERROR_NONE) {
extract_and_annotate_method_tag(calld->recv_initial_metadata, calld, chand); extract_and_annotate_method_tag(calld->recv_initial_metadata, calld, chand);
} }
calld->on_done_recv->cb(exec_ctx, calld->on_done_recv->cb_arg, success); calld->on_done_recv->cb(exec_ctx, calld->on_done_recv->cb_arg, error);
GPR_TIMER_END("census-server:server_on_done_recv", 0);
} }
static void server_mutate_op(grpc_call_element *elem, static void server_mutate_op(grpc_call_element *elem,

@ -75,7 +75,6 @@ typedef enum {
typedef struct { typedef struct {
gpr_mu mu; gpr_mu mu;
callback_phase phase; callback_phase phase;
int success;
grpc_closure on_complete; grpc_closure on_complete;
grpc_timer alarm; grpc_timer alarm;
grpc_connectivity_state state; grpc_connectivity_state state;
@ -122,7 +121,7 @@ static void finished_completion(grpc_exec_ctx *exec_ctx, void *pw,
} }
static void partly_done(grpc_exec_ctx *exec_ctx, state_watcher *w, static void partly_done(grpc_exec_ctx *exec_ctx, state_watcher *w,
int due_to_completion) { bool due_to_completion, grpc_error *error) {
int delete = 0; int delete = 0;
if (due_to_completion) { if (due_to_completion) {
@ -130,14 +129,26 @@ static void partly_done(grpc_exec_ctx *exec_ctx, state_watcher *w,
} }
gpr_mu_lock(&w->mu); gpr_mu_lock(&w->mu);
if (due_to_completion) { if (due_to_completion) {
w->success = 1; if (grpc_trace_operation_failures) {
GRPC_LOG_IF_ERROR("watch_completion_error", GRPC_ERROR_REF(error));
}
GRPC_ERROR_UNREF(error);
error = GRPC_ERROR_NONE;
} else {
if (error == GRPC_ERROR_NONE) {
error =
GRPC_ERROR_CREATE("Timed out waiting for connection state change");
} else if (error == GRPC_ERROR_CANCELLED) {
error = GRPC_ERROR_NONE;
}
} }
switch (w->phase) { switch (w->phase) {
case WAITING: case WAITING:
w->phase = CALLING_BACK; w->phase = CALLING_BACK;
grpc_cq_end_op(exec_ctx, w->cq, w->tag, w->success, finished_completion, grpc_cq_end_op(exec_ctx, w->cq, w->tag, GRPC_ERROR_REF(error),
w, &w->completion_storage); finished_completion, w, &w->completion_storage);
break; break;
case CALLING_BACK: case CALLING_BACK:
w->phase = CALLING_BACK_AND_FINISHED; w->phase = CALLING_BACK_AND_FINISHED;
@ -153,14 +164,18 @@ static void partly_done(grpc_exec_ctx *exec_ctx, state_watcher *w,
if (delete) { if (delete) {
delete_state_watcher(exec_ctx, w); delete_state_watcher(exec_ctx, w);
} }
GRPC_ERROR_UNREF(error);
} }
static void watch_complete(grpc_exec_ctx *exec_ctx, void *pw, bool success) { static void watch_complete(grpc_exec_ctx *exec_ctx, void *pw,
partly_done(exec_ctx, pw, 1); grpc_error *error) {
partly_done(exec_ctx, pw, true, GRPC_ERROR_REF(error));
} }
static void timeout_complete(grpc_exec_ctx *exec_ctx, void *pw, bool success) { static void timeout_complete(grpc_exec_ctx *exec_ctx, void *pw,
partly_done(exec_ctx, pw, 0); grpc_error *error) {
partly_done(exec_ctx, pw, false, GRPC_ERROR_REF(error));
} }
void grpc_channel_watch_connectivity_state( void grpc_channel_watch_connectivity_state(
@ -174,10 +189,11 @@ void grpc_channel_watch_connectivity_state(
GRPC_API_TRACE( GRPC_API_TRACE(
"grpc_channel_watch_connectivity_state(" "grpc_channel_watch_connectivity_state("
"channel=%p, last_observed_state=%d, " "channel=%p, last_observed_state=%d, "
"deadline=gpr_timespec { tv_sec: %lld, tv_nsec: %d, clock_type: %d }, " "deadline=gpr_timespec { tv_sec: %" PRId64
", tv_nsec: %d, clock_type: %d }, "
"cq=%p, tag=%p)", "cq=%p, tag=%p)",
7, (channel, (int)last_observed_state, (long long)deadline.tv_sec, 7, (channel, (int)last_observed_state, deadline.tv_sec, deadline.tv_nsec,
(int)deadline.tv_nsec, (int)deadline.clock_type, cq, tag)); (int)deadline.clock_type, cq, tag));
grpc_cq_begin_op(cq, tag); grpc_cq_begin_op(cq, tag);
@ -185,7 +201,6 @@ void grpc_channel_watch_connectivity_state(
grpc_closure_init(&w->on_complete, watch_complete, w); grpc_closure_init(&w->on_complete, watch_complete, w);
w->phase = WAITING; w->phase = WAITING;
w->state = last_observed_state; w->state = last_observed_state;
w->success = 0;
w->cq = cq; w->cq = cq;
w->tag = tag; w->tag = tag;
w->channel = channel; w->channel = channel;

@ -117,6 +117,7 @@ static void watch_lb_policy(grpc_exec_ctx *exec_ctx, channel_data *chand,
static void set_channel_connectivity_state_locked(grpc_exec_ctx *exec_ctx, static void set_channel_connectivity_state_locked(grpc_exec_ctx *exec_ctx,
channel_data *chand, channel_data *chand,
grpc_connectivity_state state, grpc_connectivity_state state,
grpc_error *error,
const char *reason) { const char *reason) {
if ((state == GRPC_CHANNEL_TRANSIENT_FAILURE || if ((state == GRPC_CHANNEL_TRANSIENT_FAILURE ||
state == GRPC_CHANNEL_SHUTDOWN) && state == GRPC_CHANNEL_SHUTDOWN) &&
@ -127,11 +128,13 @@ static void set_channel_connectivity_state_locked(grpc_exec_ctx *exec_ctx,
/* mask= */ GRPC_INITIAL_METADATA_IGNORE_CONNECTIVITY, /* mask= */ GRPC_INITIAL_METADATA_IGNORE_CONNECTIVITY,
/* check= */ 0); /* check= */ 0);
} }
grpc_connectivity_state_set(exec_ctx, &chand->state_tracker, state, reason); grpc_connectivity_state_set(exec_ctx, &chand->state_tracker, state, error,
reason);
} }
static void on_lb_policy_state_changed_locked( static void on_lb_policy_state_changed_locked(grpc_exec_ctx *exec_ctx,
grpc_exec_ctx *exec_ctx, lb_policy_connectivity_watcher *w) { lb_policy_connectivity_watcher *w,
grpc_error *error) {
grpc_connectivity_state publish_state = w->state; grpc_connectivity_state publish_state = w->state;
/* check if the notification is for a stale policy */ /* check if the notification is for a stale policy */
if (w->lb_policy != w->chand->lb_policy) return; if (w->lb_policy != w->chand->lb_policy) return;
@ -143,18 +146,18 @@ static void on_lb_policy_state_changed_locked(
w->chand->lb_policy = NULL; w->chand->lb_policy = NULL;
} }
set_channel_connectivity_state_locked(exec_ctx, w->chand, publish_state, set_channel_connectivity_state_locked(exec_ctx, w->chand, publish_state,
"lb_changed"); GRPC_ERROR_REF(error), "lb_changed");
if (w->state != GRPC_CHANNEL_SHUTDOWN) { if (w->state != GRPC_CHANNEL_SHUTDOWN) {
watch_lb_policy(exec_ctx, w->chand, w->lb_policy, w->state); watch_lb_policy(exec_ctx, w->chand, w->lb_policy, w->state);
} }
} }
static void on_lb_policy_state_changed(grpc_exec_ctx *exec_ctx, void *arg, static void on_lb_policy_state_changed(grpc_exec_ctx *exec_ctx, void *arg,
bool iomgr_success) { grpc_error *error) {
lb_policy_connectivity_watcher *w = arg; lb_policy_connectivity_watcher *w = arg;
gpr_mu_lock(&w->chand->mu_config); gpr_mu_lock(&w->chand->mu_config);
on_lb_policy_state_changed_locked(exec_ctx, w); on_lb_policy_state_changed_locked(exec_ctx, w, error);
gpr_mu_unlock(&w->chand->mu_config); gpr_mu_unlock(&w->chand->mu_config);
GRPC_CHANNEL_STACK_UNREF(exec_ctx, w->chand->owning_stack, "watch_lb_policy"); GRPC_CHANNEL_STACK_UNREF(exec_ctx, w->chand->owning_stack, "watch_lb_policy");
@ -176,19 +179,22 @@ static void watch_lb_policy(grpc_exec_ctx *exec_ctx, channel_data *chand,
} }
static void cc_on_config_changed(grpc_exec_ctx *exec_ctx, void *arg, static void cc_on_config_changed(grpc_exec_ctx *exec_ctx, void *arg,
bool iomgr_success) { grpc_error *error) {
channel_data *chand = arg; channel_data *chand = arg;
grpc_lb_policy *lb_policy = NULL; grpc_lb_policy *lb_policy = NULL;
grpc_lb_policy *old_lb_policy; grpc_lb_policy *old_lb_policy;
grpc_connectivity_state state = GRPC_CHANNEL_TRANSIENT_FAILURE; grpc_connectivity_state state = GRPC_CHANNEL_TRANSIENT_FAILURE;
int exit_idle = 0; int exit_idle = 0;
grpc_error *state_error = GRPC_ERROR_CREATE("No load balancing policy");
if (chand->incoming_configuration != NULL) { if (chand->incoming_configuration != NULL) {
lb_policy = grpc_client_config_get_lb_policy(chand->incoming_configuration); lb_policy = grpc_client_config_get_lb_policy(chand->incoming_configuration);
if (lb_policy != NULL) { if (lb_policy != NULL) {
GRPC_LB_POLICY_REF(lb_policy, "channel"); GRPC_LB_POLICY_REF(lb_policy, "channel");
GRPC_LB_POLICY_REF(lb_policy, "config_change"); GRPC_LB_POLICY_REF(lb_policy, "config_change");
state = grpc_lb_policy_check_connectivity(exec_ctx, lb_policy); GRPC_ERROR_UNREF(state_error);
state =
grpc_lb_policy_check_connectivity(exec_ctx, lb_policy, &state_error);
} }
grpc_client_config_unref(exec_ctx, chand->incoming_configuration); grpc_client_config_unref(exec_ctx, chand->incoming_configuration);
@ -208,7 +214,9 @@ static void cc_on_config_changed(grpc_exec_ctx *exec_ctx, void *arg,
grpc_exec_ctx_enqueue_list(exec_ctx, &chand->waiting_for_config_closures, grpc_exec_ctx_enqueue_list(exec_ctx, &chand->waiting_for_config_closures,
NULL); NULL);
} else if (chand->resolver == NULL /* disconnected */) { } else if (chand->resolver == NULL /* disconnected */) {
grpc_closure_list_fail_all(&chand->waiting_for_config_closures); grpc_closure_list_fail_all(
&chand->waiting_for_config_closures,
GRPC_ERROR_CREATE_REFERENCING("Channel disconnected", &error, 1));
grpc_exec_ctx_enqueue_list(exec_ctx, &chand->waiting_for_config_closures, grpc_exec_ctx_enqueue_list(exec_ctx, &chand->waiting_for_config_closures,
NULL); NULL);
} }
@ -218,9 +226,9 @@ static void cc_on_config_changed(grpc_exec_ctx *exec_ctx, void *arg,
chand->exit_idle_when_lb_policy_arrives = 0; chand->exit_idle_when_lb_policy_arrives = 0;
} }
if (iomgr_success && chand->resolver) { if (error == GRPC_ERROR_NONE && chand->resolver) {
set_channel_connectivity_state_locked(exec_ctx, chand, state, set_channel_connectivity_state_locked(
"new_lb+resolver"); exec_ctx, chand, state, GRPC_ERROR_REF(state_error), "new_lb+resolver");
if (lb_policy != NULL) { if (lb_policy != NULL) {
watch_lb_policy(exec_ctx, chand, lb_policy, state); watch_lb_policy(exec_ctx, chand, lb_policy, state);
} }
@ -235,8 +243,12 @@ static void cc_on_config_changed(grpc_exec_ctx *exec_ctx, void *arg,
GRPC_RESOLVER_UNREF(exec_ctx, chand->resolver, "channel"); GRPC_RESOLVER_UNREF(exec_ctx, chand->resolver, "channel");
chand->resolver = NULL; chand->resolver = NULL;
} }
grpc_error *refs[] = {error, state_error};
set_channel_connectivity_state_locked( set_channel_connectivity_state_locked(
exec_ctx, chand, GRPC_CHANNEL_SHUTDOWN, "resolver_gone"); exec_ctx, chand, GRPC_CHANNEL_SHUTDOWN,
GRPC_ERROR_CREATE_REFERENCING("Got config after disconnection", refs,
GPR_ARRAY_SIZE(refs)),
"resolver_gone");
gpr_mu_unlock(&chand->mu_config); gpr_mu_unlock(&chand->mu_config);
} }
@ -256,6 +268,7 @@ static void cc_on_config_changed(grpc_exec_ctx *exec_ctx, void *arg,
} }
GRPC_CHANNEL_STACK_UNREF(exec_ctx, chand->owning_stack, "resolver"); GRPC_CHANNEL_STACK_UNREF(exec_ctx, chand->owning_stack, "resolver");
GRPC_ERROR_UNREF(state_error);
} }
static void cc_start_transport_op(grpc_exec_ctx *exec_ctx, static void cc_start_transport_op(grpc_exec_ctx *exec_ctx,
@ -263,7 +276,7 @@ static void cc_start_transport_op(grpc_exec_ctx *exec_ctx,
grpc_transport_op *op) { grpc_transport_op *op) {
channel_data *chand = elem->channel_data; channel_data *chand = elem->channel_data;
grpc_exec_ctx_enqueue(exec_ctx, op->on_consumed, true, NULL); grpc_exec_ctx_sched(exec_ctx, op->on_consumed, GRPC_ERROR_NONE, NULL);
GPR_ASSERT(op->set_accept_stream == false); GPR_ASSERT(op->set_accept_stream == false);
if (op->bind_pollset != NULL) { if (op->bind_pollset != NULL) {
@ -282,7 +295,9 @@ static void cc_start_transport_op(grpc_exec_ctx *exec_ctx,
if (op->send_ping != NULL) { if (op->send_ping != NULL) {
if (chand->lb_policy == NULL) { if (chand->lb_policy == NULL) {
grpc_exec_ctx_enqueue(exec_ctx, op->send_ping, false, NULL); grpc_exec_ctx_sched(exec_ctx, op->send_ping,
GRPC_ERROR_CREATE("Ping with no load balancing"),
NULL);
} else { } else {
grpc_lb_policy_ping_one(exec_ctx, chand->lb_policy, op->send_ping); grpc_lb_policy_ping_one(exec_ctx, chand->lb_policy, op->send_ping);
op->bind_pollset = NULL; op->bind_pollset = NULL;
@ -290,16 +305,19 @@ static void cc_start_transport_op(grpc_exec_ctx *exec_ctx,
op->send_ping = NULL; op->send_ping = NULL;
} }
if (op->disconnect && chand->resolver != NULL) { if (op->disconnect_with_error != GRPC_ERROR_NONE) {
set_channel_connectivity_state_locked(exec_ctx, chand, if (chand->resolver != NULL) {
GRPC_CHANNEL_SHUTDOWN, "disconnect"); set_channel_connectivity_state_locked(
exec_ctx, chand, GRPC_CHANNEL_SHUTDOWN,
GRPC_ERROR_REF(op->disconnect_with_error), "disconnect");
grpc_resolver_shutdown(exec_ctx, chand->resolver); grpc_resolver_shutdown(exec_ctx, chand->resolver);
GRPC_RESOLVER_UNREF(exec_ctx, chand->resolver, "channel"); GRPC_RESOLVER_UNREF(exec_ctx, chand->resolver, "channel");
chand->resolver = NULL; chand->resolver = NULL;
if (!chand->started_resolving) { if (!chand->started_resolving) {
grpc_closure_list_fail_all(&chand->waiting_for_config_closures); grpc_closure_list_fail_all(&chand->waiting_for_config_closures,
grpc_exec_ctx_enqueue_list(exec_ctx, &chand->waiting_for_config_closures, GRPC_ERROR_REF(op->disconnect_with_error));
NULL); grpc_exec_ctx_enqueue_list(exec_ctx,
&chand->waiting_for_config_closures, NULL);
} }
if (chand->lb_policy != NULL) { if (chand->lb_policy != NULL) {
grpc_pollset_set_del_pollset_set(exec_ctx, grpc_pollset_set_del_pollset_set(exec_ctx,
@ -309,6 +327,8 @@ static void cc_start_transport_op(grpc_exec_ctx *exec_ctx,
chand->lb_policy = NULL; chand->lb_policy = NULL;
} }
} }
GRPC_ERROR_UNREF(op->disconnect_with_error);
}
gpr_mu_unlock(&chand->mu_config); gpr_mu_unlock(&chand->mu_config);
} }
@ -327,16 +347,17 @@ static int cc_pick_subchannel(grpc_exec_ctx *exec_ctx, void *arg,
grpc_connected_subchannel **connected_subchannel, grpc_connected_subchannel **connected_subchannel,
grpc_closure *on_ready); grpc_closure *on_ready);
static void continue_picking(grpc_exec_ctx *exec_ctx, void *arg, bool success) { static void continue_picking(grpc_exec_ctx *exec_ctx, void *arg,
grpc_error *error) {
continue_picking_args *cpa = arg; continue_picking_args *cpa = arg;
if (cpa->connected_subchannel == NULL) { if (cpa->connected_subchannel == NULL) {
/* cancelled, do nothing */ /* cancelled, do nothing */
} else if (!success) { } else if (error != GRPC_ERROR_NONE) {
grpc_exec_ctx_enqueue(exec_ctx, cpa->on_ready, false, NULL); grpc_exec_ctx_sched(exec_ctx, cpa->on_ready, GRPC_ERROR_REF(error), NULL);
} else if (cc_pick_subchannel(exec_ctx, cpa->elem, cpa->initial_metadata, } else if (cc_pick_subchannel(exec_ctx, cpa->elem, cpa->initial_metadata,
cpa->initial_metadata_flags, cpa->initial_metadata_flags,
cpa->connected_subchannel, cpa->on_ready)) { cpa->connected_subchannel, cpa->on_ready)) {
grpc_exec_ctx_enqueue(exec_ctx, cpa->on_ready, true, NULL); grpc_exec_ctx_sched(exec_ctx, cpa->on_ready, GRPC_ERROR_NONE, NULL);
} }
gpr_free(cpa); gpr_free(cpa);
} }
@ -346,6 +367,8 @@ static int cc_pick_subchannel(grpc_exec_ctx *exec_ctx, void *elemp,
uint32_t initial_metadata_flags, uint32_t initial_metadata_flags,
grpc_connected_subchannel **connected_subchannel, grpc_connected_subchannel **connected_subchannel,
grpc_closure *on_ready) { grpc_closure *on_ready) {
GPR_TIMER_BEGIN("cc_pick_subchannel", 0);
grpc_call_element *elem = elemp; grpc_call_element *elem = elemp;
channel_data *chand = elem->channel_data; channel_data *chand = elem->channel_data;
call_data *calld = elem->call_data; call_data *calld = elem->call_data;
@ -361,14 +384,16 @@ static int cc_pick_subchannel(grpc_exec_ctx *exec_ctx, void *elemp,
connected_subchannel); connected_subchannel);
} }
for (closure = chand->waiting_for_config_closures.head; closure != NULL; for (closure = chand->waiting_for_config_closures.head; closure != NULL;
closure = grpc_closure_next(closure)) { closure = closure->next_data.next) {
cpa = closure->cb_arg; cpa = closure->cb_arg;
if (cpa->connected_subchannel == connected_subchannel) { if (cpa->connected_subchannel == connected_subchannel) {
cpa->connected_subchannel = NULL; cpa->connected_subchannel = NULL;
grpc_exec_ctx_enqueue(exec_ctx, cpa->on_ready, false, NULL); grpc_exec_ctx_sched(exec_ctx, cpa->on_ready,
GRPC_ERROR_CREATE("Pick cancelled"), NULL);
} }
} }
gpr_mu_unlock(&chand->mu_config); gpr_mu_unlock(&chand->mu_config);
GPR_TIMER_END("cc_pick_subchannel", 0);
return 1; return 1;
} }
if (chand->lb_policy != NULL) { if (chand->lb_policy != NULL) {
@ -380,6 +405,7 @@ static int cc_pick_subchannel(grpc_exec_ctx *exec_ctx, void *elemp,
initial_metadata, initial_metadata_flags, initial_metadata, initial_metadata_flags,
connected_subchannel, on_ready); connected_subchannel, on_ready);
GRPC_LB_POLICY_UNREF(exec_ctx, lb_policy, "cc_pick_subchannel"); GRPC_LB_POLICY_UNREF(exec_ctx, lb_policy, "cc_pick_subchannel");
GPR_TIMER_END("cc_pick_subchannel", 0);
return r; return r;
} }
if (chand->resolver != NULL && !chand->started_resolving) { if (chand->resolver != NULL && !chand->started_resolving) {
@ -397,12 +423,15 @@ static int cc_pick_subchannel(grpc_exec_ctx *exec_ctx, void *elemp,
cpa->on_ready = on_ready; cpa->on_ready = on_ready;
cpa->elem = elem; cpa->elem = elem;
grpc_closure_init(&cpa->closure, continue_picking, cpa); grpc_closure_init(&cpa->closure, continue_picking, cpa);
grpc_closure_list_add(&chand->waiting_for_config_closures, &cpa->closure, grpc_closure_list_append(&chand->waiting_for_config_closures, &cpa->closure,
1); GRPC_ERROR_NONE);
} else { } else {
grpc_exec_ctx_enqueue(exec_ctx, on_ready, false, NULL); grpc_exec_ctx_sched(exec_ctx, on_ready, GRPC_ERROR_CREATE("Disconnected"),
NULL);
} }
gpr_mu_unlock(&chand->mu_config); gpr_mu_unlock(&chand->mu_config);
GPR_TIMER_END("cc_pick_subchannel", 0);
return 0; return 0;
} }
@ -507,7 +536,7 @@ grpc_connectivity_state grpc_client_channel_check_connectivity_state(
channel_data *chand = elem->channel_data; channel_data *chand = elem->channel_data;
grpc_connectivity_state out; grpc_connectivity_state out;
gpr_mu_lock(&chand->mu_config); gpr_mu_lock(&chand->mu_config);
out = grpc_connectivity_state_check(&chand->state_tracker); out = grpc_connectivity_state_check(&chand->state_tracker, NULL);
if (out == GRPC_CHANNEL_IDLE && try_to_connect) { if (out == GRPC_CHANNEL_IDLE && try_to_connect) {
if (chand->lb_policy != NULL) { if (chand->lb_policy != NULL) {
grpc_lb_policy_exit_idle(exec_ctx, chand->lb_policy); grpc_lb_policy_exit_idle(exec_ctx, chand->lb_policy);
@ -534,7 +563,7 @@ typedef struct {
} external_connectivity_watcher; } external_connectivity_watcher;
static void on_external_watch_complete(grpc_exec_ctx *exec_ctx, void *arg, static void on_external_watch_complete(grpc_exec_ctx *exec_ctx, void *arg,
bool iomgr_success) { grpc_error *error) {
external_connectivity_watcher *w = arg; external_connectivity_watcher *w = arg;
grpc_closure *follow_up = w->on_complete; grpc_closure *follow_up = w->on_complete;
grpc_pollset_set_del_pollset(exec_ctx, w->chand->interested_parties, grpc_pollset_set_del_pollset(exec_ctx, w->chand->interested_parties,
@ -542,7 +571,7 @@ static void on_external_watch_complete(grpc_exec_ctx *exec_ctx, void *arg,
GRPC_CHANNEL_STACK_UNREF(exec_ctx, w->chand->owning_stack, GRPC_CHANNEL_STACK_UNREF(exec_ctx, w->chand->owning_stack,
"external_connectivity_watcher"); "external_connectivity_watcher");
gpr_free(w); gpr_free(w);
follow_up->cb(exec_ctx, follow_up->cb_arg, iomgr_success); follow_up->cb(exec_ctx, follow_up->cb_arg, error);
} }
void grpc_client_channel_watch_connectivity_state( void grpc_client_channel_watch_connectivity_state(

@ -64,7 +64,7 @@ typedef struct {
grpc_transport *transport; grpc_transport *transport;
/** channel arguments (to be passed to the filters) */ /** channel arguments (to be passed to the filters) */
const grpc_channel_args *channel_args; grpc_channel_args *channel_args;
} grpc_connect_out_args; } grpc_connect_out_args;
struct grpc_connector_vtable { struct grpc_connector_vtable {

@ -60,8 +60,9 @@ static gpr_atm ref_mutate(grpc_lb_policy *c, gpr_atm delta,
: gpr_atm_no_barrier_fetch_add(&c->ref_pair, delta); : gpr_atm_no_barrier_fetch_add(&c->ref_pair, delta);
#ifdef GRPC_LB_POLICY_REFCOUNT_DEBUG #ifdef GRPC_LB_POLICY_REFCOUNT_DEBUG
gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG,
"LB_POLICY: %p % 12s 0x%08x -> 0x%08x [%s]", c, purpose, old_val, "LB_POLICY: 0x%" PRIxPTR " %12s 0x%" PRIxPTR " -> 0x%" PRIxPTR
old_val + delta, reason); " [%s]",
(intptr_t)c, purpose, old_val, old_val + delta, reason);
#endif #endif
return old_val; return old_val;
} }
@ -138,6 +139,8 @@ void grpc_lb_policy_notify_on_state_change(grpc_exec_ctx *exec_ctx,
} }
grpc_connectivity_state grpc_lb_policy_check_connectivity( grpc_connectivity_state grpc_lb_policy_check_connectivity(
grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy) { grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy,
return policy->vtable->check_connectivity(exec_ctx, policy); grpc_error **connectivity_error) {
return policy->vtable->check_connectivity(exec_ctx, policy,
connectivity_error);
} }

@ -77,8 +77,9 @@ struct grpc_lb_policy_vtable {
void (*exit_idle)(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy); void (*exit_idle)(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy);
/** check the current connectivity of the lb_policy */ /** check the current connectivity of the lb_policy */
grpc_connectivity_state (*check_connectivity)(grpc_exec_ctx *exec_ctx, grpc_connectivity_state (*check_connectivity)(
grpc_lb_policy *policy); grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy,
grpc_error **connectivity_error);
/** call notify when the connectivity state of a channel changes from *state. /** call notify when the connectivity state of a channel changes from *state.
Updates *state with the new state of the policy */ Updates *state with the new state of the policy */
@ -154,6 +155,7 @@ void grpc_lb_policy_notify_on_state_change(grpc_exec_ctx *exec_ctx,
grpc_closure *closure); grpc_closure *closure);
grpc_connectivity_state grpc_lb_policy_check_connectivity( grpc_connectivity_state grpc_lb_policy_check_connectivity(
grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy); grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy,
grpc_error **connectivity_error);
#endif /* GRPC_CORE_EXT_CLIENT_CONFIG_LB_POLICY_H */ #endif /* GRPC_CORE_EXT_CLIENT_CONFIG_LB_POLICY_H */

@ -54,7 +54,7 @@
#define STRONG_REF_MASK (~(gpr_atm)((1 << INTERNAL_REF_BITS) - 1)) #define STRONG_REF_MASK (~(gpr_atm)((1 << INTERNAL_REF_BITS) - 1))
#define GRPC_SUBCHANNEL_MIN_CONNECT_TIMEOUT_SECONDS 20 #define GRPC_SUBCHANNEL_MIN_CONNECT_TIMEOUT_SECONDS 20
#define GRPC_SUBCHANNEL_INITIAL_CONNECT_BACKOFF_SECONDS 2 #define GRPC_SUBCHANNEL_INITIAL_CONNECT_BACKOFF_SECONDS 1
#define GRPC_SUBCHANNEL_RECONNECT_BACKOFF_MULTIPLIER 1.6 #define GRPC_SUBCHANNEL_RECONNECT_BACKOFF_MULTIPLIER 1.6
#define GRPC_SUBCHANNEL_RECONNECT_MAX_BACKOFF_SECONDS 120 #define GRPC_SUBCHANNEL_RECONNECT_MAX_BACKOFF_SECONDS 120
#define GRPC_SUBCHANNEL_RECONNECT_JITTER 0.2 #define GRPC_SUBCHANNEL_RECONNECT_JITTER 0.2
@ -147,7 +147,7 @@ struct grpc_subchannel_call {
(((grpc_subchannel_call *)(callstack)) - 1) (((grpc_subchannel_call *)(callstack)) - 1)
static void subchannel_connected(grpc_exec_ctx *exec_ctx, void *subchannel, static void subchannel_connected(grpc_exec_ctx *exec_ctx, void *subchannel,
bool iomgr_success); grpc_error *error);
#ifdef GRPC_STREAM_REFCOUNT_DEBUG #ifdef GRPC_STREAM_REFCOUNT_DEBUG
#define REF_REASON reason #define REF_REASON reason
@ -177,7 +177,7 @@ static void subchannel_connected(grpc_exec_ctx *exec_ctx, void *subchannel,
*/ */
static void connection_destroy(grpc_exec_ctx *exec_ctx, void *arg, static void connection_destroy(grpc_exec_ctx *exec_ctx, void *arg,
bool success) { grpc_error *error) {
grpc_connected_subchannel *c = arg; grpc_connected_subchannel *c = arg;
grpc_channel_stack_destroy(exec_ctx, CHANNEL_STACK_FROM_CONNECTION(c)); grpc_channel_stack_destroy(exec_ctx, CHANNEL_STACK_FROM_CONNECTION(c));
gpr_free(c); gpr_free(c);
@ -200,7 +200,7 @@ void grpc_connected_subchannel_unref(grpc_exec_ctx *exec_ctx,
*/ */
static void subchannel_destroy(grpc_exec_ctx *exec_ctx, void *arg, static void subchannel_destroy(grpc_exec_ctx *exec_ctx, void *arg,
bool success) { grpc_error *error) {
grpc_subchannel *c = arg; grpc_subchannel *c = arg;
gpr_free((void *)c->filters); gpr_free((void *)c->filters);
grpc_channel_args_destroy(c->args); grpc_channel_args_destroy(c->args);
@ -290,8 +290,8 @@ void grpc_subchannel_weak_unref(grpc_exec_ctx *exec_ctx,
gpr_atm old_refs; gpr_atm old_refs;
old_refs = ref_mutate(c, -(gpr_atm)1, 1 REF_MUTATE_PURPOSE("WEAK_UNREF")); old_refs = ref_mutate(c, -(gpr_atm)1, 1 REF_MUTATE_PURPOSE("WEAK_UNREF"));
if (old_refs == 1) { if (old_refs == 1) {
grpc_exec_ctx_enqueue(exec_ctx, grpc_closure_create(subchannel_destroy, c), grpc_exec_ctx_sched(exec_ctx, grpc_closure_create(subchannel_destroy, c),
true, NULL); GRPC_ERROR_NONE, NULL);
} }
} }
@ -382,7 +382,8 @@ static void continue_connect(grpc_exec_ctx *exec_ctx, grpc_subchannel *c) {
args.initial_connect_string = c->initial_connect_string; args.initial_connect_string = c->initial_connect_string;
grpc_connectivity_state_set(exec_ctx, &c->state_tracker, grpc_connectivity_state_set(exec_ctx, &c->state_tracker,
GRPC_CHANNEL_CONNECTING, "state_change"); GRPC_CHANNEL_CONNECTING, GRPC_ERROR_NONE,
"state_change");
grpc_connector_connect(exec_ctx, c->connector, &args, &c->connecting_result, grpc_connector_connect(exec_ctx, c->connector, &args, &c->connecting_result,
&c->connected); &c->connected);
} }
@ -393,16 +394,17 @@ static void start_connect(grpc_exec_ctx *exec_ctx, grpc_subchannel *c) {
continue_connect(exec_ctx, c); continue_connect(exec_ctx, c);
} }
grpc_connectivity_state grpc_subchannel_check_connectivity(grpc_subchannel *c) { grpc_connectivity_state grpc_subchannel_check_connectivity(grpc_subchannel *c,
grpc_error **error) {
grpc_connectivity_state state; grpc_connectivity_state state;
gpr_mu_lock(&c->mu); gpr_mu_lock(&c->mu);
state = grpc_connectivity_state_check(&c->state_tracker); state = grpc_connectivity_state_check(&c->state_tracker, error);
gpr_mu_unlock(&c->mu); gpr_mu_unlock(&c->mu);
return state; return state;
} }
static void on_external_state_watcher_done(grpc_exec_ctx *exec_ctx, void *arg, static void on_external_state_watcher_done(grpc_exec_ctx *exec_ctx, void *arg,
bool success) { grpc_error *error) {
external_state_watcher *w = arg; external_state_watcher *w = arg;
grpc_closure *follow_up = w->notify; grpc_closure *follow_up = w->notify;
if (w->pollset_set != NULL) { if (w->pollset_set != NULL) {
@ -415,7 +417,7 @@ static void on_external_state_watcher_done(grpc_exec_ctx *exec_ctx, void *arg,
gpr_mu_unlock(&w->subchannel->mu); gpr_mu_unlock(&w->subchannel->mu);
GRPC_SUBCHANNEL_WEAK_UNREF(exec_ctx, w->subchannel, "external_state_watcher"); GRPC_SUBCHANNEL_WEAK_UNREF(exec_ctx, w->subchannel, "external_state_watcher");
gpr_free(w); gpr_free(w);
follow_up->cb(exec_ctx, follow_up->cb_arg, success); follow_up->cb(exec_ctx, follow_up->cb_arg, error);
} }
void grpc_subchannel_notify_on_state_change( void grpc_subchannel_notify_on_state_change(
@ -469,7 +471,7 @@ void grpc_connected_subchannel_process_transport_op(
} }
static void subchannel_on_child_state_changed(grpc_exec_ctx *exec_ctx, void *p, static void subchannel_on_child_state_changed(grpc_exec_ctx *exec_ctx, void *p,
bool iomgr_success) { grpc_error *error) {
state_watcher *sw = p; state_watcher *sw = p;
grpc_subchannel *c = sw->subchannel; grpc_subchannel *c = sw->subchannel;
gpr_mu *mu = &c->mu; gpr_mu *mu = &c->mu;
@ -477,13 +479,13 @@ static void subchannel_on_child_state_changed(grpc_exec_ctx *exec_ctx, void *p,
gpr_mu_lock(mu); gpr_mu_lock(mu);
/* if we failed just leave this closure */ /* if we failed just leave this closure */
if (iomgr_success) {
if (sw->connectivity_state == GRPC_CHANNEL_TRANSIENT_FAILURE) { if (sw->connectivity_state == GRPC_CHANNEL_TRANSIENT_FAILURE) {
/* any errors on a subchannel ==> we're done, create a new one */ /* any errors on a subchannel ==> we're done, create a new one */
sw->connectivity_state = GRPC_CHANNEL_SHUTDOWN; sw->connectivity_state = GRPC_CHANNEL_SHUTDOWN;
} }
grpc_connectivity_state_set(exec_ctx, &c->state_tracker, grpc_connectivity_state_set(exec_ctx, &c->state_tracker,
sw->connectivity_state, "reflect_child"); sw->connectivity_state, GRPC_ERROR_REF(error),
"reflect_child");
if (sw->connectivity_state != GRPC_CHANNEL_SHUTDOWN) { if (sw->connectivity_state != GRPC_CHANNEL_SHUTDOWN) {
grpc_connected_subchannel_notify_on_state_change( grpc_connected_subchannel_notify_on_state_change(
exec_ctx, GET_CONNECTED_SUBCHANNEL(c, no_barrier), NULL, exec_ctx, GET_CONNECTED_SUBCHANNEL(c, no_barrier), NULL,
@ -491,7 +493,6 @@ static void subchannel_on_child_state_changed(grpc_exec_ctx *exec_ctx, void *p,
GRPC_SUBCHANNEL_WEAK_REF(c, "state_watcher"); GRPC_SUBCHANNEL_WEAK_REF(c, "state_watcher");
sw = NULL; sw = NULL;
} }
}
gpr_mu_unlock(mu); gpr_mu_unlock(mu);
GRPC_SUBCHANNEL_WEAK_UNREF(exec_ctx, c, "state_watcher"); GRPC_SUBCHANNEL_WEAK_UNREF(exec_ctx, c, "state_watcher");
@ -592,17 +593,20 @@ static void publish_transport_locked(grpc_exec_ctx *exec_ctx,
/* signal completion */ /* signal completion */
grpc_connectivity_state_set(exec_ctx, &c->state_tracker, GRPC_CHANNEL_READY, grpc_connectivity_state_set(exec_ctx, &c->state_tracker, GRPC_CHANNEL_READY,
"connected"); GRPC_ERROR_NONE, "connected");
} }
static void on_alarm(grpc_exec_ctx *exec_ctx, void *arg, bool iomgr_success) { static void on_alarm(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) {
grpc_subchannel *c = arg; grpc_subchannel *c = arg;
gpr_mu_lock(&c->mu); gpr_mu_lock(&c->mu);
c->have_alarm = 0; c->have_alarm = 0;
if (c->disconnected) { if (c->disconnected) {
iomgr_success = 0; error = GRPC_ERROR_CREATE_REFERENCING("Disconnected", &error, 1);
} else {
GRPC_ERROR_REF(error);
} }
if (iomgr_success) { if (error == GRPC_ERROR_NONE) {
gpr_log(GPR_INFO, "Failed to connect to channel, retrying");
c->next_attempt = c->next_attempt =
gpr_backoff_step(&c->backoff_state, gpr_now(GPR_CLOCK_MONOTONIC)); gpr_backoff_step(&c->backoff_state, gpr_now(GPR_CLOCK_MONOTONIC));
continue_connect(exec_ctx, c); continue_connect(exec_ctx, c);
@ -611,11 +615,13 @@ static void on_alarm(grpc_exec_ctx *exec_ctx, void *arg, bool iomgr_success) {
gpr_mu_unlock(&c->mu); gpr_mu_unlock(&c->mu);
GRPC_SUBCHANNEL_WEAK_UNREF(exec_ctx, c, "connecting"); GRPC_SUBCHANNEL_WEAK_UNREF(exec_ctx, c, "connecting");
} }
GRPC_ERROR_UNREF(error);
} }
static void subchannel_connected(grpc_exec_ctx *exec_ctx, void *arg, static void subchannel_connected(grpc_exec_ctx *exec_ctx, void *arg,
bool iomgr_success) { grpc_error *error) {
grpc_subchannel *c = arg; grpc_subchannel *c = arg;
grpc_channel_args *delete_channel_args = c->connecting_result.channel_args;
GRPC_SUBCHANNEL_WEAK_REF(c, "connected"); GRPC_SUBCHANNEL_WEAK_REF(c, "connected");
gpr_mu_lock(&c->mu); gpr_mu_lock(&c->mu);
@ -627,13 +633,26 @@ static void subchannel_connected(grpc_exec_ctx *exec_ctx, void *arg,
gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC); gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC);
GPR_ASSERT(!c->have_alarm); GPR_ASSERT(!c->have_alarm);
c->have_alarm = 1; c->have_alarm = 1;
grpc_connectivity_state_set(exec_ctx, &c->state_tracker, grpc_connectivity_state_set(
GRPC_CHANNEL_TRANSIENT_FAILURE, exec_ctx, &c->state_tracker, GRPC_CHANNEL_TRANSIENT_FAILURE,
GRPC_ERROR_CREATE_REFERENCING("Connect Failed", &error, 1),
"connect_failed"); "connect_failed");
gpr_timespec time_til_next = gpr_time_sub(c->next_attempt, now);
const char *errmsg = grpc_error_string(error);
gpr_log(GPR_INFO, "Connect failed: %s", errmsg);
if (gpr_time_cmp(time_til_next, gpr_time_0(time_til_next.clock_type)) <=
0) {
gpr_log(GPR_INFO, "Retry immediately");
} else {
gpr_log(GPR_INFO, "Retry in %" PRId64 ".%09d seconds",
time_til_next.tv_sec, time_til_next.tv_nsec);
}
grpc_timer_init(exec_ctx, &c->alarm, c->next_attempt, on_alarm, c, now); grpc_timer_init(exec_ctx, &c->alarm, c->next_attempt, on_alarm, c, now);
grpc_error_free_string(errmsg);
} }
gpr_mu_unlock(&c->mu); gpr_mu_unlock(&c->mu);
GRPC_SUBCHANNEL_WEAK_UNREF(exec_ctx, c, "connecting"); GRPC_SUBCHANNEL_WEAK_UNREF(exec_ctx, c, "connecting");
grpc_channel_args_destroy(delete_channel_args);
} }
/* /*
@ -641,7 +660,7 @@ static void subchannel_connected(grpc_exec_ctx *exec_ctx, void *arg,
*/ */
static void subchannel_call_destroy(grpc_exec_ctx *exec_ctx, void *call, static void subchannel_call_destroy(grpc_exec_ctx *exec_ctx, void *call,
bool success) { grpc_error *error) {
grpc_subchannel_call *c = call; grpc_subchannel_call *c = call;
GPR_TIMER_BEGIN("grpc_subchannel_call_unref.destroy", 0); GPR_TIMER_BEGIN("grpc_subchannel_call_unref.destroy", 0);
grpc_connected_subchannel *connection = c->connection; grpc_connected_subchannel *connection = c->connection;
@ -671,9 +690,11 @@ char *grpc_subchannel_call_get_peer(grpc_exec_ctx *exec_ctx,
void grpc_subchannel_call_process_op(grpc_exec_ctx *exec_ctx, void grpc_subchannel_call_process_op(grpc_exec_ctx *exec_ctx,
grpc_subchannel_call *call, grpc_subchannel_call *call,
grpc_transport_stream_op *op) { grpc_transport_stream_op *op) {
GPR_TIMER_BEGIN("grpc_subchannel_call_process_op", 0);
grpc_call_stack *call_stack = SUBCHANNEL_CALL_TO_CALL_STACK(call); grpc_call_stack *call_stack = SUBCHANNEL_CALL_TO_CALL_STACK(call);
grpc_call_element *top_elem = grpc_call_stack_element(call_stack, 0); grpc_call_element *top_elem = grpc_call_stack_element(call_stack, 0);
top_elem->filter->start_transport_stream_op(exec_ctx, top_elem, op); top_elem->filter->start_transport_stream_op(exec_ctx, top_elem, op);
GPR_TIMER_END("grpc_subchannel_call_process_op", 0);
} }
grpc_connected_subchannel *grpc_subchannel_get_connected_subchannel( grpc_connected_subchannel *grpc_subchannel_get_connected_subchannel(

@ -119,7 +119,7 @@ void grpc_connected_subchannel_process_transport_op(
/** poll the current connectivity state of a channel */ /** poll the current connectivity state of a channel */
grpc_connectivity_state grpc_subchannel_check_connectivity( grpc_connectivity_state grpc_subchannel_check_connectivity(
grpc_subchannel *channel); grpc_subchannel *channel, grpc_error **error);
/** call notify when the connectivity state of a channel changes from *state. /** call notify when the connectivity state of a channel changes from *state.
Updates *state with the new state of the channel */ Updates *state with the new state of the channel */

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

Loading…
Cancel
Save