merge to upstream/master

pull/6774/head
Alistair Veitch 8 years ago
commit 3abd27e531
  1. 7
      .gitignore
  2. 2
      .gitmodules
  3. 72
      .travis.yml
  4. 210
      BUILD
  5. 1071
      CMakeLists.txt
  6. 7
      CONTRIBUTING.md
  7. 2
      INSTALL.md
  8. 1
      MANIFEST.md
  9. 1366
      Makefile
  10. 3
      PYTHON-MANIFEST.in
  11. 2
      Rakefile
  12. 12
      binding.gyp
  13. 280
      build.yaml
  14. 13
      composer.json
  15. 12
      config.m4
  16. 4
      doc/PROTOCOL-HTTP2.md
  17. 53
      doc/c-style-guide.md
  18. 77
      doc/command_line_tool.md
  19. 118
      doc/compression.md
  20. 133
      doc/compression_cookbook.md
  21. 91
      doc/cpp-style-guide.md
  22. BIN
      doc/images/compression_cookbook_incoming.png
  23. BIN
      doc/images/compression_cookbook_outgoing.png
  24. BIN
      doc/images/load_balancing_design.png
  25. 384
      doc/interop-test-descriptions.md
  26. 75
      doc/load-balancing.md
  27. 22
      doc/naming.md
  28. 3
      doc/statuscodes.md
  29. 2
      examples/cpp/README.md
  30. 2
      examples/cpp/cpptutorial.md
  31. 2
      examples/cpp/helloworld/Makefile
  32. 2
      examples/cpp/helloworld/README.md
  33. 4
      examples/cpp/helloworld/greeter_async_client.cc
  34. 4
      examples/cpp/helloworld/greeter_async_server.cc
  35. 2
      examples/cpp/helloworld/greeter_client.cc
  36. 2
      examples/cpp/route_guide/Makefile
  37. 2
      examples/csharp/helloworld/.nuget/packages.config
  38. 10
      examples/csharp/helloworld/Greeter/Greeter.csproj
  39. 10
      examples/csharp/helloworld/Greeter/Helloworld.cs
  40. 64
      examples/csharp/helloworld/Greeter/HelloworldGrpc.cs
  41. 6
      examples/csharp/helloworld/Greeter/packages.config
  42. 10
      examples/csharp/helloworld/GreeterClient/GreeterClient.csproj
  43. 2
      examples/csharp/helloworld/GreeterClient/Program.cs
  44. 6
      examples/csharp/helloworld/GreeterClient/packages.config
  45. 10
      examples/csharp/helloworld/GreeterServer/GreeterServer.csproj
  46. 6
      examples/csharp/helloworld/GreeterServer/packages.config
  47. 16
      examples/csharp/helloworld/README.md
  48. 2
      examples/csharp/helloworld/generate_protos.bat
  49. 2
      examples/csharp/route_guide/.nuget/packages.config
  50. 16
      examples/csharp/route_guide/RouteGuide/RouteGuide.cs
  51. 10
      examples/csharp/route_guide/RouteGuide/RouteGuide.csproj
  52. 161
      examples/csharp/route_guide/RouteGuide/RouteGuideGrpc.cs
  53. 6
      examples/csharp/route_guide/RouteGuide/packages.config
  54. 2
      examples/csharp/route_guide/RouteGuideClient/Program.cs
  55. 10
      examples/csharp/route_guide/RouteGuideClient/RouteGuideClient.csproj
  56. 6
      examples/csharp/route_guide/RouteGuideClient/packages.config
  57. 10
      examples/csharp/route_guide/RouteGuideServer/RouteGuideServer.csproj
  58. 6
      examples/csharp/route_guide/RouteGuideServer/packages.config
  59. 2
      examples/csharp/route_guide/generate_protos.bat
  60. 2
      examples/node/README.md
  61. 28
      examples/objective-c/auth_sample/AuthSample.xcodeproj/project.pbxproj
  62. 91
      examples/objective-c/auth_sample/AuthSample.xcodeproj/xcshareddata/xcschemes/AuthSample.xcscheme
  63. 38
      examples/objective-c/auth_sample/AuthTestService.podspec
  64. 4
      examples/objective-c/auth_sample/Podfile
  65. 38
      examples/objective-c/helloworld/HelloWorld.podspec
  66. 24
      examples/objective-c/helloworld/HelloWorld.xcodeproj/project.pbxproj
  67. 91
      examples/objective-c/helloworld/HelloWorld.xcodeproj/xcshareddata/xcschemes/HelloWorld.xcscheme
  68. 4
      examples/objective-c/helloworld/Podfile
  69. 2
      examples/objective-c/helloworld/README.md
  70. 108
      examples/objective-c/route_guide/Misc/Base.lproj/Main.storyboard
  71. 5
      examples/objective-c/route_guide/Podfile
  72. 38
      examples/objective-c/route_guide/RouteGuide.podspec
  73. 18
      examples/objective-c/route_guide/RouteGuideClient.xcodeproj/project.pbxproj
  74. 91
      examples/objective-c/route_guide/RouteGuideClient.xcodeproj/xcshareddata/xcschemes/RouteGuideClient.xcscheme
  75. 98
      examples/objective-c/route_guide/ViewControllers.m
  76. 7
      examples/php/README.md
  77. 8
      examples/php/composer.json
  78. 26
      examples/php/greeter_client.php
  79. 160
      examples/php/helloworld.php
  80. 768
      examples/php/route_guide/route_guide.php
  81. 266
      examples/php/route_guide/route_guide_client.php
  82. 2
      examples/python/helloworld/run_codegen.sh
  83. 2
      examples/python/route_guide/route_guide_server.py
  84. 2
      examples/python/route_guide/run_codegen.sh
  85. 792
      gRPC-Core.podspec
  86. 69
      gRPC-ProtoRPC.podspec
  87. 62
      gRPC-RxLibrary.podspec
  88. 694
      gRPC.podspec
  89. 5
      grpc.def
  90. 22
      grpc.gemspec
  91. 35
      include/grpc++/create_channel_posix.h
  92. 69
      include/grpc++/ext/proto_server_reflection_plugin.h
  93. 184
      include/grpc++/ext/reflection.grpc.pb.h
  94. 2035
      include/grpc++/ext/reflection.pb.h
  95. 2
      include/grpc++/grpc++.h
  96. 57
      include/grpc++/impl/codegen/async_stream.h
  97. 3
      include/grpc++/impl/codegen/async_unary_call.h
  98. 38
      include/grpc++/impl/codegen/call.h
  99. 12
      include/grpc++/impl/codegen/client_context.h
  100. 15
      include/grpc++/impl/codegen/completion_queue.h
  101. Some files were not shown because too many files have changed in this diff Show More

7
.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
@ -94,3 +96,6 @@ Pods/
# Artifacts directory # Artifacts directory
artifacts/ artifacts/
# Git generated files for conflicting
*.orig

2
.gitmodules vendored

@ -4,7 +4,7 @@
[submodule "third_party/protobuf"] [submodule "third_party/protobuf"]
path = third_party/protobuf path = third_party/protobuf
url = https://github.com/google/protobuf.git url = https://github.com/google/protobuf.git
branch = v3.0.0-beta-2 branch = 3.0.0-beta-3
[submodule "third_party/gflags"] [submodule "third_party/gflags"]
path = third_party/gflags path = third_party/gflags
url = https://github.com/gflags/gflags.git url = https://github.com/gflags/gflags.git

@ -1,32 +1,66 @@
git:
depth: 1
language: objective-c language: objective-c
osx_image: xcode7.2 osx_image: xcode7.3
env: env:
global: global:
- 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): Make tests an app project (instead of library), so the following will work.
# - 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:
# Until Travis upgrades from Cocoapods 0.39, we need to do it here.
- pod --version
- gem uninstall cocoapods -a
- gem install cocoapods -v '1.0.1'
- pod --version
# Recent pods aren't found if we don't explicitly update Cocoapods' repo.
- pod repo update
- brew install gflags - brew install gflags
# Pod install does this too, but we don't want the output.
- pod repo update --silent
install: install:
- make grpc_objective_c_plugin - pushd $TEST_PATH
- pushd src/objective-c/tests - pod install
# Needs to be verbose, or otherwise OpenSSL's prepare_command makes Travis
# time out:
- pod install --verbose
- 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.2 xctool -workspace "$TEST_PATH/$WORKSPACE" -scheme "$SCHEME"
-sdk iphonesimulator9.3 test;
fi
notifications: notifications:
email: false email: false

210
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,9 @@ 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/pollset.h", "src/core/lib/iomgr/pollset.h",
"src/core/lib/iomgr/pollset_set.h", "src/core/lib/iomgr/pollset_set.h",
"src/core/lib/iomgr/pollset_set_windows.h", "src/core/lib/iomgr/pollset_set_windows.h",
@ -227,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",
@ -235,6 +237,7 @@ cc_library(
"src/core/lib/transport/static_metadata.h", "src/core/lib/transport/static_metadata.h",
"src/core/lib/transport/transport.h", "src/core/lib/transport/transport.h",
"src/core/lib/transport/transport_impl.h", "src/core/lib/transport/transport_impl.h",
"src/core/ext/transport/chttp2/transport/bin_decoder.h",
"src/core/ext/transport/chttp2/transport/bin_encoder.h", "src/core/ext/transport/chttp2/transport/bin_encoder.h",
"src/core/ext/transport/chttp2/transport/chttp2_transport.h", "src/core/ext/transport/chttp2/transport/chttp2_transport.h",
"src/core/ext/transport/chttp2/transport/frame.h", "src/core/ext/transport/chttp2/transport/frame.h",
@ -272,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",
@ -316,7 +320,7 @@ cc_library(
"src/core/lib/channel/connected_channel.c", "src/core/lib/channel/connected_channel.c",
"src/core/lib/channel/http_client_filter.c", "src/core/lib/channel/http_client_filter.c",
"src/core/lib/channel/http_server_filter.c", "src/core/lib/channel/http_server_filter.c",
"src/core/lib/compression/compression_algorithm.c", "src/core/lib/compression/compression.c",
"src/core/lib/compression/message_compress.c", "src/core/lib/compression/message_compress.c",
"src/core/lib/debug/trace.c", "src/core/lib/debug/trace.c",
"src/core/lib/http/format_request.c", "src/core/lib/http/format_request.c",
@ -326,6 +330,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 +341,9 @@ 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/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",
"src/core/lib/iomgr/resolve_address_posix.c", "src/core/lib/iomgr/resolve_address_posix.c",
@ -392,6 +401,7 @@ cc_library(
"src/core/lib/transport/transport.c", "src/core/lib/transport/transport.c",
"src/core/lib/transport/transport_op_string.c", "src/core/lib/transport/transport_op_string.c",
"src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c", "src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c",
"src/core/ext/transport/chttp2/transport/bin_decoder.c",
"src/core/ext/transport/chttp2/transport/bin_encoder.c", "src/core/ext/transport/chttp2/transport/bin_encoder.c",
"src/core/ext/transport/chttp2/transport/chttp2_plugin.c", "src/core/ext/transport/chttp2/transport/chttp2_plugin.c",
"src/core/ext/transport/chttp2/transport/chttp2_transport.c", "src/core/ext/transport/chttp2/transport/chttp2_transport.c",
@ -435,6 +445,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",
@ -462,7 +473,9 @@ cc_library(
"src/core/ext/client_config/subchannel_index.c", "src/core/ext/client_config/subchannel_index.c",
"src/core/ext/client_config/uri_parser.c", "src/core/ext/client_config/uri_parser.c",
"src/core/ext/transport/chttp2/server/insecure/server_chttp2.c", "src/core/ext/transport/chttp2/server/insecure/server_chttp2.c",
"src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c",
"src/core/ext/transport/chttp2/client/insecure/channel_create.c", "src/core/ext/transport/chttp2/client/insecure/channel_create.c",
"src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c",
"src/core/ext/lb_policy/grpclb/load_balancer_api.c", "src/core/ext/lb_policy/grpclb/load_balancer_api.c",
"src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c",
"src/core/ext/lb_policy/pick_first/pick_first.c", "src/core/ext/lb_policy/pick_first/pick_first.c",
@ -490,6 +503,7 @@ cc_library(
"include/grpc/byte_buffer_reader.h", "include/grpc/byte_buffer_reader.h",
"include/grpc/compression.h", "include/grpc/compression.h",
"include/grpc/grpc.h", "include/grpc/grpc.h",
"include/grpc/grpc_posix.h",
"include/grpc/status.h", "include/grpc/status.h",
"include/grpc/impl/codegen/byte_buffer.h", "include/grpc/impl/codegen/byte_buffer.h",
"include/grpc/impl/codegen/byte_buffer_reader.h", "include/grpc/impl/codegen/byte_buffer_reader.h",
@ -553,6 +567,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",
@ -562,6 +578,9 @@ 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/pollset.h", "src/core/lib/iomgr/pollset.h",
"src/core/lib/iomgr/pollset_set.h", "src/core/lib/iomgr/pollset_set.h",
"src/core/lib/iomgr/pollset_set_windows.h", "src/core/lib/iomgr/pollset_set_windows.h",
@ -602,7 +621,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",
@ -611,6 +629,7 @@ cc_library(
"src/core/lib/transport/transport.h", "src/core/lib/transport/transport.h",
"src/core/lib/transport/transport_impl.h", "src/core/lib/transport/transport_impl.h",
"third_party/objective_c/Cronet/cronet_c_for_grpc.h", "third_party/objective_c/Cronet/cronet_c_for_grpc.h",
"src/core/ext/transport/chttp2/transport/bin_decoder.h",
"src/core/ext/transport/chttp2/transport/bin_encoder.h", "src/core/ext/transport/chttp2/transport/bin_encoder.h",
"src/core/ext/transport/chttp2/transport/chttp2_transport.h", "src/core/ext/transport/chttp2/transport/chttp2_transport.h",
"src/core/ext/transport/chttp2/transport/frame.h", "src/core/ext/transport/chttp2/transport/frame.h",
@ -664,6 +683,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",
@ -679,7 +699,7 @@ cc_library(
"src/core/lib/channel/connected_channel.c", "src/core/lib/channel/connected_channel.c",
"src/core/lib/channel/http_client_filter.c", "src/core/lib/channel/http_client_filter.c",
"src/core/lib/channel/http_server_filter.c", "src/core/lib/channel/http_server_filter.c",
"src/core/lib/compression/compression_algorithm.c", "src/core/lib/compression/compression.c",
"src/core/lib/compression/message_compress.c", "src/core/lib/compression/message_compress.c",
"src/core/lib/debug/trace.c", "src/core/lib/debug/trace.c",
"src/core/lib/http/format_request.c", "src/core/lib/http/format_request.c",
@ -689,6 +709,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",
@ -698,6 +720,9 @@ 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/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",
"src/core/lib/iomgr/resolve_address_posix.c", "src/core/lib/iomgr/resolve_address_posix.c",
@ -758,6 +783,7 @@ cc_library(
"src/core/ext/transport/cronet/transport/cronet_api_dummy.c", "src/core/ext/transport/cronet/transport/cronet_api_dummy.c",
"src/core/ext/transport/cronet/transport/cronet_transport.c", "src/core/ext/transport/cronet/transport/cronet_transport.c",
"src/core/ext/transport/chttp2/client/secure/secure_channel_create.c", "src/core/ext/transport/chttp2/client/secure/secure_channel_create.c",
"src/core/ext/transport/chttp2/transport/bin_decoder.c",
"src/core/ext/transport/chttp2/transport/bin_encoder.c", "src/core/ext/transport/chttp2/transport/bin_encoder.c",
"src/core/ext/transport/chttp2/transport/chttp2_plugin.c", "src/core/ext/transport/chttp2/transport/chttp2_plugin.c",
"src/core/ext/transport/chttp2/transport/chttp2_transport.c", "src/core/ext/transport/chttp2/transport/chttp2_transport.c",
@ -820,6 +846,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",
@ -833,6 +860,7 @@ cc_library(
"include/grpc/byte_buffer_reader.h", "include/grpc/byte_buffer_reader.h",
"include/grpc/compression.h", "include/grpc/compression.h",
"include/grpc/grpc.h", "include/grpc/grpc.h",
"include/grpc/grpc_posix.h",
"include/grpc/status.h", "include/grpc/status.h",
"include/grpc/impl/codegen/byte_buffer.h", "include/grpc/impl/codegen/byte_buffer.h",
"include/grpc/impl/codegen/byte_buffer_reader.h", "include/grpc/impl/codegen/byte_buffer_reader.h",
@ -891,6 +919,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",
@ -900,6 +930,9 @@ 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/pollset.h", "src/core/lib/iomgr/pollset.h",
"src/core/lib/iomgr/pollset_set.h", "src/core/lib/iomgr/pollset_set.h",
"src/core/lib/iomgr/pollset_set_windows.h", "src/core/lib/iomgr/pollset_set_windows.h",
@ -940,7 +973,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",
@ -948,6 +980,7 @@ cc_library(
"src/core/lib/transport/static_metadata.h", "src/core/lib/transport/static_metadata.h",
"src/core/lib/transport/transport.h", "src/core/lib/transport/transport.h",
"src/core/lib/transport/transport_impl.h", "src/core/lib/transport/transport_impl.h",
"src/core/ext/transport/chttp2/transport/bin_decoder.h",
"src/core/ext/transport/chttp2/transport/bin_encoder.h", "src/core/ext/transport/chttp2/transport/bin_encoder.h",
"src/core/ext/transport/chttp2/transport/chttp2_transport.h", "src/core/ext/transport/chttp2/transport/chttp2_transport.h",
"src/core/ext/transport/chttp2/transport/frame.h", "src/core/ext/transport/chttp2/transport/frame.h",
@ -1007,7 +1040,7 @@ cc_library(
"src/core/lib/channel/connected_channel.c", "src/core/lib/channel/connected_channel.c",
"src/core/lib/channel/http_client_filter.c", "src/core/lib/channel/http_client_filter.c",
"src/core/lib/channel/http_server_filter.c", "src/core/lib/channel/http_server_filter.c",
"src/core/lib/compression/compression_algorithm.c", "src/core/lib/compression/compression.c",
"src/core/lib/compression/message_compress.c", "src/core/lib/compression/message_compress.c",
"src/core/lib/debug/trace.c", "src/core/lib/debug/trace.c",
"src/core/lib/http/format_request.c", "src/core/lib/http/format_request.c",
@ -1017,6 +1050,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",
@ -1026,6 +1061,9 @@ 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/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",
"src/core/lib/iomgr/resolve_address_posix.c", "src/core/lib/iomgr/resolve_address_posix.c",
@ -1083,6 +1121,8 @@ cc_library(
"src/core/lib/transport/transport.c", "src/core/lib/transport/transport.c",
"src/core/lib/transport/transport_op_string.c", "src/core/lib/transport/transport_op_string.c",
"src/core/ext/transport/chttp2/server/insecure/server_chttp2.c", "src/core/ext/transport/chttp2/server/insecure/server_chttp2.c",
"src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c",
"src/core/ext/transport/chttp2/transport/bin_decoder.c",
"src/core/ext/transport/chttp2/transport/bin_encoder.c", "src/core/ext/transport/chttp2/transport/bin_encoder.c",
"src/core/ext/transport/chttp2/transport/chttp2_plugin.c", "src/core/ext/transport/chttp2/transport/chttp2_plugin.c",
"src/core/ext/transport/chttp2/transport/chttp2_transport.c", "src/core/ext/transport/chttp2/transport/chttp2_transport.c",
@ -1106,6 +1146,7 @@ cc_library(
"src/core/ext/transport/chttp2/transport/writing.c", "src/core/ext/transport/chttp2/transport/writing.c",
"src/core/ext/transport/chttp2/alpn/alpn.c", "src/core/ext/transport/chttp2/alpn/alpn.c",
"src/core/ext/transport/chttp2/client/insecure/channel_create.c", "src/core/ext/transport/chttp2/client/insecure/channel_create.c",
"src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c",
"src/core/ext/client_config/channel_connectivity.c", "src/core/ext/client_config/channel_connectivity.c",
"src/core/ext/client_config/client_channel.c", "src/core/ext/client_config/client_channel.c",
"src/core/ext/client_config/client_channel_factory.c", "src/core/ext/client_config/client_channel_factory.c",
@ -1152,6 +1193,7 @@ cc_library(
"include/grpc/byte_buffer_reader.h", "include/grpc/byte_buffer_reader.h",
"include/grpc/compression.h", "include/grpc/compression.h",
"include/grpc/grpc.h", "include/grpc/grpc.h",
"include/grpc/grpc_posix.h",
"include/grpc/status.h", "include/grpc/status.h",
"include/grpc/impl/codegen/byte_buffer.h", "include/grpc/impl/codegen/byte_buffer.h",
"include/grpc/impl/codegen/byte_buffer_reader.h", "include/grpc/impl/codegen/byte_buffer_reader.h",
@ -1191,31 +1233,11 @@ 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 = [
"include/grpc++/impl/codegen/core_codegen.h",
"src/cpp/client/secure_credentials.h", "src/cpp/client/secure_credentials.h",
"src/cpp/common/core_codegen.h",
"src/cpp/common/secure_auth_context.h", "src/cpp/common/secure_auth_context.h",
"src/cpp/server/secure_server_credentials.h", "src/cpp/server/secure_server_credentials.h",
"src/cpp/client/create_channel_internal.h", "src/cpp/client/create_channel_internal.h",
@ -1231,6 +1253,7 @@ cc_library(
"src/cpp/client/client_context.cc", "src/cpp/client/client_context.cc",
"src/cpp/client/create_channel.cc", "src/cpp/client/create_channel.cc",
"src/cpp/client/create_channel_internal.cc", "src/cpp/client/create_channel_internal.cc",
"src/cpp/client/create_channel_posix.cc",
"src/cpp/client/credentials.cc", "src/cpp/client/credentials.cc",
"src/cpp/client/generic_stub.cc", "src/cpp/client/generic_stub.cc",
"src/cpp/client/insecure_credentials.cc", "src/cpp/client/insecure_credentials.cc",
@ -1246,6 +1269,7 @@ cc_library(
"src/cpp/server/server_builder.cc", "src/cpp/server/server_builder.cc",
"src/cpp/server/server_context.cc", "src/cpp/server/server_context.cc",
"src/cpp/server/server_credentials.cc", "src/cpp/server/server_credentials.cc",
"src/cpp/server/server_posix.cc",
"src/cpp/util/byte_buffer.cc", "src/cpp/util/byte_buffer.cc",
"src/cpp/util/slice.cc", "src/cpp/util/slice.cc",
"src/cpp/util/status.cc", "src/cpp/util/status.cc",
@ -1259,14 +1283,15 @@ cc_library(
"include/grpc++/client_context.h", "include/grpc++/client_context.h",
"include/grpc++/completion_queue.h", "include/grpc++/completion_queue.h",
"include/grpc++/create_channel.h", "include/grpc++/create_channel.h",
"include/grpc++/create_channel_posix.h",
"include/grpc++/generic/async_generic_service.h", "include/grpc++/generic/async_generic_service.h",
"include/grpc++/generic/generic_stub.h", "include/grpc++/generic/generic_stub.h",
"include/grpc++/grpc++.h", "include/grpc++/grpc++.h",
"include/grpc++/impl/call.h", "include/grpc++/impl/call.h",
"include/grpc++/impl/client_unary_call.h", "include/grpc++/impl/client_unary_call.h",
"include/grpc++/impl/codegen/core_codegen.h",
"include/grpc++/impl/grpc_library.h", "include/grpc++/impl/grpc_library.h",
"include/grpc++/impl/method_handler_impl.h", "include/grpc++/impl/method_handler_impl.h",
"include/grpc++/impl/proto_utils.h",
"include/grpc++/impl/rpc_method.h", "include/grpc++/impl/rpc_method.h",
"include/grpc++/impl/rpc_service_method.h", "include/grpc++/impl/rpc_service_method.h",
"include/grpc++/impl/serialization_traits.h", "include/grpc++/impl/serialization_traits.h",
@ -1287,10 +1312,12 @@ cc_library(
"include/grpc++/server.h", "include/grpc++/server.h",
"include/grpc++/server_builder.h", "include/grpc++/server_builder.h",
"include/grpc++/server_context.h", "include/grpc++/server_context.h",
"include/grpc++/server_posix.h",
"include/grpc++/support/async_stream.h", "include/grpc++/support/async_stream.h",
"include/grpc++/support/async_unary_call.h", "include/grpc++/support/async_unary_call.h",
"include/grpc++/support/byte_buffer.h", "include/grpc++/support/byte_buffer.h",
"include/grpc++/support/channel_arguments.h", "include/grpc++/support/channel_arguments.h",
"include/grpc++/support/config.h",
"include/grpc++/support/slice.h", "include/grpc++/support/slice.h",
"include/grpc++/support/status.h", "include/grpc++/support/status.h",
"include/grpc++/support/status_code_enum.h", "include/grpc++/support/status_code_enum.h",
@ -1307,11 +1334,11 @@ cc_library(
"include/grpc++/impl/codegen/client_unary_call.h", "include/grpc++/impl/codegen/client_unary_call.h",
"include/grpc++/impl/codegen/completion_queue.h", "include/grpc++/impl/codegen/completion_queue.h",
"include/grpc++/impl/codegen/completion_queue_tag.h", "include/grpc++/impl/codegen/completion_queue_tag.h",
"include/grpc++/impl/codegen/config.h",
"include/grpc++/impl/codegen/core_codegen_interface.h", "include/grpc++/impl/codegen/core_codegen_interface.h",
"include/grpc++/impl/codegen/create_auth_context.h", "include/grpc++/impl/codegen/create_auth_context.h",
"include/grpc++/impl/codegen/grpc_library.h", "include/grpc++/impl/codegen/grpc_library.h",
"include/grpc++/impl/codegen/method_handler_impl.h", "include/grpc++/impl/codegen/method_handler_impl.h",
"include/grpc++/impl/codegen/proto_utils.h",
"include/grpc++/impl/codegen/rpc_method.h", "include/grpc++/impl/codegen/rpc_method.h",
"include/grpc++/impl/codegen/rpc_service_method.h", "include/grpc++/impl/codegen/rpc_service_method.h",
"include/grpc++/impl/codegen/security/auth_context.h", "include/grpc++/impl/codegen/security/auth_context.h",
@ -1349,10 +1376,6 @@ 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++/impl/codegen/config.h",
"include/grpc++/impl/codegen/config_protobuf.h",
"include/grpc++/support/config.h",
"include/grpc++/support/config_protobuf.h",
], ],
includes = [ includes = [
"include", "include",
@ -1367,11 +1390,88 @@ cc_library(
cc_library(
name = "grpc++_reflection",
srcs = [
"src/cpp/ext/proto_server_reflection.h",
"src/cpp/ext/proto_server_reflection.cc",
"src/cpp/ext/proto_server_reflection_plugin.cc",
"src/cpp/ext/reflection.grpc.pb.cc",
"src/cpp/ext/reflection.pb.cc",
],
hdrs = [
"include/grpc++/ext/proto_server_reflection_plugin.h",
"include/grpc++/ext/reflection.grpc.pb.h",
"include/grpc++/ext/reflection.pb.h",
"include/grpc++/impl/codegen/proto_utils.h",
"include/grpc++/impl/codegen/async_stream.h",
"include/grpc++/impl/codegen/async_unary_call.h",
"include/grpc++/impl/codegen/call.h",
"include/grpc++/impl/codegen/call_hook.h",
"include/grpc++/impl/codegen/channel_interface.h",
"include/grpc++/impl/codegen/client_context.h",
"include/grpc++/impl/codegen/client_unary_call.h",
"include/grpc++/impl/codegen/completion_queue.h",
"include/grpc++/impl/codegen/completion_queue_tag.h",
"include/grpc++/impl/codegen/config.h",
"include/grpc++/impl/codegen/core_codegen_interface.h",
"include/grpc++/impl/codegen/create_auth_context.h",
"include/grpc++/impl/codegen/grpc_library.h",
"include/grpc++/impl/codegen/method_handler_impl.h",
"include/grpc++/impl/codegen/rpc_method.h",
"include/grpc++/impl/codegen/rpc_service_method.h",
"include/grpc++/impl/codegen/security/auth_context.h",
"include/grpc++/impl/codegen/serialization_traits.h",
"include/grpc++/impl/codegen/server_context.h",
"include/grpc++/impl/codegen/server_interface.h",
"include/grpc++/impl/codegen/service_type.h",
"include/grpc++/impl/codegen/status.h",
"include/grpc++/impl/codegen/status_code_enum.h",
"include/grpc++/impl/codegen/string_ref.h",
"include/grpc++/impl/codegen/stub_options.h",
"include/grpc++/impl/codegen/sync.h",
"include/grpc++/impl/codegen/sync_cxx11.h",
"include/grpc++/impl/codegen/sync_no_cxx11.h",
"include/grpc++/impl/codegen/sync_stream.h",
"include/grpc++/impl/codegen/time.h",
"include/grpc/impl/codegen/byte_buffer.h",
"include/grpc/impl/codegen/byte_buffer_reader.h",
"include/grpc/impl/codegen/compression_types.h",
"include/grpc/impl/codegen/connectivity_state.h",
"include/grpc/impl/codegen/grpc_types.h",
"include/grpc/impl/codegen/propagation_bits.h",
"include/grpc/impl/codegen/status.h",
"include/grpc/impl/codegen/alloc.h",
"include/grpc/impl/codegen/atm.h",
"include/grpc/impl/codegen/atm_gcc_atomic.h",
"include/grpc/impl/codegen/atm_gcc_sync.h",
"include/grpc/impl/codegen/atm_windows.h",
"include/grpc/impl/codegen/log.h",
"include/grpc/impl/codegen/port_platform.h",
"include/grpc/impl/codegen/slice.h",
"include/grpc/impl/codegen/slice_buffer.h",
"include/grpc/impl/codegen/sync.h",
"include/grpc/impl/codegen/sync_generic.h",
"include/grpc/impl/codegen/sync_posix.h",
"include/grpc/impl/codegen/sync_windows.h",
"include/grpc/impl/codegen/time.h",
"include/grpc++/impl/codegen/config_protobuf.h",
],
includes = [
"include",
".",
],
deps = [
":grpc++",
],
)
cc_library( cc_library(
name = "grpc++_unsecure", name = "grpc++_unsecure",
srcs = [ srcs = [
"src/cpp/client/create_channel_internal.h", "src/cpp/client/create_channel_internal.h",
"src/cpp/common/core_codegen.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/cpp/common/insecure_create_auth_context.cc", "src/cpp/common/insecure_create_auth_context.cc",
@ -1379,6 +1479,7 @@ cc_library(
"src/cpp/client/client_context.cc", "src/cpp/client/client_context.cc",
"src/cpp/client/create_channel.cc", "src/cpp/client/create_channel.cc",
"src/cpp/client/create_channel_internal.cc", "src/cpp/client/create_channel_internal.cc",
"src/cpp/client/create_channel_posix.cc",
"src/cpp/client/credentials.cc", "src/cpp/client/credentials.cc",
"src/cpp/client/generic_stub.cc", "src/cpp/client/generic_stub.cc",
"src/cpp/client/insecure_credentials.cc", "src/cpp/client/insecure_credentials.cc",
@ -1394,6 +1495,7 @@ cc_library(
"src/cpp/server/server_builder.cc", "src/cpp/server/server_builder.cc",
"src/cpp/server/server_context.cc", "src/cpp/server/server_context.cc",
"src/cpp/server/server_credentials.cc", "src/cpp/server/server_credentials.cc",
"src/cpp/server/server_posix.cc",
"src/cpp/util/byte_buffer.cc", "src/cpp/util/byte_buffer.cc",
"src/cpp/util/slice.cc", "src/cpp/util/slice.cc",
"src/cpp/util/status.cc", "src/cpp/util/status.cc",
@ -1407,14 +1509,15 @@ cc_library(
"include/grpc++/client_context.h", "include/grpc++/client_context.h",
"include/grpc++/completion_queue.h", "include/grpc++/completion_queue.h",
"include/grpc++/create_channel.h", "include/grpc++/create_channel.h",
"include/grpc++/create_channel_posix.h",
"include/grpc++/generic/async_generic_service.h", "include/grpc++/generic/async_generic_service.h",
"include/grpc++/generic/generic_stub.h", "include/grpc++/generic/generic_stub.h",
"include/grpc++/grpc++.h", "include/grpc++/grpc++.h",
"include/grpc++/impl/call.h", "include/grpc++/impl/call.h",
"include/grpc++/impl/client_unary_call.h", "include/grpc++/impl/client_unary_call.h",
"include/grpc++/impl/codegen/core_codegen.h",
"include/grpc++/impl/grpc_library.h", "include/grpc++/impl/grpc_library.h",
"include/grpc++/impl/method_handler_impl.h", "include/grpc++/impl/method_handler_impl.h",
"include/grpc++/impl/proto_utils.h",
"include/grpc++/impl/rpc_method.h", "include/grpc++/impl/rpc_method.h",
"include/grpc++/impl/rpc_service_method.h", "include/grpc++/impl/rpc_service_method.h",
"include/grpc++/impl/serialization_traits.h", "include/grpc++/impl/serialization_traits.h",
@ -1435,10 +1538,12 @@ cc_library(
"include/grpc++/server.h", "include/grpc++/server.h",
"include/grpc++/server_builder.h", "include/grpc++/server_builder.h",
"include/grpc++/server_context.h", "include/grpc++/server_context.h",
"include/grpc++/server_posix.h",
"include/grpc++/support/async_stream.h", "include/grpc++/support/async_stream.h",
"include/grpc++/support/async_unary_call.h", "include/grpc++/support/async_unary_call.h",
"include/grpc++/support/byte_buffer.h", "include/grpc++/support/byte_buffer.h",
"include/grpc++/support/channel_arguments.h", "include/grpc++/support/channel_arguments.h",
"include/grpc++/support/config.h",
"include/grpc++/support/slice.h", "include/grpc++/support/slice.h",
"include/grpc++/support/status.h", "include/grpc++/support/status.h",
"include/grpc++/support/status_code_enum.h", "include/grpc++/support/status_code_enum.h",
@ -1455,11 +1560,11 @@ cc_library(
"include/grpc++/impl/codegen/client_unary_call.h", "include/grpc++/impl/codegen/client_unary_call.h",
"include/grpc++/impl/codegen/completion_queue.h", "include/grpc++/impl/codegen/completion_queue.h",
"include/grpc++/impl/codegen/completion_queue_tag.h", "include/grpc++/impl/codegen/completion_queue_tag.h",
"include/grpc++/impl/codegen/config.h",
"include/grpc++/impl/codegen/core_codegen_interface.h", "include/grpc++/impl/codegen/core_codegen_interface.h",
"include/grpc++/impl/codegen/create_auth_context.h", "include/grpc++/impl/codegen/create_auth_context.h",
"include/grpc++/impl/codegen/grpc_library.h", "include/grpc++/impl/codegen/grpc_library.h",
"include/grpc++/impl/codegen/method_handler_impl.h", "include/grpc++/impl/codegen/method_handler_impl.h",
"include/grpc++/impl/codegen/proto_utils.h",
"include/grpc++/impl/codegen/rpc_method.h", "include/grpc++/impl/codegen/rpc_method.h",
"include/grpc++/impl/codegen/rpc_service_method.h", "include/grpc++/impl/codegen/rpc_service_method.h",
"include/grpc++/impl/codegen/security/auth_context.h", "include/grpc++/impl/codegen/security/auth_context.h",
@ -1497,10 +1602,6 @@ 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++/impl/codegen/config.h",
"include/grpc++/impl/codegen/config_protobuf.h",
"include/grpc++/support/config.h",
"include/grpc++/support/config_protobuf.h",
], ],
includes = [ includes = [
"include", "include",
@ -1542,9 +1643,6 @@ cc_library(
"src/compiler/ruby_generator.cc", "src/compiler/ruby_generator.cc",
], ],
hdrs = [ hdrs = [
"include/grpc++/support/config.h",
"include/grpc++/support/config_protobuf.h",
"include/grpc++/impl/codegen/config.h",
"include/grpc++/impl/codegen/config_protobuf.h", "include/grpc++/impl/codegen/config_protobuf.h",
], ],
includes = [ includes = [
@ -1596,7 +1694,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",
@ -1675,7 +1772,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",
@ -1705,7 +1801,7 @@ objc_library(
"src/core/lib/channel/connected_channel.c", "src/core/lib/channel/connected_channel.c",
"src/core/lib/channel/http_client_filter.c", "src/core/lib/channel/http_client_filter.c",
"src/core/lib/channel/http_server_filter.c", "src/core/lib/channel/http_server_filter.c",
"src/core/lib/compression/compression_algorithm.c", "src/core/lib/compression/compression.c",
"src/core/lib/compression/message_compress.c", "src/core/lib/compression/message_compress.c",
"src/core/lib/debug/trace.c", "src/core/lib/debug/trace.c",
"src/core/lib/http/format_request.c", "src/core/lib/http/format_request.c",
@ -1715,6 +1811,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",
@ -1724,6 +1822,9 @@ 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/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",
"src/core/lib/iomgr/resolve_address_posix.c", "src/core/lib/iomgr/resolve_address_posix.c",
@ -1781,6 +1882,7 @@ objc_library(
"src/core/lib/transport/transport.c", "src/core/lib/transport/transport.c",
"src/core/lib/transport/transport_op_string.c", "src/core/lib/transport/transport_op_string.c",
"src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c", "src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c",
"src/core/ext/transport/chttp2/transport/bin_decoder.c",
"src/core/ext/transport/chttp2/transport/bin_encoder.c", "src/core/ext/transport/chttp2/transport/bin_encoder.c",
"src/core/ext/transport/chttp2/transport/chttp2_plugin.c", "src/core/ext/transport/chttp2/transport/chttp2_plugin.c",
"src/core/ext/transport/chttp2/transport/chttp2_transport.c", "src/core/ext/transport/chttp2/transport/chttp2_transport.c",
@ -1824,6 +1926,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",
@ -1851,7 +1954,9 @@ objc_library(
"src/core/ext/client_config/subchannel_index.c", "src/core/ext/client_config/subchannel_index.c",
"src/core/ext/client_config/uri_parser.c", "src/core/ext/client_config/uri_parser.c",
"src/core/ext/transport/chttp2/server/insecure/server_chttp2.c", "src/core/ext/transport/chttp2/server/insecure/server_chttp2.c",
"src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c",
"src/core/ext/transport/chttp2/client/insecure/channel_create.c", "src/core/ext/transport/chttp2/client/insecure/channel_create.c",
"src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c",
"src/core/ext/lb_policy/grpclb/load_balancer_api.c", "src/core/ext/lb_policy/grpclb/load_balancer_api.c",
"src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c",
"src/core/ext/lb_policy/pick_first/pick_first.c", "src/core/ext/lb_policy/pick_first/pick_first.c",
@ -1879,6 +1984,7 @@ objc_library(
"include/grpc/byte_buffer_reader.h", "include/grpc/byte_buffer_reader.h",
"include/grpc/compression.h", "include/grpc/compression.h",
"include/grpc/grpc.h", "include/grpc/grpc.h",
"include/grpc/grpc_posix.h",
"include/grpc/status.h", "include/grpc/status.h",
"include/grpc/impl/codegen/byte_buffer.h", "include/grpc/impl/codegen/byte_buffer.h",
"include/grpc/impl/codegen/byte_buffer_reader.h", "include/grpc/impl/codegen/byte_buffer_reader.h",
@ -1921,6 +2027,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",
@ -1930,6 +2038,9 @@ 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/pollset.h", "src/core/lib/iomgr/pollset.h",
"src/core/lib/iomgr/pollset_set.h", "src/core/lib/iomgr/pollset_set.h",
"src/core/lib/iomgr/pollset_set_windows.h", "src/core/lib/iomgr/pollset_set_windows.h",
@ -1970,7 +2081,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",
@ -1978,6 +2088,7 @@ objc_library(
"src/core/lib/transport/static_metadata.h", "src/core/lib/transport/static_metadata.h",
"src/core/lib/transport/transport.h", "src/core/lib/transport/transport.h",
"src/core/lib/transport/transport_impl.h", "src/core/lib/transport/transport_impl.h",
"src/core/ext/transport/chttp2/transport/bin_decoder.h",
"src/core/ext/transport/chttp2/transport/bin_encoder.h", "src/core/ext/transport/chttp2/transport/bin_encoder.h",
"src/core/ext/transport/chttp2/transport/chttp2_transport.h", "src/core/ext/transport/chttp2/transport/chttp2_transport.h",
"src/core/ext/transport/chttp2/transport/frame.h", "src/core/ext/transport/chttp2/transport/frame.h",
@ -2015,6 +2126,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

1366
Makefile

File diff suppressed because it is too large Load Diff

@ -1,12 +1,13 @@
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
graft third_party/boringssl graft third_party/boringssl
graft third_party/nanopb graft third_party/nanopb
graft third_party/zlib graft third_party/zlib
include src/python/grpcio/build.py
include src/python/grpcio/commands.py include src/python/grpcio/commands.py
include src/python/grpcio/grpc_version.py include src/python/grpcio/grpc_version.py
include src/python/grpcio/grpc_core_dependencies.py include src/python/grpcio/grpc_core_dependencies.py

@ -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',
@ -571,7 +570,7 @@
'src/core/lib/channel/connected_channel.c', 'src/core/lib/channel/connected_channel.c',
'src/core/lib/channel/http_client_filter.c', 'src/core/lib/channel/http_client_filter.c',
'src/core/lib/channel/http_server_filter.c', 'src/core/lib/channel/http_server_filter.c',
'src/core/lib/compression/compression_algorithm.c', 'src/core/lib/compression/compression.c',
'src/core/lib/compression/message_compress.c', 'src/core/lib/compression/message_compress.c',
'src/core/lib/debug/trace.c', 'src/core/lib/debug/trace.c',
'src/core/lib/http/format_request.c', 'src/core/lib/http/format_request.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,9 @@
'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/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',
'src/core/lib/iomgr/resolve_address_posix.c', 'src/core/lib/iomgr/resolve_address_posix.c',
@ -647,6 +651,7 @@
'src/core/lib/transport/transport.c', 'src/core/lib/transport/transport.c',
'src/core/lib/transport/transport_op_string.c', 'src/core/lib/transport/transport_op_string.c',
'src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c', 'src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c',
'src/core/ext/transport/chttp2/transport/bin_decoder.c',
'src/core/ext/transport/chttp2/transport/bin_encoder.c', 'src/core/ext/transport/chttp2/transport/bin_encoder.c',
'src/core/ext/transport/chttp2/transport/chttp2_plugin.c', 'src/core/ext/transport/chttp2/transport/chttp2_plugin.c',
'src/core/ext/transport/chttp2/transport/chttp2_transport.c', 'src/core/ext/transport/chttp2/transport/chttp2_transport.c',
@ -690,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',
@ -717,7 +723,9 @@
'src/core/ext/client_config/subchannel_index.c', 'src/core/ext/client_config/subchannel_index.c',
'src/core/ext/client_config/uri_parser.c', 'src/core/ext/client_config/uri_parser.c',
'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c', 'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c',
'src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c',
'src/core/ext/transport/chttp2/client/insecure/channel_create.c', 'src/core/ext/transport/chttp2/client/insecure/channel_create.c',
'src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c',
'src/core/ext/lb_policy/grpclb/load_balancer_api.c', 'src/core/ext/lb_policy/grpclb/load_balancer_api.c',
'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c', 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c',
'third_party/nanopb/pb_common.c', 'third_party/nanopb/pb_common.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: 1.1.0-dev
filegroups: filegroups:
- name: census - name: census
public_headers: public_headers:
@ -74,7 +74,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
@ -98,7 +97,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
@ -153,6 +151,7 @@ filegroups:
- include/grpc/byte_buffer_reader.h - include/grpc/byte_buffer_reader.h
- include/grpc/compression.h - include/grpc/compression.h
- include/grpc/grpc.h - include/grpc/grpc.h
- include/grpc/grpc_posix.h
- include/grpc/status.h - include/grpc/status.h
headers: headers:
- src/core/lib/channel/channel_args.h - src/core/lib/channel/channel_args.h
@ -172,6 +171,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
@ -181,6 +182,9 @@ 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/pollset.h - src/core/lib/iomgr/pollset.h
- src/core/lib/iomgr/pollset_set.h - src/core/lib/iomgr/pollset_set.h
- src/core/lib/iomgr/pollset_set_windows.h - src/core/lib/iomgr/pollset_set_windows.h
@ -221,7 +225,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
@ -237,7 +240,7 @@ filegroups:
- src/core/lib/channel/connected_channel.c - src/core/lib/channel/connected_channel.c
- src/core/lib/channel/http_client_filter.c - src/core/lib/channel/http_client_filter.c
- src/core/lib/channel/http_server_filter.c - src/core/lib/channel/http_server_filter.c
- src/core/lib/compression/compression_algorithm.c - src/core/lib/compression/compression.c
- src/core/lib/compression/message_compress.c - src/core/lib/compression/message_compress.c
- src/core/lib/debug/trace.c - src/core/lib/debug/trace.c
- src/core/lib/http/format_request.c - src/core/lib/http/format_request.c
@ -247,6 +250,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
@ -256,6 +261,9 @@ 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/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
- src/core/lib/iomgr/resolve_address_posix.c - src/core/lib/iomgr/resolve_address_posix.c
@ -438,6 +446,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:
@ -462,6 +471,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
@ -502,6 +512,7 @@ filegroups:
- gpr_test_util - gpr_test_util
- name: grpc_transport_chttp2 - name: grpc_transport_chttp2
headers: headers:
- src/core/ext/transport/chttp2/transport/bin_decoder.h
- src/core/ext/transport/chttp2/transport/bin_encoder.h - src/core/ext/transport/chttp2/transport/bin_encoder.h
- src/core/ext/transport/chttp2/transport/chttp2_transport.h - src/core/ext/transport/chttp2/transport/chttp2_transport.h
- src/core/ext/transport/chttp2/transport/frame.h - src/core/ext/transport/chttp2/transport/frame.h
@ -523,6 +534,7 @@ filegroups:
- src/core/ext/transport/chttp2/transport/timeout_encoding.h - src/core/ext/transport/chttp2/transport/timeout_encoding.h
- src/core/ext/transport/chttp2/transport/varint.h - src/core/ext/transport/chttp2/transport/varint.h
src: src:
- src/core/ext/transport/chttp2/transport/bin_decoder.c
- src/core/ext/transport/chttp2/transport/bin_encoder.c - src/core/ext/transport/chttp2/transport/bin_encoder.c
- src/core/ext/transport/chttp2/transport/chttp2_plugin.c - src/core/ext/transport/chttp2/transport/chttp2_plugin.c
- src/core/ext/transport/chttp2/transport/chttp2_transport.c - src/core/ext/transport/chttp2/transport/chttp2_transport.c
@ -558,6 +570,7 @@ filegroups:
- name: grpc_transport_chttp2_client_insecure - name: grpc_transport_chttp2_client_insecure
src: src:
- src/core/ext/transport/chttp2/client/insecure/channel_create.c - src/core/ext/transport/chttp2/client/insecure/channel_create.c
- src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c
uses: uses:
- grpc_transport_chttp2 - grpc_transport_chttp2
- grpc_base - grpc_base
@ -573,6 +586,7 @@ filegroups:
- name: grpc_transport_chttp2_server_insecure - name: grpc_transport_chttp2_server_insecure
src: src:
- src/core/ext/transport/chttp2/server/insecure/server_chttp2.c - src/core/ext/transport/chttp2/server/insecure/server_chttp2.c
- src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c
uses: uses:
- grpc_transport_chttp2 - grpc_transport_chttp2
- grpc_base - grpc_base
@ -629,14 +643,15 @@ filegroups:
- include/grpc++/client_context.h - include/grpc++/client_context.h
- include/grpc++/completion_queue.h - include/grpc++/completion_queue.h
- include/grpc++/create_channel.h - include/grpc++/create_channel.h
- include/grpc++/create_channel_posix.h
- include/grpc++/generic/async_generic_service.h - include/grpc++/generic/async_generic_service.h
- include/grpc++/generic/generic_stub.h - include/grpc++/generic/generic_stub.h
- include/grpc++/grpc++.h - include/grpc++/grpc++.h
- include/grpc++/impl/call.h - include/grpc++/impl/call.h
- include/grpc++/impl/client_unary_call.h - include/grpc++/impl/client_unary_call.h
- include/grpc++/impl/codegen/core_codegen.h
- include/grpc++/impl/grpc_library.h - include/grpc++/impl/grpc_library.h
- include/grpc++/impl/method_handler_impl.h - include/grpc++/impl/method_handler_impl.h
- include/grpc++/impl/proto_utils.h
- include/grpc++/impl/rpc_method.h - include/grpc++/impl/rpc_method.h
- include/grpc++/impl/rpc_service_method.h - include/grpc++/impl/rpc_service_method.h
- include/grpc++/impl/serialization_traits.h - include/grpc++/impl/serialization_traits.h
@ -657,10 +672,12 @@ filegroups:
- include/grpc++/server.h - include/grpc++/server.h
- include/grpc++/server_builder.h - include/grpc++/server_builder.h
- include/grpc++/server_context.h - include/grpc++/server_context.h
- include/grpc++/server_posix.h
- include/grpc++/support/async_stream.h - include/grpc++/support/async_stream.h
- include/grpc++/support/async_unary_call.h - include/grpc++/support/async_unary_call.h
- include/grpc++/support/byte_buffer.h - include/grpc++/support/byte_buffer.h
- include/grpc++/support/channel_arguments.h - include/grpc++/support/channel_arguments.h
- include/grpc++/support/config.h
- include/grpc++/support/slice.h - include/grpc++/support/slice.h
- include/grpc++/support/status.h - include/grpc++/support/status.h
- include/grpc++/support/status_code_enum.h - include/grpc++/support/status_code_enum.h
@ -670,7 +687,6 @@ filegroups:
- include/grpc++/support/time.h - include/grpc++/support/time.h
headers: headers:
- src/cpp/client/create_channel_internal.h - src/cpp/client/create_channel_internal.h
- src/cpp/common/core_codegen.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: src:
@ -678,6 +694,7 @@ filegroups:
- src/cpp/client/client_context.cc - src/cpp/client/client_context.cc
- src/cpp/client/create_channel.cc - src/cpp/client/create_channel.cc
- src/cpp/client/create_channel_internal.cc - src/cpp/client/create_channel_internal.cc
- src/cpp/client/create_channel_posix.cc
- src/cpp/client/credentials.cc - src/cpp/client/credentials.cc
- src/cpp/client/generic_stub.cc - src/cpp/client/generic_stub.cc
- src/cpp/client/insecure_credentials.cc - src/cpp/client/insecure_credentials.cc
@ -693,6 +710,7 @@ filegroups:
- src/cpp/server/server_builder.cc - src/cpp/server/server_builder.cc
- src/cpp/server/server_context.cc - src/cpp/server/server_context.cc
- src/cpp/server/server_credentials.cc - src/cpp/server/server_credentials.cc
- src/cpp/server/server_posix.cc
- src/cpp/util/byte_buffer.cc - src/cpp/util/byte_buffer.cc
- src/cpp/util/slice.cc - src/cpp/util/slice.cc
- src/cpp/util/status.cc - src/cpp/util/status.cc
@ -701,9 +719,8 @@ filegroups:
deps: deps:
- grpc - grpc
uses: uses:
- grpc++_codegen - grpc++_codegen_base
- grpc++_config - name: grpc++_codegen_base
- name: grpc++_codegen
language: c++ language: c++
public_headers: public_headers:
- include/grpc++/impl/codegen/async_stream.h - include/grpc++/impl/codegen/async_stream.h
@ -715,11 +732,11 @@ filegroups:
- include/grpc++/impl/codegen/client_unary_call.h - include/grpc++/impl/codegen/client_unary_call.h
- include/grpc++/impl/codegen/completion_queue.h - include/grpc++/impl/codegen/completion_queue.h
- include/grpc++/impl/codegen/completion_queue_tag.h - include/grpc++/impl/codegen/completion_queue_tag.h
- include/grpc++/impl/codegen/config.h
- include/grpc++/impl/codegen/core_codegen_interface.h - include/grpc++/impl/codegen/core_codegen_interface.h
- include/grpc++/impl/codegen/create_auth_context.h - include/grpc++/impl/codegen/create_auth_context.h
- include/grpc++/impl/codegen/grpc_library.h - include/grpc++/impl/codegen/grpc_library.h
- include/grpc++/impl/codegen/method_handler_impl.h - include/grpc++/impl/codegen/method_handler_impl.h
- include/grpc++/impl/codegen/proto_utils.h
- include/grpc++/impl/codegen/rpc_method.h - include/grpc++/impl/codegen/rpc_method.h
- include/grpc++/impl/codegen/rpc_service_method.h - include/grpc++/impl/codegen/rpc_service_method.h
- include/grpc++/impl/codegen/security/auth_context.h - include/grpc++/impl/codegen/security/auth_context.h
@ -736,22 +753,24 @@ filegroups:
- include/grpc++/impl/codegen/sync_no_cxx11.h - include/grpc++/impl/codegen/sync_no_cxx11.h
- include/grpc++/impl/codegen/sync_stream.h - include/grpc++/impl/codegen/sync_stream.h
- include/grpc++/impl/codegen/time.h - include/grpc++/impl/codegen/time.h
uses:
- grpc_codegen
- name: grpc++_codegen_base_src
language: c++
src: src:
- src/cpp/codegen/codegen_init.cc - src/cpp/codegen/codegen_init.cc
uses: uses:
- grpc_codegen - grpc++_codegen_base
- grpc++_config_codegen - name: grpc++_codegen_proto
- name: grpc++_config
language: c++ language: c++
public_headers: public_headers:
- include/grpc++/support/config.h - include/grpc++/impl/codegen/proto_utils.h
- include/grpc++/support/config_protobuf.h
uses: uses:
- grpc++_config_codegen - grpc++_codegen_base
- name: grpc++_config_codegen - grpc++_config_proto
- name: grpc++_config_proto
language: c++ language: c++
public_headers: public_headers:
- include/grpc++/impl/codegen/config.h
- include/grpc++/impl/codegen/config_protobuf.h - include/grpc++/impl/codegen/config_protobuf.h
libs: libs:
- name: gpr - name: gpr
@ -890,21 +909,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
@ -934,8 +938,8 @@ libs:
build: all build: all
language: c++ language: c++
headers: headers:
- include/grpc++/impl/codegen/core_codegen.h
- src/cpp/client/secure_credentials.h - src/cpp/client/secure_credentials.h
- src/cpp/common/core_codegen.h
- src/cpp/common/secure_auth_context.h - src/cpp/common/secure_auth_context.h
- src/cpp/server/secure_server_credentials.h - src/cpp/server/secure_server_credentials.h
src: src:
@ -951,9 +955,28 @@ libs:
dll: true dll: true
filegroups: filegroups:
- grpc++_base - grpc++_base
- grpc++_codegen - grpc++_codegen_base
- grpc++_codegen_base_src
secure: check secure: check
vs_project_guid: '{C187A093-A0FE-489D-A40A-6E33DE0F9FEB}' vs_project_guid: '{C187A093-A0FE-489D-A40A-6E33DE0F9FEB}'
- name: grpc++_reflection
build: all
language: c++
public_headers:
- include/grpc++/ext/proto_server_reflection_plugin.h
- include/grpc++/ext/reflection.grpc.pb.h
- include/grpc++/ext/reflection.pb.h
headers:
- src/cpp/ext/proto_server_reflection.h
src:
- src/cpp/ext/proto_server_reflection.cc
- src/cpp/ext/proto_server_reflection_plugin.cc
- src/cpp/ext/reflection.grpc.pb.cc
- src/cpp/ext/reflection.pb.cc
deps:
- grpc++
filegroups:
- grpc++_codegen_proto
- name: grpc++_test_config - name: grpc++_test_config
build: private build: private
language: c++ language: c++
@ -984,6 +1007,11 @@ libs:
deps: deps:
- grpc++ - grpc++
- grpc_test_util - grpc_test_util
filegroups:
- grpc++_codegen_base
- grpc++_codegen_base_src
- grpc++_codegen_proto
- grpc++_config_proto
- name: grpc++_unsecure - name: grpc++_unsecure
build: all build: all
language: c++ language: c++
@ -996,7 +1024,8 @@ libs:
dll: true dll: true
filegroups: filegroups:
- grpc++_base - grpc++_base
- grpc++_codegen - grpc++_codegen_base
- grpc++_codegen_base_src
secure: false secure: false
vs_project_guid: '{6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}' vs_project_guid: '{6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}'
- name: grpc_cli_libs - name: grpc_cli_libs
@ -1038,7 +1067,7 @@ libs:
- src/compiler/python_generator.cc - src/compiler/python_generator.cc
- src/compiler/ruby_generator.cc - src/compiler/ruby_generator.cc
filegroups: filegroups:
- grpc++_config - grpc++_config_proto
secure: false secure: false
vs_project_guid: '{B6E81D84-2ACB-41B8-8781-493A944C7817}' vs_project_guid: '{B6E81D84-2ACB-41B8-8781-493A944C7817}'
vs_props: vs_props:
@ -1096,7 +1125,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
@ -1115,6 +1144,7 @@ libs:
- test/cpp/qps/histogram.h - test/cpp/qps/histogram.h
- test/cpp/qps/interarrival.h - test/cpp/qps/interarrival.h
- test/cpp/qps/limit_cores.h - test/cpp/qps/limit_cores.h
- test/cpp/qps/parse_json.h
- test/cpp/qps/qps_worker.h - test/cpp/qps/qps_worker.h
- test/cpp/qps/report.h - test/cpp/qps/report.h
- test/cpp/qps/server.h - test/cpp/qps/server.h
@ -1131,6 +1161,7 @@ libs:
- test/cpp/qps/client_sync.cc - test/cpp/qps/client_sync.cc
- test/cpp/qps/driver.cc - test/cpp/qps/driver.cc
- test/cpp/qps/limit_cores.cc - test/cpp/qps/limit_cores.cc
- test/cpp/qps/parse_json.cc
- test/cpp/qps/qps_worker.cc - test/cpp/qps/qps_worker.cc
- test/cpp/qps/report.cc - test/cpp/qps/report.cc
- test/cpp/qps/server_async.cc - test/cpp/qps/server_async.cc
@ -1215,6 +1246,25 @@ 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
build: test
language: c
src:
- test/core/transport/chttp2/bin_decoder_test.c
deps:
- grpc_test_util
- grpc
- name: bin_encoder_test - name: bin_encoder_test
build: test build: test
language: c language: c
@ -1373,6 +1423,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
@ -1424,7 +1486,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:
@ -1439,7 +1501,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:
@ -1538,14 +1600,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
@ -1571,7 +1625,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:
@ -1695,10 +1749,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
@ -1710,7 +1763,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
@ -1759,9 +1813,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
@ -1779,9 +1831,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
@ -1817,11 +1867,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
@ -1830,16 +1890,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
@ -1922,6 +1985,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:
@ -2005,6 +2069,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
@ -2125,6 +2199,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
@ -2221,7 +2305,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:
@ -2289,16 +2373,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
@ -2370,20 +2444,6 @@ targets:
- grpc - grpc
- gpr_test_util - gpr_test_util
- gpr - gpr
- name: workqueue_test
build: test
language: c
src:
- test/core/iomgr/workqueue_test.c
deps:
- grpc_test_util
- grpc
- gpr_test_util
- gpr
platforms:
- mac
- linux
- posix
- name: alarm_cpp_test - name: alarm_cpp_test
gtest: true gtest: true
build: test build: test
@ -2494,7 +2554,7 @@ targets:
- grpc - grpc
- gpr - gpr
filegroups: filegroups:
- grpc++_codegen - grpc++_codegen_base
- name: codegen_test_minimal - name: codegen_test_minimal
gtest: true gtest: true
build: test build: test
@ -2507,7 +2567,8 @@ targets:
- src/proto/grpc/testing/stats.proto - src/proto/grpc/testing/stats.proto
- test/cpp/codegen/codegen_test_minimal.cc - test/cpp/codegen/codegen_test_minimal.cc
filegroups: filegroups:
- grpc++_codegen - grpc++_codegen_base
- grpc++_codegen_base_src
- name: credentials_test - name: credentials_test
gtest: true gtest: true
build: test build: test
@ -2793,6 +2854,23 @@ targets:
- grpc - grpc
- gpr_test_util - gpr_test_util
- gpr - gpr
- name: proto_server_reflection_test
gtest: true
build: test
language: c++
headers:
- test/cpp/util/proto_reflection_descriptor_database.h
src:
- test/cpp/end2end/proto_server_reflection_test.cc
- test/cpp/util/proto_reflection_descriptor_database.cc
deps:
- grpc++_reflection
- grpc++_test_util
- grpc_test_util
- grpc++
- grpc
- gpr_test_util
- gpr
- name: qps_interarrival_test - name: qps_interarrival_test
build: test build: test
run: false run: false
@ -2815,10 +2893,7 @@ targets:
build: test build: test
run: false run: false
language: c++ language: c++
headers:
- test/cpp/qps/parse_json.h
src: src:
- test/cpp/qps/parse_json.cc
- test/cpp/qps/qps_json_driver.cc - test/cpp/qps/qps_json_driver.cc
deps: deps:
- qps - qps
@ -3057,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
@ -3227,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++

@ -2,20 +2,15 @@
"name": "grpc/grpc", "name": "grpc/grpc",
"type": "library", "type": "library",
"description": "gRPC library for PHP", "description": "gRPC library for PHP",
"version": "0.15.0",
"keywords": ["rpc"], "keywords": ["rpc"],
"homepage": "http://grpc.io", "homepage": "http://grpc.io",
"license": "BSD-3-Clause", "license": "BSD-3-Clause",
"repositories": [
{
"type": "vcs",
"url": "https://github.com/stanley-cheung/Protobuf-PHP"
}
],
"require": { "require": {
"php": ">=5.5.0", "php": ">=5.5.0",
"datto/protobuf-php": "dev-master", "stanley-cheung/protobuf-php": "dev-master"
"google/auth": "v0.7" },
"require-dev": {
"google/auth": "v0.9"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {

@ -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 \
@ -90,7 +89,7 @@ if test "$PHP_GRPC" != "no"; then
src/core/lib/channel/connected_channel.c \ src/core/lib/channel/connected_channel.c \
src/core/lib/channel/http_client_filter.c \ src/core/lib/channel/http_client_filter.c \
src/core/lib/channel/http_server_filter.c \ src/core/lib/channel/http_server_filter.c \
src/core/lib/compression/compression_algorithm.c \ src/core/lib/compression/compression.c \
src/core/lib/compression/message_compress.c \ src/core/lib/compression/message_compress.c \
src/core/lib/debug/trace.c \ src/core/lib/debug/trace.c \
src/core/lib/http/format_request.c \ src/core/lib/http/format_request.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,9 @@ 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/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 \
src/core/lib/iomgr/resolve_address_posix.c \ src/core/lib/iomgr/resolve_address_posix.c \
@ -166,6 +170,7 @@ if test "$PHP_GRPC" != "no"; then
src/core/lib/transport/transport.c \ src/core/lib/transport/transport.c \
src/core/lib/transport/transport_op_string.c \ src/core/lib/transport/transport_op_string.c \
src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c \ src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c \
src/core/ext/transport/chttp2/transport/bin_decoder.c \
src/core/ext/transport/chttp2/transport/bin_encoder.c \ src/core/ext/transport/chttp2/transport/bin_encoder.c \
src/core/ext/transport/chttp2/transport/chttp2_plugin.c \ src/core/ext/transport/chttp2/transport/chttp2_plugin.c \
src/core/ext/transport/chttp2/transport/chttp2_transport.c \ src/core/ext/transport/chttp2/transport/chttp2_transport.c \
@ -209,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 \
@ -236,7 +242,9 @@ if test "$PHP_GRPC" != "no"; then
src/core/ext/client_config/subchannel_index.c \ src/core/ext/client_config/subchannel_index.c \
src/core/ext/client_config/uri_parser.c \ src/core/ext/client_config/uri_parser.c \
src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \ src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \
src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c \
src/core/ext/transport/chttp2/client/insecure/channel_create.c \ src/core/ext/transport/chttp2/client/insecure/channel_create.c \
src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c \
src/core/ext/lb_policy/grpclb/load_balancer_api.c \ src/core/ext/lb_policy/grpclb/load_balancer_api.c \
src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c \ src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c \
third_party/nanopb/pb_common.c \ third_party/nanopb/pb_common.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}

@ -9,16 +9,17 @@ Here we document style rules for C usage in the gRPC Core library.
General General
------- -------
- Layout rules are defined by clang-format, and all code should be passed through - Layout rules are defined by clang-format, and all code should be passed
clang-format. A (docker-based) script to do so is included in through clang-format. A (docker-based) script to do so is included in
tools/distrib/clang_format_code.sh. [tools/distrib/clang\_format\_code.sh](../tools/distrib/clang_format_code.sh).
Header Files Header Files
------------ ------------
- Public header files (those in the include/grpc tree) should compile as pedantic C89 - Public header files (those in the include/grpc tree) should compile as
- Public header files should be includable from C++ programs. That is, they should pedantic C89.
include the following: - Public header files should be includable from C++ programs. That is, they
should include the following:
```c ```c
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -34,24 +35,34 @@ Header Files
- All header files should have a #define guard to prevent multiple inclusion. - All header files should have a #define guard to prevent multiple inclusion.
To guarantee uniqueness they should be based on the file's path. To guarantee uniqueness they should be based on the file's path.
For public headers: include/grpc/grpc.h --> GRPC_GRPC_H For public headers: `include/grpc/grpc.h``GRPC_GRPC_H`
For private headers:
`src/core/channel/channel_stack.h`
`GRPC_INTERNAL_CORE_CHANNEL_CHANNEL_STACK_H`
Variable Initialization
-----------------------
When declaring a (non-static) pointer variable, always initialize it to `NULL`.
Even in the case of static pointer variables, it's recommended to explicitly
initialize them to `NULL`.
For private headers:
src/core/channel/channel_stack.h --> GRPC_INTERNAL_CORE_CHANNEL_CHANNEL_STACK_H
C99 Features C99 Features
------------ ------------
- Variable sized arrays are not allowed - Variable sized arrays are not allowed.
- Do not use the 'inline' keyword - Do not use the 'inline' keyword.
- Flexible array members are allowed (https://en.wikipedia.org/wiki/Flexible_array_member) - Flexible array members are allowed
(https://en.wikipedia.org/wiki/Flexible_array_member).
Comments Comments
-------- --------
Within public header files, only `/* */` comments are allowed. Within public header files, only `/* */` comments are allowed.
Within implementation files and private headers, either single line `//` Within implementation files and private headers, either single line `//`
or multi line `/* */` comments are allowed. Only one comment style per file is or multi line `/* */` comments are allowed. Only one comment style per file is
allowed however (i.e. if single line comments are used anywhere within a file, allowed however (i.e. if single line comments are used anywhere within a file,
ALL comments within that file must be single line comments). ALL comments within that file must be single line comments).
@ -59,7 +70,15 @@ ALL comments within that file must be single line comments).
Symbol Names Symbol Names
------------ ------------
- Non-static functions must be prefixed by grpc_ - Non-static functions must be prefixed by `grpc_`
- static functions must not be prefixed by grpc_ - Static functions must *not* be prefixed by `grpc_`
- enumeration values and #define names are uppercased, all others are lowercased - Enumeration values and `#define` names must be uppercase. All other values
- Multiple word identifiers use underscore as a delimiter (NEVER camel casing) must be lowercase.
- Multiple word identifiers use underscore as a delimiter, *never* camel
case. E.g. `variable_name`.
Functions
----------
- The use of [`atexit()`](http://man7.org/linux/man-pages/man3/atexit.3.html) is
in forbidden in libgrpc.

@ -0,0 +1,77 @@
# gRPC command line tool
## Overview
This document describes the command line tool that comes with gRPC repository. It is desireable to have command line
tools written in other languages to roughly follow the same syntax and flags.
At this point, the tool needs to be built from source, and it should be moved out to grpc-tools repository as a stand
alone application once it is mature enough.
## Core functionality
The command line tool can do the following things:
- Send unary rpc.
- Attach metadata and display received metadata.
- Handle common authentication to server.
- Find the request/response types from a given proto file.
- Read proto request in text form.
- Read request in wire form (for protobuf messages, this means serialized binary form).
- Display proto response in text form.
- Write response in wire form to a file.
The command line tool should support the following things:
- List server services and methods through server reflection.
- Infer request/response types from server reflection result.
- Fine-grained auth control (such as, use this oauth token to talk to the server).
- Send streaming rpc.
## Code location
To use the tool, you need to get the grpc repository and in the grpc directory execute
```
$ make grpc_cli
```
The main file can be found at
https://github.com/grpc/grpc/blob/master/test/cpp/util/grpc_cli.cc
## Usage
### Basic usage
Send a rpc to a helloworld server at `localhost:50051`:
```
$ bins/opt/grpc_cli call localhost:50051 SayHello examples/protos/helloworld.proto \
"name: 'world'" --enable_ssl=false
```
On success, the tool will print out
```
Rpc succeeded with OK status
Response:
message: "Hello world"
```
The `localhost:50051` part indicates the server you are connecting to. `SayHello` is (part of) the
gRPC method string. Then there is the path to the proto file containing the service definition,
if it is not under current directory, you can use `--proto_path` to specify a new search root.
`"name: 'world'"` is the text format of the request proto message.
We are not using ssl here by `--enable_ssl=false`. For information on more
flags, look at the comments of `grpc_cli.cc`.
### Send non-proto rpc
For using gRPC with protocols other than probobuf, you will need the exact method name string
and a file containing the raw bytes to be sent on the wire
```
$ bins/opt/grpc_cli call localhost:50051 /helloworld.Greeter/SayHello --input_binary_file=input.bin \
--output_binary_file=output.bin
```
On success, you will need to read or decode the response from the `output.bin` file.

@ -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.

@ -0,0 +1,133 @@
# gRPC (Core) Compression Cookbook
## Introduction
This document describes compression as implemented by the gRPC C core. See [the
full compression specification](compression.md) for details.
### Intended Audience
Wrapped languages developers, for the purposes of supporting compression by
interacting with the C core.
## Criteria for GA readiness
1. Be able to set compression at [channel](#per-channel-settings),
[call](#per-call-settings) and [message](#per-message-settings) level.
In principle this API should be based on _compression levels_ as opposed to
algorithms. See the discussion [below](#level-vs-algorithms).
1. Have unit tests covering [the cases from the
spec](https://github.com/grpc/grpc/blob/master/doc/compression.md#test-cases).
1. Interop tests implemented and passing on Jenkins. The two relevant interop
test cases are
[large_compressed_unary](https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md#large_compressed_unary)
and
[server_compressed_streaming](https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md#server_compressed_streaming).
## Summary Flowcharts
The following flowcharts depict the evolution of a message, both _incoming_ and
_outgoing_, irrespective of the client/server character of the call. Aspects
still not symmetric between clients and servers (e.g. the [use of compression
levels](https://github.com/grpc/grpc/blob/master/doc/compression.md#compression-levels-and-algorithms))
are explicitly marked. The in-detail textual description for the different
scenarios is described in subsequent sections.
## Incoming Messages
![image](images/compression_cookbook_incoming.png)
## Outgoing Messages
![image](images/compression_cookbook_outgoing.png)
## Levels vs Algorithms
As mentioned in [the relevant discussion on the spec
document](https://github.com/grpc/grpc/blob/master/doc/compression.md#compression-levels-and-algorithms),
compression _levels_ are the primary mechanism for compression selection _at the
server side_. In the future, it'll also be at the client side. The use of levels
abstracts away the intricacies of selecting a concrete algorithm supported by a
peer, on top of removing the burden of choice from the developer.
As of this writing (Q2 2016), clients can only specify compression _algorithms_.
Clients will support levels as soon as an automatic retry/negotiation mechanism
is in place.
## Per Channel Settings
Compression may be configured at channel creation. This is a convenience to
avoid having to repeatedly configure compression for every call. Note that any
compression setting on individual [calls](#per-call-settings) or
[messages](#per-message-settings) overrides channel settings.
The following aspects can be configured at channel-creation time via channel arguments:
#### Disable Compression _Algorithms_
Use the channel argument key
`GRPC_COMPRESSION_CHANNEL_ENABLED_ALGORITHMS_BITSET` (from
[`grpc/impl/codegen/compression_types.h`](https://github.com/grpc/grpc/blob/master/include/grpc/impl/codegen/compression_types.h)),
takes a 32 bit bitset value. A set bit means the algorithm with that enum value
according to `grpc_compression_algorithm` is _enabled_.
For example, `GRPC_COMPRESS_GZIP` currently has a numeric value of 2. To
enable/disable GZIP for a channel, one would set/clear the 3rd LSB (eg, 0b100 =
0x4). Note that setting/clearing 0th position, that corresponding to
`GRPC_COMPRESS_NONE`, has no effect, as no-compression (a.k.a. _identity_) is
always supported.
Incoming messages compressed (ie, encoded) with a disabled algorithm will result
in the call being closed with `GRPC_STATUS_UNIMPLEMENTED`.
#### Default Compression _Level_
**(currently, Q2 2016, only applicable for server side channels. It's ignored
for clients.)**
Use the channel argument key `GRPC_COMPRESSION_CHANNEL_DEFAULT_LEVEL` (from
[`grpc/impl/codegen/compression_types.h`](https://github.com/grpc/grpc/blob/master/include/grpc/impl/codegen/compression_types.h)),
valued by an integer corresponding to a value from the `grpc_compression_level`
enum.
#### Default Compression _Algorithm_
Use the channel argument key `GRPC_COMPRESSION_CHANNEL_DEFAULT_ALGORITHM` (from
[`grpc/impl/codegen/compression_types.h`](https://github.com/grpc/grpc/blob/master/include/grpc/impl/codegen/compression_types.h)),
valued by an integer corresponding to a value from the `grpc_compression_level`
enum.
## Per Call Settings
### Compression **Level** in Call Responses
The server requests a compression level via initial metadata. The
`send_initial_metadata` `grpc_op` contains a `maybe_compression_level` field
with two fields, `is_set` and `compression_level`. The former must be set when
actively choosing a level to disambiguate the default value of zero (no
compression) from the proactive selection of no compression.
The core will receive the request for the compression level and automatically
choose a compression algorithm based on its knowledge about the peer
(communicated by the client via the `grpc-accept-encoding` header. Note that the
absence of this header means no compression is supported by the client/peer).
### Compression **Algorithm** in Call Responses
**Server should avoid setting the compression algorithm directly**. Prefer
setting compression levels unless there's a _very_ compelling reason to choose
specific algorithms (benchmarking, testing).
Selection of concrete compression algorithms is performed by adding a
`(GRPC_COMPRESS_REQUEST_ALGORITHM_KEY, <algorithm-name>)` key-value pair to the
initial metadata, where `GRPC_COMPRESS_REQUEST_ALGORITHM_KEY` is defined in
[`grpc/impl/codegen/compression_types.h`](https://github.com/grpc/grpc/blob/master/include/grpc/impl/codegen/compression_types.h)),
and `<algorithm-name>` is the human readable name of the algorithm as given in
[the HTTP2 spec](https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md)
for `Message-Encoding` (e.g. gzip, identity, etc.). See
[`grpc_compression_algorithm_name`](https://github.com/grpc/grpc/blob/master/src/core/lib/compression/compression.c)
for the mapping between the `grpc_compression_algorithm` enum values and their
textual representation.
## Per Message Settings
To disable compression for a specific message, the `flags` field of `grpc_op`
instances of type `GRPC_OP_SEND_MESSAGE` must have its `GRPC_WRITE_NO_COMPRESS`
bit set. Refer to
[`grpc/impl/codegen/compression_types.h`](https://github.com/grpc/grpc/blob/master/include/grpc/impl/codegen/compression_types.h)),

@ -0,0 +1,91 @@
GRPC C++ STYLE GUIDE
=====================
Background
----------
Here we document style rules for C++ usage in the gRPC C++ bindings
and tests.
General
-------
- The majority of gRPC's C++ requirements are drawn from the [Google C++ style
guide] (https://google.github.io/styleguide/cppguide.html)
- However, gRPC has some additional requirements to maintain
[portability] (#portability)
- As in C, layout rules are defined by clang-format, and all code
should be passed through clang-format. A (docker-based) script to do
so is included in [tools/distrib/clang\_format\_code.sh]
(../tools/distrib/clang_format_code.sh).
<a name="portability"></a>
Portability Restrictions
-------------------
gRPC supports a large number of compilers, ranging from those that are
missing many key C++11 features to those that have quite detailed
analysis. As a result, gRPC compiles with a high level of warnings and
treat all warnings as errors. gRPC also forbids the use of some common
C++11 constructs. Here are some guidelines, to be extended as needed:
- Do not use range-based for. Expressions of the form
```c
for (auto& i: vec) {
// code
}
```
are not allowed and should be replaced with code such as
```c
for (auto it = vec.begin; it != vec.end(); it++) {
auto& i = *it;
// code
}
```
- Do not use lambda of any kind (no capture, explicit capture, or
default capture). Other C++ functional features such as
`std::function` or `std::bind` are allowed
- Do not use brace-list initializers.
- Do not compare a pointer to `nullptr` . This is because gcc 4.4
does not support `nullptr` directly and gRPC implements a subset of
its features in [include/grpc++/impl/codegen/config.h]
(../include/grpc++/impl/codegen/config.h). Instead, pointers should
be checked for validity using their implicit conversion to `bool`.
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
compilers. Instead use `GRPC_FINAL` and `GRPC_OVERRIDE` . These
compile down to the traditional C++ forms for compilers that support
them but are just elided if the compiler does not support those features.
- In the [include] (../../../tree/master/include/grpc++) and [src]
(../../../tree/master/src/cpp) directory trees, you should also not
use certain STL objects like `std::mutex`, `std::lock_guard`,
`std::unique_lock`, `std::nullptr`, `std::thread` . Instead, use
`grpc::mutex`, `grpc::lock_guard`, etc., which are gRPC
implementations of the prominent features of these objects that are
not always available. You can use the `std` versions of those in [test]
(../../../tree/master/test/cpp)
- Similarly, in the same directories, do not use `std::chrono` unless
it is guarded by `#ifndef GRPC_CXX0X_NO_CHRONO` . For platforms that
lack`std::chrono,` there is a C-language timer called gpr_timespec that can
be used instead.
- `std::unique_ptr` must be used with extreme care in any kind of
collection. For example `vector<std::unique_ptr>` does not work in
gcc 4.4 if the vector is constructed to its full size at
initialization but does work if elements are added to the vector
using functions like `push_back`. `map` and other pair-based
collections do not work with `unique_ptr` under gcc 4.4. The issue
is that many of these collection implementations assume a copy
constructor
to be available.
- Don't use `std::this_thread` . Use `gpr_sleep_until` for sleeping a thread.
- [Some adjacent character combinations cause problems]
(https://en.wikipedia.org/wiki/Digraphs_and_trigraphs#C). If declaring a
template against some class relative to the global namespace,
`<::name` will be non-portable. Separate the `<` from the `:` and use `< ::name`.

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

@ -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,80 +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 combination of compression algorithm and
payload type.
In all scenarios, whether compression was actually performed is determined by
the compression bit in the response's message flags. The response's compression
value indicates which algorithm was used if said compression bit is set.
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][]
* [Random 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:
``` ```
{ {
response_compression: <one of {NONE, GZIP, DEFLATE}> 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
} }
} }
``` ```
Client asserts:
* call was successful
* response payload type is COMPRESSABLE
* response compression is consistent with the requested one.
* if `response_compression == NONE`, the response MUST NOT have the
compressed message flag set.
* if `response_compression != NONE`, the response MUST have the 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
1. Client calls UnaryCall with the *uncompressed* message:
2. Client calls UnaryCall with:
``` ```
{ {
response_compression: <one of {NONE, GZIP, DEFLATE}> expect_compressed:{
response_type: UNCOMPRESSABLE value: false
}
response_size: 314159 response_size: 314159
payload:{ payload:{
body: 271828 bytes of zeros body: 271828 bytes of zeros
} }
} }
``` ```
Client asserts: Client asserts:
* call was successful * First call failed with `INVALID_ARGUMENT` status.
* response payload type is UNCOMPRESSABLE * Subsequent calls were successful.
* response compression is consistent with the requested one. * Response payload body is 314159 bytes in size.
* the response MUST NOT have the compressed message flag set. * Clients are free to assert that the response payload body contents are
* response payload body is 314159 bytes in size zeros and comparing the entire response message against a golden response.
* clients are free to assert that the response payload body contents are
identical to the golden uncompressable data at `test/cpp/interop/rnd.dat`.
### 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`:
```
{
response_compressed:{
value: true
}
response_size: 314159
payload:{
body: 271828 bytes of zeros
}
}
```
3. Client calls UnaryCall with:
``` ```
{ {
response_compression: <one of {NONE, GZIP, DEFLATE}> response_compressed:{
response_type: RANDOM value: false
}
response_size: 314159 response_size: 314159
payload:{ payload:{
body: 271828 bytes of zeros body: 271828 bytes of zeros
@ -167,9 +190,14 @@ Procedure:
``` ```
Client asserts: Client asserts:
* call was successful * call was successful
* response payload type is either COMPRESSABLE or UNCOMPRESSABLE * when `response_compressed` is true, the response MUST have the
* the behavior is consistent with the randomly chosen incoming payload type, compressed message flag set.
as described in their respective sections. * when `response_compressed` is false, the response MUST NOT have
the compressed message flag set.
* 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
@ -177,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
@ -227,61 +254,76 @@ 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: 9 body: 27182 bytes of zeros
} }
response_parameters:{ }
size: 2653 ```
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
} }
response_parameters:{ payload:{
size: 58979 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][]
* [Random Payload][]
Procedure: Procedure:
1. Client calls StreamingOutputCall with: 1. Client calls StreamingOutputCall with `StreamingOutputCallRequest`:
``` ```
{ {
response_compression: <one of {NONE, GZIP, DEFLATE}>
response_type:COMPRESSABLE
response_parameters:{ response_parameters:{
size: 31415 size: 31415
} }
@ -297,78 +339,54 @@ 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 compression is consistent with the requested one. * clients are free to assert that the response payload body contents are zero
* if `response_compression == NONE`, the response MUST NOT have the and comparing the entire response messages against golden responses
compressed message flag set.
* if `response_compression != NONE`, the response MUST have the compressed
message flag set.
* 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
2. Client calls StreamingOutputCall with: ### server_compressed_streaming
``` This test verifies that the server can compress streaming messages and disable
{ compression on individual messages.
response_compression: <one of {NONE, GZIP, DEFLATE}>
response_type:UNCOMPRESSABLE
response_parameters:{
size: 31415
}
response_parameters:{
size: 9
}
response_parameters:{
size: 2653
}
response_parameters:{
size: 58979
}
}
```
Client asserts: Server features:
* call was successful * [StreamingOutputCall][]
* exactly four responses * [CompressedResponse][]
* response payloads are UNCOMPRESSABLE
* response compressions are consistent with the requested one.
* the responses MUST NOT have the compressed message flag set.
* response payload bodies are sized (in order): 31415, 9, 2653, 58979
* clients are free to assert that the body of the responses are identical to
the golden uncompressable data at `test/cpp/interop/rnd.dat`.
3. Client calls StreamingOutputCall with: Procedure:
1. Client calls StreamingOutputCall with `StreamingOutputCallRequest`:
``` ```
{ {
response_compression: <one of {NONE, GZIP, DEFLATE}>
response_type:RANDOM
response_parameters:{ response_parameters:{
compressed: {
value: true
}
size: 31415 size: 31415
} }
response_parameters:{ response_parameters:{
size: 9 compressed: {
} value: false
response_parameters:{ }
size: 2653 size: 92653
}
response_parameters:{
size: 58979
} }
} }
``` ```
Client asserts: Client asserts:
* call was successful * call was successful
* response payload type is either COMPRESSABLE or UNCOMPRESSABLE * exactly two responses
* the behavior is consistent with the randomly chosen incoming payload type, * when `response_compressed` is false, the response's messages MUST
as described in their respective sections. NOT have the compressed message flag set.
* when `response_compressed` is true, the response's messages MUST
have the compressed message flag set.
* response payload bodies are sized (in order): 31415, 92653
* clients are free to assert that the response payload body contents are
zero and comparing the entire response messages against golden responses
### ping_pong ### ping_pong
@ -376,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
} }
@ -397,7 +413,6 @@ Procedure:
``` ```
{ {
response_type: COMPRESSABLE
response_parameters:{ response_parameters:{
size: 9 size: 9
} }
@ -411,7 +426,6 @@ Procedure:
``` ```
{ {
response_type: COMPRESSABLE
response_parameters:{ response_parameters:{
size: 2653 size: 2653
} }
@ -425,7 +439,6 @@ Procedure:
``` ```
{ {
response_type: COMPRESSABLE
response_parameters:{ response_parameters:{
size: 58979 size: 58979
} }
@ -440,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
@ -470,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][]
@ -485,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
@ -497,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
@ -518,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][]
@ -528,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
@ -541,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
@ -567,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
``` ```
@ -599,22 +610,21 @@ 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
downloaded from https://console.developers.google.com. Alternately, if using a downloaded from https://console.developers.google.com. Alternately, if using a
usable auth implementation, it may specify the file location in the environment usable auth implementation, it may specify the file location in the environment
variable GOOGLE_APPLICATION_CREDENTIALS variable GOOGLE_APPLICATION_CREDENTIALS
- optionally uses the flag `--oauth_scope` for the oauth scope if implementator - optionally uses the flag `--oauth_scope` for the oauth scope if implementator
wishes to use service account credential instead of JWT credential. For testing wishes to use service account credential instead of JWT credential. For testing
against grpc-test.sandbox.googleapis.com, oauth scope against grpc-test.sandbox.googleapis.com, oauth scope
"https://www.googleapis.com/auth/xapi.zoo" should be used. "https://www.googleapis.com/auth/xapi.zoo" should be used.
Server features: Server features:
* [UnaryCall][] * [UnaryCall][]
* [Compressable Payload][]
* [Echo Authenticated Username][] * [Echo Authenticated Username][]
* [Echo OAuth Scope][] * [Echo OAuth Scope][]
@ -645,7 +655,6 @@ by the server.
Server features: Server features:
* [UnaryCall][] * [UnaryCall][]
* [FullDuplexCall][] * [FullDuplexCall][]
* [Compressable Payload][]
* [Echo Metadata][] * [Echo Metadata][]
Procedure: Procedure:
@ -660,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
@ -679,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
@ -785,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
} }
@ -932,9 +937,24 @@ Server implements EmptyCall which immediately returns the empty message.
[UnaryCall]: #unarycall [UnaryCall]: #unarycall
Server implements UnaryCall which immediately returns a SimpleResponse with a Server implements UnaryCall which immediately returns a SimpleResponse with a
payload body of size SimpleRequest.response_size bytes and type as appropriate 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
@ -947,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.
@ -956,34 +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. A 512 kB dump from /dev/urandom is the current golden data,
stored at `test/cpp/interop/rnd.dat`
### Random Payload
[Random Payload]: #random-payload
When the client requests RANDOM payload, the response includes either a randomly
chosen COMPRESSABLE or UNCOMPRESSABLE payload. The data and the payload type
will be consistent with this choice.
### 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
@ -1004,8 +1002,8 @@ key and the corresponding value back to the client as trailing metadata.
[Observe ResponseParameters.interval_us]: #observe-responseparametersinterval_us [Observe ResponseParameters.interval_us]: #observe-responseparametersinterval_us
In StreamingOutputCall and FullDuplexCall, server delays sending a In StreamingOutputCall and FullDuplexCall, server delays sending a
StreamingOutputCallResponse by the ResponseParameters's interval_us for that StreamingOutputCallResponse by the ResponseParameters's `interval_us` for that
particular response, relative to the last response sent. That is, interval_us particular response, relative to the last response sent. That is, `interval_us`
acts like a sleep *before* sending the response and accumulates from one acts like a sleep *before* sending the response and accumulates from one
response to the next. response to the next.
@ -1027,13 +1025,13 @@ an email address.
#### Echo OAuth scope #### Echo OAuth scope
[Echo OAuth Scope]: #echo-oauth-scope [Echo OAuth Scope]: #echo-oauth-scope
If a SimpleRequest has fill_oauth_scope=true and that request was successfully If a SimpleRequest has `fill_oauth_scope=true` and that request was successfully
authenticated via OAuth, then the SimpleResponse should have oauth_scope filled authenticated via OAuth, then the SimpleResponse should have oauth_scope filled
with the scope of the method being invoked. with the scope of the method being invoked.
Although a general server-side feature, most test servers won't implement this Although a general server-side feature, most test servers won't implement this
feature. The TLS server grpc-test.sandbox.googleapis.com:443 supports this feature. feature. The TLS server `grpc-test.sandbox.googleapis.com:443` supports this
It requires at least the OAuth scope feature. It requires at least the OAuth scope
`https://www.googleapis.com/auth/xapi.zoo` for authentication to succeed. `https://www.googleapis.com/auth/xapi.zoo` for authentication to succeed.
Discussion: Discussion:

@ -4,7 +4,7 @@ Load Balancing in gRPC
# Objective # Objective
To design a load balancing API between a gRPC client and a Load Balancer to To design a load balancing API between a gRPC client and a Load Balancer to
instruct the client how to send load to multiple backend servers. instruct the client how to send load to multiple backend servers.
# Background # Background
@ -19,7 +19,7 @@ have temporary copies of the RPC request and response. This model also increases
latency to the RPCs. latency to the RPCs.
The proxy model was deemed inefficient when considering request heavy services The proxy model was deemed inefficient when considering request heavy services
like storage. like storage.
### Balancing-aware Client ### Balancing-aware Client
@ -28,7 +28,7 @@ example, the client could contain many load balancing policies (Round Robin,
Random, etc) used to select servers from a list. In this model, a list of Random, etc) used to select servers from a list. In this model, a list of
servers would be either statically configured in the client, provided by the servers would be either statically configured in the client, provided by the
name resolution system, an external load balancer, etc. In any case, the client name resolution system, an external load balancer, etc. In any case, the client
is responsible for choosing the preferred server from the list. is responsible for choosing the preferred server from the list.
One of the drawbacks of this approach is writing and maintaining the load One of the drawbacks of this approach is writing and maintaining the load
balancing policies in multiple languages and/or versions of the clients. These balancing policies in multiple languages and/or versions of the clients. These
@ -53,14 +53,69 @@ unavailability or health issues. The load balancer will make any necessary
complex decisions and inform the client. The load balancer may communicate with complex decisions and inform the client. The load balancer may communicate with
the backend servers to collect load and health information. the backend servers to collect load and health information.
## Requirements
#### Simple API and client
The gRPC client load balancing code must be simple and portable. The client
should only contain simple algorithms (ie Round Robin) for server selection. For
complex algorithms, the client should rely on a load balancer to provide load
balancing configuration and the list of servers to which the client should send
requests. The balancer will update the server list as needed to balance the load
as well as handle server unavailability or health issues. The load balancer will
make any necessary complex decisions and inform the client. The load balancer
may communicate with the backend servers to collect load and health information.
#### Security
The load balancer may be separate from the actual server backends and a
compromise of the load balancer should only lead to a compromise of the
loadbalancing functionality. In other words, a compromised load balancer should
not be able to cause a client to trust a (potentially malicious) backend server
any more than in a comparable situation without loadbalancing.
# Proposed Architecture # Proposed Architecture
The gRPC load balancing approach follows the third approach, by having an The gRPC load balancing implements the external load balancing server approach:
external load balancer which provides simple clients with a list of servers. an external load balancer provides simple clients with an up-to-date list of
servers.
![image](images/load_balancing_design.png)
1. On startup, the gRPC client issues a name resolution request for the service.
The name will resolve to one or more IP addresses to gRPC servers, a hint on
whether the IP address(es) point to a load balancer or not, and also return a
client config.
2. The gRPC client connects to a gRPC Server.
1. If the name resolution has hinted that the endpoint is a load balancer,
the client's gRPC LB policy will attempt to open a stream to the load
balancer service. The server may respond in only one of the following
ways.
1. `status::UNIMPLEMENTED`. There is no loadbalancing in use. The client
call will fail.
2. "I am a Load Balancer and here is the server list." (Goto Step 4.)
3. "Please contact Load Balancer X" (See Step 3.) The client will close
this connection and cancel the stream.
4. If the server fails to respond, the client will wait for some timeout
and then re-resolve the name (process to Step 1 above).
2. If the name resolution has not hinted that the endpoint is a load
balancer, the client connects directly to the service it wants to talk to.
3. The gRPC client's gRPC LB policy opens a separate connection to the Load
Balancer. If this fails, it will go back to step 1 and try another address.
1. During channel initialization to the Load Balancer, the client will
attempt to open a stream to the Load Balancer service.
2. The Load Balancer will return a server list to the gRPC client. If the
server list is empty, the call will wait until a non-empty one is
received. Optional: The Load Balancer will also open channels to the gRPC
servers if load reporting is needed.
4. The gRPC client will send RPCs to the gRPC servers contained in the server
list from the Load Balancer.
5. Optional: The gRPC servers may periodically report load to the Load Balancer.
## Client ## Client
When establishing a gRPC stream to the balancer, the client will send an initial When establishing a gRPC _stream_ to the balancer, the client will send an initial
request to the load balancer (via a regular gRPC message). The load balancer request to the load balancer (via a regular gRPC message). The load balancer
will respond with client config (including, for example, settings for flow will respond with client config (including, for example, settings for flow
control, RPC deadlines, etc.) or a redirect to another load balancer. If the control, RPC deadlines, etc.) or a redirect to another load balancer. If the
@ -87,11 +142,3 @@ balancer in order to compute the next list of servers.
The gRPC Server is responsible for answering RPC requests and providing The gRPC Server is responsible for answering RPC requests and providing
responses to the client. The server will also report load to the load balancer responses to the client. The server will also report load to the load balancer
if a reporting stream was opened for this purpose. if a reporting stream was opened for this purpose.
### Security
The load balancer may be separate from the actual server backends and a
compromise of the load balancer should only lead to a compromise of the
loadbalancing functionality. In other words, a compromised load balancer should
not be able to cause a client to trust a (potentially malicious) backend server
any more than in a comparable situation without loadbalancing.

@ -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.

@ -18,9 +18,12 @@ Only a subset of the pre-defined status codes are generated by the gRPC librarie
| Could not decompress, but compression algorithm supported (Server -> Client) | INTERNAL | Client | | Could not decompress, but compression algorithm supported (Server -> Client) | INTERNAL | Client |
| Compression mechanism used by client not supported at server | UNIMPLEMENTED | Server | | Compression mechanism used by client not supported at server | UNIMPLEMENTED | Server |
| Server temporarily out of resources (e.g., Flow-control resource limits reached) | RESOURCE_EXHAUSTED | Server| | Server temporarily out of resources (e.g., Flow-control resource limits reached) | RESOURCE_EXHAUSTED | Server|
| Client does not have enough memory to hold the server response | RESOURCE_EXHAUSTED | Client |
| Flow-control protocol violation | INTERNAL | Both | | Flow-control protocol violation | INTERNAL | Both |
| Error parsing returned status | UNKNOWN | Client | | Error parsing returned status | UNKNOWN | Client |
| Incorrect Auth metadata ( Credentials failed to get metadata, Incompatible credentials set on channel and call, Invalid host set in `:authority` metadata, etc.) | UNAUTHENTICATED | Both | | Incorrect Auth metadata ( Credentials failed to get metadata, Incompatible credentials set on channel and call, Invalid host set in `:authority` metadata, etc.) | UNAUTHENTICATED | Both |
| Request cardinality violation (method requires exactly one request but client sent some other number of requests) | UNIMPLEMENTED | Server|
| Response cardinality violation (method requires exactly one response but server sent some other number of responses) | UNIMPLEMENTED | Client|
| Error parsing response proto | INTERNAL | Client| | Error parsing response proto | INTERNAL | Client|
| Error parsing request proto | INTERNAL | Server| | Error parsing request proto | INTERNAL | Server|

@ -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`:

@ -97,7 +97,7 @@ ifneq ($(HAS_VALID_PROTOC),true)
@echo "Please install Google protocol buffers 3.0.0 and its compiler." @echo "Please install Google protocol buffers 3.0.0 and its compiler."
@echo "You can find it here:" @echo "You can find it here:"
@echo @echo
@echo " https://github.com/google/protobuf/releases/tag/v3.0.0-beta-2" @echo " https://github.com/google/protobuf/releases/tag/v3.0.0-beta-3.3"
@echo @echo
@echo "Here is what I get when trying to evaluate your version of protoc:" @echo "Here is what I get when trying to evaluate your version of protoc:"
@echo @echo

@ -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

@ -87,7 +87,9 @@ class GreeterClient {
void* got_tag; void* got_tag;
bool ok = false; bool ok = false;
// Block until the next result is available in the completion queue "cq". // Block until the next result is available in the completion queue "cq".
cq.Next(&got_tag, &ok); // The return value of Next should always be checked. This return value
// tells us whether there is any kind of event or the cq_ is shutting down.
GPR_ASSERT(cq.Next(&got_tag, &ok));
// Verify that the result from "cq" corresponds, by its tag, our previous // Verify that the result from "cq" corresponds, by its tag, our previous
// request. // request.

@ -160,7 +160,9 @@ class ServerImpl final {
// Block waiting to read the next event from the completion queue. The // Block waiting to read the next event from the completion queue. The
// event is uniquely identified by its tag, which in this case is the // event is uniquely identified by its tag, which in this case is the
// memory address of a CallData instance. // memory address of a CallData instance.
cq_->Next(&tag, &ok); // The return value of Next should always be checked. This return value
// tells us whether there is any kind of event or cq_ is shutting down.
GPR_ASSERT(cq_->Next(&tag, &ok));
GPR_ASSERT(ok); GPR_ASSERT(ok);
static_cast<CallData*>(tag)->Proceed(); static_cast<CallData*>(tag)->Proceed();
} }

@ -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";
} }
} }

@ -86,7 +86,7 @@ ifneq ($(HAS_VALID_PROTOC),true)
@echo "Please install Google protocol buffers 3.0.0 and its compiler." @echo "Please install Google protocol buffers 3.0.0 and its compiler."
@echo "You can find it here:" @echo "You can find it here:"
@echo @echo
@echo " https://github.com/google/protobuf/releases/tag/v3.0.0-beta-2" @echo " https://github.com/google/protobuf/releases/tag/v3.0.0-beta-3.3"
@echo @echo
@echo "Here is what I get when trying to evaluate your version of protoc:" @echo "Here is what I get when trying to evaluate your version of protoc:"
@echo @echo

@ -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,21 +75,24 @@ 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)
{ {
} }
///<summary>Protected parameterless constructor to allow creation of test doubles.</summary> /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
protected GreeterClient() : base() protected GreeterClient() : base()
{ {
} }
///<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>

@ -5,23 +5,16 @@ BACKGROUND
------------- -------------
For this sample, we've already generated the server and client stubs from [helloworld.proto][]. For this sample, we've already generated the server and client stubs from [helloworld.proto][].
Example projects depend on the [Grpc](https://www.nuget.org/packages/Grpc/) Example projects depend on the [Grpc](https://www.nuget.org/packages/Grpc/), [Grpc.Tools](https://www.nuget.org/packages/Grpc.Tools/)
and [Google.Protobuf](https://www.nuget.org/packages/Google.Protobuf/) NuGet packages and [Google.Protobuf](https://www.nuget.org/packages/Google.Protobuf/) NuGet packages
which have been already added to the project for you. which have been already added to the project for you.
PREREQUISITES PREREQUISITES
------------- -------------
**Windows**
- .NET 4.5+
- Visual Studio 2013 or 2015
**Linux** - Windows: .NET Framework 4.5+, Visual Studio 2013 or 2015
- Mono 4.0+ - Linux: Mono 4+, MonoDevelop 5.9+ (with NuGet add-in installed)
- Monodevelop 5.9+ (with NuGet plugin installed) - Mac OS X: Xamarin Studio 5.9+
**Mac OS X**
- Xamarin Studio 5.9+
- [homebrew][]
BUILD BUILD
------- -------
@ -56,6 +49,5 @@ Tutorial
You can find a more detailed tutorial in [gRPC Basics: C#][] You can find a more detailed tutorial in [gRPC Basics: C#][]
[homebrew]:http://brew.sh
[helloworld.proto]:../../protos/helloworld.proto [helloworld.proto]:../../protos/helloworld.proto
[gRPC Basics: C#]:http://www.grpc.io/docs/tutorials/basic/csharp.html [gRPC Basics: C#]:http://www.grpc.io/docs/tutorials/basic/csharp.html

@ -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,21 +139,24 @@ 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)
{ {
} }
///<summary>Protected parameterless constructor to allow creation of test doubles.</summary> /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
protected RouteGuideClient() : base() protected RouteGuideClient() : base()
{ {
} }
///<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"
@ -9,27 +13,51 @@ Pod::Spec.new do |s|
# Base directory where the .proto files are. # Base directory where the .proto files are.
src = "../../protos" src = "../../protos"
# Run protoc with the Objective-C and gRPC plugins to generate protocol messages and gRPC clients.
s.dependency "!ProtoCompiler-gRPCPlugin", "~> 0.14"
# Pods directory corresponding to this app's Podfile, relative to the location of this podspec.
pods_root = 'Pods'
# Path where Cocoapods downloads protoc and the gRPC plugin.
protoc_dir = "#{pods_root}/!ProtoCompiler"
protoc = "#{protoc_dir}/protoc"
plugin = "#{pods_root}/!ProtoCompiler-gRPCPlugin/grpc_objective_c_plugin"
# Directory where the generated files will be placed. # Directory where the generated files will be placed.
dir = "Pods/" + s.name dir = "#{pods_root}/#{s.name}"
# Run protoc with the Objective-C and gRPC plugins to generate protocol messages and gRPC clients.
s.prepare_command = <<-CMD s.prepare_command = <<-CMD
mkdir -p #{dir} mkdir -p #{dir}
protoc -I #{src} --objc_out=#{dir} --objcgrpc_out=#{dir} #{src}/auth_sample.proto #{protoc} \
--plugin=protoc-gen-grpc=#{plugin} \
--objc_out=#{dir} \
--grpc_out=#{dir} \
-I #{src} \
-I #{protoc_dir} \
#{src}/auth_sample.proto
CMD CMD
# Files generated by protoc
s.subspec "Messages" do |ms| s.subspec "Messages" do |ms|
ms.source_files = "#{dir}/*.pbobjc.{h,m}", "#{dir}/**/*.pbobjc.{h,m}" ms.source_files = "#{dir}/*.pbobjc.{h,m}", "#{dir}/**/*.pbobjc.{h,m}"
ms.header_mappings_dir = dir ms.header_mappings_dir = dir
ms.requires_arc = false ms.requires_arc = false
ms.dependency "Protobuf", "~> 3.0.0-alpha-4" # The generated files depend on the protobuf runtime.
ms.dependency "Protobuf"
# This is needed by all pods that depend on Protobuf:
ms.pod_target_xcconfig = {
'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1',
}
end end
# Files generated by the gRPC plugin
s.subspec "Services" do |ss| s.subspec "Services" do |ss|
ss.source_files = "#{dir}/*.pbrpc.{h,m}", "#{dir}/**/*.pbrpc.{h,m}" ss.source_files = "#{dir}/*.pbrpc.{h,m}", "#{dir}/**/*.pbrpc.{h,m}"
ss.header_mappings_dir = dir ss.header_mappings_dir = dir
ss.requires_arc = true ss.requires_arc = true
ss.dependency "gRPC", "~> 0.12" # The generated files depend on the gRPC runtime, and on the files generated by protoc.
ss.dependency "gRPC-ProtoRPC"
ss.dependency "#{s.name}/Messages" ss.dependency "#{s.name}/Messages"
end end
end end

@ -1,9 +1,7 @@
source 'https://github.com/CocoaPods/Specs.git' source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0' platform :ios, '8.0'
pod 'Protobuf', :path => "../../../third_party/protobuf" install! 'cocoapods', :deterministic_uuids => false
pod 'BoringSSL', :podspec => "../../../src/objective-c"
pod 'gRPC', :path => "../../.."
target 'AuthSample' do target 'AuthSample' do
# Depend on the generated AuthTestService library. # Depend on the generated AuthTestService library.

@ -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"
@ -9,27 +13,51 @@ Pod::Spec.new do |s|
# Base directory where the .proto files are. # Base directory where the .proto files are.
src = "../../protos" src = "../../protos"
# Run protoc with the Objective-C and gRPC plugins to generate protocol messages and gRPC clients.
s.dependency "!ProtoCompiler-gRPCPlugin", "~> 0.14"
# Pods directory corresponding to this app's Podfile, relative to the location of this podspec.
pods_root = 'Pods'
# Path where Cocoapods downloads protoc and the gRPC plugin.
protoc_dir = "#{pods_root}/!ProtoCompiler"
protoc = "#{protoc_dir}/protoc"
plugin = "#{pods_root}/!ProtoCompiler-gRPCPlugin/grpc_objective_c_plugin"
# Directory where the generated files will be placed. # Directory where the generated files will be placed.
dir = "Pods/" + s.name dir = "#{pods_root}/#{s.name}"
# Run protoc with the Objective-C and gRPC plugins to generate protocol messages and gRPC clients.
s.prepare_command = <<-CMD s.prepare_command = <<-CMD
mkdir -p #{dir} mkdir -p #{dir}
protoc -I #{src} --objc_out=#{dir} --objcgrpc_out=#{dir} #{src}/helloworld.proto #{protoc} \
--plugin=protoc-gen-grpc=#{plugin} \
--objc_out=#{dir} \
--grpc_out=#{dir} \
-I #{src} \
-I #{protoc_dir} \
#{src}/helloworld.proto
CMD CMD
# Files generated by protoc
s.subspec "Messages" do |ms| s.subspec "Messages" do |ms|
ms.source_files = "#{dir}/*.pbobjc.{h,m}", "#{dir}/**/*.pbobjc.{h,m}" ms.source_files = "#{dir}/*.pbobjc.{h,m}", "#{dir}/**/*.pbobjc.{h,m}"
ms.header_mappings_dir = dir ms.header_mappings_dir = dir
ms.requires_arc = false ms.requires_arc = false
ms.dependency "Protobuf", "~> 3.0.0-alpha-4" # The generated files depend on the protobuf runtime.
ms.dependency "Protobuf"
# This is needed by all pods that depend on Protobuf:
ms.pod_target_xcconfig = {
'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1',
}
end end
# Files generated by the gRPC plugin
s.subspec "Services" do |ss| s.subspec "Services" do |ss|
ss.source_files = "#{dir}/*.pbrpc.{h,m}", "#{dir}/**/*.pbrpc.{h,m}" ss.source_files = "#{dir}/*.pbrpc.{h,m}", "#{dir}/**/*.pbrpc.{h,m}"
ss.header_mappings_dir = dir ss.header_mappings_dir = dir
ss.requires_arc = true ss.requires_arc = true
ss.dependency "gRPC", "~> 0.12" # The generated files depend on the gRPC runtime, and on the files generated by protoc.
ss.dependency "gRPC-ProtoRPC"
ss.dependency "#{s.name}/Messages" ss.dependency "#{s.name}/Messages"
end end
end end

@ -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>

@ -1,9 +1,7 @@
source 'https://github.com/CocoaPods/Specs.git' source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0' platform :ios, '8.0'
pod 'Protobuf', :path => "../../../third_party/protobuf" install! 'cocoapods', :deterministic_uuids => false
pod 'BoringSSL', :podspec => "../../../src/objective-c"
pod 'gRPC', :path => "../../.."
target 'HelloWorld' do target 'HelloWorld' do
# Depend on the generated HelloWorld library. # Depend on the generated HelloWorld library.

@ -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>

@ -1,10 +1,9 @@
source 'https://github.com/CocoaPods/Specs.git' source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0' platform :ios, '8.0'
install! 'cocoapods', :deterministic_uuids => false
target 'RouteGuideClient' do target 'RouteGuideClient' do
pod 'Protobuf', :path => "../../../third_party/protobuf"
pod 'BoringSSL', :podspec => "../../../src/objective-c"
pod 'gRPC', :path => "../../.."
# Depend on the generated RouteGuide library. # Depend on the generated RouteGuide library.
pod 'RouteGuide', :path => '.' pod 'RouteGuide', :path => '.'
end end

@ -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"
@ -9,27 +13,51 @@ Pod::Spec.new do |s|
# Base directory where the .proto files are. # Base directory where the .proto files are.
src = "../../protos" src = "../../protos"
# Run protoc with the Objective-C and gRPC plugins to generate protocol messages and gRPC clients.
s.dependency "!ProtoCompiler-gRPCPlugin", "~> 0.14"
# Pods directory corresponding to this app's Podfile, relative to the location of this podspec.
pods_root = 'Pods'
# Path where Cocoapods downloads protoc and the gRPC plugin.
protoc_dir = "#{pods_root}/!ProtoCompiler"
protoc = "#{protoc_dir}/protoc"
plugin = "#{pods_root}/!ProtoCompiler-gRPCPlugin/grpc_objective_c_plugin"
# Directory where the generated files will be placed. # Directory where the generated files will be placed.
dir = "Pods/" + s.name dir = "#{pods_root}/#{s.name}"
# Run protoc with the Objective-C and gRPC plugins to generate protocol messages and gRPC clients.
s.prepare_command = <<-CMD s.prepare_command = <<-CMD
mkdir -p #{dir} mkdir -p #{dir}
protoc -I #{src} --objc_out=#{dir} --objcgrpc_out=#{dir} #{src}/route_guide.proto #{protoc} \
--plugin=protoc-gen-grpc=#{plugin} \
--objc_out=#{dir} \
--grpc_out=#{dir} \
-I #{src} \
-I #{protoc_dir} \
#{src}/route_guide.proto
CMD CMD
# Files generated by protoc
s.subspec "Messages" do |ms| s.subspec "Messages" do |ms|
ms.source_files = "#{dir}/*.pbobjc.{h,m}", "#{dir}/**/*.pbobjc.{h,m}" ms.source_files = "#{dir}/*.pbobjc.{h,m}", "#{dir}/**/*.pbobjc.{h,m}"
ms.header_mappings_dir = dir ms.header_mappings_dir = dir
ms.requires_arc = false ms.requires_arc = false
ms.dependency "Protobuf", "~> 3.0.0-alpha-4" # The generated files depend on the protobuf runtime.
ms.dependency "Protobuf"
# This is needed by all pods that depend on Protobuf:
ms.pod_target_xcconfig = {
'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1',
}
end end
# Files generated by the gRPC plugin
s.subspec "Services" do |ss| s.subspec "Services" do |ss|
ss.source_files = "#{dir}/*.pbrpc.{h,m}", "#{dir}/**/*.pbrpc.{h,m}" ss.source_files = "#{dir}/*.pbrpc.{h,m}", "#{dir}/**/*.pbrpc.{h,m}"
ss.header_mappings_dir = dir ss.header_mappings_dir = dir
ss.requires_arc = true ss.requires_arc = true
ss.dependency "gRPC", "~> 0.12" # The generated files depend on the gRPC runtime, and on the files generated by protoc.
ss.dependency "gRPC-ProtoRPC"
ss.dependency "#{s.name}/Messages" ss.dependency "#{s.name}/Messages"
end end
end end

@ -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];
} }

@ -11,13 +11,13 @@ INSTALL
- Install the gRPC PHP extension - Install the gRPC PHP extension
```sh ```sh
$ [sudo] pecl install grpc-beta $ [sudo] pecl install grpc
``` ```
- 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

@ -2,13 +2,7 @@
"name": "grpc/grpc-demo", "name": "grpc/grpc-demo",
"description": "gRPC example for PHP", "description": "gRPC example for PHP",
"minimum-stability": "dev", "minimum-stability": "dev",
"repositories": [
{
"type": "vcs",
"url": "https://github.com/stanley-cheung/Protobuf-PHP"
}
],
"require": { "require": {
"grpc/grpc": "dev-release-0_13" "grpc/grpc": "v0.15.0"
} }
} }

@ -32,19 +32,21 @@
* *
*/ */
require dirname(__FILE__) . '/vendor/autoload.php'; require dirname(__FILE__).'/vendor/autoload.php';
require dirname(__FILE__) . '/helloworld.php'; require dirname(__FILE__).'/helloworld.php';
function greet($name) { function greet($name)
$client = new helloworld\GreeterClient('localhost:50051', [ {
'credentials' => Grpc\ChannelCredentials::createInsecure() $client = new helloworld\GreeterClient('localhost:50051', [
]); 'credentials' => Grpc\ChannelCredentials::createInsecure(),
$request = new helloworld\HelloRequest(); ]);
$request->setName($name); $request = new helloworld\HelloRequest();
list($reply, $status) = $client->SayHello($request)->wait(); $request->setName($name);
$message = $reply->getMessage(); list($reply, $status) = $client->SayHello($request)->wait();
return $message; $message = $reply->getMessage();
return $message;
} }
$name = !empty($argv[1]) ? $argv[1] : 'world'; $name = !empty($argv[1]) ? $argv[1] : 'world';
print(greet($name)."\n"); echo greet($name)."\n";

@ -5,154 +5,164 @@
namespace helloworld { namespace helloworld {
class HelloRequest extends \DrSlump\Protobuf\Message { class HelloRequest extends \DrSlump\Protobuf\Message
{
/** @var string */ /** @var string */
public $name = null; public $name = null;
/** @var \Closure[] */ /** @var \Closure[] */
protected static $__extensions = array(); protected static $__extensions = array();
public static function descriptor() public static function descriptor()
{ {
$descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'helloworld.HelloRequest'); $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'helloworld.HelloRequest');
// OPTIONAL STRING name = 1 // OPTIONAL STRING name = 1
$f = new \DrSlump\Protobuf\Field(); $f = new \DrSlump\Protobuf\Field();
$f->number = 1; $f->number = 1;
$f->name = "name"; $f->name = 'name';
$f->type = \DrSlump\Protobuf::TYPE_STRING; $f->type = \DrSlump\Protobuf::TYPE_STRING;
$f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
$descriptor->addField($f); $descriptor->addField($f);
foreach (self::$__extensions as $cb) {
$descriptor->addField($cb(), true);
}
return $descriptor; foreach (self::$__extensions as $cb) {
} $descriptor->addField($cb(), true);
}
return $descriptor;
}
/** /**
* Check if <name> has a value * Check if <name> has a value.
* *
* @return boolean * @return bool
*/ */
public function hasName(){ public function hasName()
return $this->_has(1); {
return $this->_has(1);
} }
/** /**
* Clear <name> value * Clear <name> value.
* *
* @return \helloworld\HelloRequest * @return \helloworld\HelloRequest
*/ */
public function clearName(){ public function clearName()
return $this->_clear(1); {
return $this->_clear(1);
} }
/** /**
* Get <name> value * Get <name> value.
* *
* @return string * @return string
*/ */
public function getName(){ public function getName()
return $this->_get(1); {
return $this->_get(1);
} }
/** /**
* Set <name> value * Set <name> value.
* *
* @param string $value * @param string $value
*
* @return \helloworld\HelloRequest * @return \helloworld\HelloRequest
*/ */
public function setName( $value){ public function setName($value)
return $this->_set(1, $value); {
return $this->_set(1, $value);
} }
} }
} }
namespace helloworld { namespace helloworld {
class HelloReply extends \DrSlump\Protobuf\Message { class HelloReply extends \DrSlump\Protobuf\Message
{
/** @var string */ /** @var string */
public $message = null; public $message = null;
/** @var \Closure[] */ /** @var \Closure[] */
protected static $__extensions = array(); protected static $__extensions = array();
public static function descriptor() public static function descriptor()
{ {
$descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'helloworld.HelloReply'); $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'helloworld.HelloReply');
// OPTIONAL STRING message = 1 // OPTIONAL STRING message = 1
$f = new \DrSlump\Protobuf\Field(); $f = new \DrSlump\Protobuf\Field();
$f->number = 1; $f->number = 1;
$f->name = "message"; $f->name = 'message';
$f->type = \DrSlump\Protobuf::TYPE_STRING; $f->type = \DrSlump\Protobuf::TYPE_STRING;
$f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
$descriptor->addField($f); $descriptor->addField($f);
foreach (self::$__extensions as $cb) {
$descriptor->addField($cb(), true);
}
return $descriptor; foreach (self::$__extensions as $cb) {
} $descriptor->addField($cb(), true);
}
return $descriptor;
}
/** /**
* Check if <message> has a value * Check if <message> has a value.
* *
* @return boolean * @return bool
*/ */
public function hasMessage(){ public function hasMessage()
return $this->_has(1); {
return $this->_has(1);
} }
/** /**
* Clear <message> value * Clear <message> value.
* *
* @return \helloworld\HelloReply * @return \helloworld\HelloReply
*/ */
public function clearMessage(){ public function clearMessage()
return $this->_clear(1); {
return $this->_clear(1);
} }
/** /**
* Get <message> value * Get <message> value.
* *
* @return string * @return string
*/ */
public function getMessage(){ public function getMessage()
return $this->_get(1); {
return $this->_get(1);
} }
/** /**
* Set <message> value * Set <message> value.
* *
* @param string $value * @param string $value
*
* @return \helloworld\HelloReply * @return \helloworld\HelloReply
*/ */
public function setMessage( $value){ public function setMessage($value)
return $this->_set(1, $value); {
return $this->_set(1, $value);
} }
} }
} }
namespace helloworld { namespace helloworld {
class GreeterClient extends \Grpc\BaseStub { class GreeterClient extends \Grpc\BaseStub
{
public function __construct($hostname, $opts) { public function __construct($hostname, $opts)
parent::__construct($hostname, $opts); {
} parent::__construct($hostname, $opts);
}
/** /**
* @param helloworld\HelloRequest $input * @param helloworld\HelloRequest $input
*/ */
public function SayHello(\helloworld\HelloRequest $argument, $metadata = array(), $options = array()) { public function SayHello(\helloworld\HelloRequest $argument, $metadata = array(), $options = array())
return $this->_simpleRequest('/helloworld.Greeter/SayHello', $argument, '\helloworld\HelloReply::deserialize', $metadata, $options); {
return $this->_simpleRequest('/helloworld.Greeter/SayHello', $argument, '\helloworld\HelloReply::deserialize', $metadata, $options);
} }
} }
} }

File diff suppressed because it is too large Load Diff

@ -32,48 +32,50 @@
* *
*/ */
require dirname(__FILE__) . '/../vendor/autoload.php'; require dirname(__FILE__).'/../vendor/autoload.php';
require dirname(__FILE__) . '/route_guide.php'; require dirname(__FILE__).'/route_guide.php';
define('COORD_FACTOR', 1e7); define('COORD_FACTOR', 1e7);
$client = new routeguide\RouteGuideClient('localhost:50051', [ $client = new routeguide\RouteGuideClient('localhost:50051', [
'credentials' => Grpc\ChannelCredentials::createInsecure() 'credentials' => Grpc\ChannelCredentials::createInsecure(),
]); ]);
function printFeature($feature) { function printFeature($feature)
$name = $feature->getName(); {
if (!$name) { $name = $feature->getName();
$name_str = "no feature"; if (!$name) {
} else { $name_str = 'no feature';
$name_str = "feature called $name"; } else {
} $name_str = "feature called $name";
print sprintf("Found %s \n at %f, %f\n", $name_str, }
$feature->getLocation()->getLatitude() / COORD_FACTOR, echo sprintf("Found %s \n at %f, %f\n", $name_str,
$feature->getLocation()->getLongitude() / COORD_FACTOR); $feature->getLocation()->getLatitude() / COORD_FACTOR,
$feature->getLocation()->getLongitude() / COORD_FACTOR);
} }
/** /**
* Run the getFeature demo. Calls getFeature with a point known to have a * Run the getFeature demo. Calls getFeature with a point known to have a
* feature and a point known not to have a feature. * feature and a point known not to have a feature.
*/ */
function runGetFeature() { function runGetFeature()
print "Running GetFeature...\n"; {
global $client; echo "Running GetFeature...\n";
global $client;
$point = new routeguide\Point();
$points = array( $point = new routeguide\Point();
array(409146138, -746188906), $points = array(
array(0, 0), array(409146138, -746188906),
); array(0, 0),
);
foreach ($points as $p) {
$point->setLatitude($p[0]); foreach ($points as $p) {
$point->setLongitude($p[1]); $point->setLatitude($p[0]);
// make a unary grpc call $point->setLongitude($p[1]);
list($feature, $status) = $client->GetFeature($point)->wait(); // make a unary grpc call
printFeature($feature); list($feature, $status) = $client->GetFeature($point)->wait();
} printFeature($feature);
}
} }
/** /**
@ -81,29 +83,30 @@ function runGetFeature() {
* containing all of the features in the pre-generated * containing all of the features in the pre-generated
* database. Prints each response as it comes in. * database. Prints each response as it comes in.
*/ */
function runListFeatures() { function runListFeatures()
print "Running ListFeatures...\n"; {
global $client; echo "Running ListFeatures...\n";
global $client;
$lo_point = new routeguide\Point();
$hi_point = new routeguide\Point(); $lo_point = new routeguide\Point();
$hi_point = new routeguide\Point();
$lo_point->setLatitude(400000000);
$lo_point->setLongitude(-750000000); $lo_point->setLatitude(400000000);
$hi_point->setLatitude(420000000); $lo_point->setLongitude(-750000000);
$hi_point->setLongitude(-730000000); $hi_point->setLatitude(420000000);
$hi_point->setLongitude(-730000000);
$rectangle = new routeguide\Rectangle();
$rectangle->setLo($lo_point); $rectangle = new routeguide\Rectangle();
$rectangle->setHi($hi_point); $rectangle->setLo($lo_point);
$rectangle->setHi($hi_point);
// start the server streaming call
$call = $client->ListFeatures($rectangle); // start the server streaming call
// an iterator over the server streaming responses $call = $client->ListFeatures($rectangle);
$features = $call->responses(); // an iterator over the server streaming responses
foreach ($features as $feature) { $features = $call->responses();
printFeature($feature); foreach ($features as $feature) {
} printFeature($feature);
}
} }
/** /**
@ -111,96 +114,99 @@ function runListFeatures() {
* pre-generated feature database with a variable delay in between. Prints * pre-generated feature database with a variable delay in between. Prints
* the statistics when they are sent from the server. * the statistics when they are sent from the server.
*/ */
function runRecordRoute() { function runRecordRoute()
print "Running RecordRoute...\n"; {
global $client, $argv; echo "Running RecordRoute...\n";
global $client, $argv;
// start the client streaming call
$call = $client->RecordRoute(); // start the client streaming call
$call = $client->RecordRoute();
$db = json_decode(file_get_contents($argv[1]), true);
$num_points_in_db = count($db); $db = json_decode(file_get_contents($argv[1]), true);
$num_points = 10; $num_points_in_db = count($db);
for ($i = 0; $i < $num_points; $i++) { $num_points = 10;
$point = new routeguide\Point(); for ($i = 0; $i < $num_points; ++$i) {
$index = rand(0, $num_points_in_db - 1); $point = new routeguide\Point();
$lat = $db[$index]['location']['latitude']; $index = rand(0, $num_points_in_db - 1);
$long = $db[$index]['location']['longitude']; $lat = $db[$index]['location']['latitude'];
$feature_name = $db[$index]['name']; $long = $db[$index]['location']['longitude'];
$point->setLatitude($lat); $feature_name = $db[$index]['name'];
$point->setLongitude($long); $point->setLatitude($lat);
print sprintf("Visiting point %f, %f,\n with feature name: %s\n", $point->setLongitude($long);
$lat / COORD_FACTOR, $long / COORD_FACTOR, echo sprintf("Visiting point %f, %f,\n with feature name: %s\n",
$feature_name ? $feature_name : '<empty>'); $lat / COORD_FACTOR, $long / COORD_FACTOR,
usleep(rand(300000, 800000)); $feature_name ? $feature_name : '<empty>');
$call->write($point); usleep(rand(300000, 800000));
} $call->write($point);
list($route_summary, $status) = $call->wait(); }
print sprintf("Finished trip with %d points\nPassed %d features\n". list($route_summary, $status) = $call->wait();
"Travelled %d meters\nIt took %d seconds\n", echo sprintf("Finished trip with %d points\nPassed %d features\n".
$route_summary->getPointCount(), "Travelled %d meters\nIt took %d seconds\n",
$route_summary->getFeatureCount(), $route_summary->getPointCount(),
$route_summary->getDistance(), $route_summary->getFeatureCount(),
$route_summary->getElapsedTime()); $route_summary->getDistance(),
$route_summary->getElapsedTime());
} }
/** /**
* Run the routeChat demo. Send some chat messages, and print any chat * Run the routeChat demo. Send some chat messages, and print any chat
* messages that are sent from the server. * messages that are sent from the server.
*/ */
function runRouteChat() { function runRouteChat()
print "Running RouteChat...\n"; {
global $client; echo "Running RouteChat...\n";
global $client;
// start the bidirectional streaming call
$call = $client->RouteChat(); // start the bidirectional streaming call
$call = $client->RouteChat();
$notes = array(
array(1, 1, 'first message'), $notes = array(
array(1, 2, 'second message'), array(1, 1, 'first message'),
array(2, 1, 'third message'), array(1, 2, 'second message'),
array(1, 1, 'fourth message'), array(2, 1, 'third message'),
array(1, 1, 'fifth message'), array(1, 1, 'fourth message'),
); array(1, 1, 'fifth message'),
);
foreach ($notes as $n) {
$point = new routeguide\Point(); foreach ($notes as $n) {
$point->setLatitude($lat = $n[0]); $point = new routeguide\Point();
$point->setLongitude($long = $n[1]); $point->setLatitude($lat = $n[0]);
$point->setLongitude($long = $n[1]);
$route_note = new routeguide\RouteNote();
$route_note->setLocation($point); $route_note = new routeguide\RouteNote();
$route_note->setMessage($message = $n[2]); $route_note->setLocation($point);
$route_note->setMessage($message = $n[2]);
print sprintf("Sending message: '%s' at (%d, %d)\n",
$message, $lat, $long); echo sprintf("Sending message: '%s' at (%d, %d)\n",
// send a bunch of messages to the server $message, $lat, $long);
$call->write($route_note); // send a bunch of messages to the server
} $call->write($route_note);
$call->writesDone(); }
$call->writesDone();
// read from the server until there's no more
while ($route_note_reply = $call->read()) { // read from the server until there's no more
print sprintf("Previous left message at (%d, %d): '%s'\n", while ($route_note_reply = $call->read()) {
$route_note_reply->getLocation()->getLatitude(), echo sprintf("Previous left message at (%d, %d): '%s'\n",
$route_note_reply->getLocation()->getLongitude(), $route_note_reply->getLocation()->getLatitude(),
$route_note_reply->getMessage()); $route_note_reply->getLocation()->getLongitude(),
} $route_note_reply->getMessage());
}
} }
/** /**
* Run all of the demos in order * Run all of the demos in order.
*/ */
function main() { function main()
runGetFeature(); {
runListFeatures(); runGetFeature();
runRecordRoute(); runListFeatures();
runRouteChat(); runRecordRoute();
runRouteChat();
} }
if (empty($argv[1])) { if (empty($argv[1])) {
print "Usage: php -d extension=grpc.so route_guide_client.php " . echo 'Usage: php -d extension=grpc.so route_guide_client.php '.
"<path to route_guide_db.json>\n"; "<path to route_guide_db.json>\n";
exit(1); exit(1);
} }
main(); main();

@ -29,4 +29,4 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Runs the protoc with gRPC plugin to generate protocol messages and gRPC stubs. # Runs the protoc with gRPC plugin to generate protocol messages and gRPC stubs.
protoc -I ../../protos --python_out=. --grpc_out=. --plugin=protoc-gen-grpc=`which grpc_python_plugin` ../../protos/helloworld.proto python -m grpc.tools.protoc -I../../protos --python_out=. --grpc_python_out=. ../../protos/helloworld.proto

@ -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)

@ -29,4 +29,4 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Runs the protoc with gRPC plugin to generate protocol messages and gRPC stubs. # Runs the protoc with gRPC plugin to generate protocol messages and gRPC stubs.
protoc -I ../../protos --python_out=. --grpc_out=. --plugin=protoc-gen-grpc=`which grpc_python_plugin` ../../protos/route_guide.proto python -m grpc.tools.protoc -I../../protos --python_out=. --grpc_python_out=. ../../protos/route_guide.proto

@ -0,0 +1,792 @@
# GRPC CocoaPods podspec
# This file has been automatically generated from a template file. Please make modifications to
# `templates/gRPC-Core.podspec.template` instead. This file can be regenerated from the template by
# running `tools/buildgen/generate_projects.sh`.
# Copyright 2015, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Pod::Spec.new do |s|
s.name = 'gRPC-Core'
version = '0.14.0'
s.version = version
s.summary = 'Core cross-platform gRPC library, written in C'
s.homepage = 'http://www.grpc.io'
s.license = 'New BSD'
s.authors = { 'The gRPC contributors' => 'grpc-packages@google.com' }
s.source = {
:git => 'https://github.com/grpc/grpc.git',
:tag => "release-#{version.gsub(/\./, '_')}-objectivec-#{version}",
# TODO(jcanizales): Depend explicitly on the nanopb pod, and disable submodules.
:submodules => true,
}
s.ios.deployment_target = '7.1'
s.osx.deployment_target = '10.9'
s.requires_arc = false
name = 'grpc'
# When creating a dynamic framework, name it grpc.framework instead of gRPC-Core.framework.
# This lets users write their includes like `#include <grpc/grpc.h>` as opposed to `#include
# <gRPC-Core/grpc.h>`.
s.module_name = name
# When creating a dynamic framework, copy the headers under `include/grpc/` into the root of
# the `Headers/` directory of the framework (i.e., not under `Headers/include/grpc`).
#
# TODO(jcanizales): Debug why this doesn't work on macOS.
s.header_mappings_dir = 'include/grpc'
# The above has an undesired effect when creating a static library: It forces users to write
# includes like `#include <gRPC-Core/grpc.h>`. `s.header_dir` adds a path prefix to that, and
# because Cocoapods lets omit the pod name when including headers of static libraries, the
# following lets users write `#include <grpc/grpc.h>`.
s.header_dir = name
# The module map created automatically by Cocoapods doesn't work for C libraries like gRPC-Core.
s.module_map = 'include/grpc/module.modulemap'
# To compile the library, we need the user headers search path (quoted includes) to point to the
# root of the repo, and the system headers search path (angled includes) to point to `include/`.
# Cocoapods effectively clones the repo under `<Podfile dir>/Pods/gRPC-Core/`, and sets a build
# variable called `$(PODS_ROOT)` to `<Podfile dir>/Pods/`, so we use that.
#
# Relying on the file structure under $(PODS_ROOT) isn't officially supported in Cocoapods, as it
# is taken as an implementation detail. We've asked for an alternative, and have been told that
# what we're doing should keep working: https://github.com/CocoaPods/CocoaPods/issues/4386
#
# The `src_root` value of `$(PODS_ROOT)/gRPC-Core` assumes Cocoapods is installing this pod from
# its remote repo. For local development of this library, enabled by using `:path` in the Podfile,
# that assumption is wrong. In such case, the following settings need to be reset with the
# appropriate value of `src_root`. This can be accomplished in the `pre_install` hook of the
# Podfile; see `src/objective-c/tests/Podfile` for an example.
src_root = '$(PODS_ROOT)/gRPC-Core'
s.pod_target_xcconfig = {
'GRPC_SRC_ROOT' => src_root,
'HEADER_SEARCH_PATHS' => '"$(inherited)" "$(GRPC_SRC_ROOT)/include"',
'USER_HEADER_SEARCH_PATHS' => '"$(GRPC_SRC_ROOT)"',
# If we don't set these two settings, `include/grpc/support/time.h` and
# `src/core/lib/support/string.h` shadow the system `<time.h>` and `<string.h>`, breaking the
# build.
'USE_HEADERMAP' => 'NO',
'ALWAYS_SEARCH_USER_PATHS' => 'NO',
}
s.default_subspecs = 'Interface', 'Implementation'
# Like many other C libraries, gRPC-Core has its public headers under `include/<libname>/` and its
# sources and private headers in other directories outside `include/`. Cocoapods' linter doesn't
# allow any header to be listed outside the `header_mappings_dir` (even though doing so works in
# practice). Because we need our `header_mappings_dir` to be `include/grpc/` for the reason
# mentioned above, we work around the linter limitation by dividing the pod into two subspecs, one
# for public headers and the other for implementation. Each gets its own `header_mappings_dir`,
# making the linter happy.
#
# The list of source files is generated by a template: `templates/gRPC-Core.podspec.template`. It
# can be regenerated from the template by running `tools/buildgen/generate_projects.sh`.
s.subspec 'Interface' do |ss|
ss.header_mappings_dir = 'include/grpc'
ss.source_files = 'include/grpc/support/alloc.h',
'include/grpc/support/atm.h',
'include/grpc/support/atm_gcc_atomic.h',
'include/grpc/support/atm_gcc_sync.h',
'include/grpc/support/atm_windows.h',
'include/grpc/support/avl.h',
'include/grpc/support/cmdline.h',
'include/grpc/support/cpu.h',
'include/grpc/support/histogram.h',
'include/grpc/support/host_port.h',
'include/grpc/support/log.h',
'include/grpc/support/log_windows.h',
'include/grpc/support/port_platform.h',
'include/grpc/support/slice.h',
'include/grpc/support/slice_buffer.h',
'include/grpc/support/string_util.h',
'include/grpc/support/subprocess.h',
'include/grpc/support/sync.h',
'include/grpc/support/sync_generic.h',
'include/grpc/support/sync_posix.h',
'include/grpc/support/sync_windows.h',
'include/grpc/support/thd.h',
'include/grpc/support/time.h',
'include/grpc/support/tls.h',
'include/grpc/support/tls_gcc.h',
'include/grpc/support/tls_msvc.h',
'include/grpc/support/tls_pthread.h',
'include/grpc/support/useful.h',
'include/grpc/impl/codegen/alloc.h',
'include/grpc/impl/codegen/atm.h',
'include/grpc/impl/codegen/atm_gcc_atomic.h',
'include/grpc/impl/codegen/atm_gcc_sync.h',
'include/grpc/impl/codegen/atm_windows.h',
'include/grpc/impl/codegen/log.h',
'include/grpc/impl/codegen/port_platform.h',
'include/grpc/impl/codegen/slice.h',
'include/grpc/impl/codegen/slice_buffer.h',
'include/grpc/impl/codegen/sync.h',
'include/grpc/impl/codegen/sync_generic.h',
'include/grpc/impl/codegen/sync_posix.h',
'include/grpc/impl/codegen/sync_windows.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/impl/codegen/byte_buffer.h',
'include/grpc/impl/codegen/byte_buffer_reader.h',
'include/grpc/impl/codegen/compression_types.h',
'include/grpc/impl/codegen/connectivity_state.h',
'include/grpc/impl/codegen/grpc_types.h',
'include/grpc/impl/codegen/propagation_bits.h',
'include/grpc/impl/codegen/status.h',
'include/grpc/impl/codegen/alloc.h',
'include/grpc/impl/codegen/atm.h',
'include/grpc/impl/codegen/atm_gcc_atomic.h',
'include/grpc/impl/codegen/atm_gcc_sync.h',
'include/grpc/impl/codegen/atm_windows.h',
'include/grpc/impl/codegen/log.h',
'include/grpc/impl/codegen/port_platform.h',
'include/grpc/impl/codegen/slice.h',
'include/grpc/impl/codegen/slice_buffer.h',
'include/grpc/impl/codegen/sync.h',
'include/grpc/impl/codegen/sync_generic.h',
'include/grpc/impl/codegen/sync_posix.h',
'include/grpc/impl/codegen/sync_windows.h',
'include/grpc/impl/codegen/time.h',
'include/grpc/grpc_security.h',
'include/grpc/grpc_security_constants.h',
'include/grpc/census.h'
end
s.subspec 'Implementation' do |ss|
ss.header_mappings_dir = '.'
ss.libraries = 'z'
ss.dependency "#{s.name}/Interface", version
ss.dependency 'BoringSSL', '~> 4.0'
# To save you from scrolling, this is the last part of the podspec.
ss.source_files = 'src/core/lib/profiling/timers.h',
'src/core/lib/support/backoff.h',
'src/core/lib/support/block_annotate.h',
'src/core/lib/support/env.h',
'src/core/lib/support/murmur_hash.h',
'src/core/lib/support/stack_lockfree.h',
'src/core/lib/support/string.h',
'src/core/lib/support/string_windows.h',
'src/core/lib/support/thd_internal.h',
'src/core/lib/support/time_precise.h',
'src/core/lib/support/tmpfile.h',
'src/core/lib/profiling/basic_timers.c',
'src/core/lib/profiling/stap_timers.c',
'src/core/lib/support/alloc.c',
'src/core/lib/support/avl.c',
'src/core/lib/support/backoff.c',
'src/core/lib/support/cmdline.c',
'src/core/lib/support/cpu_iphone.c',
'src/core/lib/support/cpu_linux.c',
'src/core/lib/support/cpu_posix.c',
'src/core/lib/support/cpu_windows.c',
'src/core/lib/support/env_linux.c',
'src/core/lib/support/env_posix.c',
'src/core/lib/support/env_windows.c',
'src/core/lib/support/histogram.c',
'src/core/lib/support/host_port.c',
'src/core/lib/support/log.c',
'src/core/lib/support/log_android.c',
'src/core/lib/support/log_linux.c',
'src/core/lib/support/log_posix.c',
'src/core/lib/support/log_windows.c',
'src/core/lib/support/murmur_hash.c',
'src/core/lib/support/slice.c',
'src/core/lib/support/slice_buffer.c',
'src/core/lib/support/stack_lockfree.c',
'src/core/lib/support/string.c',
'src/core/lib/support/string_posix.c',
'src/core/lib/support/string_util_windows.c',
'src/core/lib/support/string_windows.c',
'src/core/lib/support/subprocess_posix.c',
'src/core/lib/support/subprocess_windows.c',
'src/core/lib/support/sync.c',
'src/core/lib/support/sync_posix.c',
'src/core/lib/support/sync_windows.c',
'src/core/lib/support/thd.c',
'src/core/lib/support/thd_posix.c',
'src/core/lib/support/thd_windows.c',
'src/core/lib/support/time.c',
'src/core/lib/support/time_posix.c',
'src/core/lib/support/time_precise.c',
'src/core/lib/support/time_windows.c',
'src/core/lib/support/tls_pthread.c',
'src/core/lib/support/tmpfile_msys.c',
'src/core/lib/support/tmpfile_posix.c',
'src/core/lib/support/tmpfile_windows.c',
'src/core/lib/support/wrap_memcpy.c',
'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/ext/transport/chttp2/transport/bin_decoder.h',
'src/core/ext/transport/chttp2/transport/bin_encoder.h',
'src/core/ext/transport/chttp2/transport/chttp2_transport.h',
'src/core/ext/transport/chttp2/transport/frame.h',
'src/core/ext/transport/chttp2/transport/frame_data.h',
'src/core/ext/transport/chttp2/transport/frame_goaway.h',
'src/core/ext/transport/chttp2/transport/frame_ping.h',
'src/core/ext/transport/chttp2/transport/frame_rst_stream.h',
'src/core/ext/transport/chttp2/transport/frame_settings.h',
'src/core/ext/transport/chttp2/transport/frame_window_update.h',
'src/core/ext/transport/chttp2/transport/hpack_encoder.h',
'src/core/ext/transport/chttp2/transport/hpack_parser.h',
'src/core/ext/transport/chttp2/transport/hpack_table.h',
'src/core/ext/transport/chttp2/transport/http2_errors.h',
'src/core/ext/transport/chttp2/transport/huffsyms.h',
'src/core/ext/transport/chttp2/transport/incoming_metadata.h',
'src/core/ext/transport/chttp2/transport/internal.h',
'src/core/ext/transport/chttp2/transport/status_conversion.h',
'src/core/ext/transport/chttp2/transport/stream_map.h',
'src/core/ext/transport/chttp2/transport/timeout_encoding.h',
'src/core/ext/transport/chttp2/transport/varint.h',
'src/core/ext/transport/chttp2/alpn/alpn.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/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/core/ext/client_config/client_channel.h',
'src/core/ext/client_config/client_channel_factory.h',
'src/core/ext/client_config/client_config.h',
'src/core/ext/client_config/connector.h',
'src/core/ext/client_config/initial_connect_string.h',
'src/core/ext/client_config/lb_policy.h',
'src/core/ext/client_config/lb_policy_factory.h',
'src/core/ext/client_config/lb_policy_registry.h',
'src/core/ext/client_config/parse_address.h',
'src/core/ext/client_config/resolver.h',
'src/core/ext/client_config/resolver_factory.h',
'src/core/ext/client_config/resolver_registry.h',
'src/core/ext/client_config/subchannel.h',
'src/core/ext/client_config/subchannel_call_holder.h',
'src/core/ext/client_config/subchannel_index.h',
'src/core/ext/client_config/uri_parser.h',
'src/core/ext/lb_policy/grpclb/load_balancer_api.h',
'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h',
'third_party/nanopb/pb.h',
'third_party/nanopb/pb_common.h',
'third_party/nanopb/pb_decode.h',
'third_party/nanopb/pb_encode.h',
'src/core/ext/load_reporting/load_reporting.h',
'src/core/ext/load_reporting/load_reporting_filter.h',
'src/core/ext/census/aggregation.h',
'src/core/ext/census/base_resources.h',
'src/core/ext/census/census_interface.h',
'src/core/ext/census/census_rpc_stats.h',
'src/core/ext/census/gen/census.pb.h',
'src/core/ext/census/grpc_filter.h',
'src/core/ext/census/mlog.h',
'src/core/ext/census/resource.h',
'src/core/ext/census/rpc_metric_id.h',
'src/core/lib/surface/init.c',
'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/ext/transport/chttp2/server/secure/server_secure_chttp2.c',
'src/core/ext/transport/chttp2/transport/bin_decoder.c',
'src/core/ext/transport/chttp2/transport/bin_encoder.c',
'src/core/ext/transport/chttp2/transport/chttp2_plugin.c',
'src/core/ext/transport/chttp2/transport/chttp2_transport.c',
'src/core/ext/transport/chttp2/transport/frame_data.c',
'src/core/ext/transport/chttp2/transport/frame_goaway.c',
'src/core/ext/transport/chttp2/transport/frame_ping.c',
'src/core/ext/transport/chttp2/transport/frame_rst_stream.c',
'src/core/ext/transport/chttp2/transport/frame_settings.c',
'src/core/ext/transport/chttp2/transport/frame_window_update.c',
'src/core/ext/transport/chttp2/transport/hpack_encoder.c',
'src/core/ext/transport/chttp2/transport/hpack_parser.c',
'src/core/ext/transport/chttp2/transport/hpack_table.c',
'src/core/ext/transport/chttp2/transport/huffsyms.c',
'src/core/ext/transport/chttp2/transport/incoming_metadata.c',
'src/core/ext/transport/chttp2/transport/parsing.c',
'src/core/ext/transport/chttp2/transport/status_conversion.c',
'src/core/ext/transport/chttp2/transport/stream_lists.c',
'src/core/ext/transport/chttp2/transport/stream_map.c',
'src/core/ext/transport/chttp2/transport/timeout_encoding.c',
'src/core/ext/transport/chttp2/transport/varint.c',
'src/core/ext/transport/chttp2/transport/writing.c',
'src/core/ext/transport/chttp2/alpn/alpn.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/lib/tsi/fake_transport_security.c',
'src/core/lib/tsi/ssl_transport_security.c',
'src/core/lib/tsi/transport_security.c',
'src/core/ext/transport/chttp2/client/secure/secure_channel_create.c',
'src/core/ext/client_config/channel_connectivity.c',
'src/core/ext/client_config/client_channel.c',
'src/core/ext/client_config/client_channel_factory.c',
'src/core/ext/client_config/client_config.c',
'src/core/ext/client_config/client_config_plugin.c',
'src/core/ext/client_config/connector.c',
'src/core/ext/client_config/default_initial_connect_string.c',
'src/core/ext/client_config/initial_connect_string.c',
'src/core/ext/client_config/lb_policy.c',
'src/core/ext/client_config/lb_policy_factory.c',
'src/core/ext/client_config/lb_policy_registry.c',
'src/core/ext/client_config/parse_address.c',
'src/core/ext/client_config/resolver.c',
'src/core/ext/client_config/resolver_factory.c',
'src/core/ext/client_config/resolver_registry.c',
'src/core/ext/client_config/subchannel.c',
'src/core/ext/client_config/subchannel_call_holder.c',
'src/core/ext/client_config/subchannel_index.c',
'src/core/ext/client_config/uri_parser.c',
'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c',
'src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c',
'src/core/ext/transport/chttp2/client/insecure/channel_create.c',
'src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c',
'src/core/ext/lb_policy/grpclb/load_balancer_api.c',
'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c',
'third_party/nanopb/pb_common.c',
'third_party/nanopb/pb_decode.c',
'third_party/nanopb/pb_encode.c',
'src/core/ext/lb_policy/pick_first/pick_first.c',
'src/core/ext/lb_policy/round_robin/round_robin.c',
'src/core/ext/resolver/dns/native/dns_resolver.c',
'src/core/ext/resolver/sockaddr/sockaddr_resolver.c',
'src/core/ext/load_reporting/load_reporting.c',
'src/core/ext/load_reporting/load_reporting_filter.c',
'src/core/ext/census/base_resources.c',
'src/core/ext/census/context.c',
'src/core/ext/census/gen/census.pb.c',
'src/core/ext/census/grpc_context.c',
'src/core/ext/census/grpc_filter.c',
'src/core/ext/census/grpc_plugin.c',
'src/core/ext/census/initialize.c',
'src/core/ext/census/mlog.c',
'src/core/ext/census/operation.c',
'src/core/ext/census/placeholders.c',
'src/core/ext/census/resource.c',
'src/core/ext/census/tracing.c',
'src/core/plugin_registry/grpc_plugin_registry.c'
ss.private_header_files = 'src/core/lib/profiling/timers.h',
'src/core/lib/support/backoff.h',
'src/core/lib/support/block_annotate.h',
'src/core/lib/support/env.h',
'src/core/lib/support/murmur_hash.h',
'src/core/lib/support/stack_lockfree.h',
'src/core/lib/support/string.h',
'src/core/lib/support/string_windows.h',
'src/core/lib/support/thd_internal.h',
'src/core/lib/support/time_precise.h',
'src/core/lib/support/tmpfile.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/ext/transport/chttp2/transport/bin_decoder.h',
'src/core/ext/transport/chttp2/transport/bin_encoder.h',
'src/core/ext/transport/chttp2/transport/chttp2_transport.h',
'src/core/ext/transport/chttp2/transport/frame.h',
'src/core/ext/transport/chttp2/transport/frame_data.h',
'src/core/ext/transport/chttp2/transport/frame_goaway.h',
'src/core/ext/transport/chttp2/transport/frame_ping.h',
'src/core/ext/transport/chttp2/transport/frame_rst_stream.h',
'src/core/ext/transport/chttp2/transport/frame_settings.h',
'src/core/ext/transport/chttp2/transport/frame_window_update.h',
'src/core/ext/transport/chttp2/transport/hpack_encoder.h',
'src/core/ext/transport/chttp2/transport/hpack_parser.h',
'src/core/ext/transport/chttp2/transport/hpack_table.h',
'src/core/ext/transport/chttp2/transport/http2_errors.h',
'src/core/ext/transport/chttp2/transport/huffsyms.h',
'src/core/ext/transport/chttp2/transport/incoming_metadata.h',
'src/core/ext/transport/chttp2/transport/internal.h',
'src/core/ext/transport/chttp2/transport/status_conversion.h',
'src/core/ext/transport/chttp2/transport/stream_map.h',
'src/core/ext/transport/chttp2/transport/timeout_encoding.h',
'src/core/ext/transport/chttp2/transport/varint.h',
'src/core/ext/transport/chttp2/alpn/alpn.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/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/core/ext/client_config/client_channel.h',
'src/core/ext/client_config/client_channel_factory.h',
'src/core/ext/client_config/client_config.h',
'src/core/ext/client_config/connector.h',
'src/core/ext/client_config/initial_connect_string.h',
'src/core/ext/client_config/lb_policy.h',
'src/core/ext/client_config/lb_policy_factory.h',
'src/core/ext/client_config/lb_policy_registry.h',
'src/core/ext/client_config/parse_address.h',
'src/core/ext/client_config/resolver.h',
'src/core/ext/client_config/resolver_factory.h',
'src/core/ext/client_config/resolver_registry.h',
'src/core/ext/client_config/subchannel.h',
'src/core/ext/client_config/subchannel_call_holder.h',
'src/core/ext/client_config/subchannel_index.h',
'src/core/ext/client_config/uri_parser.h',
'src/core/ext/lb_policy/grpclb/load_balancer_api.h',
'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h',
'third_party/nanopb/pb.h',
'third_party/nanopb/pb_common.h',
'third_party/nanopb/pb_decode.h',
'third_party/nanopb/pb_encode.h',
'src/core/ext/load_reporting/load_reporting.h',
'src/core/ext/load_reporting/load_reporting_filter.h',
'src/core/ext/census/aggregation.h',
'src/core/ext/census/base_resources.h',
'src/core/ext/census/census_interface.h',
'src/core/ext/census/census_rpc_stats.h',
'src/core/ext/census/gen/census.pb.h',
'src/core/ext/census/grpc_filter.h',
'src/core/ext/census/mlog.h',
'src/core/ext/census/resource.h',
'src/core/ext/census/rpc_metric_id.h'
end
s.subspec 'Cronet-Interface' do |ss|
ss.header_mappings_dir = 'include/grpc'
ss.source_files = 'include/grpc/grpc_cronet.h'
end
s.subspec 'Cronet-Tests' do |ss|
ss.header_mappings_dir = '.'
ss.source_files = 'src/core/ext/transport/cronet/client/secure/cronet_channel_create.c',
'src/core/ext/transport/cronet/transport/cronet_transport.c',
'test/core/end2end/cq_verifier.{c,h}',
'test/core/end2end/end2end_tests.{c,h}',
'test/core/end2end/tests/*.{c,h}',
'test/core/end2end/data/*.{c,h}',
'test/core/util/test_config.{c,h}',
'test/core/util/port.h',
'test/core/util/port_posix.c',
'test/core/util/port_server_client.{c,h}'
ss.dependency 'CronetFramework'
end
end

@ -0,0 +1,69 @@
# GRPC CocoaPods podspec
# This file has been automatically generated from a template file.
# Please look at the templates directory instead.
# This file can be regenerated from the template by running
# tools/buildgen/generate_projects.sh
# Copyright 2015, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Pod::Spec.new do |s|
s.name = 'gRPC-ProtoRPC'
version = '0.14.0'
s.version = version
s.summary = 'RPC library for Protocol Buffers, based on gRPC'
s.homepage = 'http://www.grpc.io'
s.license = 'New BSD'
s.authors = { 'The gRPC contributors' => 'grpc-packages@google.com' }
s.source = {
:git => 'https://github.com/grpc/grpc.git',
:tag => "release-#{version.gsub(/\./, '_')}-objectivec-#{version}",
}
s.ios.deployment_target = '7.1'
s.osx.deployment_target = '10.9'
name = 'ProtoRPC'
s.module_name = name
s.header_dir = name
src_dir = 'src/objective-c/ProtoRPC'
s.source_files = "#{src_dir}/*.{h,m}"
s.header_mappings_dir = "#{src_dir}"
s.dependency 'gRPC', version
s.dependency 'gRPC-RxLibrary', version
s.dependency 'Protobuf', '~> 3.0.0-beta-3.1'
# This is needed by all pods that depend on Protobuf:
s.pod_target_xcconfig = {
'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1',
}
end

@ -0,0 +1,62 @@
# GRPC CocoaPods podspec
# This file has been automatically generated from a template file.
# Please look at the templates directory instead.
# This file can be regenerated from the template by running
# tools/buildgen/generate_projects.sh
# Copyright 2015, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Pod::Spec.new do |s|
s.name = 'gRPC-RxLibrary'
version = '0.14.0'
s.version = version
s.summary = 'Reactive Extensions library for iOS/OSX.'
s.homepage = 'http://www.grpc.io'
s.license = 'New BSD'
s.authors = { 'The gRPC contributors' => 'grpc-packages@google.com' }
s.source = {
:git => 'https://github.com/grpc/grpc.git',
:tag => "release-#{version.gsub(/\./, '_')}-objectivec-#{version}",
}
s.ios.deployment_target = '7.1'
s.osx.deployment_target = '10.9'
name = 'RxLibrary'
s.module_name = name
s.header_dir = name
src_dir = 'src/objective-c/RxLibrary'
s.source_files = "#{src_dir}/*.{h,m}", "#{src_dir}/**/*.{h,m}"
s.private_header_files = "#{src_dir}/private/*.h"
s.header_mappings_dir = "#{src_dir}"
end

@ -43,690 +43,26 @@ Pod::Spec.new do |s|
s.license = 'New BSD' s.license = 'New BSD'
s.authors = { 'The gRPC contributors' => 'grpc-packages@google.com' } s.authors = { 'The gRPC contributors' => 'grpc-packages@google.com' }
s.source = { :git => 'https://github.com/grpc/grpc.git', s.source = {
:tag => "release-#{version.gsub(/\./, '_')}-objectivec-#{version}", :git => 'https://github.com/grpc/grpc.git',
:submodules => true } :tag => "release-#{version.gsub(/\./, '_')}-objectivec-#{version}",
}
s.ios.deployment_target = '7.1' s.ios.deployment_target = '7.1'
s.osx.deployment_target = '10.9' s.osx.deployment_target = '10.9'
s.requires_arc = true
objc_dir = 'src/objective-c'
# Reactive Extensions library for iOS.
s.subspec 'RxLibrary' do |ss|
src_dir = "#{objc_dir}/RxLibrary"
ss.source_files = "#{src_dir}/*.{h,m}", "#{src_dir}/**/*.{h,m}"
ss.private_header_files = "#{src_dir}/private/*.h"
ss.header_mappings_dir = "#{objc_dir}"
end
# Core cross-platform gRPC library, written in C.
s.subspec 'C-Core' do |ss|
ss.source_files = 'src/core/lib/profiling/timers.h',
'src/core/lib/support/backoff.h',
'src/core/lib/support/block_annotate.h',
'src/core/lib/support/env.h',
'src/core/lib/support/load_file.h',
'src/core/lib/support/murmur_hash.h',
'src/core/lib/support/stack_lockfree.h',
'src/core/lib/support/string.h',
'src/core/lib/support/string_windows.h',
'src/core/lib/support/thd_internal.h',
'src/core/lib/support/time_precise.h',
'src/core/lib/support/tmpfile.h',
'include/grpc/support/alloc.h',
'include/grpc/support/atm.h',
'include/grpc/support/atm_gcc_atomic.h',
'include/grpc/support/atm_gcc_sync.h',
'include/grpc/support/atm_windows.h',
'include/grpc/support/avl.h',
'include/grpc/support/cmdline.h',
'include/grpc/support/cpu.h',
'include/grpc/support/histogram.h',
'include/grpc/support/host_port.h',
'include/grpc/support/log.h',
'include/grpc/support/log_windows.h',
'include/grpc/support/port_platform.h',
'include/grpc/support/slice.h',
'include/grpc/support/slice_buffer.h',
'include/grpc/support/string_util.h',
'include/grpc/support/subprocess.h',
'include/grpc/support/sync.h',
'include/grpc/support/sync_generic.h',
'include/grpc/support/sync_posix.h',
'include/grpc/support/sync_windows.h',
'include/grpc/support/thd.h',
'include/grpc/support/time.h',
'include/grpc/support/tls.h',
'include/grpc/support/tls_gcc.h',
'include/grpc/support/tls_msvc.h',
'include/grpc/support/tls_pthread.h',
'include/grpc/support/useful.h',
'include/grpc/impl/codegen/alloc.h',
'include/grpc/impl/codegen/atm.h',
'include/grpc/impl/codegen/atm_gcc_atomic.h',
'include/grpc/impl/codegen/atm_gcc_sync.h',
'include/grpc/impl/codegen/atm_windows.h',
'include/grpc/impl/codegen/log.h',
'include/grpc/impl/codegen/port_platform.h',
'include/grpc/impl/codegen/slice.h',
'include/grpc/impl/codegen/slice_buffer.h',
'include/grpc/impl/codegen/sync.h',
'include/grpc/impl/codegen/sync_generic.h',
'include/grpc/impl/codegen/sync_posix.h',
'include/grpc/impl/codegen/sync_windows.h',
'include/grpc/impl/codegen/time.h',
'src/core/lib/profiling/basic_timers.c',
'src/core/lib/profiling/stap_timers.c',
'src/core/lib/support/alloc.c',
'src/core/lib/support/avl.c',
'src/core/lib/support/backoff.c',
'src/core/lib/support/cmdline.c',
'src/core/lib/support/cpu_iphone.c',
'src/core/lib/support/cpu_linux.c',
'src/core/lib/support/cpu_posix.c',
'src/core/lib/support/cpu_windows.c',
'src/core/lib/support/env_linux.c',
'src/core/lib/support/env_posix.c',
'src/core/lib/support/env_windows.c',
'src/core/lib/support/histogram.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_android.c',
'src/core/lib/support/log_linux.c',
'src/core/lib/support/log_posix.c',
'src/core/lib/support/log_windows.c',
'src/core/lib/support/murmur_hash.c',
'src/core/lib/support/slice.c',
'src/core/lib/support/slice_buffer.c',
'src/core/lib/support/stack_lockfree.c',
'src/core/lib/support/string.c',
'src/core/lib/support/string_posix.c',
'src/core/lib/support/string_util_windows.c',
'src/core/lib/support/string_windows.c',
'src/core/lib/support/subprocess_posix.c',
'src/core/lib/support/subprocess_windows.c',
'src/core/lib/support/sync.c',
'src/core/lib/support/sync_posix.c',
'src/core/lib/support/sync_windows.c',
'src/core/lib/support/thd.c',
'src/core/lib/support/thd_posix.c',
'src/core/lib/support/thd_windows.c',
'src/core/lib/support/time.c',
'src/core/lib/support/time_posix.c',
'src/core/lib/support/time_precise.c',
'src/core/lib/support/time_windows.c',
'src/core/lib/support/tls_pthread.c',
'src/core/lib/support/tmpfile_msys.c',
'src/core/lib/support/tmpfile_posix.c',
'src/core/lib/support/tmpfile_windows.c',
'src/core/lib/support/wrap_memcpy.c',
'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/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/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/surface/surface_trace.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/ext/transport/chttp2/transport/bin_encoder.h',
'src/core/ext/transport/chttp2/transport/chttp2_transport.h',
'src/core/ext/transport/chttp2/transport/frame.h',
'src/core/ext/transport/chttp2/transport/frame_data.h',
'src/core/ext/transport/chttp2/transport/frame_goaway.h',
'src/core/ext/transport/chttp2/transport/frame_ping.h',
'src/core/ext/transport/chttp2/transport/frame_rst_stream.h',
'src/core/ext/transport/chttp2/transport/frame_settings.h',
'src/core/ext/transport/chttp2/transport/frame_window_update.h',
'src/core/ext/transport/chttp2/transport/hpack_encoder.h',
'src/core/ext/transport/chttp2/transport/hpack_parser.h',
'src/core/ext/transport/chttp2/transport/hpack_table.h',
'src/core/ext/transport/chttp2/transport/http2_errors.h',
'src/core/ext/transport/chttp2/transport/huffsyms.h',
'src/core/ext/transport/chttp2/transport/incoming_metadata.h',
'src/core/ext/transport/chttp2/transport/internal.h',
'src/core/ext/transport/chttp2/transport/status_conversion.h',
'src/core/ext/transport/chttp2/transport/stream_map.h',
'src/core/ext/transport/chttp2/transport/timeout_encoding.h',
'src/core/ext/transport/chttp2/transport/varint.h',
'src/core/ext/transport/chttp2/alpn/alpn.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/util/b64.h',
'src/core/lib/security/util/json_util.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/core/ext/client_config/client_channel.h',
'src/core/ext/client_config/client_channel_factory.h',
'src/core/ext/client_config/client_config.h',
'src/core/ext/client_config/connector.h',
'src/core/ext/client_config/initial_connect_string.h',
'src/core/ext/client_config/lb_policy.h',
'src/core/ext/client_config/lb_policy_factory.h',
'src/core/ext/client_config/lb_policy_registry.h',
'src/core/ext/client_config/parse_address.h',
'src/core/ext/client_config/resolver.h',
'src/core/ext/client_config/resolver_factory.h',
'src/core/ext/client_config/resolver_registry.h',
'src/core/ext/client_config/subchannel.h',
'src/core/ext/client_config/subchannel_call_holder.h',
'src/core/ext/client_config/subchannel_index.h',
'src/core/ext/client_config/uri_parser.h',
'src/core/ext/lb_policy/grpclb/load_balancer_api.h',
'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h',
'third_party/nanopb/pb.h',
'third_party/nanopb/pb_common.h',
'third_party/nanopb/pb_decode.h',
'third_party/nanopb/pb_encode.h',
'src/core/ext/load_reporting/load_reporting.h',
'src/core/ext/load_reporting/load_reporting_filter.h',
'src/core/ext/census/aggregation.h',
'src/core/ext/census/base_resources.h',
'src/core/ext/census/census_interface.h',
'src/core/ext/census/census_rpc_stats.h',
'src/core/ext/census/gen/census.pb.h',
'src/core/ext/census/grpc_filter.h',
'src/core/ext/census/mlog.h',
'src/core/ext/census/resource.h',
'src/core/ext/census/rpc_metric_id.h',
'include/grpc/byte_buffer.h',
'include/grpc/byte_buffer_reader.h',
'include/grpc/compression.h',
'include/grpc/grpc.h',
'include/grpc/status.h',
'include/grpc/impl/codegen/byte_buffer.h',
'include/grpc/impl/codegen/byte_buffer_reader.h',
'include/grpc/impl/codegen/compression_types.h',
'include/grpc/impl/codegen/connectivity_state.h',
'include/grpc/impl/codegen/grpc_types.h',
'include/grpc/impl/codegen/propagation_bits.h',
'include/grpc/impl/codegen/status.h',
'include/grpc/impl/codegen/alloc.h',
'include/grpc/impl/codegen/atm.h',
'include/grpc/impl/codegen/atm_gcc_atomic.h',
'include/grpc/impl/codegen/atm_gcc_sync.h',
'include/grpc/impl/codegen/atm_windows.h',
'include/grpc/impl/codegen/log.h',
'include/grpc/impl/codegen/port_platform.h',
'include/grpc/impl/codegen/slice.h',
'include/grpc/impl/codegen/slice_buffer.h',
'include/grpc/impl/codegen/sync.h',
'include/grpc/impl/codegen/sync_generic.h',
'include/grpc/impl/codegen/sync_posix.h',
'include/grpc/impl/codegen/sync_windows.h',
'include/grpc/impl/codegen/time.h',
'include/grpc/grpc_security.h',
'include/grpc/grpc_security_constants.h',
'include/grpc/census.h',
'src/core/lib/surface/init.c',
'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_algorithm.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/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/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/ext/transport/chttp2/server/secure/server_secure_chttp2.c',
'src/core/ext/transport/chttp2/transport/bin_encoder.c',
'src/core/ext/transport/chttp2/transport/chttp2_plugin.c',
'src/core/ext/transport/chttp2/transport/chttp2_transport.c',
'src/core/ext/transport/chttp2/transport/frame_data.c',
'src/core/ext/transport/chttp2/transport/frame_goaway.c',
'src/core/ext/transport/chttp2/transport/frame_ping.c',
'src/core/ext/transport/chttp2/transport/frame_rst_stream.c',
'src/core/ext/transport/chttp2/transport/frame_settings.c',
'src/core/ext/transport/chttp2/transport/frame_window_update.c',
'src/core/ext/transport/chttp2/transport/hpack_encoder.c',
'src/core/ext/transport/chttp2/transport/hpack_parser.c',
'src/core/ext/transport/chttp2/transport/hpack_table.c',
'src/core/ext/transport/chttp2/transport/huffsyms.c',
'src/core/ext/transport/chttp2/transport/incoming_metadata.c',
'src/core/ext/transport/chttp2/transport/parsing.c',
'src/core/ext/transport/chttp2/transport/status_conversion.c',
'src/core/ext/transport/chttp2/transport/stream_lists.c',
'src/core/ext/transport/chttp2/transport/stream_map.c',
'src/core/ext/transport/chttp2/transport/timeout_encoding.c',
'src/core/ext/transport/chttp2/transport/varint.c',
'src/core/ext/transport/chttp2/transport/writing.c',
'src/core/ext/transport/chttp2/alpn/alpn.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/util/b64.c',
'src/core/lib/security/util/json_util.c',
'src/core/lib/surface/init_secure.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/core/ext/transport/chttp2/client/secure/secure_channel_create.c',
'src/core/ext/client_config/channel_connectivity.c',
'src/core/ext/client_config/client_channel.c',
'src/core/ext/client_config/client_channel_factory.c',
'src/core/ext/client_config/client_config.c',
'src/core/ext/client_config/client_config_plugin.c',
'src/core/ext/client_config/connector.c',
'src/core/ext/client_config/default_initial_connect_string.c',
'src/core/ext/client_config/initial_connect_string.c',
'src/core/ext/client_config/lb_policy.c',
'src/core/ext/client_config/lb_policy_factory.c',
'src/core/ext/client_config/lb_policy_registry.c',
'src/core/ext/client_config/parse_address.c',
'src/core/ext/client_config/resolver.c',
'src/core/ext/client_config/resolver_factory.c',
'src/core/ext/client_config/resolver_registry.c',
'src/core/ext/client_config/subchannel.c',
'src/core/ext/client_config/subchannel_call_holder.c',
'src/core/ext/client_config/subchannel_index.c',
'src/core/ext/client_config/uri_parser.c',
'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c',
'src/core/ext/transport/chttp2/client/insecure/channel_create.c',
'src/core/ext/lb_policy/grpclb/load_balancer_api.c',
'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c',
'third_party/nanopb/pb_common.c',
'third_party/nanopb/pb_decode.c',
'third_party/nanopb/pb_encode.c',
'src/core/ext/lb_policy/pick_first/pick_first.c',
'src/core/ext/lb_policy/round_robin/round_robin.c',
'src/core/ext/resolver/dns/native/dns_resolver.c',
'src/core/ext/resolver/sockaddr/sockaddr_resolver.c',
'src/core/ext/load_reporting/load_reporting.c',
'src/core/ext/load_reporting/load_reporting_filter.c',
'src/core/ext/census/base_resources.c',
'src/core/ext/census/context.c',
'src/core/ext/census/gen/census.pb.c',
'src/core/ext/census/grpc_context.c',
'src/core/ext/census/grpc_filter.c',
'src/core/ext/census/grpc_plugin.c',
'src/core/ext/census/initialize.c',
'src/core/ext/census/mlog.c',
'src/core/ext/census/operation.c',
'src/core/ext/census/placeholders.c',
'src/core/ext/census/resource.c',
'src/core/ext/census/tracing.c',
'src/core/plugin_registry/grpc_plugin_registry.c'
ss.private_header_files = 'src/core/lib/profiling/timers.h',
'src/core/lib/support/backoff.h',
'src/core/lib/support/block_annotate.h',
'src/core/lib/support/env.h',
'src/core/lib/support/load_file.h',
'src/core/lib/support/murmur_hash.h',
'src/core/lib/support/stack_lockfree.h',
'src/core/lib/support/string.h',
'src/core/lib/support/string_windows.h',
'src/core/lib/support/thd_internal.h',
'src/core/lib/support/time_precise.h',
'src/core/lib/support/tmpfile.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/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/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/surface/surface_trace.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/ext/transport/chttp2/transport/bin_encoder.h',
'src/core/ext/transport/chttp2/transport/chttp2_transport.h',
'src/core/ext/transport/chttp2/transport/frame.h',
'src/core/ext/transport/chttp2/transport/frame_data.h',
'src/core/ext/transport/chttp2/transport/frame_goaway.h',
'src/core/ext/transport/chttp2/transport/frame_ping.h',
'src/core/ext/transport/chttp2/transport/frame_rst_stream.h',
'src/core/ext/transport/chttp2/transport/frame_settings.h',
'src/core/ext/transport/chttp2/transport/frame_window_update.h',
'src/core/ext/transport/chttp2/transport/hpack_encoder.h',
'src/core/ext/transport/chttp2/transport/hpack_parser.h',
'src/core/ext/transport/chttp2/transport/hpack_table.h',
'src/core/ext/transport/chttp2/transport/http2_errors.h',
'src/core/ext/transport/chttp2/transport/huffsyms.h',
'src/core/ext/transport/chttp2/transport/incoming_metadata.h',
'src/core/ext/transport/chttp2/transport/internal.h',
'src/core/ext/transport/chttp2/transport/status_conversion.h',
'src/core/ext/transport/chttp2/transport/stream_map.h',
'src/core/ext/transport/chttp2/transport/timeout_encoding.h',
'src/core/ext/transport/chttp2/transport/varint.h',
'src/core/ext/transport/chttp2/alpn/alpn.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/util/b64.h',
'src/core/lib/security/util/json_util.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/core/ext/client_config/client_channel.h',
'src/core/ext/client_config/client_channel_factory.h',
'src/core/ext/client_config/client_config.h',
'src/core/ext/client_config/connector.h',
'src/core/ext/client_config/initial_connect_string.h',
'src/core/ext/client_config/lb_policy.h',
'src/core/ext/client_config/lb_policy_factory.h',
'src/core/ext/client_config/lb_policy_registry.h',
'src/core/ext/client_config/parse_address.h',
'src/core/ext/client_config/resolver.h',
'src/core/ext/client_config/resolver_factory.h',
'src/core/ext/client_config/resolver_registry.h',
'src/core/ext/client_config/subchannel.h',
'src/core/ext/client_config/subchannel_call_holder.h',
'src/core/ext/client_config/subchannel_index.h',
'src/core/ext/client_config/uri_parser.h',
'src/core/ext/lb_policy/grpclb/load_balancer_api.h',
'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h',
'third_party/nanopb/pb.h',
'third_party/nanopb/pb_common.h',
'third_party/nanopb/pb_decode.h',
'third_party/nanopb/pb_encode.h',
'src/core/ext/load_reporting/load_reporting.h',
'src/core/ext/load_reporting/load_reporting_filter.h',
'src/core/ext/census/aggregation.h',
'src/core/ext/census/base_resources.h',
'src/core/ext/census/census_interface.h',
'src/core/ext/census/census_rpc_stats.h',
'src/core/ext/census/gen/census.pb.h',
'src/core/ext/census/grpc_filter.h',
'src/core/ext/census/mlog.h',
'src/core/ext/census/resource.h',
'src/core/ext/census/rpc_metric_id.h'
ss.header_mappings_dir = '.'
# This isn't officially supported in Cocoapods. We've asked for an alternative:
# https://github.com/CocoaPods/CocoaPods/issues/4386
ss.xcconfig = {
'USE_HEADERMAP' => 'NO',
'ALWAYS_SEARCH_USER_PATHS' => 'NO',
'USER_HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/Headers/Private/gRPC"',
'HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/Headers/Private/gRPC/include"'
}
ss.requires_arc = false
ss.libraries = 'z'
ss.dependency 'BoringSSL', '~> 3.0'
# ss.compiler_flags = '-GCC_WARN_INHIBIT_ALL_WARNINGS', '-w'
end
# Objective-C wrapper around the core gRPC library.
s.subspec 'GRPCClient' do |ss|
src_dir = "#{objc_dir}/GRPCClient"
ss.source_files = "#{src_dir}/*.{h,m}", "#{src_dir}/**/*.{h,m}"
ss.private_header_files = "#{src_dir}/private/*.h"
ss.header_mappings_dir = "#{objc_dir}"
ss.dependency 'gRPC/C-Core' name = 'GRPCClient'
ss.dependency 'gRPC/RxLibrary' s.module_name = name
s.header_dir = name
# Certificates, to be able to establish TLS connections: src_dir = 'src/objective-c/GRPCClient'
ss.resource_bundles = { 'gRPCCertificates' => ['etc/roots.pem'] } s.source_files = "#{src_dir}/*.{h,m}", "#{src_dir}/**/*.{h,m}"
end s.private_header_files = "#{src_dir}/private/*.h"
s.header_mappings_dir = "#{src_dir}"
# RPC library for ProtocolBuffers, based on gRPC s.dependency 'gRPC-Core', version
s.subspec 'ProtoRPC' do |ss| s.dependency 'gRPC-RxLibrary', version
src_dir = "#{objc_dir}/ProtoRPC"
ss.source_files = "#{src_dir}/*.{h,m}"
ss.header_mappings_dir = "#{objc_dir}"
ss.dependency 'gRPC/GRPCClient' # Certificates, to be able to establish TLS connections:
ss.dependency 'gRPC/RxLibrary' s.resource_bundles = { 'gRPCCertificates' => ['etc/roots.pem'] }
ss.dependency 'Protobuf', '~> 3.0.0-alpha-4'
end
end end

@ -83,6 +83,9 @@ EXPORTS
grpc_header_nonbin_value_is_legal grpc_header_nonbin_value_is_legal
grpc_is_binary_header grpc_is_binary_header
grpc_call_error_to_string grpc_call_error_to_string
grpc_insecure_channel_create_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
@ -215,6 +218,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 )
@ -147,6 +145,7 @@ Gem::Specification.new do |s|
s.files += %w( include/grpc/byte_buffer_reader.h ) s.files += %w( include/grpc/byte_buffer_reader.h )
s.files += %w( include/grpc/compression.h ) s.files += %w( include/grpc/compression.h )
s.files += %w( include/grpc/grpc.h ) s.files += %w( include/grpc/grpc.h )
s.files += %w( include/grpc/grpc_posix.h )
s.files += %w( include/grpc/status.h ) s.files += %w( include/grpc/status.h )
s.files += %w( include/grpc/impl/codegen/byte_buffer.h ) s.files += %w( include/grpc/impl/codegen/byte_buffer.h )
s.files += %w( include/grpc/impl/codegen/byte_buffer_reader.h ) s.files += %w( include/grpc/impl/codegen/byte_buffer_reader.h )
@ -189,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 )
@ -198,6 +199,9 @@ 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/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 )
s.files += %w( src/core/lib/iomgr/pollset_set_windows.h ) s.files += %w( src/core/lib/iomgr/pollset_set_windows.h )
@ -238,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 )
@ -246,6 +249,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/transport/static_metadata.h ) s.files += %w( src/core/lib/transport/static_metadata.h )
s.files += %w( src/core/lib/transport/transport.h ) s.files += %w( src/core/lib/transport/transport.h )
s.files += %w( src/core/lib/transport/transport_impl.h ) s.files += %w( src/core/lib/transport/transport_impl.h )
s.files += %w( src/core/ext/transport/chttp2/transport/bin_decoder.h )
s.files += %w( src/core/ext/transport/chttp2/transport/bin_encoder.h ) s.files += %w( src/core/ext/transport/chttp2/transport/bin_encoder.h )
s.files += %w( src/core/ext/transport/chttp2/transport/chttp2_transport.h ) s.files += %w( src/core/ext/transport/chttp2/transport/chttp2_transport.h )
s.files += %w( src/core/ext/transport/chttp2/transport/frame.h ) s.files += %w( src/core/ext/transport/chttp2/transport/frame.h )
@ -283,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 )
@ -331,7 +336,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/channel/connected_channel.c ) s.files += %w( src/core/lib/channel/connected_channel.c )
s.files += %w( src/core/lib/channel/http_client_filter.c ) s.files += %w( src/core/lib/channel/http_client_filter.c )
s.files += %w( src/core/lib/channel/http_server_filter.c ) s.files += %w( src/core/lib/channel/http_server_filter.c )
s.files += %w( src/core/lib/compression/compression_algorithm.c ) s.files += %w( src/core/lib/compression/compression.c )
s.files += %w( src/core/lib/compression/message_compress.c ) s.files += %w( src/core/lib/compression/message_compress.c )
s.files += %w( src/core/lib/debug/trace.c ) s.files += %w( src/core/lib/debug/trace.c )
s.files += %w( src/core/lib/http/format_request.c ) s.files += %w( src/core/lib/http/format_request.c )
@ -341,6 +346,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 )
@ -350,6 +357,9 @@ 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/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 )
s.files += %w( src/core/lib/iomgr/resolve_address_posix.c ) s.files += %w( src/core/lib/iomgr/resolve_address_posix.c )
@ -407,6 +417,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/transport/transport.c ) s.files += %w( src/core/lib/transport/transport.c )
s.files += %w( src/core/lib/transport/transport_op_string.c ) s.files += %w( src/core/lib/transport/transport_op_string.c )
s.files += %w( src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c ) s.files += %w( src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c )
s.files += %w( src/core/ext/transport/chttp2/transport/bin_decoder.c )
s.files += %w( src/core/ext/transport/chttp2/transport/bin_encoder.c ) s.files += %w( src/core/ext/transport/chttp2/transport/bin_encoder.c )
s.files += %w( src/core/ext/transport/chttp2/transport/chttp2_plugin.c ) s.files += %w( src/core/ext/transport/chttp2/transport/chttp2_plugin.c )
s.files += %w( src/core/ext/transport/chttp2/transport/chttp2_transport.c ) s.files += %w( src/core/ext/transport/chttp2/transport/chttp2_transport.c )
@ -450,6 +461,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 )
@ -477,7 +489,9 @@ Gem::Specification.new do |s|
s.files += %w( src/core/ext/client_config/subchannel_index.c ) s.files += %w( src/core/ext/client_config/subchannel_index.c )
s.files += %w( src/core/ext/client_config/uri_parser.c ) s.files += %w( src/core/ext/client_config/uri_parser.c )
s.files += %w( src/core/ext/transport/chttp2/server/insecure/server_chttp2.c ) s.files += %w( src/core/ext/transport/chttp2/server/insecure/server_chttp2.c )
s.files += %w( src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c )
s.files += %w( src/core/ext/transport/chttp2/client/insecure/channel_create.c ) s.files += %w( src/core/ext/transport/chttp2/client/insecure/channel_create.c )
s.files += %w( src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c )
s.files += %w( src/core/ext/lb_policy/grpclb/load_balancer_api.c ) s.files += %w( src/core/ext/lb_policy/grpclb/load_balancer_api.c )
s.files += %w( src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c ) s.files += %w( src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c )
s.files += %w( third_party/nanopb/pb_common.c ) s.files += %w( third_party/nanopb/pb_common.c )

@ -1,6 +1,6 @@
/* /*
* *
* Copyright 2015, Google Inc. * Copyright 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
@ -31,18 +31,27 @@
* *
*/ */
#ifndef GRPC_CORE_LIB_SURFACE_SURFACE_TRACE_H #ifndef GRPCXX_CREATE_CHANNEL_POSIX_H
#define GRPC_CORE_LIB_SURFACE_SURFACE_TRACE_H #define GRPCXX_CREATE_CHANNEL_POSIX_H
#include <grpc/support/log.h> #include <memory>
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/surface/api_trace.h"
#define GRPC_SURFACE_TRACE_RETURNED_EVENT(cq, event) \ #include <grpc++/channel.h>
if (grpc_api_trace) { \ #include <grpc/support/port_platform.h>
char *_ev = grpc_event_string(event); \
gpr_log(GPR_INFO, "RETURN_EVENT[%p]: %s", cq, _ev); \
gpr_free(_ev); \
}
#endif /* GRPC_CORE_LIB_SURFACE_SURFACE_TRACE_H */ namespace grpc {
#ifdef GPR_SUPPORT_CHANNELS_FROM_FD
/// Create a new \a Channel communicating over given file descriptor
///
/// \param target The name of the target.
/// \param fd The file descriptor representing a socket.
std::shared_ptr<Channel> CreateInsecureChannelFromFd(const grpc::string& target,
int fd);
#endif // GPR_SUPPORT_CHANNELS_FROM_FD
} // namespace grpc
#endif // GRPCXX_CREATE_CHANNEL_POSIX_H

@ -0,0 +1,69 @@
/*
*
* Copyright 2015, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef GRPCXX_EXT_PROTO_SERVER_REFLECTION_PLUGIN_H
#define GRPCXX_EXT_PROTO_SERVER_REFLECTION_PLUGIN_H
#include <grpc++/impl/server_builder_plugin.h>
#include <grpc++/support/config.h>
namespace grpc {
class ServerInitializer;
class ProtoServerReflection;
} // namespace grpc
namespace grpc {
namespace reflection {
class ProtoServerReflectionPlugin : public ::grpc::ServerBuilderPlugin {
public:
ProtoServerReflectionPlugin();
::grpc::string name() GRPC_OVERRIDE;
void InitServer(::grpc::ServerInitializer* si) GRPC_OVERRIDE;
void Finish(::grpc::ServerInitializer* si) GRPC_OVERRIDE;
void ChangeArguments(const ::grpc::string& name, void* value) GRPC_OVERRIDE;
bool has_async_methods() const GRPC_OVERRIDE;
bool has_sync_methods() const GRPC_OVERRIDE;
private:
std::shared_ptr<grpc::ProtoServerReflection> reflection_service_;
};
// Add proto reflection plugin to ServerBuilder. This function should be called
// at the static initialization time.
void InitProtoReflectionServerBuilderPlugin();
} // namespace reflection
} // namespace grpc
#endif // GRPCXX_EXT_PROTO_SERVER_REFLECTION_PLUGIN_H

@ -0,0 +1,184 @@
/*
*
* Copyright 2015, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
// Generated by the gRPC protobuf plugin.
// If you make any local change, they will be lost.
// source: reflection.proto
// Original file comments:
// 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.
//
// Service exported by server reflection
//
#ifndef GRPC_reflection_2eproto__INCLUDED
#define GRPC_reflection_2eproto__INCLUDED
#include <grpc++/ext/reflection.pb.h>
#include <grpc++/impl/codegen/async_stream.h>
#include <grpc++/impl/codegen/async_unary_call.h>
#include <grpc++/impl/codegen/proto_utils.h>
#include <grpc++/impl/codegen/rpc_method.h>
#include <grpc++/impl/codegen/service_type.h>
#include <grpc++/impl/codegen/status.h>
#include <grpc++/impl/codegen/stub_options.h>
#include <grpc++/impl/codegen/sync_stream.h>
namespace grpc {
class CompletionQueue;
class Channel;
class RpcService;
class ServerCompletionQueue;
class ServerContext;
} // namespace grpc
namespace grpc {
namespace reflection {
namespace v1alpha {
class ServerReflection GRPC_FINAL {
public:
class StubInterface {
public:
virtual ~StubInterface() {}
// The reflection service is structured as a bidirectional stream, ensuring
// all related requests go to a single server.
std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>> ServerReflectionInfo(::grpc::ClientContext* context) {
return std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>>(ServerReflectionInfoRaw(context));
}
std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>> AsyncServerReflectionInfo(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) {
return std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>>(AsyncServerReflectionInfoRaw(context, cq, tag));
}
private:
virtual ::grpc::ClientReaderWriterInterface< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>* ServerReflectionInfoRaw(::grpc::ClientContext* context) = 0;
virtual ::grpc::ClientAsyncReaderWriterInterface< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>* AsyncServerReflectionInfoRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) = 0;
};
class Stub GRPC_FINAL : public StubInterface {
public:
Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel);
std::unique_ptr< ::grpc::ClientReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>> ServerReflectionInfo(::grpc::ClientContext* context) {
return std::unique_ptr< ::grpc::ClientReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>>(ServerReflectionInfoRaw(context));
}
std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>> AsyncServerReflectionInfo(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) {
return std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>>(AsyncServerReflectionInfoRaw(context, cq, tag));
}
private:
std::shared_ptr< ::grpc::ChannelInterface> channel_;
::grpc::ClientReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>* ServerReflectionInfoRaw(::grpc::ClientContext* context) GRPC_OVERRIDE;
::grpc::ClientAsyncReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>* AsyncServerReflectionInfoRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) GRPC_OVERRIDE;
const ::grpc::RpcMethod rpcmethod_ServerReflectionInfo_;
};
static std::unique_ptr<Stub> NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions());
class Service : public ::grpc::Service {
public:
Service();
virtual ~Service();
// The reflection service is structured as a bidirectional stream, ensuring
// all related requests go to a single server.
virtual ::grpc::Status ServerReflectionInfo(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionResponse, ::grpc::reflection::v1alpha::ServerReflectionRequest>* stream);
};
template <class BaseClass>
class WithAsyncMethod_ServerReflectionInfo : public BaseClass {
private:
void BaseClassMustBeDerivedFromService(const Service *service) {}
public:
WithAsyncMethod_ServerReflectionInfo() {
::grpc::Service::MarkMethodAsync(0);
}
~WithAsyncMethod_ServerReflectionInfo() GRPC_OVERRIDE {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
::grpc::Status ServerReflectionInfo(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionResponse, ::grpc::reflection::v1alpha::ServerReflectionRequest>* stream) GRPC_FINAL GRPC_OVERRIDE {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
void RequestServerReflectionInfo(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionResponse, ::grpc::reflection::v1alpha::ServerReflectionRequest>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
::grpc::Service::RequestAsyncBidiStreaming(0, context, stream, new_call_cq, notification_cq, tag);
}
};
typedef WithAsyncMethod_ServerReflectionInfo<Service > AsyncService;
template <class BaseClass>
class WithGenericMethod_ServerReflectionInfo : public BaseClass {
private:
void BaseClassMustBeDerivedFromService(const Service *service) {}
public:
WithGenericMethod_ServerReflectionInfo() {
::grpc::Service::MarkMethodGeneric(0);
}
~WithGenericMethod_ServerReflectionInfo() GRPC_OVERRIDE {
BaseClassMustBeDerivedFromService(this);
}
// disable synchronous version of this method
::grpc::Status ServerReflectionInfo(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionResponse, ::grpc::reflection::v1alpha::ServerReflectionRequest>* stream) GRPC_FINAL GRPC_OVERRIDE {
abort();
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
}
};
};
} // namespace v1alpha
} // namespace reflection
} // namespace grpc
#endif // GRPC_reflection_2eproto__INCLUDED

File diff suppressed because it is too large Load Diff

@ -57,8 +57,10 @@
#include <grpc++/client_context.h> #include <grpc++/client_context.h>
#include <grpc++/completion_queue.h> #include <grpc++/completion_queue.h>
#include <grpc++/create_channel.h> #include <grpc++/create_channel.h>
#include <grpc++/create_channel_posix.h>
#include <grpc++/server.h> #include <grpc++/server.h>
#include <grpc++/server_builder.h> #include <grpc++/server_builder.h>
#include <grpc++/server_context.h> #include <grpc++/server_context.h>
#include <grpc++/server_posix.h>
#endif // GRPCXX_GRPCXX_H #endif // GRPCXX_GRPCXX_H

@ -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;
@ -172,6 +182,7 @@ class ClientAsyncWriter GRPC_FINAL : public ClientAsyncWriterInterface<W> {
R* response, void* tag) R* response, void* tag)
: context_(context), call_(channel->CreateCall(method, context, cq)) { : context_(context), call_(channel->CreateCall(method, context, cq)) {
finish_ops_.RecvMessage(response); finish_ops_.RecvMessage(response);
finish_ops_.AllowNoMessage();
init_ops_.set_output_tag(tag); init_ops_.set_output_tag(tag);
init_ops_.SendInitialMetadata(context->send_initial_metadata_, init_ops_.SendInitialMetadata(context->send_initial_metadata_,
@ -228,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;
@ -298,8 +310,16 @@ class ClientAsyncReaderWriter GRPC_FINAL
}; };
template <class W, class R> template <class W, class R>
class ServerAsyncReader GRPC_FINAL : public ServerAsyncStreamingInterface, class ServerAsyncReaderInterface : public ServerAsyncStreamingInterface,
public AsyncReaderInterface<R> { public AsyncReaderInterface<R> {
public:
virtual void Finish(const W& msg, const Status& status, void* tag) = 0;
virtual void FinishWithError(const Status& status, void* tag) = 0;
};
template <class W, class R>
class ServerAsyncReader GRPC_FINAL : public ServerAsyncReaderInterface<W, R> {
public: public:
explicit ServerAsyncReader(ServerContext* ctx) explicit ServerAsyncReader(ServerContext* ctx)
: call_(nullptr, nullptr, nullptr), ctx_(ctx) {} : call_(nullptr, nullptr, nullptr), ctx_(ctx) {}
@ -320,7 +340,7 @@ class ServerAsyncReader GRPC_FINAL : public ServerAsyncStreamingInterface,
call_.PerformOps(&read_ops_); call_.PerformOps(&read_ops_);
} }
void Finish(const W& msg, const Status& status, void* tag) { void Finish(const W& msg, const Status& status, void* tag) GRPC_OVERRIDE {
finish_ops_.set_output_tag(tag); finish_ops_.set_output_tag(tag);
if (!ctx_->sent_initial_metadata_) { if (!ctx_->sent_initial_metadata_) {
finish_ops_.SendInitialMetadata(ctx_->initial_metadata_, finish_ops_.SendInitialMetadata(ctx_->initial_metadata_,
@ -337,7 +357,7 @@ class ServerAsyncReader GRPC_FINAL : public ServerAsyncStreamingInterface,
call_.PerformOps(&finish_ops_); call_.PerformOps(&finish_ops_);
} }
void FinishWithError(const Status& status, void* tag) { void FinishWithError(const Status& status, void* tag) GRPC_OVERRIDE {
GPR_CODEGEN_ASSERT(!status.ok()); GPR_CODEGEN_ASSERT(!status.ok());
finish_ops_.set_output_tag(tag); finish_ops_.set_output_tag(tag);
if (!ctx_->sent_initial_metadata_) { if (!ctx_->sent_initial_metadata_) {
@ -362,8 +382,14 @@ class ServerAsyncReader GRPC_FINAL : public ServerAsyncStreamingInterface,
}; };
template <class W> template <class W>
class ServerAsyncWriter GRPC_FINAL : public ServerAsyncStreamingInterface, class ServerAsyncWriterInterface : public ServerAsyncStreamingInterface,
public AsyncWriterInterface<W> { public AsyncWriterInterface<W> {
public:
virtual void Finish(const Status& status, void* tag) = 0;
};
template <class W>
class ServerAsyncWriter GRPC_FINAL : public ServerAsyncWriterInterface<W> {
public: public:
explicit ServerAsyncWriter(ServerContext* ctx) explicit ServerAsyncWriter(ServerContext* ctx)
: call_(nullptr, nullptr, nullptr), ctx_(ctx) {} : call_(nullptr, nullptr, nullptr), ctx_(ctx) {}
@ -390,7 +416,7 @@ class ServerAsyncWriter GRPC_FINAL : public ServerAsyncStreamingInterface,
call_.PerformOps(&write_ops_); call_.PerformOps(&write_ops_);
} }
void Finish(const Status& status, void* tag) { void Finish(const Status& status, void* tag) GRPC_OVERRIDE {
finish_ops_.set_output_tag(tag); finish_ops_.set_output_tag(tag);
if (!ctx_->sent_initial_metadata_) { if (!ctx_->sent_initial_metadata_) {
finish_ops_.SendInitialMetadata(ctx_->initial_metadata_, finish_ops_.SendInitialMetadata(ctx_->initial_metadata_,
@ -413,9 +439,16 @@ class ServerAsyncWriter GRPC_FINAL : public ServerAsyncStreamingInterface,
/// Server-side interface for asynchronous bi-directional streaming. /// Server-side interface for asynchronous bi-directional streaming.
template <class W, class R> template <class W, class R>
class ServerAsyncReaderWriter GRPC_FINAL : public ServerAsyncStreamingInterface, class ServerAsyncReaderWriterInterface : public ServerAsyncStreamingInterface,
public AsyncWriterInterface<W>, public AsyncWriterInterface<W>,
public AsyncReaderInterface<R> { public AsyncReaderInterface<R> {
public:
virtual void Finish(const Status& status, void* tag) = 0;
};
template <class W, class R>
class ServerAsyncReaderWriter GRPC_FINAL
: public ServerAsyncReaderWriterInterface<W, R> {
public: public:
explicit ServerAsyncReaderWriter(ServerContext* ctx) explicit ServerAsyncReaderWriter(ServerContext* ctx)
: call_(nullptr, nullptr, nullptr), ctx_(ctx) {} : call_(nullptr, nullptr, nullptr), ctx_(ctx) {}
@ -448,7 +481,7 @@ class ServerAsyncReaderWriter GRPC_FINAL : public ServerAsyncStreamingInterface,
call_.PerformOps(&write_ops_); call_.PerformOps(&write_ops_);
} }
void Finish(const Status& status, void* tag) { void Finish(const Status& status, void* tag) GRPC_OVERRIDE {
finish_ops_.set_output_tag(tag); finish_ops_.set_output_tag(tag);
if (!ctx_->sent_initial_metadata_) { if (!ctx_->sent_initial_metadata_) {
finish_ops_.SendInitialMetadata(ctx_->initial_metadata_, finish_ops_.SendInitialMetadata(ctx_->initial_metadata_,

@ -65,7 +65,7 @@ class ClientAsyncResponseReader GRPC_FINAL
const W& request) const W& request)
: context_(context), : context_(context),
call_(channel->CreateCall(method, context, cq)), call_(channel->CreateCall(method, context, cq)),
collection_(new CallOpSetCollection) { collection_(std::make_shared<CallOpSetCollection>()) {
collection_->init_buf_.SetCollection(collection_); collection_->init_buf_.SetCollection(collection_);
collection_->init_buf_.SendInitialMetadata( collection_->init_buf_.SendInitialMetadata(
context->send_initial_metadata_, context->initial_metadata_flags()); context->send_initial_metadata_, context->initial_metadata_flags());
@ -91,6 +91,7 @@ class ClientAsyncResponseReader GRPC_FINAL
collection_->finish_buf_.RecvInitialMetadata(context_); collection_->finish_buf_.RecvInitialMetadata(context_);
} }
collection_->finish_buf_.RecvMessage(msg); collection_->finish_buf_.RecvMessage(msg);
collection_->finish_buf_.AllowNoMessage();
collection_->finish_buf_.ClientRecvStatus(context_, status); collection_->finish_buf_.ClientRecvStatus(context_, status);
call_.PerformOps(&collection_->finish_buf_); call_.PerformOps(&collection_->finish_buf_);
} }

@ -47,7 +47,9 @@
#include <grpc++/impl/codegen/serialization_traits.h> #include <grpc++/impl/codegen/serialization_traits.h>
#include <grpc++/impl/codegen/status.h> #include <grpc++/impl/codegen/status.h>
#include <grpc++/impl/codegen/string_ref.h> #include <grpc++/impl/codegen/string_ref.h>
#include <grpc/impl/codegen/alloc.h> #include <grpc/impl/codegen/alloc.h>
#include <grpc/impl/codegen/compression_types.h>
#include <grpc/impl/codegen/grpc_types.h> #include <grpc/impl/codegen/grpc_types.h>
struct grpc_byte_buffer; struct grpc_byte_buffer;
@ -187,6 +189,8 @@ class CallOpSendInitialMetadata {
flags_ = flags; flags_ = flags;
initial_metadata_count_ = metadata.size(); initial_metadata_count_ = metadata.size();
initial_metadata_ = FillMetadataArray(metadata); initial_metadata_ = FillMetadataArray(metadata);
// TODO(dgq): expose compression level in API so it can be properly set.
maybe_compression_level_.is_set = false;
} }
protected: protected:
@ -198,6 +202,10 @@ class CallOpSendInitialMetadata {
op->reserved = NULL; op->reserved = NULL;
op->data.send_initial_metadata.count = initial_metadata_count_; op->data.send_initial_metadata.count = initial_metadata_count_;
op->data.send_initial_metadata.metadata = initial_metadata_; op->data.send_initial_metadata.metadata = initial_metadata_;
op->data.send_initial_metadata.maybe_compression_level.is_set =
maybe_compression_level_.is_set;
op->data.send_initial_metadata.maybe_compression_level.level =
maybe_compression_level_.level;
} }
void FinishOp(bool* status, int max_message_size) { void FinishOp(bool* status, int max_message_size) {
if (!send_) return; if (!send_) return;
@ -209,6 +217,10 @@ class CallOpSendInitialMetadata {
uint32_t flags_; uint32_t flags_;
size_t initial_metadata_count_; size_t initial_metadata_count_;
grpc_metadata* initial_metadata_; grpc_metadata* initial_metadata_;
struct {
bool is_set;
grpc_compression_level level;
} maybe_compression_level_;
}; };
class CallOpSendMessage { class CallOpSendMessage {
@ -261,10 +273,16 @@ Status CallOpSendMessage::SendMessage(const M& message) {
template <class R> template <class R>
class CallOpRecvMessage { class CallOpRecvMessage {
public: public:
CallOpRecvMessage() : got_message(false), message_(nullptr) {} CallOpRecvMessage()
: got_message(false),
message_(nullptr),
allow_not_getting_message_(false) {}
void RecvMessage(R* message) { message_ = message; } void RecvMessage(R* message) { message_ = message; }
// Do not change status if no message is received.
void AllowNoMessage() { allow_not_getting_message_ = true; }
bool got_message; bool got_message;
protected: protected:
@ -290,7 +308,9 @@ class CallOpRecvMessage {
} }
} else { } else {
got_message = false; got_message = false;
*status = false; if (!allow_not_getting_message_) {
*status = false;
}
} }
message_ = nullptr; message_ = nullptr;
} }
@ -298,6 +318,7 @@ class CallOpRecvMessage {
private: private:
R* message_; R* message_;
grpc_byte_buffer* recv_buf_; grpc_byte_buffer* recv_buf_;
bool allow_not_getting_message_;
}; };
namespace CallOpGenericRecvMessageHelper { namespace CallOpGenericRecvMessageHelper {
@ -316,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
@ -325,7 +346,8 @@ class DeserializeFuncType GRPC_FINAL : public DeserializeFunc {
class CallOpGenericRecvMessage { class CallOpGenericRecvMessage {
public: public:
CallOpGenericRecvMessage() : got_message(false) {} CallOpGenericRecvMessage()
: got_message(false), allow_not_getting_message_(false) {}
template <class R> template <class R>
void RecvMessage(R* message) { void RecvMessage(R* message) {
@ -336,6 +358,9 @@ class CallOpGenericRecvMessage {
deserialize_.reset(func); deserialize_.reset(func);
} }
// Do not change status if no message is received.
void AllowNoMessage() { allow_not_getting_message_ = true; }
bool got_message; bool got_message;
protected: protected:
@ -360,7 +385,9 @@ class CallOpGenericRecvMessage {
} }
} else { } else {
got_message = false; got_message = false;
*status = false; if (!allow_not_getting_message_) {
*status = false;
}
} }
deserialize_.reset(); deserialize_.reset();
} }
@ -368,6 +395,7 @@ class CallOpGenericRecvMessage {
private: private:
std::unique_ptr<CallOpGenericRecvMessageHelper::DeserializeFunc> deserialize_; std::unique_ptr<CallOpGenericRecvMessageHelper::DeserializeFunc> deserialize_;
grpc_byte_buffer* recv_buf_; grpc_byte_buffer* recv_buf_;
bool allow_not_getting_message_;
}; };
class CallOpClientSendClose { class CallOpClientSendClose {

@ -41,7 +41,7 @@
/// ///
/// Context settings are only relevant to the call they are invoked with, that /// Context settings are only relevant to the call they are invoked with, that
/// is to say, they aren't sticky. Some of these settings, such as the /// is to say, they aren't sticky. Some of these settings, such as the
/// compression options, can be made persistant at channel construction time /// compression options, can be made persistent at channel construction time
/// (see \a grpc::CreateCustomChannel). /// (see \a grpc::CreateCustomChannel).
/// ///
/// \warning ClientContext instances should \em not be reused across rpcs. /// \warning ClientContext instances should \em not be reused across rpcs.
@ -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

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

Loading…
Cancel
Save