Merge remote-tracking branch 'upstream/master' into cli_type_fork

pull/7899/head
Yuchen Zeng 8 years ago
commit a964cbafba
  1. 141
      BUILD
  2. 122
      CMakeLists.txt
  3. 2
      INSTALL.md
  4. 473
      Makefile
  5. 6
      Rakefile
  6. 7
      binding.gyp
  7. 119
      build.yaml
  8. 7
      config.m4
  9. 16
      doc/fail_fast.md
  10. 8
      doc/g_stands_for.md
  11. 30
      doc/http-grpc-status-mapping.md
  12. 192
      doc/server_reflection_tutorial.md
  13. 14
      doc/wait-for-ready.md
  14. 4
      etc/README.md
  15. 39
      etc/roots.pem
  16. 1
      examples/cpp/helloworld/greeter_async_client.cc
  17. 1
      examples/cpp/helloworld/greeter_async_client2.cc
  18. 1
      examples/cpp/helloworld/greeter_async_server.cc
  19. 4
      examples/csharp/.nuget/packages.config
  20. 4
      examples/csharp/helloworld-from-cli/Greeter/project.json
  21. 4
      examples/csharp/helloworld-from-cli/GreeterClient/project.json
  22. 4
      examples/csharp/helloworld-from-cli/GreeterServer/project.json
  23. 10
      examples/csharp/helloworld/Greeter/Greeter.csproj
  24. 10
      examples/csharp/helloworld/Greeter/packages.config
  25. 10
      examples/csharp/helloworld/GreeterClient/GreeterClient.csproj
  26. 8
      examples/csharp/helloworld/GreeterClient/packages.config
  27. 10
      examples/csharp/helloworld/GreeterServer/GreeterServer.csproj
  28. 8
      examples/csharp/helloworld/GreeterServer/packages.config
  29. 2
      examples/csharp/helloworld/generate_protos.bat
  30. 10
      examples/csharp/route_guide/RouteGuide/RouteGuide.csproj
  31. 8
      examples/csharp/route_guide/RouteGuide/packages.config
  32. 10
      examples/csharp/route_guide/RouteGuideClient/RouteGuideClient.csproj
  33. 8
      examples/csharp/route_guide/RouteGuideClient/packages.config
  34. 10
      examples/csharp/route_guide/RouteGuideServer/RouteGuideServer.csproj
  35. 10
      examples/csharp/route_guide/RouteGuideServer/packages.config
  36. 2
      examples/csharp/route_guide/generate_protos.bat
  37. 2
      examples/node/README.md
  38. 2
      examples/php/composer.json
  39. 2
      examples/php/run_greeter_client.sh
  40. 57
      examples/python/README.md
  41. 2
      examples/python/helloworld/README.md
  42. 2
      examples/python/multiplex/README.md
  43. 32
      gRPC-Core.podspec
  44. 125
      grpc.def
  45. 26
      grpc.gemspec
  46. 1
      include/grpc++/create_channel.h
  47. 2
      include/grpc++/ext/reflection.grpc.pb.h
  48. 4
      include/grpc++/grpc++.h
  49. 1
      include/grpc++/impl/codegen/async_unary_call.h
  50. 10
      include/grpc++/impl/codegen/call.h
  51. 15
      include/grpc++/impl/codegen/client_context.h
  52. 13
      include/grpc++/impl/codegen/completion_queue.h
  53. 12
      include/grpc++/impl/codegen/core_codegen.h
  54. 18
      include/grpc++/impl/codegen/core_codegen_interface.h
  55. 1
      include/grpc++/impl/codegen/grpc_library.h
  56. 60
      include/grpc++/impl/codegen/method_handler_impl.h
  57. 3
      include/grpc++/impl/codegen/proto_utils.h
  58. 3
      include/grpc++/impl/codegen/rpc_method.h
  59. 6
      include/grpc++/impl/codegen/rpc_service_method.h
  60. 15
      include/grpc++/impl/codegen/server_context.h
  61. 7
      include/grpc++/impl/codegen/server_interface.h
  62. 11
      include/grpc++/impl/codegen/service_type.h
  63. 47
      include/grpc++/impl/codegen/status_helper.h
  64. 28
      include/grpc++/impl/codegen/sync_no_cxx11.h
  65. 139
      include/grpc++/impl/codegen/sync_stream.h
  66. 2
      include/grpc++/impl/codegen/thrift_serializer.h
  67. 2
      include/grpc++/impl/codegen/thrift_utils.h
  68. 4
      include/grpc++/impl/codegen/time.h
  69. 5
      include/grpc++/impl/server_builder_plugin.h
  70. 65
      include/grpc/byte_buffer.h
  71. 3
      include/grpc/compression.h
  72. 3
      include/grpc/grpc.h
  73. 3
      include/grpc/impl/codegen/atm.h
  74. 2
      include/grpc/impl/codegen/atm_gcc_atomic.h
  75. 8
      include/grpc/impl/codegen/atm_gcc_sync.h
  76. 4
      include/grpc/impl/codegen/atm_windows.h
  77. 122
      include/grpc/impl/codegen/byte_buffer.h
  78. 8
      include/grpc/impl/codegen/byte_buffer_reader.h
  79. 2
      include/grpc/impl/codegen/compression_types.h
  80. 140
      include/grpc/impl/codegen/gpr_types.h
  81. 41
      include/grpc/impl/codegen/grpc_types.h
  82. 118
      include/grpc/impl/codegen/log.h
  83. 11
      include/grpc/impl/codegen/port_platform.h
  84. 138
      include/grpc/impl/codegen/slice.h
  85. 104
      include/grpc/impl/codegen/slice_buffer.h
  86. 253
      include/grpc/impl/codegen/sync.h
  87. 130
      include/grpc/impl/codegen/time.h
  88. 2
      include/grpc/module.modulemap
  89. 37
      include/grpc/support/alloc.h
  90. 81
      include/grpc/support/log.h
  91. 89
      include/grpc/support/slice.h
  92. 50
      include/grpc/support/slice_buffer.h
  93. 252
      include/grpc/support/sync.h
  94. 68
      include/grpc/support/time.h
  95. 29
      package.xml
  96. 4
      setup.py
  97. 77
      src/compiler/cpp_generator.cc
  98. 4
      src/core/ext/census/gen/README.md
  99. 81
      src/core/ext/census/gen/trace_context.pb.c
  100. 99
      src/core/ext/census/gen/trace_context.pb.h
  101. Some files were not shown because too many files have changed in this diff Show More

141
BUILD

@ -51,7 +51,9 @@ 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/mpscq.h",
"src/core/lib/support/murmur_hash.h", "src/core/lib/support/murmur_hash.h",
"src/core/lib/support/percent_encoding.h",
"src/core/lib/support/stack_lockfree.h", "src/core/lib/support/stack_lockfree.h",
"src/core/lib/support/string.h", "src/core/lib/support/string.h",
"src/core/lib/support/string_windows.h", "src/core/lib/support/string_windows.h",
@ -78,7 +80,9 @@ cc_library(
"src/core/lib/support/log_linux.c", "src/core/lib/support/log_linux.c",
"src/core/lib/support/log_posix.c", "src/core/lib/support/log_posix.c",
"src/core/lib/support/log_windows.c", "src/core/lib/support/log_windows.c",
"src/core/lib/support/mpscq.c",
"src/core/lib/support/murmur_hash.c", "src/core/lib/support/murmur_hash.c",
"src/core/lib/support/percent_encoding.c",
"src/core/lib/support/slice.c", "src/core/lib/support/slice.c",
"src/core/lib/support/slice_buffer.c", "src/core/lib/support/slice_buffer.c",
"src/core/lib/support/stack_lockfree.c", "src/core/lib/support/stack_lockfree.c",
@ -133,20 +137,17 @@ cc_library(
"include/grpc/support/tls_msvc.h", "include/grpc/support/tls_msvc.h",
"include/grpc/support/tls_pthread.h", "include/grpc/support/tls_pthread.h",
"include/grpc/support/useful.h", "include/grpc/support/useful.h",
"include/grpc/impl/codegen/alloc.h",
"include/grpc/impl/codegen/atm.h", "include/grpc/impl/codegen/atm.h",
"include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_atomic.h",
"include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_gcc_sync.h",
"include/grpc/impl/codegen/atm_windows.h", "include/grpc/impl/codegen/atm_windows.h",
"include/grpc/impl/codegen/log.h", "include/grpc/impl/codegen/gpr_types.h",
"include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/port_platform.h",
"include/grpc/impl/codegen/slice.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.h",
"include/grpc/impl/codegen/sync_generic.h", "include/grpc/impl/codegen/sync_generic.h",
"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",
], ],
includes = [ includes = [
"include", "include",
@ -177,6 +178,7 @@ cc_library(
"src/core/lib/http/httpcli.h", "src/core/lib/http/httpcli.h",
"src/core/lib/http/parser.h", "src/core/lib/http/parser.h",
"src/core/lib/iomgr/closure.h", "src/core/lib/iomgr/closure.h",
"src/core/lib/iomgr/combiner.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/error.h",
@ -288,7 +290,6 @@ cc_library(
"src/core/lib/tsi/transport_security_interface.h", "src/core/lib/tsi/transport_security_interface.h",
"src/core/ext/client_config/client_channel.h", "src/core/ext/client_config/client_channel.h",
"src/core/ext/client_config/client_channel_factory.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/connector.h",
"src/core/ext/client_config/initial_connect_string.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.h",
@ -298,8 +299,8 @@ cc_library(
"src/core/ext/client_config/resolver.h", "src/core/ext/client_config/resolver.h",
"src/core/ext/client_config/resolver_factory.h", "src/core/ext/client_config/resolver_factory.h",
"src/core/ext/client_config/resolver_registry.h", "src/core/ext/client_config/resolver_registry.h",
"src/core/ext/client_config/resolver_result.h",
"src/core/ext/client_config/subchannel.h", "src/core/ext/client_config/subchannel.h",
"src/core/ext/client_config/subchannel_call_holder.h",
"src/core/ext/client_config/subchannel_index.h", "src/core/ext/client_config/subchannel_index.h",
"src/core/ext/client_config/uri_parser.h", "src/core/ext/client_config/uri_parser.h",
"src/core/ext/lb_policy/grpclb/grpclb.h", "src/core/ext/lb_policy/grpclb/grpclb.h",
@ -312,6 +313,7 @@ cc_library(
"src/core/ext/census/census_interface.h", "src/core/ext/census/census_interface.h",
"src/core/ext/census/census_rpc_stats.h", "src/core/ext/census/census_rpc_stats.h",
"src/core/ext/census/gen/census.pb.h", "src/core/ext/census/gen/census.pb.h",
"src/core/ext/census/gen/trace_context.pb.h",
"src/core/ext/census/grpc_filter.h", "src/core/ext/census/grpc_filter.h",
"src/core/ext/census/mlog.h", "src/core/ext/census/mlog.h",
"src/core/ext/census/resource.h", "src/core/ext/census/resource.h",
@ -332,6 +334,7 @@ cc_library(
"src/core/lib/http/httpcli.c", "src/core/lib/http/httpcli.c",
"src/core/lib/http/parser.c", "src/core/lib/http/parser.c",
"src/core/lib/iomgr/closure.c", "src/core/lib/iomgr/closure.c",
"src/core/lib/iomgr/combiner.c",
"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",
@ -461,7 +464,6 @@ cc_library(
"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",
"src/core/ext/client_config/client_config.c",
"src/core/ext/client_config/client_config_plugin.c", "src/core/ext/client_config/client_config_plugin.c",
"src/core/ext/client_config/connector.c", "src/core/ext/client_config/connector.c",
"src/core/ext/client_config/default_initial_connect_string.c", "src/core/ext/client_config/default_initial_connect_string.c",
@ -473,8 +475,8 @@ cc_library(
"src/core/ext/client_config/resolver.c", "src/core/ext/client_config/resolver.c",
"src/core/ext/client_config/resolver_factory.c", "src/core/ext/client_config/resolver_factory.c",
"src/core/ext/client_config/resolver_registry.c", "src/core/ext/client_config/resolver_registry.c",
"src/core/ext/client_config/resolver_result.c",
"src/core/ext/client_config/subchannel.c", "src/core/ext/client_config/subchannel.c",
"src/core/ext/client_config/subchannel_call_holder.c",
"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",
@ -493,6 +495,7 @@ cc_library(
"src/core/ext/census/base_resources.c", "src/core/ext/census/base_resources.c",
"src/core/ext/census/context.c", "src/core/ext/census/context.c",
"src/core/ext/census/gen/census.pb.c", "src/core/ext/census/gen/census.pb.c",
"src/core/ext/census/gen/trace_context.pb.c",
"src/core/ext/census/grpc_context.c", "src/core/ext/census/grpc_context.c",
"src/core/ext/census/grpc_filter.c", "src/core/ext/census/grpc_filter.c",
"src/core/ext/census/grpc_plugin.c", "src/core/ext/census/grpc_plugin.c",
@ -512,27 +515,23 @@ cc_library(
"include/grpc/grpc_posix.h", "include/grpc/grpc_posix.h",
"include/grpc/grpc_security_constants.h", "include/grpc/grpc_security_constants.h",
"include/grpc/status.h", "include/grpc/status.h",
"include/grpc/impl/codegen/byte_buffer.h",
"include/grpc/impl/codegen/byte_buffer_reader.h", "include/grpc/impl/codegen/byte_buffer_reader.h",
"include/grpc/impl/codegen/compression_types.h", "include/grpc/impl/codegen/compression_types.h",
"include/grpc/impl/codegen/connectivity_state.h", "include/grpc/impl/codegen/connectivity_state.h",
"include/grpc/impl/codegen/grpc_types.h", "include/grpc/impl/codegen/grpc_types.h",
"include/grpc/impl/codegen/propagation_bits.h", "include/grpc/impl/codegen/propagation_bits.h",
"include/grpc/impl/codegen/status.h", "include/grpc/impl/codegen/status.h",
"include/grpc/impl/codegen/alloc.h",
"include/grpc/impl/codegen/atm.h", "include/grpc/impl/codegen/atm.h",
"include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_atomic.h",
"include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_gcc_sync.h",
"include/grpc/impl/codegen/atm_windows.h", "include/grpc/impl/codegen/atm_windows.h",
"include/grpc/impl/codegen/log.h", "include/grpc/impl/codegen/gpr_types.h",
"include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/port_platform.h",
"include/grpc/impl/codegen/slice.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.h",
"include/grpc/impl/codegen/sync_generic.h", "include/grpc/impl/codegen/sync_generic.h",
"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/grpc_security.h", "include/grpc/grpc_security.h",
"include/grpc/census.h", "include/grpc/census.h",
], ],
@ -572,6 +571,7 @@ cc_library(
"src/core/lib/http/httpcli.h", "src/core/lib/http/httpcli.h",
"src/core/lib/http/parser.h", "src/core/lib/http/parser.h",
"src/core/lib/iomgr/closure.h", "src/core/lib/iomgr/closure.h",
"src/core/lib/iomgr/combiner.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/error.h",
@ -660,7 +660,6 @@ cc_library(
"src/core/ext/transport/chttp2/alpn/alpn.h", "src/core/ext/transport/chttp2/alpn/alpn.h",
"src/core/ext/client_config/client_channel.h", "src/core/ext/client_config/client_channel.h",
"src/core/ext/client_config/client_channel_factory.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/connector.h",
"src/core/ext/client_config/initial_connect_string.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.h",
@ -670,8 +669,8 @@ cc_library(
"src/core/ext/client_config/resolver.h", "src/core/ext/client_config/resolver.h",
"src/core/ext/client_config/resolver_factory.h", "src/core/ext/client_config/resolver_factory.h",
"src/core/ext/client_config/resolver_registry.h", "src/core/ext/client_config/resolver_registry.h",
"src/core/ext/client_config/resolver_result.h",
"src/core/ext/client_config/subchannel.h", "src/core/ext/client_config/subchannel.h",
"src/core/ext/client_config/subchannel_call_holder.h",
"src/core/ext/client_config/subchannel_index.h", "src/core/ext/client_config/subchannel_index.h",
"src/core/ext/client_config/uri_parser.h", "src/core/ext/client_config/uri_parser.h",
"src/core/lib/security/context/security_context.h", "src/core/lib/security/context/security_context.h",
@ -714,6 +713,7 @@ cc_library(
"src/core/lib/http/httpcli.c", "src/core/lib/http/httpcli.c",
"src/core/lib/http/parser.c", "src/core/lib/http/parser.c",
"src/core/lib/iomgr/closure.c", "src/core/lib/iomgr/closure.c",
"src/core/lib/iomgr/combiner.c",
"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",
@ -817,7 +817,6 @@ cc_library(
"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",
"src/core/ext/client_config/client_config.c",
"src/core/ext/client_config/client_config_plugin.c", "src/core/ext/client_config/client_config_plugin.c",
"src/core/ext/client_config/connector.c", "src/core/ext/client_config/connector.c",
"src/core/ext/client_config/default_initial_connect_string.c", "src/core/ext/client_config/default_initial_connect_string.c",
@ -829,8 +828,8 @@ cc_library(
"src/core/ext/client_config/resolver.c", "src/core/ext/client_config/resolver.c",
"src/core/ext/client_config/resolver_factory.c", "src/core/ext/client_config/resolver_factory.c",
"src/core/ext/client_config/resolver_registry.c", "src/core/ext/client_config/resolver_registry.c",
"src/core/ext/client_config/resolver_result.c",
"src/core/ext/client_config/subchannel.c", "src/core/ext/client_config/subchannel.c",
"src/core/ext/client_config/subchannel_call_holder.c",
"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/lib/http/httpcli_security_connector.c", "src/core/lib/http/httpcli_security_connector.c",
@ -871,27 +870,23 @@ cc_library(
"include/grpc/grpc_posix.h", "include/grpc/grpc_posix.h",
"include/grpc/grpc_security_constants.h", "include/grpc/grpc_security_constants.h",
"include/grpc/status.h", "include/grpc/status.h",
"include/grpc/impl/codegen/byte_buffer.h",
"include/grpc/impl/codegen/byte_buffer_reader.h", "include/grpc/impl/codegen/byte_buffer_reader.h",
"include/grpc/impl/codegen/compression_types.h", "include/grpc/impl/codegen/compression_types.h",
"include/grpc/impl/codegen/connectivity_state.h", "include/grpc/impl/codegen/connectivity_state.h",
"include/grpc/impl/codegen/grpc_types.h", "include/grpc/impl/codegen/grpc_types.h",
"include/grpc/impl/codegen/propagation_bits.h", "include/grpc/impl/codegen/propagation_bits.h",
"include/grpc/impl/codegen/status.h", "include/grpc/impl/codegen/status.h",
"include/grpc/impl/codegen/alloc.h",
"include/grpc/impl/codegen/atm.h", "include/grpc/impl/codegen/atm.h",
"include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_atomic.h",
"include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_gcc_sync.h",
"include/grpc/impl/codegen/atm_windows.h", "include/grpc/impl/codegen/atm_windows.h",
"include/grpc/impl/codegen/log.h", "include/grpc/impl/codegen/gpr_types.h",
"include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/port_platform.h",
"include/grpc/impl/codegen/slice.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.h",
"include/grpc/impl/codegen/sync_generic.h", "include/grpc/impl/codegen/sync_generic.h",
"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/grpc_cronet.h", "include/grpc/grpc_cronet.h",
"include/grpc/grpc_security.h", "include/grpc/grpc_security.h",
], ],
@ -926,6 +921,7 @@ cc_library(
"src/core/lib/http/httpcli.h", "src/core/lib/http/httpcli.h",
"src/core/lib/http/parser.h", "src/core/lib/http/parser.h",
"src/core/lib/iomgr/closure.h", "src/core/lib/iomgr/closure.h",
"src/core/lib/iomgr/combiner.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/error.h",
@ -1013,7 +1009,6 @@ cc_library(
"src/core/ext/transport/chttp2/alpn/alpn.h", "src/core/ext/transport/chttp2/alpn/alpn.h",
"src/core/ext/client_config/client_channel.h", "src/core/ext/client_config/client_channel.h",
"src/core/ext/client_config/client_channel_factory.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/connector.h",
"src/core/ext/client_config/initial_connect_string.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.h",
@ -1023,8 +1018,8 @@ cc_library(
"src/core/ext/client_config/resolver.h", "src/core/ext/client_config/resolver.h",
"src/core/ext/client_config/resolver_factory.h", "src/core/ext/client_config/resolver_factory.h",
"src/core/ext/client_config/resolver_registry.h", "src/core/ext/client_config/resolver_registry.h",
"src/core/ext/client_config/resolver_result.h",
"src/core/ext/client_config/subchannel.h", "src/core/ext/client_config/subchannel.h",
"src/core/ext/client_config/subchannel_call_holder.h",
"src/core/ext/client_config/subchannel_index.h", "src/core/ext/client_config/subchannel_index.h",
"src/core/ext/client_config/uri_parser.h", "src/core/ext/client_config/uri_parser.h",
"src/core/ext/load_reporting/load_reporting.h", "src/core/ext/load_reporting/load_reporting.h",
@ -1037,6 +1032,7 @@ cc_library(
"src/core/ext/census/census_interface.h", "src/core/ext/census/census_interface.h",
"src/core/ext/census/census_rpc_stats.h", "src/core/ext/census/census_rpc_stats.h",
"src/core/ext/census/gen/census.pb.h", "src/core/ext/census/gen/census.pb.h",
"src/core/ext/census/gen/trace_context.pb.h",
"src/core/ext/census/grpc_filter.h", "src/core/ext/census/grpc_filter.h",
"src/core/ext/census/mlog.h", "src/core/ext/census/mlog.h",
"src/core/ext/census/resource.h", "src/core/ext/census/resource.h",
@ -1058,6 +1054,7 @@ cc_library(
"src/core/lib/http/httpcli.c", "src/core/lib/http/httpcli.c",
"src/core/lib/http/parser.c", "src/core/lib/http/parser.c",
"src/core/lib/iomgr/closure.c", "src/core/lib/iomgr/closure.c",
"src/core/lib/iomgr/combiner.c",
"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",
@ -1161,7 +1158,6 @@ cc_library(
"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",
"src/core/ext/client_config/client_config.c",
"src/core/ext/client_config/client_config_plugin.c", "src/core/ext/client_config/client_config_plugin.c",
"src/core/ext/client_config/connector.c", "src/core/ext/client_config/connector.c",
"src/core/ext/client_config/default_initial_connect_string.c", "src/core/ext/client_config/default_initial_connect_string.c",
@ -1173,8 +1169,8 @@ cc_library(
"src/core/ext/client_config/resolver.c", "src/core/ext/client_config/resolver.c",
"src/core/ext/client_config/resolver_factory.c", "src/core/ext/client_config/resolver_factory.c",
"src/core/ext/client_config/resolver_registry.c", "src/core/ext/client_config/resolver_registry.c",
"src/core/ext/client_config/resolver_result.c",
"src/core/ext/client_config/subchannel.c", "src/core/ext/client_config/subchannel.c",
"src/core/ext/client_config/subchannel_call_holder.c",
"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/resolver/dns/native/dns_resolver.c", "src/core/ext/resolver/dns/native/dns_resolver.c",
@ -1189,6 +1185,7 @@ cc_library(
"src/core/ext/census/base_resources.c", "src/core/ext/census/base_resources.c",
"src/core/ext/census/context.c", "src/core/ext/census/context.c",
"src/core/ext/census/gen/census.pb.c", "src/core/ext/census/gen/census.pb.c",
"src/core/ext/census/gen/trace_context.pb.c",
"src/core/ext/census/grpc_context.c", "src/core/ext/census/grpc_context.c",
"src/core/ext/census/grpc_filter.c", "src/core/ext/census/grpc_filter.c",
"src/core/ext/census/grpc_plugin.c", "src/core/ext/census/grpc_plugin.c",
@ -1208,27 +1205,23 @@ cc_library(
"include/grpc/grpc_posix.h", "include/grpc/grpc_posix.h",
"include/grpc/grpc_security_constants.h", "include/grpc/grpc_security_constants.h",
"include/grpc/status.h", "include/grpc/status.h",
"include/grpc/impl/codegen/byte_buffer.h",
"include/grpc/impl/codegen/byte_buffer_reader.h", "include/grpc/impl/codegen/byte_buffer_reader.h",
"include/grpc/impl/codegen/compression_types.h", "include/grpc/impl/codegen/compression_types.h",
"include/grpc/impl/codegen/connectivity_state.h", "include/grpc/impl/codegen/connectivity_state.h",
"include/grpc/impl/codegen/grpc_types.h", "include/grpc/impl/codegen/grpc_types.h",
"include/grpc/impl/codegen/propagation_bits.h", "include/grpc/impl/codegen/propagation_bits.h",
"include/grpc/impl/codegen/status.h", "include/grpc/impl/codegen/status.h",
"include/grpc/impl/codegen/alloc.h",
"include/grpc/impl/codegen/atm.h", "include/grpc/impl/codegen/atm.h",
"include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_atomic.h",
"include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_gcc_sync.h",
"include/grpc/impl/codegen/atm_windows.h", "include/grpc/impl/codegen/atm_windows.h",
"include/grpc/impl/codegen/log.h", "include/grpc/impl/codegen/gpr_types.h",
"include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/port_platform.h",
"include/grpc/impl/codegen/slice.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.h",
"include/grpc/impl/codegen/sync_generic.h", "include/grpc/impl/codegen/sync_generic.h",
"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/census.h", "include/grpc/census.h",
], ],
includes = [ includes = [
@ -1273,6 +1266,7 @@ cc_library(
"src/core/lib/http/httpcli.h", "src/core/lib/http/httpcli.h",
"src/core/lib/http/parser.h", "src/core/lib/http/parser.h",
"src/core/lib/iomgr/closure.h", "src/core/lib/iomgr/closure.h",
"src/core/lib/iomgr/combiner.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/error.h",
@ -1337,39 +1331,39 @@ cc_library(
"src/core/lib/transport/timeout_encoding.h", "src/core/lib/transport/timeout_encoding.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/cpp/client/insecure_credentials.cc",
"src/cpp/client/secure_credentials.cc", "src/cpp/client/secure_credentials.cc",
"src/cpp/common/auth_property_iterator.cc", "src/cpp/common/auth_property_iterator.cc",
"src/cpp/common/secure_auth_context.cc", "src/cpp/common/secure_auth_context.cc",
"src/cpp/common/secure_channel_arguments.cc", "src/cpp/common/secure_channel_arguments.cc",
"src/cpp/common/secure_create_auth_context.cc", "src/cpp/common/secure_create_auth_context.cc",
"src/cpp/server/insecure_server_credentials.cc",
"src/cpp/server/secure_server_credentials.cc", "src/cpp/server/secure_server_credentials.cc",
"src/cpp/client/channel.cc", "src/cpp/client/channel_cc.cc",
"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/create_channel_posix.cc",
"src/cpp/client/credentials.cc", "src/cpp/client/credentials_cc.cc",
"src/cpp/client/generic_stub.cc", "src/cpp/client/generic_stub.cc",
"src/cpp/client/insecure_credentials.cc",
"src/cpp/common/channel_arguments.cc", "src/cpp/common/channel_arguments.cc",
"src/cpp/common/channel_filter.cc", "src/cpp/common/channel_filter.cc",
"src/cpp/common/completion_queue.cc", "src/cpp/common/completion_queue_cc.cc",
"src/cpp/common/core_codegen.cc", "src/cpp/common/core_codegen.cc",
"src/cpp/common/rpc_method.cc", "src/cpp/common/rpc_method.cc",
"src/cpp/server/async_generic_service.cc", "src/cpp/server/async_generic_service.cc",
"src/cpp/server/create_default_thread_pool.cc", "src/cpp/server/create_default_thread_pool.cc",
"src/cpp/server/dynamic_thread_pool.cc", "src/cpp/server/dynamic_thread_pool.cc",
"src/cpp/server/insecure_server_credentials.cc",
"src/cpp/server/server.cc",
"src/cpp/server/server_builder.cc", "src/cpp/server/server_builder.cc",
"src/cpp/server/server_cc.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/server/server_posix.cc",
"src/cpp/util/byte_buffer.cc", "src/cpp/util/byte_buffer_cc.cc",
"src/cpp/util/slice.cc", "src/cpp/util/slice_cc.cc",
"src/cpp/util/status.cc", "src/cpp/util/status.cc",
"src/cpp/util/string_ref.cc", "src/cpp/util/string_ref.cc",
"src/cpp/util/time.cc", "src/cpp/util/time_cc.cc",
"src/core/lib/channel/channel_args.c", "src/core/lib/channel/channel_args.c",
"src/core/lib/channel/channel_stack.c", "src/core/lib/channel/channel_stack.c",
"src/core/lib/channel/channel_stack_builder.c", "src/core/lib/channel/channel_stack_builder.c",
@ -1385,6 +1379,7 @@ cc_library(
"src/core/lib/http/httpcli.c", "src/core/lib/http/httpcli.c",
"src/core/lib/http/parser.c", "src/core/lib/http/parser.c",
"src/core/lib/iomgr/closure.c", "src/core/lib/iomgr/closure.c",
"src/core/lib/iomgr/combiner.c",
"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",
@ -1516,27 +1511,23 @@ cc_library(
"include/grpc/grpc_posix.h", "include/grpc/grpc_posix.h",
"include/grpc/grpc_security_constants.h", "include/grpc/grpc_security_constants.h",
"include/grpc/status.h", "include/grpc/status.h",
"include/grpc/impl/codegen/byte_buffer.h",
"include/grpc/impl/codegen/byte_buffer_reader.h", "include/grpc/impl/codegen/byte_buffer_reader.h",
"include/grpc/impl/codegen/compression_types.h", "include/grpc/impl/codegen/compression_types.h",
"include/grpc/impl/codegen/connectivity_state.h", "include/grpc/impl/codegen/connectivity_state.h",
"include/grpc/impl/codegen/grpc_types.h", "include/grpc/impl/codegen/grpc_types.h",
"include/grpc/impl/codegen/propagation_bits.h", "include/grpc/impl/codegen/propagation_bits.h",
"include/grpc/impl/codegen/status.h", "include/grpc/impl/codegen/status.h",
"include/grpc/impl/codegen/alloc.h",
"include/grpc/impl/codegen/atm.h", "include/grpc/impl/codegen/atm.h",
"include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_atomic.h",
"include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_gcc_sync.h",
"include/grpc/impl/codegen/atm_windows.h", "include/grpc/impl/codegen/atm_windows.h",
"include/grpc/impl/codegen/log.h", "include/grpc/impl/codegen/gpr_types.h",
"include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/port_platform.h",
"include/grpc/impl/codegen/slice.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.h",
"include/grpc/impl/codegen/sync_generic.h", "include/grpc/impl/codegen/sync_generic.h",
"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/async_stream.h", "include/grpc++/impl/codegen/async_stream.h",
"include/grpc++/impl/codegen/async_unary_call.h", "include/grpc++/impl/codegen/async_unary_call.h",
"include/grpc++/impl/codegen/call.h", "include/grpc++/impl/codegen/call.h",
@ -1560,6 +1551,7 @@ cc_library(
"include/grpc++/impl/codegen/service_type.h", "include/grpc++/impl/codegen/service_type.h",
"include/grpc++/impl/codegen/status.h", "include/grpc++/impl/codegen/status.h",
"include/grpc++/impl/codegen/status_code_enum.h", "include/grpc++/impl/codegen/status_code_enum.h",
"include/grpc++/impl/codegen/status_helper.h",
"include/grpc++/impl/codegen/string_ref.h", "include/grpc++/impl/codegen/string_ref.h",
"include/grpc++/impl/codegen/stub_options.h", "include/grpc++/impl/codegen/stub_options.h",
"include/grpc++/impl/codegen/sync.h", "include/grpc++/impl/codegen/sync.h",
@ -1619,6 +1611,7 @@ cc_library(
"include/grpc++/impl/codegen/service_type.h", "include/grpc++/impl/codegen/service_type.h",
"include/grpc++/impl/codegen/status.h", "include/grpc++/impl/codegen/status.h",
"include/grpc++/impl/codegen/status_code_enum.h", "include/grpc++/impl/codegen/status_code_enum.h",
"include/grpc++/impl/codegen/status_helper.h",
"include/grpc++/impl/codegen/string_ref.h", "include/grpc++/impl/codegen/string_ref.h",
"include/grpc++/impl/codegen/stub_options.h", "include/grpc++/impl/codegen/stub_options.h",
"include/grpc++/impl/codegen/sync.h", "include/grpc++/impl/codegen/sync.h",
@ -1626,27 +1619,23 @@ cc_library(
"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",
"include/grpc/impl/codegen/byte_buffer.h",
"include/grpc/impl/codegen/byte_buffer_reader.h", "include/grpc/impl/codegen/byte_buffer_reader.h",
"include/grpc/impl/codegen/compression_types.h", "include/grpc/impl/codegen/compression_types.h",
"include/grpc/impl/codegen/connectivity_state.h", "include/grpc/impl/codegen/connectivity_state.h",
"include/grpc/impl/codegen/grpc_types.h", "include/grpc/impl/codegen/grpc_types.h",
"include/grpc/impl/codegen/propagation_bits.h", "include/grpc/impl/codegen/propagation_bits.h",
"include/grpc/impl/codegen/status.h", "include/grpc/impl/codegen/status.h",
"include/grpc/impl/codegen/alloc.h",
"include/grpc/impl/codegen/atm.h", "include/grpc/impl/codegen/atm.h",
"include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_atomic.h",
"include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_gcc_sync.h",
"include/grpc/impl/codegen/atm_windows.h", "include/grpc/impl/codegen/atm_windows.h",
"include/grpc/impl/codegen/log.h", "include/grpc/impl/codegen/gpr_types.h",
"include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/port_platform.h",
"include/grpc/impl/codegen/slice.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.h",
"include/grpc/impl/codegen/sync_generic.h", "include/grpc/impl/codegen/sync_generic.h",
"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/config_protobuf.h", "include/grpc++/impl/codegen/config_protobuf.h",
], ],
includes = [ includes = [
@ -1683,6 +1672,7 @@ cc_library(
"src/core/lib/http/httpcli.h", "src/core/lib/http/httpcli.h",
"src/core/lib/http/parser.h", "src/core/lib/http/parser.h",
"src/core/lib/iomgr/closure.h", "src/core/lib/iomgr/closure.h",
"src/core/lib/iomgr/combiner.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/error.h",
@ -1747,34 +1737,34 @@ cc_library(
"src/core/lib/transport/timeout_encoding.h", "src/core/lib/transport/timeout_encoding.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/cpp/client/insecure_credentials.cc",
"src/cpp/common/insecure_create_auth_context.cc", "src/cpp/common/insecure_create_auth_context.cc",
"src/cpp/client/channel.cc", "src/cpp/server/insecure_server_credentials.cc",
"src/cpp/client/channel_cc.cc",
"src/cpp/client/client_context.cc", "src/cpp/client/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/create_channel_posix.cc",
"src/cpp/client/credentials.cc", "src/cpp/client/credentials_cc.cc",
"src/cpp/client/generic_stub.cc", "src/cpp/client/generic_stub.cc",
"src/cpp/client/insecure_credentials.cc",
"src/cpp/common/channel_arguments.cc", "src/cpp/common/channel_arguments.cc",
"src/cpp/common/channel_filter.cc", "src/cpp/common/channel_filter.cc",
"src/cpp/common/completion_queue.cc", "src/cpp/common/completion_queue_cc.cc",
"src/cpp/common/core_codegen.cc", "src/cpp/common/core_codegen.cc",
"src/cpp/common/rpc_method.cc", "src/cpp/common/rpc_method.cc",
"src/cpp/server/async_generic_service.cc", "src/cpp/server/async_generic_service.cc",
"src/cpp/server/create_default_thread_pool.cc", "src/cpp/server/create_default_thread_pool.cc",
"src/cpp/server/dynamic_thread_pool.cc", "src/cpp/server/dynamic_thread_pool.cc",
"src/cpp/server/insecure_server_credentials.cc",
"src/cpp/server/server.cc",
"src/cpp/server/server_builder.cc", "src/cpp/server/server_builder.cc",
"src/cpp/server/server_cc.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/server/server_posix.cc",
"src/cpp/util/byte_buffer.cc", "src/cpp/util/byte_buffer_cc.cc",
"src/cpp/util/slice.cc", "src/cpp/util/slice_cc.cc",
"src/cpp/util/status.cc", "src/cpp/util/status.cc",
"src/cpp/util/string_ref.cc", "src/cpp/util/string_ref.cc",
"src/cpp/util/time.cc", "src/cpp/util/time_cc.cc",
"src/core/lib/channel/channel_args.c", "src/core/lib/channel/channel_args.c",
"src/core/lib/channel/channel_stack.c", "src/core/lib/channel/channel_stack.c",
"src/core/lib/channel/channel_stack_builder.c", "src/core/lib/channel/channel_stack_builder.c",
@ -1790,6 +1780,7 @@ cc_library(
"src/core/lib/http/httpcli.c", "src/core/lib/http/httpcli.c",
"src/core/lib/http/parser.c", "src/core/lib/http/parser.c",
"src/core/lib/iomgr/closure.c", "src/core/lib/iomgr/closure.c",
"src/core/lib/iomgr/combiner.c",
"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",
@ -1921,27 +1912,23 @@ cc_library(
"include/grpc/grpc_posix.h", "include/grpc/grpc_posix.h",
"include/grpc/grpc_security_constants.h", "include/grpc/grpc_security_constants.h",
"include/grpc/status.h", "include/grpc/status.h",
"include/grpc/impl/codegen/byte_buffer.h",
"include/grpc/impl/codegen/byte_buffer_reader.h", "include/grpc/impl/codegen/byte_buffer_reader.h",
"include/grpc/impl/codegen/compression_types.h", "include/grpc/impl/codegen/compression_types.h",
"include/grpc/impl/codegen/connectivity_state.h", "include/grpc/impl/codegen/connectivity_state.h",
"include/grpc/impl/codegen/grpc_types.h", "include/grpc/impl/codegen/grpc_types.h",
"include/grpc/impl/codegen/propagation_bits.h", "include/grpc/impl/codegen/propagation_bits.h",
"include/grpc/impl/codegen/status.h", "include/grpc/impl/codegen/status.h",
"include/grpc/impl/codegen/alloc.h",
"include/grpc/impl/codegen/atm.h", "include/grpc/impl/codegen/atm.h",
"include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_atomic.h",
"include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_gcc_sync.h",
"include/grpc/impl/codegen/atm_windows.h", "include/grpc/impl/codegen/atm_windows.h",
"include/grpc/impl/codegen/log.h", "include/grpc/impl/codegen/gpr_types.h",
"include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/port_platform.h",
"include/grpc/impl/codegen/slice.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.h",
"include/grpc/impl/codegen/sync_generic.h", "include/grpc/impl/codegen/sync_generic.h",
"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/async_stream.h", "include/grpc++/impl/codegen/async_stream.h",
"include/grpc++/impl/codegen/async_unary_call.h", "include/grpc++/impl/codegen/async_unary_call.h",
"include/grpc++/impl/codegen/call.h", "include/grpc++/impl/codegen/call.h",
@ -1965,6 +1952,7 @@ cc_library(
"include/grpc++/impl/codegen/service_type.h", "include/grpc++/impl/codegen/service_type.h",
"include/grpc++/impl/codegen/status.h", "include/grpc++/impl/codegen/status.h",
"include/grpc++/impl/codegen/status_code_enum.h", "include/grpc++/impl/codegen/status_code_enum.h",
"include/grpc++/impl/codegen/status_helper.h",
"include/grpc++/impl/codegen/string_ref.h", "include/grpc++/impl/codegen/string_ref.h",
"include/grpc++/impl/codegen/stub_options.h", "include/grpc++/impl/codegen/stub_options.h",
"include/grpc++/impl/codegen/sync.h", "include/grpc++/impl/codegen/sync.h",
@ -2068,7 +2056,9 @@ objc_library(
"src/core/lib/support/log_linux.c", "src/core/lib/support/log_linux.c",
"src/core/lib/support/log_posix.c", "src/core/lib/support/log_posix.c",
"src/core/lib/support/log_windows.c", "src/core/lib/support/log_windows.c",
"src/core/lib/support/mpscq.c",
"src/core/lib/support/murmur_hash.c", "src/core/lib/support/murmur_hash.c",
"src/core/lib/support/percent_encoding.c",
"src/core/lib/support/slice.c", "src/core/lib/support/slice.c",
"src/core/lib/support/slice_buffer.c", "src/core/lib/support/slice_buffer.c",
"src/core/lib/support/stack_lockfree.c", "src/core/lib/support/stack_lockfree.c",
@ -2123,25 +2113,24 @@ objc_library(
"include/grpc/support/tls_msvc.h", "include/grpc/support/tls_msvc.h",
"include/grpc/support/tls_pthread.h", "include/grpc/support/tls_pthread.h",
"include/grpc/support/useful.h", "include/grpc/support/useful.h",
"include/grpc/impl/codegen/alloc.h",
"include/grpc/impl/codegen/atm.h", "include/grpc/impl/codegen/atm.h",
"include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_atomic.h",
"include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_gcc_sync.h",
"include/grpc/impl/codegen/atm_windows.h", "include/grpc/impl/codegen/atm_windows.h",
"include/grpc/impl/codegen/log.h", "include/grpc/impl/codegen/gpr_types.h",
"include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/port_platform.h",
"include/grpc/impl/codegen/slice.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.h",
"include/grpc/impl/codegen/sync_generic.h", "include/grpc/impl/codegen/sync_generic.h",
"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",
"src/core/lib/profiling/timers.h", "src/core/lib/profiling/timers.h",
"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/mpscq.h",
"src/core/lib/support/murmur_hash.h", "src/core/lib/support/murmur_hash.h",
"src/core/lib/support/percent_encoding.h",
"src/core/lib/support/stack_lockfree.h", "src/core/lib/support/stack_lockfree.h",
"src/core/lib/support/string.h", "src/core/lib/support/string.h",
"src/core/lib/support/string_windows.h", "src/core/lib/support/string_windows.h",
@ -2178,6 +2167,7 @@ objc_library(
"src/core/lib/http/httpcli.c", "src/core/lib/http/httpcli.c",
"src/core/lib/http/parser.c", "src/core/lib/http/parser.c",
"src/core/lib/iomgr/closure.c", "src/core/lib/iomgr/closure.c",
"src/core/lib/iomgr/combiner.c",
"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",
@ -2307,7 +2297,6 @@ objc_library(
"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",
"src/core/ext/client_config/client_config.c",
"src/core/ext/client_config/client_config_plugin.c", "src/core/ext/client_config/client_config_plugin.c",
"src/core/ext/client_config/connector.c", "src/core/ext/client_config/connector.c",
"src/core/ext/client_config/default_initial_connect_string.c", "src/core/ext/client_config/default_initial_connect_string.c",
@ -2319,8 +2308,8 @@ objc_library(
"src/core/ext/client_config/resolver.c", "src/core/ext/client_config/resolver.c",
"src/core/ext/client_config/resolver_factory.c", "src/core/ext/client_config/resolver_factory.c",
"src/core/ext/client_config/resolver_registry.c", "src/core/ext/client_config/resolver_registry.c",
"src/core/ext/client_config/resolver_result.c",
"src/core/ext/client_config/subchannel.c", "src/core/ext/client_config/subchannel.c",
"src/core/ext/client_config/subchannel_call_holder.c",
"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",
@ -2339,6 +2328,7 @@ objc_library(
"src/core/ext/census/base_resources.c", "src/core/ext/census/base_resources.c",
"src/core/ext/census/context.c", "src/core/ext/census/context.c",
"src/core/ext/census/gen/census.pb.c", "src/core/ext/census/gen/census.pb.c",
"src/core/ext/census/gen/trace_context.pb.c",
"src/core/ext/census/grpc_context.c", "src/core/ext/census/grpc_context.c",
"src/core/ext/census/grpc_filter.c", "src/core/ext/census/grpc_filter.c",
"src/core/ext/census/grpc_plugin.c", "src/core/ext/census/grpc_plugin.c",
@ -2358,27 +2348,23 @@ objc_library(
"include/grpc/grpc_posix.h", "include/grpc/grpc_posix.h",
"include/grpc/grpc_security_constants.h", "include/grpc/grpc_security_constants.h",
"include/grpc/status.h", "include/grpc/status.h",
"include/grpc/impl/codegen/byte_buffer.h",
"include/grpc/impl/codegen/byte_buffer_reader.h", "include/grpc/impl/codegen/byte_buffer_reader.h",
"include/grpc/impl/codegen/compression_types.h", "include/grpc/impl/codegen/compression_types.h",
"include/grpc/impl/codegen/connectivity_state.h", "include/grpc/impl/codegen/connectivity_state.h",
"include/grpc/impl/codegen/grpc_types.h", "include/grpc/impl/codegen/grpc_types.h",
"include/grpc/impl/codegen/propagation_bits.h", "include/grpc/impl/codegen/propagation_bits.h",
"include/grpc/impl/codegen/status.h", "include/grpc/impl/codegen/status.h",
"include/grpc/impl/codegen/alloc.h",
"include/grpc/impl/codegen/atm.h", "include/grpc/impl/codegen/atm.h",
"include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_atomic.h",
"include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_gcc_sync.h",
"include/grpc/impl/codegen/atm_windows.h", "include/grpc/impl/codegen/atm_windows.h",
"include/grpc/impl/codegen/log.h", "include/grpc/impl/codegen/gpr_types.h",
"include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/port_platform.h",
"include/grpc/impl/codegen/slice.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.h",
"include/grpc/impl/codegen/sync_generic.h", "include/grpc/impl/codegen/sync_generic.h",
"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/grpc_security.h", "include/grpc/grpc_security.h",
"include/grpc/census.h", "include/grpc/census.h",
"src/core/lib/channel/channel_args.h", "src/core/lib/channel/channel_args.h",
@ -2397,6 +2383,7 @@ objc_library(
"src/core/lib/http/httpcli.h", "src/core/lib/http/httpcli.h",
"src/core/lib/http/parser.h", "src/core/lib/http/parser.h",
"src/core/lib/iomgr/closure.h", "src/core/lib/iomgr/closure.h",
"src/core/lib/iomgr/combiner.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/error.h",
@ -2508,7 +2495,6 @@ objc_library(
"src/core/lib/tsi/transport_security_interface.h", "src/core/lib/tsi/transport_security_interface.h",
"src/core/ext/client_config/client_channel.h", "src/core/ext/client_config/client_channel.h",
"src/core/ext/client_config/client_channel_factory.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/connector.h",
"src/core/ext/client_config/initial_connect_string.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.h",
@ -2518,8 +2504,8 @@ objc_library(
"src/core/ext/client_config/resolver.h", "src/core/ext/client_config/resolver.h",
"src/core/ext/client_config/resolver_factory.h", "src/core/ext/client_config/resolver_factory.h",
"src/core/ext/client_config/resolver_registry.h", "src/core/ext/client_config/resolver_registry.h",
"src/core/ext/client_config/resolver_result.h",
"src/core/ext/client_config/subchannel.h", "src/core/ext/client_config/subchannel.h",
"src/core/ext/client_config/subchannel_call_holder.h",
"src/core/ext/client_config/subchannel_index.h", "src/core/ext/client_config/subchannel_index.h",
"src/core/ext/client_config/uri_parser.h", "src/core/ext/client_config/uri_parser.h",
"src/core/ext/lb_policy/grpclb/grpclb.h", "src/core/ext/lb_policy/grpclb/grpclb.h",
@ -2532,6 +2518,7 @@ objc_library(
"src/core/ext/census/census_interface.h", "src/core/ext/census/census_interface.h",
"src/core/ext/census/census_rpc_stats.h", "src/core/ext/census/census_rpc_stats.h",
"src/core/ext/census/gen/census.pb.h", "src/core/ext/census/gen/census.pb.h",
"src/core/ext/census/gen/trace_context.pb.h",
"src/core/ext/census/grpc_filter.h", "src/core/ext/census/grpc_filter.h",
"src/core/ext/census/mlog.h", "src/core/ext/census/mlog.h",
"src/core/ext/census/resource.h", "src/core/ext/census/resource.h",

@ -191,7 +191,9 @@ add_library(gpr
src/core/lib/support/log_linux.c src/core/lib/support/log_linux.c
src/core/lib/support/log_posix.c src/core/lib/support/log_posix.c
src/core/lib/support/log_windows.c src/core/lib/support/log_windows.c
src/core/lib/support/mpscq.c
src/core/lib/support/murmur_hash.c src/core/lib/support/murmur_hash.c
src/core/lib/support/percent_encoding.c
src/core/lib/support/slice.c src/core/lib/support/slice.c
src/core/lib/support/slice_buffer.c src/core/lib/support/slice_buffer.c
src/core/lib/support/stack_lockfree.c src/core/lib/support/stack_lockfree.c
@ -257,20 +259,17 @@ foreach(_hdr
include/grpc/support/tls_msvc.h include/grpc/support/tls_msvc.h
include/grpc/support/tls_pthread.h include/grpc/support/tls_pthread.h
include/grpc/support/useful.h include/grpc/support/useful.h
include/grpc/impl/codegen/alloc.h
include/grpc/impl/codegen/atm.h include/grpc/impl/codegen/atm.h
include/grpc/impl/codegen/atm_gcc_atomic.h include/grpc/impl/codegen/atm_gcc_atomic.h
include/grpc/impl/codegen/atm_gcc_sync.h include/grpc/impl/codegen/atm_gcc_sync.h
include/grpc/impl/codegen/atm_windows.h include/grpc/impl/codegen/atm_windows.h
include/grpc/impl/codegen/log.h include/grpc/impl/codegen/gpr_types.h
include/grpc/impl/codegen/port_platform.h include/grpc/impl/codegen/port_platform.h
include/grpc/impl/codegen/slice.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.h
include/grpc/impl/codegen/sync_generic.h include/grpc/impl/codegen/sync_generic.h
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
) )
string(REPLACE "include/" "" _path ${_hdr}) string(REPLACE "include/" "" _path ${_hdr})
get_filename_component(_path ${_path} PATH) get_filename_component(_path ${_path} PATH)
@ -306,6 +305,7 @@ add_library(grpc
src/core/lib/http/httpcli.c src/core/lib/http/httpcli.c
src/core/lib/http/parser.c src/core/lib/http/parser.c
src/core/lib/iomgr/closure.c src/core/lib/iomgr/closure.c
src/core/lib/iomgr/combiner.c
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
@ -435,7 +435,6 @@ add_library(grpc
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
src/core/ext/client_config/client_config.c
src/core/ext/client_config/client_config_plugin.c src/core/ext/client_config/client_config_plugin.c
src/core/ext/client_config/connector.c src/core/ext/client_config/connector.c
src/core/ext/client_config/default_initial_connect_string.c src/core/ext/client_config/default_initial_connect_string.c
@ -447,8 +446,8 @@ add_library(grpc
src/core/ext/client_config/resolver.c src/core/ext/client_config/resolver.c
src/core/ext/client_config/resolver_factory.c src/core/ext/client_config/resolver_factory.c
src/core/ext/client_config/resolver_registry.c src/core/ext/client_config/resolver_registry.c
src/core/ext/client_config/resolver_result.c
src/core/ext/client_config/subchannel.c src/core/ext/client_config/subchannel.c
src/core/ext/client_config/subchannel_call_holder.c
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
@ -470,6 +469,7 @@ add_library(grpc
src/core/ext/census/base_resources.c src/core/ext/census/base_resources.c
src/core/ext/census/context.c src/core/ext/census/context.c
src/core/ext/census/gen/census.pb.c src/core/ext/census/gen/census.pb.c
src/core/ext/census/gen/trace_context.pb.c
src/core/ext/census/grpc_context.c src/core/ext/census/grpc_context.c
src/core/ext/census/grpc_filter.c src/core/ext/census/grpc_filter.c
src/core/ext/census/grpc_plugin.c src/core/ext/census/grpc_plugin.c
@ -506,27 +506,23 @@ foreach(_hdr
include/grpc/grpc_posix.h include/grpc/grpc_posix.h
include/grpc/grpc_security_constants.h include/grpc/grpc_security_constants.h
include/grpc/status.h include/grpc/status.h
include/grpc/impl/codegen/byte_buffer.h
include/grpc/impl/codegen/byte_buffer_reader.h include/grpc/impl/codegen/byte_buffer_reader.h
include/grpc/impl/codegen/compression_types.h include/grpc/impl/codegen/compression_types.h
include/grpc/impl/codegen/connectivity_state.h include/grpc/impl/codegen/connectivity_state.h
include/grpc/impl/codegen/grpc_types.h include/grpc/impl/codegen/grpc_types.h
include/grpc/impl/codegen/propagation_bits.h include/grpc/impl/codegen/propagation_bits.h
include/grpc/impl/codegen/status.h include/grpc/impl/codegen/status.h
include/grpc/impl/codegen/alloc.h
include/grpc/impl/codegen/atm.h include/grpc/impl/codegen/atm.h
include/grpc/impl/codegen/atm_gcc_atomic.h include/grpc/impl/codegen/atm_gcc_atomic.h
include/grpc/impl/codegen/atm_gcc_sync.h include/grpc/impl/codegen/atm_gcc_sync.h
include/grpc/impl/codegen/atm_windows.h include/grpc/impl/codegen/atm_windows.h
include/grpc/impl/codegen/log.h include/grpc/impl/codegen/gpr_types.h
include/grpc/impl/codegen/port_platform.h include/grpc/impl/codegen/port_platform.h
include/grpc/impl/codegen/slice.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.h
include/grpc/impl/codegen/sync_generic.h include/grpc/impl/codegen/sync_generic.h
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/grpc_security.h include/grpc/grpc_security.h
include/grpc/census.h include/grpc/census.h
) )
@ -564,6 +560,7 @@ add_library(grpc_cronet
src/core/lib/http/httpcli.c src/core/lib/http/httpcli.c
src/core/lib/http/parser.c src/core/lib/http/parser.c
src/core/lib/iomgr/closure.c src/core/lib/iomgr/closure.c
src/core/lib/iomgr/combiner.c
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
@ -667,7 +664,6 @@ add_library(grpc_cronet
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
src/core/ext/client_config/client_config.c
src/core/ext/client_config/client_config_plugin.c src/core/ext/client_config/client_config_plugin.c
src/core/ext/client_config/connector.c src/core/ext/client_config/connector.c
src/core/ext/client_config/default_initial_connect_string.c src/core/ext/client_config/default_initial_connect_string.c
@ -679,8 +675,8 @@ add_library(grpc_cronet
src/core/ext/client_config/resolver.c src/core/ext/client_config/resolver.c
src/core/ext/client_config/resolver_factory.c src/core/ext/client_config/resolver_factory.c
src/core/ext/client_config/resolver_registry.c src/core/ext/client_config/resolver_registry.c
src/core/ext/client_config/resolver_result.c
src/core/ext/client_config/subchannel.c src/core/ext/client_config/subchannel.c
src/core/ext/client_config/subchannel_call_holder.c
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/lib/http/httpcli_security_connector.c src/core/lib/http/httpcli_security_connector.c
@ -737,27 +733,23 @@ foreach(_hdr
include/grpc/grpc_posix.h include/grpc/grpc_posix.h
include/grpc/grpc_security_constants.h include/grpc/grpc_security_constants.h
include/grpc/status.h include/grpc/status.h
include/grpc/impl/codegen/byte_buffer.h
include/grpc/impl/codegen/byte_buffer_reader.h include/grpc/impl/codegen/byte_buffer_reader.h
include/grpc/impl/codegen/compression_types.h include/grpc/impl/codegen/compression_types.h
include/grpc/impl/codegen/connectivity_state.h include/grpc/impl/codegen/connectivity_state.h
include/grpc/impl/codegen/grpc_types.h include/grpc/impl/codegen/grpc_types.h
include/grpc/impl/codegen/propagation_bits.h include/grpc/impl/codegen/propagation_bits.h
include/grpc/impl/codegen/status.h include/grpc/impl/codegen/status.h
include/grpc/impl/codegen/alloc.h
include/grpc/impl/codegen/atm.h include/grpc/impl/codegen/atm.h
include/grpc/impl/codegen/atm_gcc_atomic.h include/grpc/impl/codegen/atm_gcc_atomic.h
include/grpc/impl/codegen/atm_gcc_sync.h include/grpc/impl/codegen/atm_gcc_sync.h
include/grpc/impl/codegen/atm_windows.h include/grpc/impl/codegen/atm_windows.h
include/grpc/impl/codegen/log.h include/grpc/impl/codegen/gpr_types.h
include/grpc/impl/codegen/port_platform.h include/grpc/impl/codegen/port_platform.h
include/grpc/impl/codegen/slice.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.h
include/grpc/impl/codegen/sync_generic.h include/grpc/impl/codegen/sync_generic.h
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/grpc_cronet.h include/grpc/grpc_cronet.h
include/grpc/grpc_security.h include/grpc/grpc_security.h
) )
@ -796,6 +788,7 @@ add_library(grpc_unsecure
src/core/lib/http/httpcli.c src/core/lib/http/httpcli.c
src/core/lib/http/parser.c src/core/lib/http/parser.c
src/core/lib/iomgr/closure.c src/core/lib/iomgr/closure.c
src/core/lib/iomgr/combiner.c
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
@ -899,7 +892,6 @@ add_library(grpc_unsecure
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
src/core/ext/client_config/client_config.c
src/core/ext/client_config/client_config_plugin.c src/core/ext/client_config/client_config_plugin.c
src/core/ext/client_config/connector.c src/core/ext/client_config/connector.c
src/core/ext/client_config/default_initial_connect_string.c src/core/ext/client_config/default_initial_connect_string.c
@ -911,8 +903,8 @@ add_library(grpc_unsecure
src/core/ext/client_config/resolver.c src/core/ext/client_config/resolver.c
src/core/ext/client_config/resolver_factory.c src/core/ext/client_config/resolver_factory.c
src/core/ext/client_config/resolver_registry.c src/core/ext/client_config/resolver_registry.c
src/core/ext/client_config/resolver_result.c
src/core/ext/client_config/subchannel.c src/core/ext/client_config/subchannel.c
src/core/ext/client_config/subchannel_call_holder.c
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/resolver/dns/native/dns_resolver.c src/core/ext/resolver/dns/native/dns_resolver.c
@ -930,6 +922,7 @@ add_library(grpc_unsecure
src/core/ext/census/base_resources.c src/core/ext/census/base_resources.c
src/core/ext/census/context.c src/core/ext/census/context.c
src/core/ext/census/gen/census.pb.c src/core/ext/census/gen/census.pb.c
src/core/ext/census/gen/trace_context.pb.c
src/core/ext/census/grpc_context.c src/core/ext/census/grpc_context.c
src/core/ext/census/grpc_filter.c src/core/ext/census/grpc_filter.c
src/core/ext/census/grpc_plugin.c src/core/ext/census/grpc_plugin.c
@ -964,27 +957,23 @@ foreach(_hdr
include/grpc/grpc_posix.h include/grpc/grpc_posix.h
include/grpc/grpc_security_constants.h include/grpc/grpc_security_constants.h
include/grpc/status.h include/grpc/status.h
include/grpc/impl/codegen/byte_buffer.h
include/grpc/impl/codegen/byte_buffer_reader.h include/grpc/impl/codegen/byte_buffer_reader.h
include/grpc/impl/codegen/compression_types.h include/grpc/impl/codegen/compression_types.h
include/grpc/impl/codegen/connectivity_state.h include/grpc/impl/codegen/connectivity_state.h
include/grpc/impl/codegen/grpc_types.h include/grpc/impl/codegen/grpc_types.h
include/grpc/impl/codegen/propagation_bits.h include/grpc/impl/codegen/propagation_bits.h
include/grpc/impl/codegen/status.h include/grpc/impl/codegen/status.h
include/grpc/impl/codegen/alloc.h
include/grpc/impl/codegen/atm.h include/grpc/impl/codegen/atm.h
include/grpc/impl/codegen/atm_gcc_atomic.h include/grpc/impl/codegen/atm_gcc_atomic.h
include/grpc/impl/codegen/atm_gcc_sync.h include/grpc/impl/codegen/atm_gcc_sync.h
include/grpc/impl/codegen/atm_windows.h include/grpc/impl/codegen/atm_windows.h
include/grpc/impl/codegen/log.h include/grpc/impl/codegen/gpr_types.h
include/grpc/impl/codegen/port_platform.h include/grpc/impl/codegen/port_platform.h
include/grpc/impl/codegen/slice.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.h
include/grpc/impl/codegen/sync_generic.h include/grpc/impl/codegen/sync_generic.h
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/census.h include/grpc/census.h
) )
string(REPLACE "include/" "" _path ${_hdr}) string(REPLACE "include/" "" _path ${_hdr})
@ -1005,39 +994,39 @@ endif()
add_library(grpc++ add_library(grpc++
src/cpp/client/insecure_credentials.cc
src/cpp/client/secure_credentials.cc src/cpp/client/secure_credentials.cc
src/cpp/common/auth_property_iterator.cc src/cpp/common/auth_property_iterator.cc
src/cpp/common/secure_auth_context.cc src/cpp/common/secure_auth_context.cc
src/cpp/common/secure_channel_arguments.cc src/cpp/common/secure_channel_arguments.cc
src/cpp/common/secure_create_auth_context.cc src/cpp/common/secure_create_auth_context.cc
src/cpp/server/insecure_server_credentials.cc
src/cpp/server/secure_server_credentials.cc src/cpp/server/secure_server_credentials.cc
src/cpp/client/channel.cc src/cpp/client/channel_cc.cc
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/create_channel_posix.cc
src/cpp/client/credentials.cc src/cpp/client/credentials_cc.cc
src/cpp/client/generic_stub.cc src/cpp/client/generic_stub.cc
src/cpp/client/insecure_credentials.cc
src/cpp/common/channel_arguments.cc src/cpp/common/channel_arguments.cc
src/cpp/common/channel_filter.cc src/cpp/common/channel_filter.cc
src/cpp/common/completion_queue.cc src/cpp/common/completion_queue_cc.cc
src/cpp/common/core_codegen.cc src/cpp/common/core_codegen.cc
src/cpp/common/rpc_method.cc src/cpp/common/rpc_method.cc
src/cpp/server/async_generic_service.cc src/cpp/server/async_generic_service.cc
src/cpp/server/create_default_thread_pool.cc src/cpp/server/create_default_thread_pool.cc
src/cpp/server/dynamic_thread_pool.cc src/cpp/server/dynamic_thread_pool.cc
src/cpp/server/insecure_server_credentials.cc
src/cpp/server/server.cc
src/cpp/server/server_builder.cc src/cpp/server/server_builder.cc
src/cpp/server/server_cc.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/server/server_posix.cc
src/cpp/util/byte_buffer.cc src/cpp/util/byte_buffer_cc.cc
src/cpp/util/slice.cc src/cpp/util/slice_cc.cc
src/cpp/util/status.cc src/cpp/util/status.cc
src/cpp/util/string_ref.cc src/cpp/util/string_ref.cc
src/cpp/util/time.cc src/cpp/util/time_cc.cc
src/core/lib/channel/channel_args.c src/core/lib/channel/channel_args.c
src/core/lib/channel/channel_stack.c src/core/lib/channel/channel_stack.c
src/core/lib/channel/channel_stack_builder.c src/core/lib/channel/channel_stack_builder.c
@ -1053,6 +1042,7 @@ add_library(grpc++
src/core/lib/http/httpcli.c src/core/lib/http/httpcli.c
src/core/lib/http/parser.c src/core/lib/http/parser.c
src/core/lib/iomgr/closure.c src/core/lib/iomgr/closure.c
src/core/lib/iomgr/combiner.c
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
@ -1202,27 +1192,23 @@ foreach(_hdr
include/grpc/grpc_posix.h include/grpc/grpc_posix.h
include/grpc/grpc_security_constants.h include/grpc/grpc_security_constants.h
include/grpc/status.h include/grpc/status.h
include/grpc/impl/codegen/byte_buffer.h
include/grpc/impl/codegen/byte_buffer_reader.h include/grpc/impl/codegen/byte_buffer_reader.h
include/grpc/impl/codegen/compression_types.h include/grpc/impl/codegen/compression_types.h
include/grpc/impl/codegen/connectivity_state.h include/grpc/impl/codegen/connectivity_state.h
include/grpc/impl/codegen/grpc_types.h include/grpc/impl/codegen/grpc_types.h
include/grpc/impl/codegen/propagation_bits.h include/grpc/impl/codegen/propagation_bits.h
include/grpc/impl/codegen/status.h include/grpc/impl/codegen/status.h
include/grpc/impl/codegen/alloc.h
include/grpc/impl/codegen/atm.h include/grpc/impl/codegen/atm.h
include/grpc/impl/codegen/atm_gcc_atomic.h include/grpc/impl/codegen/atm_gcc_atomic.h
include/grpc/impl/codegen/atm_gcc_sync.h include/grpc/impl/codegen/atm_gcc_sync.h
include/grpc/impl/codegen/atm_windows.h include/grpc/impl/codegen/atm_windows.h
include/grpc/impl/codegen/log.h include/grpc/impl/codegen/gpr_types.h
include/grpc/impl/codegen/port_platform.h include/grpc/impl/codegen/port_platform.h
include/grpc/impl/codegen/slice.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.h
include/grpc/impl/codegen/sync_generic.h include/grpc/impl/codegen/sync_generic.h
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/async_stream.h include/grpc++/impl/codegen/async_stream.h
include/grpc++/impl/codegen/async_unary_call.h include/grpc++/impl/codegen/async_unary_call.h
include/grpc++/impl/codegen/call.h include/grpc++/impl/codegen/call.h
@ -1246,6 +1232,7 @@ foreach(_hdr
include/grpc++/impl/codegen/service_type.h include/grpc++/impl/codegen/service_type.h
include/grpc++/impl/codegen/status.h include/grpc++/impl/codegen/status.h
include/grpc++/impl/codegen/status_code_enum.h include/grpc++/impl/codegen/status_code_enum.h
include/grpc++/impl/codegen/status_helper.h
include/grpc++/impl/codegen/string_ref.h include/grpc++/impl/codegen/string_ref.h
include/grpc++/impl/codegen/stub_options.h include/grpc++/impl/codegen/stub_options.h
include/grpc++/impl/codegen/sync.h include/grpc++/impl/codegen/sync.h
@ -1319,6 +1306,7 @@ foreach(_hdr
include/grpc++/impl/codegen/service_type.h include/grpc++/impl/codegen/service_type.h
include/grpc++/impl/codegen/status.h include/grpc++/impl/codegen/status.h
include/grpc++/impl/codegen/status_code_enum.h include/grpc++/impl/codegen/status_code_enum.h
include/grpc++/impl/codegen/status_helper.h
include/grpc++/impl/codegen/string_ref.h include/grpc++/impl/codegen/string_ref.h
include/grpc++/impl/codegen/stub_options.h include/grpc++/impl/codegen/stub_options.h
include/grpc++/impl/codegen/sync.h include/grpc++/impl/codegen/sync.h
@ -1326,27 +1314,23 @@ foreach(_hdr
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
include/grpc/impl/codegen/byte_buffer.h
include/grpc/impl/codegen/byte_buffer_reader.h include/grpc/impl/codegen/byte_buffer_reader.h
include/grpc/impl/codegen/compression_types.h include/grpc/impl/codegen/compression_types.h
include/grpc/impl/codegen/connectivity_state.h include/grpc/impl/codegen/connectivity_state.h
include/grpc/impl/codegen/grpc_types.h include/grpc/impl/codegen/grpc_types.h
include/grpc/impl/codegen/propagation_bits.h include/grpc/impl/codegen/propagation_bits.h
include/grpc/impl/codegen/status.h include/grpc/impl/codegen/status.h
include/grpc/impl/codegen/alloc.h
include/grpc/impl/codegen/atm.h include/grpc/impl/codegen/atm.h
include/grpc/impl/codegen/atm_gcc_atomic.h include/grpc/impl/codegen/atm_gcc_atomic.h
include/grpc/impl/codegen/atm_gcc_sync.h include/grpc/impl/codegen/atm_gcc_sync.h
include/grpc/impl/codegen/atm_windows.h include/grpc/impl/codegen/atm_windows.h
include/grpc/impl/codegen/log.h include/grpc/impl/codegen/gpr_types.h
include/grpc/impl/codegen/port_platform.h include/grpc/impl/codegen/port_platform.h
include/grpc/impl/codegen/slice.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.h
include/grpc/impl/codegen/sync_generic.h include/grpc/impl/codegen/sync_generic.h
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/config_protobuf.h include/grpc++/impl/codegen/config_protobuf.h
) )
string(REPLACE "include/" "" _path ${_hdr}) string(REPLACE "include/" "" _path ${_hdr})
@ -1367,34 +1351,34 @@ endif()
add_library(grpc++_unsecure add_library(grpc++_unsecure
src/cpp/client/insecure_credentials.cc
src/cpp/common/insecure_create_auth_context.cc src/cpp/common/insecure_create_auth_context.cc
src/cpp/client/channel.cc src/cpp/server/insecure_server_credentials.cc
src/cpp/client/channel_cc.cc
src/cpp/client/client_context.cc src/cpp/client/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/create_channel_posix.cc
src/cpp/client/credentials.cc src/cpp/client/credentials_cc.cc
src/cpp/client/generic_stub.cc src/cpp/client/generic_stub.cc
src/cpp/client/insecure_credentials.cc
src/cpp/common/channel_arguments.cc src/cpp/common/channel_arguments.cc
src/cpp/common/channel_filter.cc src/cpp/common/channel_filter.cc
src/cpp/common/completion_queue.cc src/cpp/common/completion_queue_cc.cc
src/cpp/common/core_codegen.cc src/cpp/common/core_codegen.cc
src/cpp/common/rpc_method.cc src/cpp/common/rpc_method.cc
src/cpp/server/async_generic_service.cc src/cpp/server/async_generic_service.cc
src/cpp/server/create_default_thread_pool.cc src/cpp/server/create_default_thread_pool.cc
src/cpp/server/dynamic_thread_pool.cc src/cpp/server/dynamic_thread_pool.cc
src/cpp/server/insecure_server_credentials.cc
src/cpp/server/server.cc
src/cpp/server/server_builder.cc src/cpp/server/server_builder.cc
src/cpp/server/server_cc.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/server/server_posix.cc
src/cpp/util/byte_buffer.cc src/cpp/util/byte_buffer_cc.cc
src/cpp/util/slice.cc src/cpp/util/slice_cc.cc
src/cpp/util/status.cc src/cpp/util/status.cc
src/cpp/util/string_ref.cc src/cpp/util/string_ref.cc
src/cpp/util/time.cc src/cpp/util/time_cc.cc
src/core/lib/channel/channel_args.c src/core/lib/channel/channel_args.c
src/core/lib/channel/channel_stack.c src/core/lib/channel/channel_stack.c
src/core/lib/channel/channel_stack_builder.c src/core/lib/channel/channel_stack_builder.c
@ -1410,6 +1394,7 @@ add_library(grpc++_unsecure
src/core/lib/http/httpcli.c src/core/lib/http/httpcli.c
src/core/lib/http/parser.c src/core/lib/http/parser.c
src/core/lib/iomgr/closure.c src/core/lib/iomgr/closure.c
src/core/lib/iomgr/combiner.c
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
@ -1558,27 +1543,23 @@ foreach(_hdr
include/grpc/grpc_posix.h include/grpc/grpc_posix.h
include/grpc/grpc_security_constants.h include/grpc/grpc_security_constants.h
include/grpc/status.h include/grpc/status.h
include/grpc/impl/codegen/byte_buffer.h
include/grpc/impl/codegen/byte_buffer_reader.h include/grpc/impl/codegen/byte_buffer_reader.h
include/grpc/impl/codegen/compression_types.h include/grpc/impl/codegen/compression_types.h
include/grpc/impl/codegen/connectivity_state.h include/grpc/impl/codegen/connectivity_state.h
include/grpc/impl/codegen/grpc_types.h include/grpc/impl/codegen/grpc_types.h
include/grpc/impl/codegen/propagation_bits.h include/grpc/impl/codegen/propagation_bits.h
include/grpc/impl/codegen/status.h include/grpc/impl/codegen/status.h
include/grpc/impl/codegen/alloc.h
include/grpc/impl/codegen/atm.h include/grpc/impl/codegen/atm.h
include/grpc/impl/codegen/atm_gcc_atomic.h include/grpc/impl/codegen/atm_gcc_atomic.h
include/grpc/impl/codegen/atm_gcc_sync.h include/grpc/impl/codegen/atm_gcc_sync.h
include/grpc/impl/codegen/atm_windows.h include/grpc/impl/codegen/atm_windows.h
include/grpc/impl/codegen/log.h include/grpc/impl/codegen/gpr_types.h
include/grpc/impl/codegen/port_platform.h include/grpc/impl/codegen/port_platform.h
include/grpc/impl/codegen/slice.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.h
include/grpc/impl/codegen/sync_generic.h include/grpc/impl/codegen/sync_generic.h
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/async_stream.h include/grpc++/impl/codegen/async_stream.h
include/grpc++/impl/codegen/async_unary_call.h include/grpc++/impl/codegen/async_unary_call.h
include/grpc++/impl/codegen/call.h include/grpc++/impl/codegen/call.h
@ -1602,6 +1583,7 @@ foreach(_hdr
include/grpc++/impl/codegen/service_type.h include/grpc++/impl/codegen/service_type.h
include/grpc++/impl/codegen/status.h include/grpc++/impl/codegen/status.h
include/grpc++/impl/codegen/status_code_enum.h include/grpc++/impl/codegen/status_code_enum.h
include/grpc++/impl/codegen/status_helper.h
include/grpc++/impl/codegen/string_ref.h include/grpc++/impl/codegen/string_ref.h
include/grpc++/impl/codegen/stub_options.h include/grpc++/impl/codegen/stub_options.h
include/grpc++/impl/codegen/sync.h include/grpc++/impl/codegen/sync.h
@ -1751,6 +1733,30 @@ if (gRPC_INSTALL)
endif() endif()
add_executable(gen_percent_encoding_tables
tools/codegen/core/gen_percent_encoding_tables.c
)
target_include_directories(gen_percent_encoding_tables
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
PRIVATE ${BORINGSSL_ROOT_DIR}/include
PRIVATE ${PROTOBUF_ROOT_DIR}/src
PRIVATE ${ZLIB_ROOT_DIR}
PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib
)
if (gRPC_INSTALL)
install(TARGETS gen_percent_encoding_tables EXPORT gRPCTargets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
endif()
add_executable(grpc_create_jwt add_executable(grpc_create_jwt
test/core/security/create_jwt.c test/core/security/create_jwt.c
) )

@ -9,7 +9,7 @@ refer to these documents
* [Java](https://github.com/grpc/grpc-java) * [Java](https://github.com/grpc/grpc-java)
* [Node](src/node): `npm install grpc` * [Node](src/node): `npm install grpc`
* [Objective-C](src/objective-c) * [Objective-C](src/objective-c)
* [PHP](src/php): `pecl install grpc-beta` * [PHP](src/php): `pecl install grpc`
* [Python](src/python/grpcio): `pip install grpcio` * [Python](src/python/grpcio): `pip install grpcio`
* [Ruby](src/ruby): `gem install grpc` * [Ruby](src/ruby): `gem install grpc`

File diff suppressed because it is too large Load Diff

@ -100,13 +100,15 @@ desc 'Build the native gem file under rake_compiler_dock'
task 'gem:native' do task 'gem:native' do
verbose = ENV['V'] || '0' verbose = ENV['V'] || '0'
grpc_config = ENV['GRPC_CONFIG'] || 'opt'
if RUBY_PLATFORM =~ /darwin/ if RUBY_PLATFORM =~ /darwin/
FileUtils.touch 'grpc_c.32.ruby' FileUtils.touch 'grpc_c.32.ruby'
FileUtils.touch 'grpc_c.64.ruby' FileUtils.touch 'grpc_c.64.ruby'
system "rake cross native gem RUBY_CC_VERSION=2.3.0:2.2.2:2.1.5:2.0.0 V=#{verbose}" system "rake cross native gem RUBY_CC_VERSION=2.3.0:2.2.2:2.1.5:2.0.0 V=#{verbose} GRPC_CONFIG=#{grpc_config}"
else else
Rake::Task['dlls'].execute Rake::Task['dlls'].execute
docker_for_windows "bundle && rake cross native gem RUBY_CC_VERSION=2.3.0:2.2.2:2.1.5:2.0.0 V=#{verbose}" docker_for_windows "bundle && rake cross native gem RUBY_CC_VERSION=2.3.0:2.2.2:2.1.5:2.0.0 V=#{verbose} GRPC_CONFIG=#{grpc_config}"
end end
end end

@ -515,7 +515,9 @@
'src/core/lib/support/log_linux.c', 'src/core/lib/support/log_linux.c',
'src/core/lib/support/log_posix.c', 'src/core/lib/support/log_posix.c',
'src/core/lib/support/log_windows.c', 'src/core/lib/support/log_windows.c',
'src/core/lib/support/mpscq.c',
'src/core/lib/support/murmur_hash.c', 'src/core/lib/support/murmur_hash.c',
'src/core/lib/support/percent_encoding.c',
'src/core/lib/support/slice.c', 'src/core/lib/support/slice.c',
'src/core/lib/support/slice_buffer.c', 'src/core/lib/support/slice_buffer.c',
'src/core/lib/support/stack_lockfree.c', 'src/core/lib/support/stack_lockfree.c',
@ -578,6 +580,7 @@
'src/core/lib/http/httpcli.c', 'src/core/lib/http/httpcli.c',
'src/core/lib/http/parser.c', 'src/core/lib/http/parser.c',
'src/core/lib/iomgr/closure.c', 'src/core/lib/iomgr/closure.c',
'src/core/lib/iomgr/combiner.c',
'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',
@ -707,7 +710,6 @@
'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',
'src/core/ext/client_config/client_config.c',
'src/core/ext/client_config/client_config_plugin.c', 'src/core/ext/client_config/client_config_plugin.c',
'src/core/ext/client_config/connector.c', 'src/core/ext/client_config/connector.c',
'src/core/ext/client_config/default_initial_connect_string.c', 'src/core/ext/client_config/default_initial_connect_string.c',
@ -719,8 +721,8 @@
'src/core/ext/client_config/resolver.c', 'src/core/ext/client_config/resolver.c',
'src/core/ext/client_config/resolver_factory.c', 'src/core/ext/client_config/resolver_factory.c',
'src/core/ext/client_config/resolver_registry.c', 'src/core/ext/client_config/resolver_registry.c',
'src/core/ext/client_config/resolver_result.c',
'src/core/ext/client_config/subchannel.c', 'src/core/ext/client_config/subchannel.c',
'src/core/ext/client_config/subchannel_call_holder.c',
'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',
@ -742,6 +744,7 @@
'src/core/ext/census/base_resources.c', 'src/core/ext/census/base_resources.c',
'src/core/ext/census/context.c', 'src/core/ext/census/context.c',
'src/core/ext/census/gen/census.pb.c', 'src/core/ext/census/gen/census.pb.c',
'src/core/ext/census/gen/trace_context.pb.c',
'src/core/ext/census/grpc_context.c', 'src/core/ext/census/grpc_context.c',
'src/core/ext/census/grpc_filter.c', 'src/core/ext/census/grpc_filter.c',
'src/core/ext/census/grpc_plugin.c', 'src/core/ext/census/grpc_plugin.c',

@ -2,11 +2,17 @@
'#2': It is used among other things to generate all of our project files. '#2': It is used among other things to generate all of our project files.
'#3': Please refer to the templates directory for more information. '#3': Please refer to the templates directory for more information.
settings: settings:
'#1': The public version number of the library. '#01': The public version number of the library.
'#2': Master always has a "-dev" suffix '#02': ===
'#3': Use "-preN" suffixes to identify pre-release versions '#03': Please update the 'g_stands_for' field periodically with a new g word
'#4': Per-language overrides are possible with (eg) ruby_version tag here '#04': not listed in doc/g_stands_for.md - and update that document to list the
'#5': See the expand_version.py for all the quirks here '#05': new word.
'#06': ===
'#07': Master always has a "-dev" suffix
'#08': Use "-preN" suffixes to identify pre-release versions
'#09': Per-language overrides are possible with (eg) ruby_version tag here
'#10': See the expand_version.py for all the quirks here
g_stands_for: good
version: 1.1.0-dev version: 1.1.0-dev
filegroups: filegroups:
- name: census - name: census
@ -18,6 +24,7 @@ filegroups:
- src/core/ext/census/census_interface.h - src/core/ext/census/census_interface.h
- src/core/ext/census/census_rpc_stats.h - src/core/ext/census/census_rpc_stats.h
- src/core/ext/census/gen/census.pb.h - src/core/ext/census/gen/census.pb.h
- src/core/ext/census/gen/trace_context.pb.h
- src/core/ext/census/grpc_filter.h - src/core/ext/census/grpc_filter.h
- src/core/ext/census/mlog.h - src/core/ext/census/mlog.h
- src/core/ext/census/resource.h - src/core/ext/census/resource.h
@ -26,6 +33,7 @@ filegroups:
- src/core/ext/census/base_resources.c - src/core/ext/census/base_resources.c
- src/core/ext/census/context.c - src/core/ext/census/context.c
- src/core/ext/census/gen/census.pb.c - src/core/ext/census/gen/census.pb.c
- src/core/ext/census/gen/trace_context.pb.c
- src/core/ext/census/grpc_context.c - src/core/ext/census/grpc_context.c
- src/core/ext/census/grpc_filter.c - src/core/ext/census/grpc_filter.c
- src/core/ext/census/grpc_plugin.c - src/core/ext/census/grpc_plugin.c
@ -74,7 +82,9 @@ 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/mpscq.h
- src/core/lib/support/murmur_hash.h - src/core/lib/support/murmur_hash.h
- src/core/lib/support/percent_encoding.h
- src/core/lib/support/stack_lockfree.h - src/core/lib/support/stack_lockfree.h
- src/core/lib/support/string.h - src/core/lib/support/string.h
- src/core/lib/support/string_windows.h - src/core/lib/support/string_windows.h
@ -102,7 +112,9 @@ filegroups:
- src/core/lib/support/log_linux.c - src/core/lib/support/log_linux.c
- src/core/lib/support/log_posix.c - src/core/lib/support/log_posix.c
- src/core/lib/support/log_windows.c - src/core/lib/support/log_windows.c
- src/core/lib/support/mpscq.c
- src/core/lib/support/murmur_hash.c - src/core/lib/support/murmur_hash.c
- src/core/lib/support/percent_encoding.c
- src/core/lib/support/slice.c - src/core/lib/support/slice.c
- src/core/lib/support/slice_buffer.c - src/core/lib/support/slice_buffer.c
- src/core/lib/support/stack_lockfree.c - src/core/lib/support/stack_lockfree.c
@ -131,20 +143,17 @@ filegroups:
- gpr_codegen - gpr_codegen
- name: gpr_codegen - name: gpr_codegen
public_headers: public_headers:
- include/grpc/impl/codegen/alloc.h
- include/grpc/impl/codegen/atm.h - include/grpc/impl/codegen/atm.h
- include/grpc/impl/codegen/atm_gcc_atomic.h - include/grpc/impl/codegen/atm_gcc_atomic.h
- include/grpc/impl/codegen/atm_gcc_sync.h - include/grpc/impl/codegen/atm_gcc_sync.h
- include/grpc/impl/codegen/atm_windows.h - include/grpc/impl/codegen/atm_windows.h
- include/grpc/impl/codegen/log.h - include/grpc/impl/codegen/gpr_types.h
- include/grpc/impl/codegen/port_platform.h - include/grpc/impl/codegen/port_platform.h
- include/grpc/impl/codegen/slice.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.h
- include/grpc/impl/codegen/sync_generic.h - include/grpc/impl/codegen/sync_generic.h
- 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
- name: grpc_base - name: grpc_base
public_headers: public_headers:
- include/grpc/byte_buffer.h - include/grpc/byte_buffer.h
@ -171,6 +180,7 @@ filegroups:
- src/core/lib/http/httpcli.h - src/core/lib/http/httpcli.h
- src/core/lib/http/parser.h - src/core/lib/http/parser.h
- src/core/lib/iomgr/closure.h - src/core/lib/iomgr/closure.h
- src/core/lib/iomgr/combiner.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/error.h
@ -251,6 +261,7 @@ filegroups:
- src/core/lib/http/httpcli.c - src/core/lib/http/httpcli.c
- src/core/lib/http/parser.c - src/core/lib/http/parser.c
- src/core/lib/iomgr/closure.c - src/core/lib/iomgr/closure.c
- src/core/lib/iomgr/combiner.c
- 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
@ -333,7 +344,6 @@ filegroups:
headers: headers:
- src/core/ext/client_config/client_channel.h - src/core/ext/client_config/client_channel.h
- src/core/ext/client_config/client_channel_factory.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/connector.h
- src/core/ext/client_config/initial_connect_string.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.h
@ -343,15 +353,14 @@ filegroups:
- src/core/ext/client_config/resolver.h - src/core/ext/client_config/resolver.h
- src/core/ext/client_config/resolver_factory.h - src/core/ext/client_config/resolver_factory.h
- src/core/ext/client_config/resolver_registry.h - src/core/ext/client_config/resolver_registry.h
- src/core/ext/client_config/resolver_result.h
- src/core/ext/client_config/subchannel.h - src/core/ext/client_config/subchannel.h
- src/core/ext/client_config/subchannel_call_holder.h
- src/core/ext/client_config/subchannel_index.h - src/core/ext/client_config/subchannel_index.h
- src/core/ext/client_config/uri_parser.h - src/core/ext/client_config/uri_parser.h
src: src:
- 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
- src/core/ext/client_config/client_config.c
- src/core/ext/client_config/client_config_plugin.c - src/core/ext/client_config/client_config_plugin.c
- src/core/ext/client_config/connector.c - src/core/ext/client_config/connector.c
- src/core/ext/client_config/default_initial_connect_string.c - src/core/ext/client_config/default_initial_connect_string.c
@ -363,8 +372,8 @@ filegroups:
- src/core/ext/client_config/resolver.c - src/core/ext/client_config/resolver.c
- src/core/ext/client_config/resolver_factory.c - src/core/ext/client_config/resolver_factory.c
- src/core/ext/client_config/resolver_registry.c - src/core/ext/client_config/resolver_registry.c
- src/core/ext/client_config/resolver_result.c
- src/core/ext/client_config/subchannel.c - src/core/ext/client_config/subchannel.c
- src/core/ext/client_config/subchannel_call_holder.c
- 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
plugin: grpc_client_config plugin: grpc_client_config
@ -372,7 +381,6 @@ filegroups:
- grpc_base - grpc_base
- name: grpc_codegen - name: grpc_codegen
public_headers: public_headers:
- include/grpc/impl/codegen/byte_buffer.h
- include/grpc/impl/codegen/byte_buffer_reader.h - include/grpc/impl/codegen/byte_buffer_reader.h
- include/grpc/impl/codegen/compression_types.h - include/grpc/impl/codegen/compression_types.h
- include/grpc/impl/codegen/connectivity_state.h - include/grpc/impl/codegen/connectivity_state.h
@ -696,33 +704,31 @@ filegroups:
- 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:
- src/cpp/client/channel.cc - src/cpp/client/channel_cc.cc
- 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/create_channel_posix.cc
- src/cpp/client/credentials.cc - src/cpp/client/credentials_cc.cc
- src/cpp/client/generic_stub.cc - src/cpp/client/generic_stub.cc
- src/cpp/client/insecure_credentials.cc
- src/cpp/common/channel_arguments.cc - src/cpp/common/channel_arguments.cc
- src/cpp/common/channel_filter.cc - src/cpp/common/channel_filter.cc
- src/cpp/common/completion_queue.cc - src/cpp/common/completion_queue_cc.cc
- src/cpp/common/core_codegen.cc - src/cpp/common/core_codegen.cc
- src/cpp/common/rpc_method.cc - src/cpp/common/rpc_method.cc
- src/cpp/server/async_generic_service.cc - src/cpp/server/async_generic_service.cc
- src/cpp/server/create_default_thread_pool.cc - src/cpp/server/create_default_thread_pool.cc
- src/cpp/server/dynamic_thread_pool.cc - src/cpp/server/dynamic_thread_pool.cc
- src/cpp/server/insecure_server_credentials.cc
- src/cpp/server/server.cc
- src/cpp/server/server_builder.cc - src/cpp/server/server_builder.cc
- src/cpp/server/server_cc.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/server/server_posix.cc
- src/cpp/util/byte_buffer.cc - src/cpp/util/byte_buffer_cc.cc
- src/cpp/util/slice.cc - src/cpp/util/slice_cc.cc
- src/cpp/util/status.cc - src/cpp/util/status.cc
- src/cpp/util/string_ref.cc - src/cpp/util/string_ref.cc
- src/cpp/util/time.cc - src/cpp/util/time_cc.cc
uses: uses:
- grpc_base - grpc_base
- grpc++_codegen_base - grpc++_codegen_base
@ -752,6 +758,7 @@ filegroups:
- include/grpc++/impl/codegen/service_type.h - include/grpc++/impl/codegen/service_type.h
- include/grpc++/impl/codegen/status.h - include/grpc++/impl/codegen/status.h
- include/grpc++/impl/codegen/status_code_enum.h - include/grpc++/impl/codegen/status_code_enum.h
- include/grpc++/impl/codegen/status_helper.h
- include/grpc++/impl/codegen/string_ref.h - include/grpc++/impl/codegen/string_ref.h
- include/grpc++/impl/codegen/stub_options.h - include/grpc++/impl/codegen/stub_options.h
- include/grpc++/impl/codegen/sync.h - include/grpc++/impl/codegen/sync.h
@ -967,11 +974,13 @@ libs:
- 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:
- src/cpp/client/insecure_credentials.cc
- src/cpp/client/secure_credentials.cc - src/cpp/client/secure_credentials.cc
- src/cpp/common/auth_property_iterator.cc - src/cpp/common/auth_property_iterator.cc
- src/cpp/common/secure_auth_context.cc - src/cpp/common/secure_auth_context.cc
- src/cpp/common/secure_channel_arguments.cc - src/cpp/common/secure_channel_arguments.cc
- src/cpp/common/secure_create_auth_context.cc - src/cpp/common/secure_create_auth_context.cc
- src/cpp/server/insecure_server_credentials.cc
- src/cpp/server/secure_server_credentials.cc - src/cpp/server/secure_server_credentials.cc
deps: deps:
- grpc - grpc
@ -1008,7 +1017,7 @@ libs:
headers: headers:
- test/cpp/util/test_config.h - test/cpp/util/test_config.h
src: src:
- test/cpp/util/test_config.cc - test/cpp/util/test_config_cc.cc
- name: grpc++_test_util - name: grpc++_test_util
build: private build: private
language: c++ language: c++
@ -1042,7 +1051,9 @@ libs:
build: all build: all
language: c++ language: c++
src: src:
- src/cpp/client/insecure_credentials.cc
- src/cpp/common/insecure_create_auth_context.cc - src/cpp/common/insecure_create_auth_context.cc
- src/cpp/server/insecure_server_credentials.cc
deps: deps:
- gpr - gpr
- grpc_unsecure - grpc_unsecure
@ -1398,6 +1409,17 @@ targets:
- test/core/end2end/fuzzers/client_fuzzer_corpus - test/core/end2end/fuzzers/client_fuzzer_corpus
dict: test/core/end2end/fuzzers/hpack.dictionary dict: test/core/end2end/fuzzers/hpack.dictionary
maxlen: 2048 maxlen: 2048
- name: combiner_test
cpu_cost: 30
build: test
language: c
src:
- test/core/iomgr/combiner_test.c
deps:
- grpc_test_util
- grpc
- gpr_test_util
- gpr
- name: compression_test - name: compression_test
build: test build: test
language: c language: c
@ -1570,6 +1592,12 @@ targets:
src: src:
- tools/codegen/core/gen_legal_metadata_characters.c - tools/codegen/core/gen_legal_metadata_characters.c
deps: [] deps: []
- name: gen_percent_encoding_tables
build: tool
language: c
src:
- tools/codegen/core/gen_percent_encoding_tables.c
deps: []
- name: goaway_server_test - name: goaway_server_test
cpu_cost: 0.1 cpu_cost: 0.1
build: test build: test
@ -1649,6 +1677,23 @@ targets:
deps: deps:
- gpr_test_util - gpr_test_util
- gpr - gpr
- name: gpr_mpscq_test
cpu_cost: 30
build: test
language: c
src:
- test/core/support/mpscq_test.c
deps:
- gpr_test_util
- gpr
- name: gpr_percent_encoding_test
build: test
language: c
src:
- test/core/support/percent_encoding_test.c
deps:
- gpr_test_util
- gpr
- name: gpr_slice_buffer_test - name: gpr_slice_buffer_test
build: test build: test
language: c language: c
@ -2210,6 +2255,32 @@ targets:
- grpc - grpc
- gpr_test_util - gpr_test_util
- gpr - gpr
- name: percent_decode_fuzzer
build: fuzzer
language: c
src:
- test/core/support/percent_decode_fuzzer.c
deps:
- grpc_test_util
- grpc
- gpr_test_util
- gpr
corpus_dirs:
- test/core/support/percent_decode_corpus
maxlen: 32
- name: percent_encode_fuzzer
build: fuzzer
language: c
src:
- test/core/support/percent_encode_fuzzer.c
deps:
- grpc_test_util
- grpc
- gpr_test_util
- gpr
corpus_dirs:
- test/core/support/percent_encode_corpus
maxlen: 32
- name: resolve_address_test - name: resolve_address_test
build: test build: test
language: c language: c

@ -56,7 +56,9 @@ if test "$PHP_GRPC" != "no"; then
src/core/lib/support/log_linux.c \ src/core/lib/support/log_linux.c \
src/core/lib/support/log_posix.c \ src/core/lib/support/log_posix.c \
src/core/lib/support/log_windows.c \ src/core/lib/support/log_windows.c \
src/core/lib/support/mpscq.c \
src/core/lib/support/murmur_hash.c \ src/core/lib/support/murmur_hash.c \
src/core/lib/support/percent_encoding.c \
src/core/lib/support/slice.c \ src/core/lib/support/slice.c \
src/core/lib/support/slice_buffer.c \ src/core/lib/support/slice_buffer.c \
src/core/lib/support/stack_lockfree.c \ src/core/lib/support/stack_lockfree.c \
@ -97,6 +99,7 @@ if test "$PHP_GRPC" != "no"; then
src/core/lib/http/httpcli.c \ src/core/lib/http/httpcli.c \
src/core/lib/http/parser.c \ src/core/lib/http/parser.c \
src/core/lib/iomgr/closure.c \ src/core/lib/iomgr/closure.c \
src/core/lib/iomgr/combiner.c \
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 \
@ -226,7 +229,6 @@ if test "$PHP_GRPC" != "no"; then
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 \
src/core/ext/client_config/client_config.c \
src/core/ext/client_config/client_config_plugin.c \ src/core/ext/client_config/client_config_plugin.c \
src/core/ext/client_config/connector.c \ src/core/ext/client_config/connector.c \
src/core/ext/client_config/default_initial_connect_string.c \ src/core/ext/client_config/default_initial_connect_string.c \
@ -238,8 +240,8 @@ if test "$PHP_GRPC" != "no"; then
src/core/ext/client_config/resolver.c \ src/core/ext/client_config/resolver.c \
src/core/ext/client_config/resolver_factory.c \ src/core/ext/client_config/resolver_factory.c \
src/core/ext/client_config/resolver_registry.c \ src/core/ext/client_config/resolver_registry.c \
src/core/ext/client_config/resolver_result.c \
src/core/ext/client_config/subchannel.c \ src/core/ext/client_config/subchannel.c \
src/core/ext/client_config/subchannel_call_holder.c \
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 \
@ -261,6 +263,7 @@ if test "$PHP_GRPC" != "no"; then
src/core/ext/census/base_resources.c \ src/core/ext/census/base_resources.c \
src/core/ext/census/context.c \ src/core/ext/census/context.c \
src/core/ext/census/gen/census.pb.c \ src/core/ext/census/gen/census.pb.c \
src/core/ext/census/gen/trace_context.pb.c \
src/core/ext/census/grpc_context.c \ src/core/ext/census/grpc_context.c \
src/core/ext/census/grpc_filter.c \ src/core/ext/census/grpc_filter.c \
src/core/ext/census/grpc_plugin.c \ src/core/ext/census/grpc_plugin.c \

@ -1,15 +1 @@
gRPC Fail Fast Semantics Moved to wait-for-ready.md
========================
Fail fast requests allow terminating requests (with status UNAVAILABLE) prior
to the deadline of the request being met.
gRPC implementations of fail fast can terminate requests whenever a channel is
in the TRANSIENT_FAILURE or SHUTDOWN states. If the channel is in any other
state (CONNECTING, READY, or IDLE) the request should not be terminated.
Fail fast SHOULD be the default for gRPC implementations, with an option to
switch to non fail fast.
The opposite of fail fast is 'ignore connectivity'.

@ -0,0 +1,8 @@
Each version of gRPC gets a new description of what the 'g' stands for, since
we've never really been able to figure it out.
Below is a list of already-used definitions (that should not be repeated in the
future), and the corresponding version numbers that used them:
- 1.0 'g' stands for 'gRPC'
- 1.1 'g' stands for 'good'

@ -0,0 +1,30 @@
# HTTP to gRPC Status Code Mapping
Since intermediaries are a common part of HTTP infrastructure some responses to
gRPC requests may be received that do not include the grpc-status header. In
some cases mapping error codes from an intermediary allows the gRPC client to
behave more appropriately to the error situation without overloading the
semantics of either error code.
This table is to be used _only_ for clients that received a response that did
not include grpc-status. If grpc-status was provided, it _must_ be used. Servers
_must not_ use this table to determine an HTTP status code to use; the mappings
are neither symmetric nor 1-to-1.
| HTTP Status Code | gRPC Status Code |
|----------------------------|--------------------|
| 400 Bad Request | INTERNAL |
| 401 Unauthorized | UNAUTHENTICATED |
| 403 Forbidden | PERMISSION\_DENIED |
| 404 Not Found | UNIMPLEMENTED |
| 429 Too Many Requests | UNAVAILABLE |
| 502 Bad Gateway | UNAVAILABLE |
| 503 Service Unavailable | UNAVAILABLE |
| 504 Gateway Timeout | UNAVAILABLE |
| _All other codes_ | UNKNOWN |
Technically, 1xx should have the entire header skipped and a subsequent header
be read. See RFC 7540 §8.1.
200 is UNKNOWN because there should be a grpc-status in case of truly OK
response.

@ -0,0 +1,192 @@
# gRPC Server Reflection Tutorial
gRPC Server Reflection provides information about publicly-accessible gRPC
services on a server, and assists clients at runtime to construct RPC
requests and responses without precompiled service information. It is used by
gRPC CLI, which can be used to introspect server protos and send/receive test
RPCs.
## Enable Server Reflection
### Enable server reflection in C++ servers
C++ Server Reflection is an add-on library, `libgrpc++_reflction`. To enable C++
server reflection, you can link this library to your server binary.
Some platforms (e.g. Ubuntu 11.10 onwards) only link in libraries that directly
contain symbols used by the application. On these platforms, LD flag
`--no-as-needed` is needed for for dynamic linking and `--whole-archive` is
needed for for static linking.
This [Makefile](../examples/cpp/helloworld/Makefile#L37#L45) demonstrates
enabling c++ server reflection on Linux and MacOS.
## Test services using Server Reflection
After enabling Server Reflection in a server application, you can use gRPC CLI
to test its services.
Instructions on how to use gRPC CLI can be found at
[command_line_tool.md](command_line_tool.md), or using `grpc_cli help` command.
Here we use `examples/cpp/helloworld` as an example to show the use of gRPC
Server Reflection and gRPC CLI. First, we need to build gRPC CLI and setup an
example server with Server Reflection enabled.
- Setup an example server
Server Reflection has already been enabled in the
[Makefile](../examples/cpp/helloworld/Makefile) of the helloworld example. We
can simply make it and run the greeter_server.
```sh
$ make -C examples/cpp/helloworld
$ examples/cpp/helloworld/greeter_server &
```
- Build gRPC CLI
```sh
make grpc_cli
cd bins/opt
```
gRPC CLI binary `grpc_cli` can be found at `bins/opt/` folder. This tool is
still new and does not have a `make install` target yet.
### List services
`grpc_cli ls` command lists services and methods exposed at a given port
- List all the services exposed at a given port
```sh
$ grpc_cli ls localhost:50051
```
output:
```sh
helloworld.Greeter
grpc.reflection.v1alpha.ServerReflection
```
- List one service with details
`grpc_cli ls` command inspects a service given its full name (in the format of
\<package\>.\<service\>). It can print information with a long listing format
when `-l` flag is set. This flag can be used to get more details about a
service.
```sh
$ grpc_cli ls localhost:50051 helloworld.Greeter -l
```
output:
```sh
filename: helloworld.proto
package: helloworld;
service Greeter {
rpc SayHello(helloworld.HelloRequest) returns (helloworld.HelloReply) {}
}
```
### List methods
- List one method with details
`grpc_cli ls` command also inspects a method given its full name (in the
format of \<package\>.\<service\>.\<method\>).
```sh
$ grpc_cli ls localhost:50051 helloworld.Greeter.SayHello -l
```
output:
```sh
rpc SayHello(helloworld.HelloRequest) returns (helloworld.HelloReply) {}
```
### Inspect message types
We can use`grpc_cli type` command to inspect request/response types given the
full name of the type (in the format of \<package\>.\<type\>).
- Get information about the request type
```sh
$ grpc_cli type localhost:50051 helloworld.HelloRequest
```
output:
```sh
message HelloRequest {
optional string name = 1;
}
```
### Call a remote method
We can send RPCs to a server and get responses using `grpc_cli call` command.
- Call a unary method
```sh
$ grpc_cli call localhost:50051 SayHello "name: 'gRPC CLI'"
```
output:
```sh
message: "Hello gRPC CLI"
```
## Use Server Reflection in a C++ client
Server Reflection can be used by clients to get information about gRPC services
at runtime. We've provided a descriptor database called
[grpc::ProtoReflectionDescriptorDatabase](../test/cpp/util/proto_reflection_descriptor_database.h)
which implements the
[google::protobuf::DescriptorDatabase](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.descriptor_database#DescriptorDatabase)
interface. It manages the communication between clients and reflection services
and the storage of received information. Clients can use it as using a local
descriptor database.
- To use Server Reflection with grpc::ProtoReflectionDescriptorDatabase, first
initialize an instance with a grpc::Channel.
```c++
std::shared_ptr<grpc::Channel> channel =
grpc::CreateChannel(server_address, server_cred);
grpc::ProtoReflectionDescriptorDatabase reflection_db(channel);
```
- Then use this instance to feed a
[google::protobuf::DescriptorPool](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.descriptor#DescriptorPool).
```c++
google::protobuf::DescriptorPool desc_pool(&reflection_db);
```
- Example usage of this descriptor pool
* Get Service/method descriptors.
```c++
const google::protobuf::ServiceDescriptor* service_desc =
desc_pool->FindServiceByName("helloworld.Greeter");
const google::protobuf::MethodDescriptor* method_desc =
desc_pool->FindMethodByName("helloworld.Greeter.SayHello");
```
* Get message type descriptors.
```c++
const google::protobuf::Descriptor* request_desc =
desc_pool->FindMessageTypeByName("helloworld.HelloRequest");
```
* Feed [google::protobuf::DynamicMessageFactory](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.dynamic_message#DynamicMessageFactory).
```c++
google::protobuf::DynamicMessageFactory(&desc_pool);
```

@ -0,0 +1,14 @@
gRPC Wait for Ready Semantics
=============================
If an RPC is issued but the channel is in `TRANSIENT_FAILURE` or `SHUTDOWN`
states, the RPC is unable to be transmited promptly. By default, gRPC
implementations SHOULD fail such RPCs immediately. This is known as "fail fast,"
but usage of the term is historical. RPCs SHOULD NOT fail as a result of the
channel being in other states (`CONNECTING`, `READY`, or `IDLE`).
gRPC implementations MAY provide a per-RPC option to not fail RPCs as a result
of the channel being in `TRANSIENT_FAILURE` state. Instead, the implementation
queues the RPCs until the channel is `READY`. This is known as "wait for ready."
The RPCs SHOULD still fail before `READY` if there are unrelated reasons, such
as the channel is `SHUTDOWN` or the RPC's deadline is reached.

@ -0,0 +1,4 @@
The roots.pem file is periodically generated from:
https://hg.mozilla.org/mozilla-central/raw-file/tip/security/nss/lib/ckfw/builtins/certdata.txt
using
https://github.com/agl/extract-nss-root-certs

@ -5387,3 +5387,42 @@ BggqhkjOPQQDAwNpADBmAjEAj6jcnboMBBf6Fek9LykBl7+BFjNAk2z8+e2AcG+q
j9uEwov1NcoG3GRvaBbhj5G5AjEA2Euly8LQCGzpGPta3U1fJAuwACEl74+nBCZx j9uEwov1NcoG3GRvaBbhj5G5AjEA2Euly8LQCGzpGPta3U1fJAuwACEl74+nBCZx
4nxp5V2a+EEfOzmTk51V6s2N8fvB 4nxp5V2a+EEfOzmTk51V6s2N8fvB
-----END CERTIFICATE----- -----END CERTIFICATE-----
# Issuer: CN=ISRG Root X1 O=Internet Security Research Group
# Subject: CN=ISRG Root X1 O=Internet Security Research Group
# Label: "ISRG Root X1"
# Serial: 172886928669790476064670243504169061120
# MD5 Fingerprint: 0c:d2:f9:e0:da:17:73:e9:ed:86:4d:a5:e3:70:e7:4e
# SHA1 Fingerprint: ca:bd:2a:79:a1:07:6a:31:f2:1d:25:36:35:cb:03:9d:43:29:a5:e8
# SHA256 Fingerprint: 96:bc:ec:06:26:49:76:f3:74:60:77:9a:cf:28:c5:a7:cf:e8:a3:c0:aa:e1:1a:8f:fc:ee:05:c0:bd:df:08:c6
-----BEGIN CERTIFICATE-----
MIIFazCCA1OgAwIBAgIRAIIQz7DSQONZRGPgu2OCiwAwDQYJKoZIhvcNAQELBQAw
TzELMAkGA1UEBhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2Vh
cmNoIEdyb3VwMRUwEwYDVQQDEwxJU1JHIFJvb3QgWDEwHhcNMTUwNjA0MTEwNDM4
WhcNMzUwNjA0MTEwNDM4WjBPMQswCQYDVQQGEwJVUzEpMCcGA1UEChMgSW50ZXJu
ZXQgU2VjdXJpdHkgUmVzZWFyY2ggR3JvdXAxFTATBgNVBAMTDElTUkcgUm9vdCBY
MTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAK3oJHP0FDfzm54rVygc
h77ct984kIxuPOZXoHj3dcKi/vVqbvYATyjb3miGbESTtrFj/RQSa78f0uoxmyF+
0TM8ukj13Xnfs7j/EvEhmkvBioZxaUpmZmyPfjxwv60pIgbz5MDmgK7iS4+3mX6U
A5/TR5d8mUgjU+g4rk8Kb4Mu0UlXjIB0ttov0DiNewNwIRt18jA8+o+u3dpjq+sW
T8KOEUt+zwvo/7V3LvSye0rgTBIlDHCNAymg4VMk7BPZ7hm/ELNKjD+Jo2FR3qyH
B5T0Y3HsLuJvW5iB4YlcNHlsdu87kGJ55tukmi8mxdAQ4Q7e2RCOFvu396j3x+UC
B5iPNgiV5+I3lg02dZ77DnKxHZu8A/lJBdiB3QW0KtZB6awBdpUKD9jf1b0SHzUv
KBds0pjBqAlkd25HN7rOrFleaJ1/ctaJxQZBKT5ZPt0m9STJEadao0xAH0ahmbWn
OlFuhjuefXKnEgV4We0+UXgVCwOPjdAvBbI+e0ocS3MFEvzG6uBQE3xDk3SzynTn
jh8BCNAw1FtxNrQHusEwMFxIt4I7mKZ9YIqioymCzLq9gwQbooMDQaHWBfEbwrbw
qHyGO0aoSCqI3Haadr8faqU9GY/rOPNk3sgrDQoo//fb4hVC1CLQJ13hef4Y53CI
rU7m2Ys6xt0nUW7/vGT1M0NPAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNV
HRMBAf8EBTADAQH/MB0GA1UdDgQWBBR5tFnme7bl5AFzgAiIyBpY9umbbjANBgkq
hkiG9w0BAQsFAAOCAgEAVR9YqbyyqFDQDLHYGmkgJykIrGF1XIpu+ILlaS/V9lZL
ubhzEFnTIZd+50xx+7LSYK05qAvqFyFWhfFQDlnrzuBZ6brJFe+GnY+EgPbk6ZGQ
3BebYhtF8GaV0nxvwuo77x/Py9auJ/GpsMiu/X1+mvoiBOv/2X/qkSsisRcOj/KK
NFtY2PwByVS5uCbMiogziUwthDyC3+6WVwW6LLv3xLfHTjuCvjHIInNzktHCgKQ5
ORAzI4JMPJ+GslWYHb4phowim57iaztXOoJwTdwJx4nLCgdNbOhdjsnvzqvHu7Ur
TkXWStAmzOVyyghqpZXjFaH3pO3JLF+l+/+sKAIuvtd7u+Nxe5AW0wdeRlN8NwdC
jNPElpzVmbUq4JUagEiuTDkHzsxHpFKVK7q4+63SM1N95R1NbdWhscdCb+ZAJzVc
oyi3B43njTOQ5yOf+1CceWxG1bQVs5ZufpsMljq4Ui0/1lvh+wjChP4kqKOJ2qxq
4RgqsahDYVvTH9w7jXbyLeiNdd8XM2w9U/t7y0Ff/9yi0GE44Za4rF2LN9d11TPA
mRGunUHBcnWEvgJBQl9nJEiU0Zsnvgc/ubhPgXRR4Xq37Z0j4r7g1SgEEzwxA57d
emyPxgcYxn/eR44/KJ4EBs+lVDR3veyJm+kXQ99b21/+jh5Xos1AnX5iItreGCc=
-----END CERTIFICATE-----

@ -36,6 +36,7 @@
#include <string> #include <string>
#include <grpc++/grpc++.h> #include <grpc++/grpc++.h>
#include <grpc/support/log.h>
#include "helloworld.grpc.pb.h" #include "helloworld.grpc.pb.h"

@ -36,6 +36,7 @@
#include <string> #include <string>
#include <grpc++/grpc++.h> #include <grpc++/grpc++.h>
#include <grpc/support/log.h>
#include <thread> #include <thread>
#include "helloworld.grpc.pb.h" #include "helloworld.grpc.pb.h"

@ -37,6 +37,7 @@
#include <thread> #include <thread>
#include <grpc++/grpc++.h> #include <grpc++/grpc++.h>
#include <grpc/support/log.h>
#include "helloworld.grpc.pb.h" #include "helloworld.grpc.pb.h"

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

@ -5,8 +5,8 @@
"debugType": "portable", "debugType": "portable",
}, },
"dependencies": { "dependencies": {
"Google.Protobuf": "3.0.0-beta3", "Google.Protobuf": "3.0.0",
"Grpc": "1.0.0-pre1", "Grpc": "1.0.0",
}, },
"frameworks": { "frameworks": {
"net45": { "net45": {

@ -6,8 +6,8 @@
"emitEntryPoint": "true" "emitEntryPoint": "true"
}, },
"dependencies": { "dependencies": {
"Google.Protobuf": "3.0.0-beta3", "Google.Protobuf": "3.0.0",
"Grpc": "1.0.0-pre1", "Grpc": "1.0.0",
"Greeter": { "Greeter": {
"target": "project" "target": "project"
} }

@ -6,8 +6,8 @@
"emitEntryPoint": "true" "emitEntryPoint": "true"
}, },
"dependencies": { "dependencies": {
"Google.Protobuf": "3.0.0-beta3", "Google.Protobuf": "3.0.0",
"Grpc": "1.0.0-pre1", "Grpc": "1.0.0",
"Greeter": { "Greeter": {
"target": "project" "target": "project"
} }

@ -33,16 +33,16 @@
<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-beta3\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath> <HintPath>..\packages\Google.Protobuf.3.0.0\lib\net45\Google.Protobuf.dll</HintPath>
</Reference> </Reference>
<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.15.0\lib\net45\Grpc.Core.dll</HintPath> <HintPath>..\packages\Grpc.Core.1.0.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">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Ix-Async.1.2.5\lib\net45\System.Interactive.Async.dll</HintPath> <HintPath>..\packages\System.Interactive.Async.3.0.0\lib\net45\System.Interactive.Async.dll</HintPath>
</Reference> </Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@ -61,11 +61,11 @@
<None Include="packages.config" /> <None Include="packages.config" />
</ItemGroup> </ItemGroup>
<ItemGroup /> <ItemGroup />
<Import Project="..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets')" /> <Import Project="..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <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.15.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets'))" /> <Error Condition="!Exists('..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets'))" />
</Target> </Target>
</Project> </Project>

@ -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-beta3" targetFramework="net45" /> <package id="Google.Protobuf" version="3.0.0" targetFramework="net45" />
<package id="Grpc" version="0.15.0" targetFramework="net45" /> <package id="Grpc" version="1.0.0" targetFramework="net45" />
<package id="Grpc.Core" version="0.15.0" targetFramework="net45" /> <package id="Grpc.Core" version="1.0.0" targetFramework="net45" />
<package id="Ix-Async" version="1.2.5" targetFramework="net45" /> <package id="System.Interactive.Async" version="3.0.0" targetFramework="net45" />
<package id="Grpc.Tools" version="0.15.0" targetFramework="net45" /> <package id="Grpc.Tools" version="1.0.0" targetFramework="net45" />
</packages> </packages>

@ -33,16 +33,16 @@
<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-beta3\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath> <HintPath>..\packages\Google.Protobuf.3.0.0\lib\net45\Google.Protobuf.dll</HintPath>
</Reference> </Reference>
<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.15.0\lib\net45\Grpc.Core.dll</HintPath> <HintPath>..\packages\Grpc.Core.1.0.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">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Ix-Async.1.2.5\lib\net45\System.Interactive.Async.dll</HintPath> <HintPath>..\packages\System.Interactive.Async.3.0.0\lib\net45\System.Interactive.Async.dll</HintPath>
</Reference> </Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@ -59,11 +59,11 @@
<ItemGroup> <ItemGroup>
<None Include="packages.config" /> <None Include="packages.config" />
</ItemGroup> </ItemGroup>
<Import Project="..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets')" /> <Import Project="..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <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.15.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets'))" /> <Error Condition="!Exists('..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets'))" />
</Target> </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-beta3" targetFramework="net45" /> <package id="Google.Protobuf" version="3.0.0" targetFramework="net45" />
<package id="Grpc" version="0.15.0" targetFramework="net45" /> <package id="Grpc" version="1.0.0" targetFramework="net45" />
<package id="Grpc.Core" version="0.15.0" targetFramework="net45" /> <package id="Grpc.Core" version="1.0.0" targetFramework="net45" />
<package id="Ix-Async" version="1.2.5" targetFramework="net45" /> <package id="System.Interactive.Async" version="3.0.0" targetFramework="net45" />
</packages> </packages>

@ -33,16 +33,16 @@
<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-beta3\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath> <HintPath>..\packages\Google.Protobuf.3.0.0\lib\net45\Google.Protobuf.dll</HintPath>
</Reference> </Reference>
<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.15.0\lib\net45\Grpc.Core.dll</HintPath> <HintPath>..\packages\Grpc.Core.1.0.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">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Ix-Async.1.2.5\lib\net45\System.Interactive.Async.dll</HintPath> <HintPath>..\packages\System.Interactive.Async.3.0.0\lib\net45\System.Interactive.Async.dll</HintPath>
</Reference> </Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@ -59,11 +59,11 @@
<ItemGroup> <ItemGroup>
<None Include="packages.config" /> <None Include="packages.config" />
</ItemGroup> </ItemGroup>
<Import Project="..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets')" /> <Import Project="..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <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.15.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets'))" /> <Error Condition="!Exists('..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets'))" />
</Target> </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-beta3" targetFramework="net45" /> <package id="Google.Protobuf" version="3.0.0" targetFramework="net45" />
<package id="Grpc" version="0.15.0" targetFramework="net45" /> <package id="Grpc" version="1.0.0" targetFramework="net45" />
<package id="Grpc.Core" version="0.15.0" targetFramework="net45" /> <package id="Grpc.Core" version="1.0.0" targetFramework="net45" />
<package id="Ix-Async" version="1.2.5" targetFramework="net45" /> <package id="System.Interactive.Async" version="3.0.0" 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.15.0\tools\windows_x86 set TOOLS_PATH=packages\Grpc.Tools.1.0.0\tools\windows_x86
%TOOLS_PATH%\protoc.exe -I../../protos --csharp_out Greeter ../../protos/helloworld.proto --grpc_out Greeter --plugin=protoc-gen-grpc=%TOOLS_PATH%\grpc_csharp_plugin.exe %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

@ -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-beta3\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath> <HintPath>..\packages\Google.Protobuf.3.0.0\lib\net45\Google.Protobuf.dll</HintPath>
</Reference> </Reference>
<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.15.0\lib\net45\Grpc.Core.dll</HintPath> <HintPath>..\packages\Grpc.Core.1.0.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>
@ -52,7 +52,7 @@
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<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">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Ix-Async.1.2.5\lib\net45\System.Interactive.Async.dll</HintPath> <HintPath>..\packages\System.Interactive.Async.3.0.0\lib\net45\System.Interactive.Async.dll</HintPath>
</Reference> </Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@ -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.15.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets')" /> <Import Project="..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <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.15.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets'))" /> <Error Condition="!Exists('..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets'))" />
</Target> </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-beta3" targetFramework="net45" /> <package id="Google.Protobuf" version="3.0.0" targetFramework="net45" />
<package id="Grpc" version="0.15.0" targetFramework="net45" /> <package id="Grpc" version="1.0.0" targetFramework="net45" />
<package id="Grpc.Core" version="0.15.0" targetFramework="net45" /> <package id="Grpc.Core" version="1.0.0" targetFramework="net45" />
<package id="Ix-Async" version="1.2.5" targetFramework="net45" /> <package id="System.Interactive.Async" version="3.0.0" targetFramework="net45" />
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" /> <package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
</packages> </packages>

@ -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-beta3\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath> <HintPath>..\packages\Google.Protobuf.3.0.0\lib\net45\Google.Protobuf.dll</HintPath>
</Reference> </Reference>
<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.15.0\lib\net45\Grpc.Core.dll</HintPath> <HintPath>..\packages\Grpc.Core.1.0.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>
@ -49,7 +49,7 @@
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<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">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Ix-Async.1.2.5\lib\net45\System.Interactive.Async.dll</HintPath> <HintPath>..\packages\System.Interactive.Async.3.0.0\lib\net45\System.Interactive.Async.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Data.DataSetExtensions" />
@ -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.15.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets')" /> <Import Project="..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <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.15.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets'))" /> <Error Condition="!Exists('..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets'))" />
</Target> </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-beta3" targetFramework="net45" /> <package id="Google.Protobuf" version="3.0.0" targetFramework="net45" />
<package id="Grpc" version="0.15.0" targetFramework="net45" /> <package id="Grpc" version="1.0.0" targetFramework="net45" />
<package id="Grpc.Core" version="0.15.0" targetFramework="net45" /> <package id="Grpc.Core" version="1.0.0" targetFramework="net45" />
<package id="Ix-Async" version="1.2.5" targetFramework="net45" /> <package id="System.Interactive.Async" version="3.0.0" targetFramework="net45" />
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" /> <package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
</packages> </packages>

@ -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-beta3\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll</HintPath> <HintPath>..\packages\Google.Protobuf.3.0.0\lib\net45\Google.Protobuf.dll</HintPath>
</Reference> </Reference>
<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.15.0\lib\net45\Grpc.Core.dll</HintPath> <HintPath>..\packages\Grpc.Core.1.0.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>
@ -54,7 +54,7 @@
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<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">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Ix-Async.1.2.5\lib\net45\System.Interactive.Async.dll</HintPath> <HintPath>..\packages\System.Interactive.Async.3.0.0\lib\net45\System.Interactive.Async.dll</HintPath>
</Reference> </Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@ -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.15.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets')" /> <Import Project="..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <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.15.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.0.15.0\build\net45\Grpc.Core.targets'))" /> <Error Condition="!Exists('..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.1.0.0\build\net45\Grpc.Core.targets'))" />
</Target> </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,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Google.Protobuf" version="3.0.0-beta3" targetFramework="net45" /> <package id="Google.Protobuf" version="3.0.0" targetFramework="net45" />
<package id="Grpc" version="0.15.0" targetFramework="net45" /> <package id="Grpc" version="1.0.0" targetFramework="net45" />
<package id="Grpc.Core" version="0.15.0" targetFramework="net45" /> <package id="Grpc.Core" version="1.0.0" targetFramework="net45" />
<package id="Ix-Async" version="1.2.5" targetFramework="net45" /> <package id="System.Interactive.Async" version="3.0.0" targetFramework="net45" />
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" /> <package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
<package id="Grpc.Tools" version="0.15.0" targetFramework="net45" /> <package id="Grpc.Tools" version="1.0.0" 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.15.0\tools\windows_x86 set TOOLS_PATH=packages\Grpc.Tools.1.0.0\tools\windows_x86
%TOOLS_PATH%\protoc.exe -I../../protos --csharp_out RouteGuide ../../protos/route_guide.proto --grpc_out RouteGuide --plugin=protoc-gen-grpc=%TOOLS_PATH%\grpc_csharp_plugin.exe %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

@ -39,7 +39,7 @@ There are two ways to generate the code needed to work with protocol buffers in
$ # from this directory $ # from this directory
$ node ./dynamic_codegen/greeter_client.js $ node ./dynamic_codegen/greeter_client.js
$ # OR $ # OR
$ node ./dynamic_codegen/greeter_client.js $ node ./static_codegen/greeter_client.js
``` ```
TUTORIAL TUTORIAL

@ -2,6 +2,6 @@
"name": "grpc/grpc-demo", "name": "grpc/grpc-demo",
"description": "gRPC example for PHP", "description": "gRPC example for PHP",
"require": { "require": {
"grpc/grpc": "v1.0.0", "grpc/grpc": "v1.0.0"
} }
} }

@ -30,5 +30,5 @@
set -e set -e
cd $(dirname $0) cd $(dirname $0)
php $extension_dir -d extension=grpc.so -d max_execution_time=300 \ php -d extension=grpc.so -d max_execution_time=300 \
greeter_client.php $1 greeter_client.php $1

@ -1,56 +1 @@
gRPC in 3 minutes (Python) [This code's documentation lives on the grpc.io site.](http://www.grpc.io/docs/quickstart/python.html)
========================
Background
-------------
For this sample, we've already generated the server and client stubs from
[helloworld.proto][] and we'll be using a specific reference platform.
Install gRPC:
```sh
$ pip install grpcio
```
Or, to install it system wide:
```sh
$ sudo pip install grpcio
```
If you're on Windows, make sure you installed the `pip.exe` component when you
installed Python. Invoke as above but with `pip.exe` instead of `pip` (you may
also need to invoke from a `cmd.exe` ran as administrator):
```sh
$ pip.exe install grpcio
```
Download the example
```sh
$ # Clone the repository to get the example code:
$ git clone https://github.com/grpc/grpc
$ # Navigate to the "hello, world" Python example:
$ cd grpc/examples/python/helloworld
```
Try it!
-------
- Run the server
```sh
$ python2.7 greeter_server.py &
```
- Run the client
```sh
$ python2.7 greeter_client.py
```
Tutorial
--------
You can find a more detailed tutorial in [gRPC Basics: Python][]
[helloworld.proto]:../protos/helloworld.proto
[Install gRPC Python]:../../src/python#installation
[gRPC Basics: Python]:http://www.grpc.io/docs/tutorials/basic/python.html

@ -1 +1 @@
[This code's documentation lives on the grpc.io site.](http://www.grpc.io/docs) [This code's documentation lives on the grpc.io site.](http://www.grpc.io/docs/quickstart/python.html)

@ -1 +1,3 @@
An example showing two stubs sharing a channel and two servicers sharing a server. An example showing two stubs sharing a channel and two servicers sharing a server.
More complete documentation lives at [grpc.io](http://www.grpc.io/docs/tutorials/basic/python.html).

@ -144,20 +144,17 @@ Pod::Spec.new do |s|
'include/grpc/support/tls_msvc.h', 'include/grpc/support/tls_msvc.h',
'include/grpc/support/tls_pthread.h', 'include/grpc/support/tls_pthread.h',
'include/grpc/support/useful.h', 'include/grpc/support/useful.h',
'include/grpc/impl/codegen/alloc.h',
'include/grpc/impl/codegen/atm.h', 'include/grpc/impl/codegen/atm.h',
'include/grpc/impl/codegen/atm_gcc_atomic.h', 'include/grpc/impl/codegen/atm_gcc_atomic.h',
'include/grpc/impl/codegen/atm_gcc_sync.h', 'include/grpc/impl/codegen/atm_gcc_sync.h',
'include/grpc/impl/codegen/atm_windows.h', 'include/grpc/impl/codegen/atm_windows.h',
'include/grpc/impl/codegen/log.h', 'include/grpc/impl/codegen/gpr_types.h',
'include/grpc/impl/codegen/port_platform.h', 'include/grpc/impl/codegen/port_platform.h',
'include/grpc/impl/codegen/slice.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.h',
'include/grpc/impl/codegen/sync_generic.h', 'include/grpc/impl/codegen/sync_generic.h',
'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/byte_buffer.h', 'include/grpc/byte_buffer.h',
'include/grpc/byte_buffer_reader.h', 'include/grpc/byte_buffer_reader.h',
'include/grpc/compression.h', 'include/grpc/compression.h',
@ -165,27 +162,23 @@ Pod::Spec.new do |s|
'include/grpc/grpc_posix.h', 'include/grpc/grpc_posix.h',
'include/grpc/grpc_security_constants.h', 'include/grpc/grpc_security_constants.h',
'include/grpc/status.h', 'include/grpc/status.h',
'include/grpc/impl/codegen/byte_buffer.h',
'include/grpc/impl/codegen/byte_buffer_reader.h', 'include/grpc/impl/codegen/byte_buffer_reader.h',
'include/grpc/impl/codegen/compression_types.h', 'include/grpc/impl/codegen/compression_types.h',
'include/grpc/impl/codegen/connectivity_state.h', 'include/grpc/impl/codegen/connectivity_state.h',
'include/grpc/impl/codegen/grpc_types.h', 'include/grpc/impl/codegen/grpc_types.h',
'include/grpc/impl/codegen/propagation_bits.h', 'include/grpc/impl/codegen/propagation_bits.h',
'include/grpc/impl/codegen/status.h', 'include/grpc/impl/codegen/status.h',
'include/grpc/impl/codegen/alloc.h',
'include/grpc/impl/codegen/atm.h', 'include/grpc/impl/codegen/atm.h',
'include/grpc/impl/codegen/atm_gcc_atomic.h', 'include/grpc/impl/codegen/atm_gcc_atomic.h',
'include/grpc/impl/codegen/atm_gcc_sync.h', 'include/grpc/impl/codegen/atm_gcc_sync.h',
'include/grpc/impl/codegen/atm_windows.h', 'include/grpc/impl/codegen/atm_windows.h',
'include/grpc/impl/codegen/log.h', 'include/grpc/impl/codegen/gpr_types.h',
'include/grpc/impl/codegen/port_platform.h', 'include/grpc/impl/codegen/port_platform.h',
'include/grpc/impl/codegen/slice.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.h',
'include/grpc/impl/codegen/sync_generic.h', 'include/grpc/impl/codegen/sync_generic.h',
'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/grpc_security.h', 'include/grpc/grpc_security.h',
'include/grpc/census.h' 'include/grpc/census.h'
end end
@ -200,7 +193,9 @@ Pod::Spec.new do |s|
'src/core/lib/support/backoff.h', 'src/core/lib/support/backoff.h',
'src/core/lib/support/block_annotate.h', 'src/core/lib/support/block_annotate.h',
'src/core/lib/support/env.h', 'src/core/lib/support/env.h',
'src/core/lib/support/mpscq.h',
'src/core/lib/support/murmur_hash.h', 'src/core/lib/support/murmur_hash.h',
'src/core/lib/support/percent_encoding.h',
'src/core/lib/support/stack_lockfree.h', 'src/core/lib/support/stack_lockfree.h',
'src/core/lib/support/string.h', 'src/core/lib/support/string.h',
'src/core/lib/support/string_windows.h', 'src/core/lib/support/string_windows.h',
@ -227,7 +222,9 @@ Pod::Spec.new do |s|
'src/core/lib/support/log_linux.c', 'src/core/lib/support/log_linux.c',
'src/core/lib/support/log_posix.c', 'src/core/lib/support/log_posix.c',
'src/core/lib/support/log_windows.c', 'src/core/lib/support/log_windows.c',
'src/core/lib/support/mpscq.c',
'src/core/lib/support/murmur_hash.c', 'src/core/lib/support/murmur_hash.c',
'src/core/lib/support/percent_encoding.c',
'src/core/lib/support/slice.c', 'src/core/lib/support/slice.c',
'src/core/lib/support/slice_buffer.c', 'src/core/lib/support/slice_buffer.c',
'src/core/lib/support/stack_lockfree.c', 'src/core/lib/support/stack_lockfree.c',
@ -268,6 +265,7 @@ Pod::Spec.new do |s|
'src/core/lib/http/httpcli.h', 'src/core/lib/http/httpcli.h',
'src/core/lib/http/parser.h', 'src/core/lib/http/parser.h',
'src/core/lib/iomgr/closure.h', 'src/core/lib/iomgr/closure.h',
'src/core/lib/iomgr/combiner.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/error.h',
@ -379,7 +377,6 @@ Pod::Spec.new do |s|
'src/core/lib/tsi/transport_security_interface.h', 'src/core/lib/tsi/transport_security_interface.h',
'src/core/ext/client_config/client_channel.h', 'src/core/ext/client_config/client_channel.h',
'src/core/ext/client_config/client_channel_factory.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/connector.h',
'src/core/ext/client_config/initial_connect_string.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.h',
@ -389,8 +386,8 @@ Pod::Spec.new do |s|
'src/core/ext/client_config/resolver.h', 'src/core/ext/client_config/resolver.h',
'src/core/ext/client_config/resolver_factory.h', 'src/core/ext/client_config/resolver_factory.h',
'src/core/ext/client_config/resolver_registry.h', 'src/core/ext/client_config/resolver_registry.h',
'src/core/ext/client_config/resolver_result.h',
'src/core/ext/client_config/subchannel.h', 'src/core/ext/client_config/subchannel.h',
'src/core/ext/client_config/subchannel_call_holder.h',
'src/core/ext/client_config/subchannel_index.h', 'src/core/ext/client_config/subchannel_index.h',
'src/core/ext/client_config/uri_parser.h', 'src/core/ext/client_config/uri_parser.h',
'src/core/ext/lb_policy/grpclb/grpclb.h', 'src/core/ext/lb_policy/grpclb/grpclb.h',
@ -407,6 +404,7 @@ Pod::Spec.new do |s|
'src/core/ext/census/census_interface.h', 'src/core/ext/census/census_interface.h',
'src/core/ext/census/census_rpc_stats.h', 'src/core/ext/census/census_rpc_stats.h',
'src/core/ext/census/gen/census.pb.h', 'src/core/ext/census/gen/census.pb.h',
'src/core/ext/census/gen/trace_context.pb.h',
'src/core/ext/census/grpc_filter.h', 'src/core/ext/census/grpc_filter.h',
'src/core/ext/census/mlog.h', 'src/core/ext/census/mlog.h',
'src/core/ext/census/resource.h', 'src/core/ext/census/resource.h',
@ -427,6 +425,7 @@ Pod::Spec.new do |s|
'src/core/lib/http/httpcli.c', 'src/core/lib/http/httpcli.c',
'src/core/lib/http/parser.c', 'src/core/lib/http/parser.c',
'src/core/lib/iomgr/closure.c', 'src/core/lib/iomgr/closure.c',
'src/core/lib/iomgr/combiner.c',
'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',
@ -556,7 +555,6 @@ Pod::Spec.new do |s|
'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',
'src/core/ext/client_config/client_config.c',
'src/core/ext/client_config/client_config_plugin.c', 'src/core/ext/client_config/client_config_plugin.c',
'src/core/ext/client_config/connector.c', 'src/core/ext/client_config/connector.c',
'src/core/ext/client_config/default_initial_connect_string.c', 'src/core/ext/client_config/default_initial_connect_string.c',
@ -568,8 +566,8 @@ Pod::Spec.new do |s|
'src/core/ext/client_config/resolver.c', 'src/core/ext/client_config/resolver.c',
'src/core/ext/client_config/resolver_factory.c', 'src/core/ext/client_config/resolver_factory.c',
'src/core/ext/client_config/resolver_registry.c', 'src/core/ext/client_config/resolver_registry.c',
'src/core/ext/client_config/resolver_result.c',
'src/core/ext/client_config/subchannel.c', 'src/core/ext/client_config/subchannel.c',
'src/core/ext/client_config/subchannel_call_holder.c',
'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',
@ -591,6 +589,7 @@ Pod::Spec.new do |s|
'src/core/ext/census/base_resources.c', 'src/core/ext/census/base_resources.c',
'src/core/ext/census/context.c', 'src/core/ext/census/context.c',
'src/core/ext/census/gen/census.pb.c', 'src/core/ext/census/gen/census.pb.c',
'src/core/ext/census/gen/trace_context.pb.c',
'src/core/ext/census/grpc_context.c', 'src/core/ext/census/grpc_context.c',
'src/core/ext/census/grpc_filter.c', 'src/core/ext/census/grpc_filter.c',
'src/core/ext/census/grpc_plugin.c', 'src/core/ext/census/grpc_plugin.c',
@ -606,7 +605,9 @@ Pod::Spec.new do |s|
'src/core/lib/support/backoff.h', 'src/core/lib/support/backoff.h',
'src/core/lib/support/block_annotate.h', 'src/core/lib/support/block_annotate.h',
'src/core/lib/support/env.h', 'src/core/lib/support/env.h',
'src/core/lib/support/mpscq.h',
'src/core/lib/support/murmur_hash.h', 'src/core/lib/support/murmur_hash.h',
'src/core/lib/support/percent_encoding.h',
'src/core/lib/support/stack_lockfree.h', 'src/core/lib/support/stack_lockfree.h',
'src/core/lib/support/string.h', 'src/core/lib/support/string.h',
'src/core/lib/support/string_windows.h', 'src/core/lib/support/string_windows.h',
@ -629,6 +630,7 @@ Pod::Spec.new do |s|
'src/core/lib/http/httpcli.h', 'src/core/lib/http/httpcli.h',
'src/core/lib/http/parser.h', 'src/core/lib/http/parser.h',
'src/core/lib/iomgr/closure.h', 'src/core/lib/iomgr/closure.h',
'src/core/lib/iomgr/combiner.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/error.h',
@ -740,7 +742,6 @@ Pod::Spec.new do |s|
'src/core/lib/tsi/transport_security_interface.h', 'src/core/lib/tsi/transport_security_interface.h',
'src/core/ext/client_config/client_channel.h', 'src/core/ext/client_config/client_channel.h',
'src/core/ext/client_config/client_channel_factory.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/connector.h',
'src/core/ext/client_config/initial_connect_string.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.h',
@ -750,8 +751,8 @@ Pod::Spec.new do |s|
'src/core/ext/client_config/resolver.h', 'src/core/ext/client_config/resolver.h',
'src/core/ext/client_config/resolver_factory.h', 'src/core/ext/client_config/resolver_factory.h',
'src/core/ext/client_config/resolver_registry.h', 'src/core/ext/client_config/resolver_registry.h',
'src/core/ext/client_config/resolver_result.h',
'src/core/ext/client_config/subchannel.h', 'src/core/ext/client_config/subchannel.h',
'src/core/ext/client_config/subchannel_call_holder.h',
'src/core/ext/client_config/subchannel_index.h', 'src/core/ext/client_config/subchannel_index.h',
'src/core/ext/client_config/uri_parser.h', 'src/core/ext/client_config/uri_parser.h',
'src/core/ext/lb_policy/grpclb/grpclb.h', 'src/core/ext/lb_policy/grpclb/grpclb.h',
@ -768,6 +769,7 @@ Pod::Spec.new do |s|
'src/core/ext/census/census_interface.h', 'src/core/ext/census/census_interface.h',
'src/core/ext/census/census_rpc_stats.h', 'src/core/ext/census/census_rpc_stats.h',
'src/core/ext/census/gen/census.pb.h', 'src/core/ext/census/gen/census.pb.h',
'src/core/ext/census/gen/trace_context.pb.h',
'src/core/ext/census/grpc_filter.h', 'src/core/ext/census/grpc_filter.h',
'src/core/ext/census/mlog.h', 'src/core/ext/census/mlog.h',
'src/core/ext/census/resource.h', 'src/core/ext/census/resource.h',

@ -1,4 +1,14 @@
EXPORTS EXPORTS
grpc_raw_byte_buffer_create
grpc_raw_compressed_byte_buffer_create
grpc_byte_buffer_copy
grpc_byte_buffer_length
grpc_byte_buffer_destroy
grpc_byte_buffer_reader_init
grpc_byte_buffer_reader_destroy
grpc_byte_buffer_reader_next
grpc_byte_buffer_reader_readall
grpc_raw_byte_buffer_from_reader
census_initialize census_initialize
census_shutdown census_shutdown
census_supported census_supported
@ -42,6 +52,7 @@ EXPORTS
grpc_init grpc_init
grpc_shutdown grpc_shutdown
grpc_version_string grpc_version_string
grpc_g_stands_for
grpc_completion_queue_create grpc_completion_queue_create
grpc_completion_queue_next grpc_completion_queue_next
grpc_completion_queue_pluck grpc_completion_queue_pluck
@ -125,21 +136,48 @@ EXPORTS
gpr_free_aligned gpr_free_aligned
gpr_set_allocation_functions gpr_set_allocation_functions
gpr_get_allocation_functions gpr_get_allocation_functions
grpc_raw_byte_buffer_create gpr_avl_create
grpc_raw_compressed_byte_buffer_create gpr_avl_ref
grpc_byte_buffer_copy gpr_avl_unref
grpc_byte_buffer_length gpr_avl_add
grpc_byte_buffer_destroy gpr_avl_remove
grpc_byte_buffer_reader_init gpr_avl_get
grpc_byte_buffer_reader_destroy gpr_avl_maybe_get
grpc_byte_buffer_reader_next gpr_avl_is_empty
grpc_byte_buffer_reader_readall gpr_cmdline_create
grpc_raw_byte_buffer_from_reader gpr_cmdline_add_int
gpr_cmdline_add_flag
gpr_cmdline_add_string
gpr_cmdline_on_extra_arg
gpr_cmdline_set_survive_failure
gpr_cmdline_parse
gpr_cmdline_destroy
gpr_cmdline_usage_string
gpr_cpu_num_cores
gpr_cpu_current_cpu
gpr_histogram_create
gpr_histogram_destroy
gpr_histogram_add
gpr_histogram_merge
gpr_histogram_percentile
gpr_histogram_mean
gpr_histogram_stddev
gpr_histogram_variance
gpr_histogram_maximum
gpr_histogram_minimum
gpr_histogram_count
gpr_histogram_sum
gpr_histogram_sum_of_squares
gpr_histogram_get_contents
gpr_histogram_merge_contents
gpr_join_host_port
gpr_split_host_port
gpr_log gpr_log
gpr_log_message gpr_log_message
gpr_set_log_verbosity gpr_set_log_verbosity
gpr_log_verbosity_init gpr_log_verbosity_init
gpr_set_log_function gpr_set_log_function
gpr_format_message
gpr_slice_ref gpr_slice_ref
gpr_slice_unref gpr_slice_unref
gpr_slice_new gpr_slice_new
@ -169,6 +207,13 @@ EXPORTS
gpr_slice_buffer_trim_end gpr_slice_buffer_trim_end
gpr_slice_buffer_move_first gpr_slice_buffer_move_first
gpr_slice_buffer_take_first gpr_slice_buffer_take_first
gpr_strdup
gpr_asprintf
gpr_subprocess_binary_extension
gpr_subprocess_create
gpr_subprocess_destroy
gpr_subprocess_join
gpr_subprocess_interrupt
gpr_mu_init gpr_mu_init
gpr_mu_destroy gpr_mu_destroy
gpr_mu_lock gpr_mu_lock
@ -192,6 +237,14 @@ EXPORTS
gpr_stats_init gpr_stats_init
gpr_stats_inc gpr_stats_inc
gpr_stats_read gpr_stats_read
gpr_thd_new
gpr_thd_options_default
gpr_thd_options_set_detached
gpr_thd_options_set_joinable
gpr_thd_options_is_detached
gpr_thd_options_is_joinable
gpr_thd_currentid
gpr_thd_join
gpr_time_0 gpr_time_0
gpr_inf_future gpr_inf_future
gpr_inf_past gpr_inf_past
@ -213,55 +266,3 @@ EXPORTS
gpr_time_similar gpr_time_similar
gpr_sleep_until gpr_sleep_until
gpr_timespec_to_micros gpr_timespec_to_micros
gpr_avl_create
gpr_avl_ref
gpr_avl_unref
gpr_avl_add
gpr_avl_remove
gpr_avl_get
gpr_avl_maybe_get
gpr_avl_is_empty
gpr_cmdline_create
gpr_cmdline_add_int
gpr_cmdline_add_flag
gpr_cmdline_add_string
gpr_cmdline_on_extra_arg
gpr_cmdline_set_survive_failure
gpr_cmdline_parse
gpr_cmdline_destroy
gpr_cmdline_usage_string
gpr_cpu_num_cores
gpr_cpu_current_cpu
gpr_histogram_create
gpr_histogram_destroy
gpr_histogram_add
gpr_histogram_merge
gpr_histogram_percentile
gpr_histogram_mean
gpr_histogram_stddev
gpr_histogram_variance
gpr_histogram_maximum
gpr_histogram_minimum
gpr_histogram_count
gpr_histogram_sum
gpr_histogram_sum_of_squares
gpr_histogram_get_contents
gpr_histogram_merge_contents
gpr_join_host_port
gpr_split_host_port
gpr_format_message
gpr_strdup
gpr_asprintf
gpr_subprocess_binary_extension
gpr_subprocess_create
gpr_subprocess_destroy
gpr_subprocess_join
gpr_subprocess_interrupt
gpr_thd_new
gpr_thd_options_default
gpr_thd_options_set_detached
gpr_thd_options_set_joinable
gpr_thd_options_is_detached
gpr_thd_options_is_joinable
gpr_thd_currentid
gpr_thd_join

@ -29,6 +29,7 @@ Gem::Specification.new do |s|
s.add_dependency 'google-protobuf', '~> 3.0' s.add_dependency 'google-protobuf', '~> 3.0'
s.add_dependency 'googleauth', '~> 0.5.1' s.add_dependency 'googleauth', '~> 0.5.1'
s.add_dependency 'concurrent-ruby'
s.add_development_dependency 'bundler', '~> 1.9' s.add_development_dependency 'bundler', '~> 1.9'
s.add_development_dependency 'facter', '~> 2.4' s.add_development_dependency 'facter', '~> 2.4'
@ -71,25 +72,24 @@ Gem::Specification.new do |s|
s.files += %w( include/grpc/support/tls_msvc.h ) s.files += %w( include/grpc/support/tls_msvc.h )
s.files += %w( include/grpc/support/tls_pthread.h ) s.files += %w( include/grpc/support/tls_pthread.h )
s.files += %w( include/grpc/support/useful.h ) s.files += %w( include/grpc/support/useful.h )
s.files += %w( include/grpc/impl/codegen/alloc.h )
s.files += %w( include/grpc/impl/codegen/atm.h ) s.files += %w( include/grpc/impl/codegen/atm.h )
s.files += %w( include/grpc/impl/codegen/atm_gcc_atomic.h ) s.files += %w( include/grpc/impl/codegen/atm_gcc_atomic.h )
s.files += %w( include/grpc/impl/codegen/atm_gcc_sync.h ) s.files += %w( include/grpc/impl/codegen/atm_gcc_sync.h )
s.files += %w( include/grpc/impl/codegen/atm_windows.h ) s.files += %w( include/grpc/impl/codegen/atm_windows.h )
s.files += %w( include/grpc/impl/codegen/log.h ) s.files += %w( include/grpc/impl/codegen/gpr_types.h )
s.files += %w( include/grpc/impl/codegen/port_platform.h ) s.files += %w( include/grpc/impl/codegen/port_platform.h )
s.files += %w( include/grpc/impl/codegen/slice.h ) s.files += %w( include/grpc/impl/codegen/slice.h )
s.files += %w( include/grpc/impl/codegen/slice_buffer.h )
s.files += %w( include/grpc/impl/codegen/sync.h ) s.files += %w( include/grpc/impl/codegen/sync.h )
s.files += %w( include/grpc/impl/codegen/sync_generic.h ) s.files += %w( include/grpc/impl/codegen/sync_generic.h )
s.files += %w( include/grpc/impl/codegen/sync_posix.h ) s.files += %w( include/grpc/impl/codegen/sync_posix.h )
s.files += %w( include/grpc/impl/codegen/sync_windows.h ) s.files += %w( include/grpc/impl/codegen/sync_windows.h )
s.files += %w( include/grpc/impl/codegen/time.h )
s.files += %w( src/core/lib/profiling/timers.h ) s.files += %w( src/core/lib/profiling/timers.h )
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/mpscq.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/percent_encoding.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 )
s.files += %w( src/core/lib/support/string_windows.h ) s.files += %w( src/core/lib/support/string_windows.h )
@ -116,7 +116,9 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/support/log_linux.c ) s.files += %w( src/core/lib/support/log_linux.c )
s.files += %w( src/core/lib/support/log_posix.c ) s.files += %w( src/core/lib/support/log_posix.c )
s.files += %w( src/core/lib/support/log_windows.c ) s.files += %w( src/core/lib/support/log_windows.c )
s.files += %w( src/core/lib/support/mpscq.c )
s.files += %w( src/core/lib/support/murmur_hash.c ) s.files += %w( src/core/lib/support/murmur_hash.c )
s.files += %w( src/core/lib/support/percent_encoding.c )
s.files += %w( src/core/lib/support/slice.c ) s.files += %w( src/core/lib/support/slice.c )
s.files += %w( src/core/lib/support/slice_buffer.c ) s.files += %w( src/core/lib/support/slice_buffer.c )
s.files += %w( src/core/lib/support/stack_lockfree.c ) s.files += %w( src/core/lib/support/stack_lockfree.c )
@ -148,27 +150,23 @@ Gem::Specification.new do |s|
s.files += %w( include/grpc/grpc_posix.h ) s.files += %w( include/grpc/grpc_posix.h )
s.files += %w( include/grpc/grpc_security_constants.h ) s.files += %w( include/grpc/grpc_security_constants.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_reader.h ) s.files += %w( include/grpc/impl/codegen/byte_buffer_reader.h )
s.files += %w( include/grpc/impl/codegen/compression_types.h ) s.files += %w( include/grpc/impl/codegen/compression_types.h )
s.files += %w( include/grpc/impl/codegen/connectivity_state.h ) s.files += %w( include/grpc/impl/codegen/connectivity_state.h )
s.files += %w( include/grpc/impl/codegen/grpc_types.h ) s.files += %w( include/grpc/impl/codegen/grpc_types.h )
s.files += %w( include/grpc/impl/codegen/propagation_bits.h ) s.files += %w( include/grpc/impl/codegen/propagation_bits.h )
s.files += %w( include/grpc/impl/codegen/status.h ) s.files += %w( include/grpc/impl/codegen/status.h )
s.files += %w( include/grpc/impl/codegen/alloc.h )
s.files += %w( include/grpc/impl/codegen/atm.h ) s.files += %w( include/grpc/impl/codegen/atm.h )
s.files += %w( include/grpc/impl/codegen/atm_gcc_atomic.h ) s.files += %w( include/grpc/impl/codegen/atm_gcc_atomic.h )
s.files += %w( include/grpc/impl/codegen/atm_gcc_sync.h ) s.files += %w( include/grpc/impl/codegen/atm_gcc_sync.h )
s.files += %w( include/grpc/impl/codegen/atm_windows.h ) s.files += %w( include/grpc/impl/codegen/atm_windows.h )
s.files += %w( include/grpc/impl/codegen/log.h ) s.files += %w( include/grpc/impl/codegen/gpr_types.h )
s.files += %w( include/grpc/impl/codegen/port_platform.h ) s.files += %w( include/grpc/impl/codegen/port_platform.h )
s.files += %w( include/grpc/impl/codegen/slice.h ) s.files += %w( include/grpc/impl/codegen/slice.h )
s.files += %w( include/grpc/impl/codegen/slice_buffer.h )
s.files += %w( include/grpc/impl/codegen/sync.h ) s.files += %w( include/grpc/impl/codegen/sync.h )
s.files += %w( include/grpc/impl/codegen/sync_generic.h ) s.files += %w( include/grpc/impl/codegen/sync_generic.h )
s.files += %w( include/grpc/impl/codegen/sync_posix.h ) s.files += %w( include/grpc/impl/codegen/sync_posix.h )
s.files += %w( include/grpc/impl/codegen/sync_windows.h ) s.files += %w( include/grpc/impl/codegen/sync_windows.h )
s.files += %w( include/grpc/impl/codegen/time.h )
s.files += %w( include/grpc/grpc_security.h ) s.files += %w( include/grpc/grpc_security.h )
s.files += %w( include/grpc/census.h ) s.files += %w( include/grpc/census.h )
s.files += %w( src/core/lib/channel/channel_args.h ) s.files += %w( src/core/lib/channel/channel_args.h )
@ -187,6 +185,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/http/httpcli.h ) s.files += %w( src/core/lib/http/httpcli.h )
s.files += %w( src/core/lib/http/parser.h ) s.files += %w( src/core/lib/http/parser.h )
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/combiner.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/error.h )
@ -298,7 +297,6 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/tsi/transport_security_interface.h ) s.files += %w( src/core/lib/tsi/transport_security_interface.h )
s.files += %w( src/core/ext/client_config/client_channel.h ) s.files += %w( src/core/ext/client_config/client_channel.h )
s.files += %w( src/core/ext/client_config/client_channel_factory.h ) s.files += %w( src/core/ext/client_config/client_channel_factory.h )
s.files += %w( src/core/ext/client_config/client_config.h )
s.files += %w( src/core/ext/client_config/connector.h ) s.files += %w( src/core/ext/client_config/connector.h )
s.files += %w( src/core/ext/client_config/initial_connect_string.h ) s.files += %w( src/core/ext/client_config/initial_connect_string.h )
s.files += %w( src/core/ext/client_config/lb_policy.h ) s.files += %w( src/core/ext/client_config/lb_policy.h )
@ -308,8 +306,8 @@ Gem::Specification.new do |s|
s.files += %w( src/core/ext/client_config/resolver.h ) s.files += %w( src/core/ext/client_config/resolver.h )
s.files += %w( src/core/ext/client_config/resolver_factory.h ) s.files += %w( src/core/ext/client_config/resolver_factory.h )
s.files += %w( src/core/ext/client_config/resolver_registry.h ) s.files += %w( src/core/ext/client_config/resolver_registry.h )
s.files += %w( src/core/ext/client_config/resolver_result.h )
s.files += %w( src/core/ext/client_config/subchannel.h ) s.files += %w( src/core/ext/client_config/subchannel.h )
s.files += %w( src/core/ext/client_config/subchannel_call_holder.h )
s.files += %w( src/core/ext/client_config/subchannel_index.h ) s.files += %w( src/core/ext/client_config/subchannel_index.h )
s.files += %w( src/core/ext/client_config/uri_parser.h ) s.files += %w( src/core/ext/client_config/uri_parser.h )
s.files += %w( src/core/ext/lb_policy/grpclb/grpclb.h ) s.files += %w( src/core/ext/lb_policy/grpclb/grpclb.h )
@ -326,6 +324,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/ext/census/census_interface.h ) s.files += %w( src/core/ext/census/census_interface.h )
s.files += %w( src/core/ext/census/census_rpc_stats.h ) s.files += %w( src/core/ext/census/census_rpc_stats.h )
s.files += %w( src/core/ext/census/gen/census.pb.h ) s.files += %w( src/core/ext/census/gen/census.pb.h )
s.files += %w( src/core/ext/census/gen/trace_context.pb.h )
s.files += %w( src/core/ext/census/grpc_filter.h ) s.files += %w( src/core/ext/census/grpc_filter.h )
s.files += %w( src/core/ext/census/mlog.h ) s.files += %w( src/core/ext/census/mlog.h )
s.files += %w( src/core/ext/census/resource.h ) s.files += %w( src/core/ext/census/resource.h )
@ -346,6 +345,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/http/httpcli.c ) s.files += %w( src/core/lib/http/httpcli.c )
s.files += %w( src/core/lib/http/parser.c ) s.files += %w( src/core/lib/http/parser.c )
s.files += %w( src/core/lib/iomgr/closure.c ) s.files += %w( src/core/lib/iomgr/closure.c )
s.files += %w( src/core/lib/iomgr/combiner.c )
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 )
@ -475,7 +475,6 @@ Gem::Specification.new do |s|
s.files += %w( src/core/ext/client_config/channel_connectivity.c ) s.files += %w( src/core/ext/client_config/channel_connectivity.c )
s.files += %w( src/core/ext/client_config/client_channel.c ) s.files += %w( src/core/ext/client_config/client_channel.c )
s.files += %w( src/core/ext/client_config/client_channel_factory.c ) s.files += %w( src/core/ext/client_config/client_channel_factory.c )
s.files += %w( src/core/ext/client_config/client_config.c )
s.files += %w( src/core/ext/client_config/client_config_plugin.c ) s.files += %w( src/core/ext/client_config/client_config_plugin.c )
s.files += %w( src/core/ext/client_config/connector.c ) s.files += %w( src/core/ext/client_config/connector.c )
s.files += %w( src/core/ext/client_config/default_initial_connect_string.c ) s.files += %w( src/core/ext/client_config/default_initial_connect_string.c )
@ -487,8 +486,8 @@ Gem::Specification.new do |s|
s.files += %w( src/core/ext/client_config/resolver.c ) s.files += %w( src/core/ext/client_config/resolver.c )
s.files += %w( src/core/ext/client_config/resolver_factory.c ) s.files += %w( src/core/ext/client_config/resolver_factory.c )
s.files += %w( src/core/ext/client_config/resolver_registry.c ) s.files += %w( src/core/ext/client_config/resolver_registry.c )
s.files += %w( src/core/ext/client_config/resolver_result.c )
s.files += %w( src/core/ext/client_config/subchannel.c ) s.files += %w( src/core/ext/client_config/subchannel.c )
s.files += %w( src/core/ext/client_config/subchannel_call_holder.c )
s.files += %w( src/core/ext/client_config/subchannel_index.c ) s.files += %w( src/core/ext/client_config/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 )
@ -510,6 +509,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/ext/census/base_resources.c ) s.files += %w( src/core/ext/census/base_resources.c )
s.files += %w( src/core/ext/census/context.c ) s.files += %w( src/core/ext/census/context.c )
s.files += %w( src/core/ext/census/gen/census.pb.c ) s.files += %w( src/core/ext/census/gen/census.pb.c )
s.files += %w( src/core/ext/census/gen/trace_context.pb.c )
s.files += %w( src/core/ext/census/grpc_context.c ) s.files += %w( src/core/ext/census/grpc_context.c )
s.files += %w( src/core/ext/census/grpc_filter.c ) s.files += %w( src/core/ext/census/grpc_filter.c )
s.files += %w( src/core/ext/census/grpc_plugin.c ) s.files += %w( src/core/ext/census/grpc_plugin.c )

@ -48,7 +48,6 @@ namespace grpc {
/// \param target The URI of the endpoint to connect to. /// \param target The URI of the endpoint to connect to.
/// \param creds Credentials to use for the created channel. If it does not hold /// \param creds Credentials to use for the created channel. If it does not hold
/// an object or is invalid, a lame channel is returned. /// an object or is invalid, a lame channel is returned.
/// \param args Options for channel creation.
std::shared_ptr<Channel> CreateChannel( std::shared_ptr<Channel> CreateChannel(
const grpc::string& target, const grpc::string& target,
const std::shared_ptr<ChannelCredentials>& creds); const std::shared_ptr<ChannelCredentials>& creds);

@ -74,6 +74,7 @@
#include <grpc++/impl/codegen/async_stream.h> #include <grpc++/impl/codegen/async_stream.h>
#include <grpc++/impl/codegen/async_unary_call.h> #include <grpc++/impl/codegen/async_unary_call.h>
#include <grpc++/impl/codegen/method_handler_impl.h>
#include <grpc++/impl/codegen/proto_utils.h> #include <grpc++/impl/codegen/proto_utils.h>
#include <grpc++/impl/codegen/rpc_method.h> #include <grpc++/impl/codegen/rpc_method.h>
#include <grpc++/impl/codegen/service_type.h> #include <grpc++/impl/codegen/service_type.h>
@ -174,6 +175,7 @@ class ServerReflection GRPC_FINAL {
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
} }
}; };
typedef Service StreamedUnaryService;
}; };
} // namespace v1alpha } // namespace v1alpha

@ -51,6 +51,9 @@
#ifndef GRPCXX_GRPCXX_H #ifndef GRPCXX_GRPCXX_H
#define GRPCXX_GRPCXX_H #define GRPCXX_GRPCXX_H
// Pragma for http://include-what-you-use.org/ tool, tells that following
// headers are not private for grpc++.h and are part of its interface.
// IWYU pragma: begin_exports
#include <grpc/grpc.h> #include <grpc/grpc.h>
#include <grpc++/channel.h> #include <grpc++/channel.h>
@ -62,5 +65,6 @@
#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++/server_posix.h>
// IWYU pragma: end_exports
#endif // GRPCXX_GRPCXX_H #endif // GRPCXX_GRPCXX_H

@ -40,7 +40,6 @@
#include <grpc++/impl/codegen/server_context.h> #include <grpc++/impl/codegen/server_context.h>
#include <grpc++/impl/codegen/service_type.h> #include <grpc++/impl/codegen/service_type.h>
#include <grpc++/impl/codegen/status.h> #include <grpc++/impl/codegen/status.h>
#include <grpc/impl/codegen/log.h>
namespace grpc { namespace grpc {

@ -46,9 +46,9 @@
#include <grpc++/impl/codegen/core_codegen_interface.h> #include <grpc++/impl/codegen/core_codegen_interface.h>
#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/status_helper.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/compression_types.h> #include <grpc/impl/codegen/compression_types.h>
#include <grpc/impl/codegen/grpc_types.h> #include <grpc/impl/codegen/grpc_types.h>
@ -434,7 +434,7 @@ class CallOpServerSendStatus {
trailing_metadata_count_ = trailing_metadata.size(); trailing_metadata_count_ = trailing_metadata.size();
trailing_metadata_ = FillMetadataArray(trailing_metadata); trailing_metadata_ = FillMetadataArray(trailing_metadata);
send_status_available_ = true; send_status_available_ = true;
send_status_code_ = static_cast<grpc_status_code>(status.error_code()); send_status_code_ = static_cast<grpc_status_code>(GetCanonicalCode(status));
send_status_details_ = status.error_message(); send_status_details_ = status.error_message();
} }
@ -662,10 +662,10 @@ class Call GRPC_FINAL {
call_hook_->PerformOpsOnCall(ops, this); call_hook_->PerformOpsOnCall(ops, this);
} }
grpc_call* call() { return call_; } grpc_call* call() const { return call_; }
CompletionQueue* cq() { return cq_; } CompletionQueue* cq() const { return cq_; }
int max_message_size() { return max_message_size_; } int max_message_size() const { return max_message_size_; }
private: private:
CallHook* call_hook_; CallHook* call_hook_;

@ -62,9 +62,7 @@
#include <grpc++/impl/codegen/sync.h> #include <grpc++/impl/codegen/sync.h>
#include <grpc++/impl/codegen/time.h> #include <grpc++/impl/codegen/time.h>
#include <grpc/impl/codegen/compression_types.h> #include <grpc/impl/codegen/compression_types.h>
#include <grpc/impl/codegen/log.h>
#include <grpc/impl/codegen/propagation_bits.h> #include <grpc/impl/codegen/propagation_bits.h>
#include <grpc/impl/codegen/time.h>
struct census_context; struct census_context;
struct grpc_call; struct grpc_call;
@ -225,6 +223,9 @@ class ClientContext {
/// EXPERIMENTAL: Set this request to be idempotent /// EXPERIMENTAL: Set this request to be idempotent
void set_idempotent(bool idempotent) { idempotent_ = idempotent; } void set_idempotent(bool idempotent) { idempotent_ = idempotent; }
/// EXPERIMENTAL: Set this request to be cacheable
void set_cacheable(bool cacheable) { cacheable_ = cacheable; }
/// EXPERIMENTAL: Trigger fail-fast or not on this request /// EXPERIMENTAL: Trigger fail-fast or not on this request
void set_fail_fast(bool fail_fast) { fail_fast_ = fail_fast; } void set_fail_fast(bool fail_fast) { fail_fast_ = fail_fast; }
@ -271,7 +272,7 @@ class ClientContext {
/// Set \a algorithm to be the compression algorithm used for the client call. /// Set \a algorithm to be the compression algorithm used for the client call.
/// ///
/// \param algorith The compression algorithm used for the client call. /// \param algorithm The compression algorithm used for the client call.
void set_compression_algorithm(grpc_compression_algorithm algorithm); void set_compression_algorithm(grpc_compression_algorithm algorithm);
/// Return the peer uri in a string. /// Return the peer uri in a string.
@ -307,6 +308,10 @@ class ClientContext {
}; };
static void SetGlobalCallbacks(GlobalCallbacks* callbacks); static void SetGlobalCallbacks(GlobalCallbacks* callbacks);
// Should be used for framework-level extensions only.
// Applications never need to call this method.
grpc_call* c_call() { return call_; }
private: private:
// Disallow copy and assign. // Disallow copy and assign.
ClientContext(const ClientContext&); ClientContext(const ClientContext&);
@ -342,7 +347,8 @@ class ClientContext {
uint32_t initial_metadata_flags() const { uint32_t initial_metadata_flags() const {
return (idempotent_ ? GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST : 0) | return (idempotent_ ? GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST : 0) |
(fail_fast_ ? 0 : GRPC_INITIAL_METADATA_IGNORE_CONNECTIVITY); (fail_fast_ ? 0 : GRPC_INITIAL_METADATA_IGNORE_CONNECTIVITY) |
(cacheable_ ? GRPC_INITIAL_METADATA_CACHEABLE_REQUEST : 0);
} }
grpc::string authority() { return authority_; } grpc::string authority() { return authority_; }
@ -350,6 +356,7 @@ class ClientContext {
bool initial_metadata_received_; bool initial_metadata_received_;
bool fail_fast_; bool fail_fast_;
bool idempotent_; bool idempotent_;
bool cacheable_;
std::shared_ptr<Channel> channel_; std::shared_ptr<Channel> channel_;
grpc::mutex mu_; grpc::mutex mu_;
grpc_call* call_; grpc_call* call_;

@ -52,7 +52,6 @@
#include <grpc++/impl/codegen/grpc_library.h> #include <grpc++/impl/codegen/grpc_library.h>
#include <grpc++/impl/codegen/status.h> #include <grpc++/impl/codegen/status.h>
#include <grpc++/impl/codegen/time.h> #include <grpc++/impl/codegen/time.h>
#include <grpc/impl/codegen/time.h>
struct grpc_completion_queue; struct grpc_completion_queue;
@ -68,8 +67,10 @@ template <class R>
class ServerReader; class ServerReader;
template <class W> template <class W>
class ServerWriter; class ServerWriter;
namespace internal {
template <class W, class R> template <class W, class R>
class ServerReaderWriter; class ServerReaderWriterBody;
}
template <class ServiceType, class RequestType, class ResponseType> template <class ServiceType, class RequestType, class ResponseType>
class RpcMethodHandler; class RpcMethodHandler;
template <class ServiceType, class RequestType, class ResponseType> template <class ServiceType, class RequestType, class ResponseType>
@ -178,15 +179,15 @@ class CompletionQueue : private GrpcLibraryCodegen {
template <class W> template <class W>
friend class ::grpc::ServerWriter; friend class ::grpc::ServerWriter;
template <class W, class R> template <class W, class R>
friend class ::grpc::ServerReaderWriter; friend class ::grpc::internal::ServerReaderWriterBody;
template <class ServiceType, class RequestType, class ResponseType> template <class ServiceType, class RequestType, class ResponseType>
friend class RpcMethodHandler; friend class RpcMethodHandler;
template <class ServiceType, class RequestType, class ResponseType> template <class ServiceType, class RequestType, class ResponseType>
friend class ClientStreamingHandler; friend class ClientStreamingHandler;
template <class ServiceType, class RequestType, class ResponseType> template <class ServiceType, class RequestType, class ResponseType>
friend class ServerStreamingHandler; friend class ServerStreamingHandler;
template <class ServiceType, class RequestType, class ResponseType> template <class Streamer, bool WriteNeeded>
friend class BidiStreamingHandler; friend class TemplatedBidiStreamingHandler;
friend class UnknownMethodHandler; friend class UnknownMethodHandler;
friend class ::grpc::Server; friend class ::grpc::Server;
friend class ::grpc::ServerContext; friend class ::grpc::ServerContext;
@ -217,7 +218,7 @@ class CompletionQueue : private GrpcLibraryCodegen {
/// Performs a single polling pluck on \a tag. /// Performs a single polling pluck on \a tag.
/// \warning Must not be mixed with calls to \a Next. /// \warning Must not be mixed with calls to \a Next.
void TryPluck(CompletionQueueTag* tag) { void TryPluck(CompletionQueueTag* tag) {
auto deadline = gpr_time_0(GPR_CLOCK_REALTIME); auto deadline = g_core_codegen_interface->gpr_time_0(GPR_CLOCK_REALTIME);
auto ev = g_core_codegen_interface->grpc_completion_queue_pluck( auto ev = g_core_codegen_interface->grpc_completion_queue_pluck(
cq_, tag, deadline, nullptr); cq_, tag, deadline, nullptr);
if (ev.type == GRPC_QUEUE_TIMEOUT) return; if (ev.type == GRPC_QUEUE_TIMEOUT) return;

@ -55,6 +55,17 @@ class CoreCodegen : public CoreCodegenInterface {
void* gpr_malloc(size_t size) GRPC_OVERRIDE; void* gpr_malloc(size_t size) GRPC_OVERRIDE;
void gpr_free(void* p) GRPC_OVERRIDE; void gpr_free(void* p) GRPC_OVERRIDE;
void gpr_mu_init(gpr_mu* mu) GRPC_OVERRIDE;
void gpr_mu_destroy(gpr_mu* mu) GRPC_OVERRIDE;
void gpr_mu_lock(gpr_mu* mu) GRPC_OVERRIDE;
void gpr_mu_unlock(gpr_mu* mu) GRPC_OVERRIDE;
void gpr_cv_init(gpr_cv* cv) GRPC_OVERRIDE;
void gpr_cv_destroy(gpr_cv* cv) GRPC_OVERRIDE;
int gpr_cv_wait(gpr_cv* cv, gpr_mu* mu,
gpr_timespec abs_deadline) GRPC_OVERRIDE;
void gpr_cv_signal(gpr_cv* cv) GRPC_OVERRIDE;
void gpr_cv_broadcast(gpr_cv* cv) GRPC_OVERRIDE;
void grpc_byte_buffer_destroy(grpc_byte_buffer* bb) GRPC_OVERRIDE; void grpc_byte_buffer_destroy(grpc_byte_buffer* bb) GRPC_OVERRIDE;
int grpc_byte_buffer_reader_init(grpc_byte_buffer_reader* reader, int grpc_byte_buffer_reader_init(grpc_byte_buffer_reader* reader,
@ -78,6 +89,7 @@ class CoreCodegen : public CoreCodegenInterface {
void grpc_metadata_array_destroy(grpc_metadata_array* array) GRPC_OVERRIDE; void grpc_metadata_array_destroy(grpc_metadata_array* array) GRPC_OVERRIDE;
gpr_timespec gpr_inf_future(gpr_clock_type type) GRPC_OVERRIDE; gpr_timespec gpr_inf_future(gpr_clock_type type) GRPC_OVERRIDE;
gpr_timespec gpr_time_0(gpr_clock_type type) GRPC_OVERRIDE;
virtual const Status& ok() GRPC_OVERRIDE; virtual const Status& ok() GRPC_OVERRIDE;
virtual const Status& cancelled() GRPC_OVERRIDE; virtual const Status& cancelled() GRPC_OVERRIDE;

@ -36,7 +36,13 @@
#include <grpc++/impl/codegen/config.h> #include <grpc++/impl/codegen/config.h>
#include <grpc++/impl/codegen/status.h> #include <grpc++/impl/codegen/status.h>
#include <grpc/impl/codegen/byte_buffer_reader.h>
#include <grpc/impl/codegen/grpc_types.h> #include <grpc/impl/codegen/grpc_types.h>
#include <grpc/impl/codegen/sync.h>
extern "C" {
struct grpc_byte_buffer;
}
namespace grpc { namespace grpc {
@ -63,6 +69,17 @@ class CoreCodegenInterface {
virtual void* gpr_malloc(size_t size) = 0; virtual void* gpr_malloc(size_t size) = 0;
virtual void gpr_free(void* p) = 0; virtual void gpr_free(void* p) = 0;
virtual void gpr_mu_init(gpr_mu* mu) = 0;
virtual void gpr_mu_destroy(gpr_mu* mu) = 0;
virtual void gpr_mu_lock(gpr_mu* mu) = 0;
virtual void gpr_mu_unlock(gpr_mu* mu) = 0;
virtual void gpr_cv_init(gpr_cv* cv) = 0;
virtual void gpr_cv_destroy(gpr_cv* cv) = 0;
virtual int gpr_cv_wait(gpr_cv* cv, gpr_mu* mu,
gpr_timespec abs_deadline) = 0;
virtual void gpr_cv_signal(gpr_cv* cv) = 0;
virtual void gpr_cv_broadcast(gpr_cv* cv) = 0;
virtual void grpc_byte_buffer_destroy(grpc_byte_buffer* bb) = 0; virtual void grpc_byte_buffer_destroy(grpc_byte_buffer* bb) = 0;
virtual int grpc_byte_buffer_reader_init(grpc_byte_buffer_reader* reader, virtual int grpc_byte_buffer_reader_init(grpc_byte_buffer_reader* reader,
@ -89,6 +106,7 @@ class CoreCodegenInterface {
virtual const Status& cancelled() = 0; virtual const Status& cancelled() = 0;
virtual gpr_timespec gpr_inf_future(gpr_clock_type type) = 0; virtual gpr_timespec gpr_inf_future(gpr_clock_type type) = 0;
virtual gpr_timespec gpr_time_0(gpr_clock_type type) = 0;
}; };
extern CoreCodegenInterface* g_core_codegen_interface; extern CoreCodegenInterface* g_core_codegen_interface;

@ -35,7 +35,6 @@
#define GRPCXX_IMPL_CODEGEN_GRPC_LIBRARY_H #define GRPCXX_IMPL_CODEGEN_GRPC_LIBRARY_H
#include <grpc++/impl/codegen/core_codegen_interface.h> #include <grpc++/impl/codegen/core_codegen_interface.h>
#include <grpc/impl/codegen/log.h>
namespace grpc { namespace grpc {

@ -167,20 +167,22 @@ class ServerStreamingHandler : public MethodHandler {
}; };
// A wrapper class of an application provided bidi-streaming handler. // A wrapper class of an application provided bidi-streaming handler.
template <class ServiceType, class RequestType, class ResponseType> // This also applies to server-streamed implementation of a unary method
class BidiStreamingHandler : public MethodHandler { // with the additional requirement that such methods must have done a
// write for status to be ok
// Since this is used by more than 1 class, the service is not passed in.
// Instead, it is expected to be an implicitly-captured argument of func
// (through bind or something along those lines)
template <class Streamer, bool WriteNeeded>
class TemplatedBidiStreamingHandler : public MethodHandler {
public: public:
BidiStreamingHandler( TemplatedBidiStreamingHandler(
std::function<Status(ServiceType*, ServerContext*, std::function<Status(ServerContext*, Streamer*)> func)
ServerReaderWriter<ResponseType, RequestType>*)> : func_(func), write_needed_(WriteNeeded) {}
func,
ServiceType* service)
: func_(func), service_(service) {}
void RunHandler(const HandlerParameter& param) GRPC_FINAL { void RunHandler(const HandlerParameter& param) GRPC_FINAL {
ServerReaderWriter<ResponseType, RequestType> stream(param.call, Streamer stream(param.call, param.server_context);
param.server_context); Status status = func_(param.server_context, &stream);
Status status = func_(service_, param.server_context, &stream);
CallOpSet<CallOpSendInitialMetadata, CallOpServerSendStatus> ops; CallOpSet<CallOpSendInitialMetadata, CallOpServerSendStatus> ops;
if (!param.server_context->sent_initial_metadata_) { if (!param.server_context->sent_initial_metadata_) {
@ -189,6 +191,12 @@ class BidiStreamingHandler : public MethodHandler {
if (param.server_context->compression_level_set()) { if (param.server_context->compression_level_set()) {
ops.set_compression_level(param.server_context->compression_level()); ops.set_compression_level(param.server_context->compression_level());
} }
if (write_needed_ && status.ok()) {
// If we needed a write but never did one, we need to mark the
// status as a fail
status = Status(StatusCode::INTERNAL,
"Service did not provide response message");
}
} }
ops.ServerSendStatus(param.server_context->trailing_metadata_, status); ops.ServerSendStatus(param.server_context->trailing_metadata_, status);
param.call->PerformOps(&ops); param.call->PerformOps(&ops);
@ -196,10 +204,36 @@ class BidiStreamingHandler : public MethodHandler {
} }
private: private:
std::function<Status(ServerContext*, Streamer*)> func_;
const bool write_needed_;
};
template <class ServiceType, class RequestType, class ResponseType>
class BidiStreamingHandler
: public TemplatedBidiStreamingHandler<
ServerReaderWriter<ResponseType, RequestType>, false> {
public:
BidiStreamingHandler(
std::function<Status(ServiceType*, ServerContext*, std::function<Status(ServiceType*, ServerContext*,
ServerReaderWriter<ResponseType, RequestType>*)> ServerReaderWriter<ResponseType, RequestType>*)>
func_; func,
ServiceType* service_; ServiceType* service)
: TemplatedBidiStreamingHandler<
ServerReaderWriter<ResponseType, RequestType>, false>(std::bind(
func, service, std::placeholders::_1, std::placeholders::_2)) {}
};
template <class RequestType, class ResponseType>
class StreamedUnaryHandler
: public TemplatedBidiStreamingHandler<
ServerUnaryStreamer<RequestType, ResponseType>, true> {
public:
explicit StreamedUnaryHandler(
std::function<Status(ServerContext*,
ServerUnaryStreamer<RequestType, ResponseType>*)>
func)
: TemplatedBidiStreamingHandler<
ServerUnaryStreamer<RequestType, ResponseType>, true>(func) {}
}; };
// Handle unknown method by returning UNIMPLEMENTED error. // Handle unknown method by returning UNIMPLEMENTED error.

@ -40,9 +40,8 @@
#include <grpc++/impl/codegen/core_codegen_interface.h> #include <grpc++/impl/codegen/core_codegen_interface.h>
#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/byte_buffer.h>
#include <grpc/impl/codegen/byte_buffer_reader.h> #include <grpc/impl/codegen/byte_buffer_reader.h>
#include <grpc/impl/codegen/log.h> #include <grpc/impl/codegen/grpc_types.h>
#include <grpc/impl/codegen/slice.h> #include <grpc/impl/codegen/slice.h>
namespace grpc { namespace grpc {

@ -60,11 +60,12 @@ class RpcMethod {
const char* name() const { return name_; } const char* name() const { return name_; }
RpcType method_type() const { return method_type_; } RpcType method_type() const { return method_type_; }
void SetMethodType(RpcType type) { method_type_ = type; }
void* channel_tag() const { return channel_tag_; } void* channel_tag() const { return channel_tag_; }
private: private:
const char* const name_; const char* const name_;
const RpcType method_type_; RpcType method_type_;
void* const channel_tag_; void* const channel_tag_;
}; };

@ -43,7 +43,10 @@
#include <grpc++/impl/codegen/config.h> #include <grpc++/impl/codegen/config.h>
#include <grpc++/impl/codegen/rpc_method.h> #include <grpc++/impl/codegen/rpc_method.h>
#include <grpc++/impl/codegen/status.h> #include <grpc++/impl/codegen/status.h>
#include <grpc/impl/codegen/byte_buffer.h>
extern "C" {
struct grpc_byte_buffer;
}
namespace grpc { namespace grpc {
class ServerContext; class ServerContext;
@ -82,6 +85,7 @@ class RpcServiceMethod : public RpcMethod {
// if MethodHandler is nullptr, then this is an async method // if MethodHandler is nullptr, then this is an async method
MethodHandler* handler() const { return handler_.get(); } MethodHandler* handler() const { return handler_.get(); }
void ResetHandler() { handler_.reset(); } void ResetHandler() { handler_.reset(); }
void SetHandler(MethodHandler* handler) { handler_.reset(handler); }
private: private:
void* server_tag_; void* server_tag_;

@ -43,7 +43,6 @@
#include <grpc++/impl/codegen/string_ref.h> #include <grpc++/impl/codegen/string_ref.h>
#include <grpc++/impl/codegen/time.h> #include <grpc++/impl/codegen/time.h>
#include <grpc/impl/codegen/compression_types.h> #include <grpc/impl/codegen/compression_types.h>
#include <grpc/impl/codegen/time.h>
struct gpr_timespec; struct gpr_timespec;
struct grpc_metadata; struct grpc_metadata;
@ -65,8 +64,10 @@ template <class R>
class ServerReader; class ServerReader;
template <class W> template <class W>
class ServerWriter; class ServerWriter;
namespace internal {
template <class W, class R> template <class W, class R>
class ServerReaderWriter; class ServerReaderWriterBody;
}
template <class ServiceType, class RequestType, class ResponseType> template <class ServiceType, class RequestType, class ResponseType>
class RpcMethodHandler; class RpcMethodHandler;
template <class ServiceType, class RequestType, class ResponseType> template <class ServiceType, class RequestType, class ResponseType>
@ -166,6 +167,10 @@ class ServerContext {
async_notify_when_done_tag_ = tag; async_notify_when_done_tag_ = tag;
} }
// Should be used for framework-level extensions only.
// Applications never need to call this method.
grpc_call* c_call() { return call_; }
private: private:
friend class ::grpc::testing::InteropServerContextInspector; friend class ::grpc::testing::InteropServerContextInspector;
friend class ::grpc::ServerInterface; friend class ::grpc::ServerInterface;
@ -183,15 +188,15 @@ class ServerContext {
template <class W> template <class W>
friend class ::grpc::ServerWriter; friend class ::grpc::ServerWriter;
template <class W, class R> template <class W, class R>
friend class ::grpc::ServerReaderWriter; friend class ::grpc::internal::ServerReaderWriterBody;
template <class ServiceType, class RequestType, class ResponseType> template <class ServiceType, class RequestType, class ResponseType>
friend class RpcMethodHandler; friend class RpcMethodHandler;
template <class ServiceType, class RequestType, class ResponseType> template <class ServiceType, class RequestType, class ResponseType>
friend class ClientStreamingHandler; friend class ClientStreamingHandler;
template <class ServiceType, class RequestType, class ResponseType> template <class ServiceType, class RequestType, class ResponseType>
friend class ServerStreamingHandler; friend class ServerStreamingHandler;
template <class ServiceType, class RequestType, class ResponseType> template <class Streamer, bool WriteNeeded>
friend class BidiStreamingHandler; friend class TemplatedBidiStreamingHandler;
friend class UnknownMethodHandler; friend class UnknownMethodHandler;
friend class ::grpc::ClientContext; friend class ::grpc::ClientContext;

@ -52,6 +52,8 @@ class ServerCredentials;
class Service; class Service;
class ThreadPoolInterface; class ThreadPoolInterface;
extern CoreCodegenInterface* g_core_codegen_interface;
/// Models a gRPC server. /// Models a gRPC server.
/// ///
/// Servers are configured and started via \a grpc::ServerBuilder. /// Servers are configured and started via \a grpc::ServerBuilder.
@ -78,7 +80,10 @@ class ServerInterface : public CallHook {
/// All completion queue associated with the server (for example, for async /// All completion queue associated with the server (for example, for async
/// serving) must be shutdown *after* this method has returned: /// serving) must be shutdown *after* this method has returned:
/// See \a ServerBuilder::AddCompletionQueue for details. /// See \a ServerBuilder::AddCompletionQueue for details.
void Shutdown() { ShutdownInternal(gpr_inf_future(GPR_CLOCK_MONOTONIC)); } void Shutdown() {
ShutdownInternal(
g_core_codegen_interface->gpr_inf_future(GPR_CLOCK_MONOTONIC));
}
/// Block waiting for all work to complete. /// Block waiting for all work to complete.
/// ///

@ -147,6 +147,17 @@ class Service {
methods_[index].reset(); methods_[index].reset();
} }
void MarkMethodStreamedUnary(int index,
MethodHandler* streamed_unary_method) {
GPR_CODEGEN_ASSERT(methods_[index] && methods_[index]->handler() &&
"Cannot mark an async or generic method Streamed Unary");
methods_[index]->SetHandler(streamed_unary_method);
// From the server's point of view, streamed unary is a special
// case of BIDI_STREAMING that has 1 read and 1 write, in that order.
methods_[index]->SetMethodType(::grpc::RpcMethod::BIDI_STREAMING);
}
private: private:
friend class Server; friend class Server;
friend class ServerInterface; friend class ServerInterface;

@ -0,0 +1,47 @@
/*
*
* Copyright 2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef GRPCXX_IMPL_CODEGEN_STATUS_HELPER_H
#define GRPCXX_IMPL_CODEGEN_STATUS_HELPER_H
#include <grpc++/impl/codegen/status.h>
namespace grpc {
inline StatusCode GetCanonicalCode(const Status& status) {
return status.error_code();
}
} // namespace grpc
#endif // GRPCXX_IMPL_CODEGEN_STATUS_HELPER_H

@ -34,18 +34,20 @@
#ifndef GRPCXX_IMPL_CODEGEN_SYNC_NO_CXX11_H #ifndef GRPCXX_IMPL_CODEGEN_SYNC_NO_CXX11_H
#define GRPCXX_IMPL_CODEGEN_SYNC_NO_CXX11_H #define GRPCXX_IMPL_CODEGEN_SYNC_NO_CXX11_H
#include <grpc/impl/codegen/sync.h> #include <grpc++/impl/codegen/core_codegen_interface.h>
namespace grpc { namespace grpc {
extern CoreCodegenInterface *g_core_codegen_interface;
template <class mutex> template <class mutex>
class lock_guard; class lock_guard;
class condition_variable; class condition_variable;
class mutex { class mutex {
public: public:
mutex() { gpr_mu_init(&mu_); } mutex() { g_core_codegen_interface->gpr_mu_init(&mu_); }
~mutex() { gpr_mu_destroy(&mu_); } ~mutex() { g_core_codegen_interface->gpr_mu_destroy(&mu_); }
private: private:
::gpr_mu mu_; ::gpr_mu mu_;
@ -57,16 +59,18 @@ class mutex {
template <class mutex> template <class mutex>
class lock_guard { class lock_guard {
public: public:
lock_guard(mutex &mu) : mu_(mu), locked(true) { gpr_mu_lock(&mu.mu_); } lock_guard(mutex &mu) : mu_(mu), locked(true) {
g_core_codegen_interface->gpr_mu_lock(&mu.mu_);
}
~lock_guard() { unlock_internal(); } ~lock_guard() { unlock_internal(); }
protected: protected:
void lock_internal() { void lock_internal() {
if (!locked) gpr_mu_lock(&mu_.mu_); if (!locked) g_core_codegen_interface->gpr_mu_lock(&mu_.mu_);
locked = true; locked = true;
} }
void unlock_internal() { void unlock_internal() {
if (locked) gpr_mu_unlock(&mu_.mu_); if (locked) g_core_codegen_interface->gpr_mu_unlock(&mu_.mu_);
locked = false; locked = false;
} }
@ -86,15 +90,17 @@ class unique_lock : public lock_guard<mutex> {
class condition_variable { class condition_variable {
public: public:
condition_variable() { gpr_cv_init(&cv_); } condition_variable() { g_core_codegen_interface->gpr_cv_init(&cv_); }
~condition_variable() { gpr_cv_destroy(&cv_); } ~condition_variable() { g_core_codegen_interface->gpr_cv_destroy(&cv_); }
void wait(lock_guard<mutex> &mu) { void wait(lock_guard<mutex> &mu) {
mu.locked = false; mu.locked = false;
gpr_cv_wait(&cv_, &mu.mu_.mu_, gpr_inf_future(GPR_CLOCK_REALTIME)); g_core_codegen_interface->gpr_cv_wait(
&cv_, &mu.mu_.mu_,
g_core_codegen_interface->gpr_inf_future(GPR_CLOCK_REALTIME));
mu.locked = true; mu.locked = true;
} }
void notify_one() { gpr_cv_signal(&cv_); } void notify_one() { g_core_codegen_interface->gpr_cv_signal(&cv_); }
void notify_all() { gpr_cv_broadcast(&cv_); } void notify_all() { g_core_codegen_interface->gpr_cv_broadcast(&cv_); }
private: private:
gpr_cv cv_; gpr_cv cv_;

@ -42,7 +42,6 @@
#include <grpc++/impl/codegen/server_context.h> #include <grpc++/impl/codegen/server_context.h>
#include <grpc++/impl/codegen/service_type.h> #include <grpc++/impl/codegen/service_type.h>
#include <grpc++/impl/codegen/status.h> #include <grpc++/impl/codegen/status.h>
#include <grpc/impl/codegen/log.h>
namespace grpc { namespace grpc {
@ -64,12 +63,24 @@ class ClientStreamingInterface {
virtual Status Finish() = 0; virtual Status Finish() = 0;
}; };
/// Common interface for all synchronous server side streaming.
class ServerStreamingInterface {
public:
virtual ~ServerStreamingInterface() {}
/// Blocking send initial metadata to client.
virtual void SendInitialMetadata() = 0;
};
/// An interface that yields a sequence of messages of type \a R. /// An interface that yields a sequence of messages of type \a R.
template <class R> template <class R>
class ReaderInterface { class ReaderInterface {
public: public:
virtual ~ReaderInterface() {} virtual ~ReaderInterface() {}
/// Upper bound on the next message size available for reading on this stream
virtual bool NextMessageSize(uint32_t* sz) = 0;
/// Blocking read a message and parse to \a msg. Returns \a true on success. /// Blocking read a message and parse to \a msg. Returns \a true on success.
/// This is thread-safe with respect to \a Write or \WritesDone methods on /// This is thread-safe with respect to \a Write or \WritesDone methods on
/// the same stream. It should not be called concurrently with another \a /// the same stream. It should not be called concurrently with another \a
@ -148,6 +159,11 @@ class ClientReader GRPC_FINAL : public ClientReaderInterface<R> {
cq_.Pluck(&ops); /// status ignored cq_.Pluck(&ops); /// status ignored
} }
bool NextMessageSize(uint32_t* sz) GRPC_OVERRIDE {
*sz = call_.max_message_size();
return true;
}
bool Read(R* msg) GRPC_OVERRIDE { bool Read(R* msg) GRPC_OVERRIDE {
CallOpSet<CallOpRecvInitialMetadata, CallOpRecvMessage<R>> ops; CallOpSet<CallOpRecvInitialMetadata, CallOpRecvMessage<R>> ops;
if (!context_->initial_metadata_received_) { if (!context_->initial_metadata_received_) {
@ -293,6 +309,11 @@ class ClientReaderWriter GRPC_FINAL : public ClientReaderWriterInterface<W, R> {
cq_.Pluck(&ops); // status ignored cq_.Pluck(&ops); // status ignored
} }
bool NextMessageSize(uint32_t* sz) GRPC_OVERRIDE {
*sz = call_.max_message_size();
return true;
}
bool Read(R* msg) GRPC_OVERRIDE { bool Read(R* msg) GRPC_OVERRIDE {
CallOpSet<CallOpRecvInitialMetadata, CallOpRecvMessage<R>> ops; CallOpSet<CallOpRecvInitialMetadata, CallOpRecvMessage<R>> ops;
if (!context_->initial_metadata_received_) { if (!context_->initial_metadata_received_) {
@ -336,12 +357,17 @@ class ClientReaderWriter GRPC_FINAL : public ClientReaderWriterInterface<W, R> {
Call call_; Call call_;
}; };
/// Server-side interface for streaming reads of message of type \a R.
template <class R>
class ServerReaderInterface : public ServerStreamingInterface,
public ReaderInterface<R> {};
template <class R> template <class R>
class ServerReader GRPC_FINAL : public ReaderInterface<R> { class ServerReader GRPC_FINAL : public ServerReaderInterface<R> {
public: public:
ServerReader(Call* call, ServerContext* ctx) : call_(call), ctx_(ctx) {} ServerReader(Call* call, ServerContext* ctx) : call_(call), ctx_(ctx) {}
void SendInitialMetadata() { void SendInitialMetadata() GRPC_OVERRIDE {
GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_); GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_);
CallOpSet<CallOpSendInitialMetadata> ops; CallOpSet<CallOpSendInitialMetadata> ops;
@ -355,6 +381,11 @@ class ServerReader GRPC_FINAL : public ReaderInterface<R> {
call_->cq()->Pluck(&ops); call_->cq()->Pluck(&ops);
} }
bool NextMessageSize(uint32_t* sz) GRPC_OVERRIDE {
*sz = call_->max_message_size();
return true;
}
bool Read(R* msg) GRPC_OVERRIDE { bool Read(R* msg) GRPC_OVERRIDE {
CallOpSet<CallOpRecvMessage<R>> ops; CallOpSet<CallOpRecvMessage<R>> ops;
ops.RecvMessage(msg); ops.RecvMessage(msg);
@ -367,12 +398,17 @@ class ServerReader GRPC_FINAL : public ReaderInterface<R> {
ServerContext* const ctx_; ServerContext* const ctx_;
}; };
/// Server-side interface for streaming writes of message of type \a W.
template <class W> template <class W>
class ServerWriter GRPC_FINAL : public WriterInterface<W> { class ServerWriterInterface : public ServerStreamingInterface,
public WriterInterface<W> {};
template <class W>
class ServerWriter GRPC_FINAL : public ServerWriterInterface<W> {
public: public:
ServerWriter(Call* call, ServerContext* ctx) : call_(call), ctx_(ctx) {} ServerWriter(Call* call, ServerContext* ctx) : call_(call), ctx_(ctx) {}
void SendInitialMetadata() { void SendInitialMetadata() GRPC_OVERRIDE {
GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_); GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_);
CallOpSet<CallOpSendInitialMetadata> ops; CallOpSet<CallOpSendInitialMetadata> ops;
@ -411,10 +447,17 @@ class ServerWriter GRPC_FINAL : public WriterInterface<W> {
/// Server-side interface for bi-directional streaming. /// Server-side interface for bi-directional streaming.
template <class W, class R> template <class W, class R>
class ServerReaderWriter GRPC_FINAL : public WriterInterface<W>, class ServerReaderWriterInterface : public ServerStreamingInterface,
public ReaderInterface<R> { public WriterInterface<W>,
public ReaderInterface<R> {};
// Actual implementation of bi-directional streaming
namespace internal {
template <class W, class R>
class ServerReaderWriterBody GRPC_FINAL {
public: public:
ServerReaderWriter(Call* call, ServerContext* ctx) : call_(call), ctx_(ctx) {} ServerReaderWriterBody(Call* call, ServerContext* ctx)
: call_(call), ctx_(ctx) {}
void SendInitialMetadata() { void SendInitialMetadata() {
GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_); GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_);
@ -430,15 +473,19 @@ class ServerReaderWriter GRPC_FINAL : public WriterInterface<W>,
call_->cq()->Pluck(&ops); call_->cq()->Pluck(&ops);
} }
bool Read(R* msg) GRPC_OVERRIDE { bool NextMessageSize(uint32_t* sz) {
*sz = call_->max_message_size();
return true;
}
bool Read(R* msg) {
CallOpSet<CallOpRecvMessage<R>> ops; CallOpSet<CallOpRecvMessage<R>> ops;
ops.RecvMessage(msg); ops.RecvMessage(msg);
call_->PerformOps(&ops); call_->PerformOps(&ops);
return call_->cq()->Pluck(&ops) && ops.got_message; return call_->cq()->Pluck(&ops) && ops.got_message;
} }
using WriterInterface<W>::Write; bool Write(const W& msg, const WriteOptions& options) {
bool Write(const W& msg, const WriteOptions& options) GRPC_OVERRIDE {
CallOpSet<CallOpSendInitialMetadata, CallOpSendMessage> ops; CallOpSet<CallOpSendInitialMetadata, CallOpSendMessage> ops;
if (!ops.SendMessage(msg, options).ok()) { if (!ops.SendMessage(msg, options).ok()) {
return false; return false;
@ -459,6 +506,76 @@ class ServerReaderWriter GRPC_FINAL : public WriterInterface<W>,
Call* const call_; Call* const call_;
ServerContext* const ctx_; ServerContext* const ctx_;
}; };
}
// class to represent the user API for a bidirectional streaming call
template <class W, class R>
class ServerReaderWriter GRPC_FINAL : public ServerReaderWriterInterface<W, R> {
public:
ServerReaderWriter(Call* call, ServerContext* ctx) : body_(call, ctx) {}
void SendInitialMetadata() GRPC_OVERRIDE { body_.SendInitialMetadata(); }
bool NextMessageSize(uint32_t* sz) GRPC_OVERRIDE {
return body_.NextMessageSize(sz);
}
bool Read(R* msg) GRPC_OVERRIDE { return body_.Read(msg); }
using WriterInterface<W>::Write;
bool Write(const W& msg, const WriteOptions& options) GRPC_OVERRIDE {
return body_.Write(msg, options);
}
private:
internal::ServerReaderWriterBody<W, R> body_;
};
/// A class to represent a flow-controlled unary call. This is something
/// of a hybrid between conventional unary and streaming. This is invoked
/// through a unary call on the client side, but the server responds to it
/// as though it were a single-ping-pong streaming call. The server can use
/// the \a NextMessageSize method to determine an upper-bound on the size of
/// the message.
/// A key difference relative to streaming: ServerUnaryStreamer
/// must have exactly 1 Read and exactly 1 Write, in that order, to function
/// correctly. Otherwise, the RPC is in error.
template <class RequestType, class ResponseType>
class ServerUnaryStreamer GRPC_FINAL
: public ServerReaderWriterInterface<ResponseType, RequestType> {
public:
ServerUnaryStreamer(Call* call, ServerContext* ctx)
: body_(call, ctx), read_done_(false), write_done_(false) {}
void SendInitialMetadata() GRPC_OVERRIDE { body_.SendInitialMetadata(); }
bool NextMessageSize(uint32_t* sz) GRPC_OVERRIDE {
return body_.NextMessageSize(sz);
}
bool Read(RequestType* request) GRPC_OVERRIDE {
if (read_done_) {
return false;
}
read_done_ = true;
return body_.Read(request);
}
using WriterInterface<ResponseType>::Write;
bool Write(const ResponseType& response,
const WriteOptions& options) GRPC_OVERRIDE {
if (write_done_ || !read_done_) {
return false;
}
write_done_ = true;
return body_.Write(response, options);
}
private:
internal::ServerReaderWriterBody<ResponseType, RequestType> body_;
bool read_done_;
bool write_done_;
};
} // namespace grpc } // namespace grpc

@ -34,10 +34,8 @@
#ifndef GRPCXX_IMPL_CODEGEN_THRIFT_SERIALIZER_H #ifndef GRPCXX_IMPL_CODEGEN_THRIFT_SERIALIZER_H
#define GRPCXX_IMPL_CODEGEN_THRIFT_SERIALIZER_H #define GRPCXX_IMPL_CODEGEN_THRIFT_SERIALIZER_H
#include <grpc/impl/codegen/byte_buffer.h>
#include <grpc/impl/codegen/byte_buffer_reader.h> #include <grpc/impl/codegen/byte_buffer_reader.h>
#include <grpc/impl/codegen/slice.h> #include <grpc/impl/codegen/slice.h>
#include <grpc/impl/codegen/slice_buffer.h>
#include <thrift/protocol/TBinaryProtocol.h> #include <thrift/protocol/TBinaryProtocol.h>
#include <thrift/protocol/TCompactProtocol.h> #include <thrift/protocol/TCompactProtocol.h>
#include <thrift/protocol/TProtocolException.h> #include <thrift/protocol/TProtocolException.h>

@ -40,10 +40,8 @@
#include <grpc++/impl/codegen/status.h> #include <grpc++/impl/codegen/status.h>
#include <grpc++/impl/codegen/status_code_enum.h> #include <grpc++/impl/codegen/status_code_enum.h>
#include <grpc++/impl/codegen/thrift_serializer.h> #include <grpc++/impl/codegen/thrift_serializer.h>
#include <grpc/impl/codegen/byte_buffer.h>
#include <grpc/impl/codegen/byte_buffer_reader.h> #include <grpc/impl/codegen/byte_buffer_reader.h>
#include <grpc/impl/codegen/slice.h> #include <grpc/impl/codegen/slice.h>
#include <grpc/impl/codegen/slice_buffer.h>
#include <cstdint> #include <cstdint>
#include <cstdlib> #include <cstdlib>

@ -35,7 +35,7 @@
#define GRPCXX_IMPL_CODEGEN_TIME_H #define GRPCXX_IMPL_CODEGEN_TIME_H
#include <grpc++/impl/codegen/config.h> #include <grpc++/impl/codegen/config.h>
#include <grpc/impl/codegen/time.h> #include <grpc/impl/codegen/grpc_types.h>
namespace grpc { namespace grpc {
@ -79,7 +79,7 @@ class TimePoint<gpr_timespec> {
#include <chrono> #include <chrono>
#include <grpc/impl/codegen/time.h> #include <grpc/impl/codegen/grpc_types.h>
namespace grpc { namespace grpc {

@ -41,6 +41,7 @@
namespace grpc { namespace grpc {
class ServerInitializer; class ServerInitializer;
class ChannelArguments;
class ServerBuilderPlugin { class ServerBuilderPlugin {
public: public:
@ -58,6 +59,10 @@ class ServerBuilderPlugin {
// ServerBuilderOption::UpdatePlugins // ServerBuilderOption::UpdatePlugins
virtual void ChangeArguments(const grpc::string& name, void* value) = 0; virtual void ChangeArguments(const grpc::string& name, void* value) = 0;
// UpdateChannelArguments will be called in ServerBuilder::BuildAndStart(),
// before the Server instance is created.
virtual void UpdateChannelArguments(ChannelArguments* args) {}
virtual bool has_sync_methods() const { return false; } virtual bool has_sync_methods() const { return false; }
virtual bool has_async_methods() const { return false; } virtual bool has_async_methods() const { return false; }
}; };

@ -34,6 +34,69 @@
#ifndef GRPC_BYTE_BUFFER_H #ifndef GRPC_BYTE_BUFFER_H
#define GRPC_BYTE_BUFFER_H #define GRPC_BYTE_BUFFER_H
#include <grpc/impl/codegen/byte_buffer.h> #include <grpc/impl/codegen/grpc_types.h>
#include <grpc/support/slice_buffer.h>
#ifdef __cplusplus
extern "C" {
#endif
/** Returns a RAW byte buffer instance over the given slices (up to \a nslices).
*
* Increases the reference count for all \a slices processed. The user is
* responsible for invoking grpc_byte_buffer_destroy on the returned instance.*/
GRPCAPI grpc_byte_buffer *grpc_raw_byte_buffer_create(gpr_slice *slices,
size_t nslices);
/** Returns a *compressed* RAW byte buffer instance over the given slices (up to
* \a nslices). The \a compression argument defines the compression algorithm
* used to generate the data in \a slices.
*
* Increases the reference count for all \a slices processed. The user is
* responsible for invoking grpc_byte_buffer_destroy on the returned instance.*/
GRPCAPI grpc_byte_buffer *grpc_raw_compressed_byte_buffer_create(
gpr_slice *slices, size_t nslices, grpc_compression_algorithm compression);
/** Copies input byte buffer \a bb.
*
* Increases the reference count of all the source slices. The user is
* responsible for calling grpc_byte_buffer_destroy over the returned copy. */
GRPCAPI grpc_byte_buffer *grpc_byte_buffer_copy(grpc_byte_buffer *bb);
/** Returns the size of the given byte buffer, in bytes. */
GRPCAPI size_t grpc_byte_buffer_length(grpc_byte_buffer *bb);
/** Destroys \a byte_buffer deallocating all its memory. */
GRPCAPI void grpc_byte_buffer_destroy(grpc_byte_buffer *byte_buffer);
/** Reader for byte buffers. Iterates over slices in the byte buffer */
struct grpc_byte_buffer_reader;
typedef struct grpc_byte_buffer_reader grpc_byte_buffer_reader;
/** Initialize \a reader to read over \a buffer.
* Returns 1 upon success, 0 otherwise. */
GRPCAPI int grpc_byte_buffer_reader_init(grpc_byte_buffer_reader *reader,
grpc_byte_buffer *buffer);
/** Cleanup and destroy \a reader */
GRPCAPI void grpc_byte_buffer_reader_destroy(grpc_byte_buffer_reader *reader);
/** Updates \a slice with the next piece of data from from \a reader and returns
* 1. Returns 0 at the end of the stream. Caller is responsible for calling
* gpr_slice_unref on the result. */
GRPCAPI int grpc_byte_buffer_reader_next(grpc_byte_buffer_reader *reader,
gpr_slice *slice);
/** Merge all data from \a reader into single slice */
GRPCAPI gpr_slice
grpc_byte_buffer_reader_readall(grpc_byte_buffer_reader *reader);
/** Returns a RAW byte buffer instance from the output of \a reader. */
GRPCAPI grpc_byte_buffer *grpc_raw_byte_buffer_from_reader(
grpc_byte_buffer_reader *reader);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_BYTE_BUFFER_H */ #endif /* GRPC_BYTE_BUFFER_H */

@ -36,9 +36,10 @@
#include <stdlib.h> #include <stdlib.h>
#include <grpc/impl/codegen/compression_types.h>
#include <grpc/impl/codegen/port_platform.h> #include <grpc/impl/codegen/port_platform.h>
#include <grpc/impl/codegen/compression_types.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif

@ -90,6 +90,9 @@ GRPCAPI void grpc_shutdown(void);
/** Return a string representing the current version of grpc */ /** Return a string representing the current version of grpc */
GRPCAPI const char *grpc_version_string(void); GRPCAPI const char *grpc_version_string(void);
/** Return a string specifying what the 'g' in gRPC stands for */
GRPCAPI const char *grpc_g_stands_for(void);
/** Create a completion queue */ /** Create a completion queue */
GRPCAPI grpc_completion_queue *grpc_completion_queue_create(void *reserved); GRPCAPI grpc_completion_queue *grpc_completion_queue_create(void *reserved);

@ -75,6 +75,9 @@
int gpr_atm_no_barrier_cas(gpr_atm *p, gpr_atm o, gpr_atm n); int gpr_atm_no_barrier_cas(gpr_atm *p, gpr_atm o, gpr_atm n);
int gpr_atm_acq_cas(gpr_atm *p, gpr_atm o, gpr_atm n); int gpr_atm_acq_cas(gpr_atm *p, gpr_atm o, gpr_atm n);
int gpr_atm_rel_cas(gpr_atm *p, gpr_atm o, gpr_atm n); int gpr_atm_rel_cas(gpr_atm *p, gpr_atm o, gpr_atm n);
// Atomically, set *p=n and return the old value of *p
gpr_atm gpr_atm_full_xchg(gpr_atm *p, gpr_atm n);
*/ */
#include <grpc/impl/codegen/port_platform.h> #include <grpc/impl/codegen/port_platform.h>

@ -69,4 +69,6 @@ static __inline int gpr_atm_rel_cas(gpr_atm *p, gpr_atm o, gpr_atm n) {
__ATOMIC_RELAXED); __ATOMIC_RELAXED);
} }
#define gpr_atm_full_xchg(p, n) __atomic_exchange_n((p), (n), __ATOMIC_ACQ_REL)
#endif /* GRPC_IMPL_CODEGEN_ATM_GCC_ATOMIC_H */ #endif /* GRPC_IMPL_CODEGEN_ATM_GCC_ATOMIC_H */

@ -84,4 +84,12 @@ static __inline void gpr_atm_no_barrier_store(gpr_atm *p, gpr_atm value) {
#define gpr_atm_acq_cas(p, o, n) (__sync_bool_compare_and_swap((p), (o), (n))) #define gpr_atm_acq_cas(p, o, n) (__sync_bool_compare_and_swap((p), (o), (n)))
#define gpr_atm_rel_cas(p, o, n) gpr_atm_acq_cas((p), (o), (n)) #define gpr_atm_rel_cas(p, o, n) gpr_atm_acq_cas((p), (o), (n))
static __inline gpr_atm gpr_atm_full_xchg(gpr_atm *p, gpr_atm n) {
gpr_atm cur;
do {
cur = gpr_atm_acq_load(p);
} while (!gpr_atm_rel_cas(p, cur, n));
return cur;
}
#endif /* GRPC_IMPL_CODEGEN_ATM_GCC_SYNC_H */ #endif /* GRPC_IMPL_CODEGEN_ATM_GCC_SYNC_H */

@ -122,4 +122,8 @@ static __inline gpr_atm gpr_atm_full_fetch_add(gpr_atm *p, gpr_atm delta) {
return old; return old;
} }
static __inline gpr_atm gpr_atm_full_xchg(gpr_atm *p, gpr_atm n) {
return (gpr_atm)InterlockedExchangePointer((PVOID *)p, (PVOID)n);
}
#endif /* GRPC_IMPL_CODEGEN_ATM_WINDOWS_H */ #endif /* GRPC_IMPL_CODEGEN_ATM_WINDOWS_H */

@ -1,122 +0,0 @@
/*
*
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef GRPC_IMPL_CODEGEN_BYTE_BUFFER_H
#define GRPC_IMPL_CODEGEN_BYTE_BUFFER_H
#include <grpc/impl/codegen/compression_types.h>
#include <grpc/impl/codegen/slice_buffer.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
GRPC_BB_RAW
/* Future types may include GRPC_BB_PROTOBUF, etc. */
} grpc_byte_buffer_type;
struct grpc_byte_buffer {
void *reserved;
grpc_byte_buffer_type type;
union {
struct {
void *reserved[8];
} reserved;
struct {
grpc_compression_algorithm compression;
gpr_slice_buffer slice_buffer;
} raw;
} data;
};
typedef struct grpc_byte_buffer grpc_byte_buffer;
/** Returns a RAW byte buffer instance over the given slices (up to \a nslices).
*
* Increases the reference count for all \a slices processed. The user is
* responsible for invoking grpc_byte_buffer_destroy on the returned instance.*/
GRPCAPI grpc_byte_buffer *grpc_raw_byte_buffer_create(gpr_slice *slices,
size_t nslices);
/** Returns a *compressed* RAW byte buffer instance over the given slices (up to
* \a nslices). The \a compression argument defines the compression algorithm
* used to generate the data in \a slices.
*
* Increases the reference count for all \a slices processed. The user is
* responsible for invoking grpc_byte_buffer_destroy on the returned instance.*/
GRPCAPI grpc_byte_buffer *grpc_raw_compressed_byte_buffer_create(
gpr_slice *slices, size_t nslices, grpc_compression_algorithm compression);
/** Copies input byte buffer \a bb.
*
* Increases the reference count of all the source slices. The user is
* responsible for calling grpc_byte_buffer_destroy over the returned copy. */
GRPCAPI grpc_byte_buffer *grpc_byte_buffer_copy(grpc_byte_buffer *bb);
/** Returns the size of the given byte buffer, in bytes. */
GRPCAPI size_t grpc_byte_buffer_length(grpc_byte_buffer *bb);
/** Destroys \a byte_buffer deallocating all its memory. */
GRPCAPI void grpc_byte_buffer_destroy(grpc_byte_buffer *byte_buffer);
/** Reader for byte buffers. Iterates over slices in the byte buffer */
struct grpc_byte_buffer_reader;
typedef struct grpc_byte_buffer_reader grpc_byte_buffer_reader;
/** Initialize \a reader to read over \a buffer.
* Returns 1 upon success, 0 otherwise. */
GRPCAPI int grpc_byte_buffer_reader_init(grpc_byte_buffer_reader *reader,
grpc_byte_buffer *buffer);
/** Cleanup and destroy \a reader */
GRPCAPI void grpc_byte_buffer_reader_destroy(grpc_byte_buffer_reader *reader);
/** Updates \a slice with the next piece of data from from \a reader and returns
* 1. Returns 0 at the end of the stream. Caller is responsible for calling
* gpr_slice_unref on the result. */
GRPCAPI int grpc_byte_buffer_reader_next(grpc_byte_buffer_reader *reader,
gpr_slice *slice);
/** Merge all data from \a reader into single slice */
GRPCAPI gpr_slice
grpc_byte_buffer_reader_readall(grpc_byte_buffer_reader *reader);
/** Returns a RAW byte buffer instance from the output of \a reader. */
GRPCAPI grpc_byte_buffer *grpc_raw_byte_buffer_from_reader(
grpc_byte_buffer_reader *reader);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_IMPL_CODEGEN_BYTE_BUFFER_H */

@ -34,15 +34,15 @@
#ifndef GRPC_IMPL_CODEGEN_BYTE_BUFFER_READER_H #ifndef GRPC_IMPL_CODEGEN_BYTE_BUFFER_READER_H
#define GRPC_IMPL_CODEGEN_BYTE_BUFFER_READER_H #define GRPC_IMPL_CODEGEN_BYTE_BUFFER_READER_H
#include <grpc/impl/codegen/byte_buffer.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
struct grpc_byte_buffer;
struct grpc_byte_buffer_reader { struct grpc_byte_buffer_reader {
grpc_byte_buffer *buffer_in; struct grpc_byte_buffer *buffer_in;
grpc_byte_buffer *buffer_out; struct grpc_byte_buffer *buffer_out;
/* Different current objects correspond to different types of byte buffers */ /* Different current objects correspond to different types of byte buffers */
union { union {
/* Index into a slice buffer's array of slices */ /* Index into a slice buffer's array of slices */

@ -34,8 +34,8 @@
#ifndef GRPC_IMPL_CODEGEN_COMPRESSION_TYPES_H #ifndef GRPC_IMPL_CODEGEN_COMPRESSION_TYPES_H
#define GRPC_IMPL_CODEGEN_COMPRESSION_TYPES_H #define GRPC_IMPL_CODEGEN_COMPRESSION_TYPES_H
#include <grpc/impl/codegen/port_platform.h>
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

@ -0,0 +1,140 @@
/*
*
* Copyright 2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef GRPC_IMPL_CODEGEN_GPR_TYPES_H
#define GRPC_IMPL_CODEGEN_GPR_TYPES_H
#include <grpc/impl/codegen/port_platform.h>
#include <stddef.h>
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/* The clocks we support. */
typedef enum {
/* Monotonic clock. Epoch undefined. Always moves forwards. */
GPR_CLOCK_MONOTONIC = 0,
/* Realtime clock. May jump forwards or backwards. Settable by
the system administrator. Has its epoch at 0:00:00 UTC 1 Jan 1970. */
GPR_CLOCK_REALTIME,
/* CPU cycle time obtained by rdtsc instruction on x86 platforms. Epoch
undefined. Degrades to GPR_CLOCK_REALTIME on other platforms. */
GPR_CLOCK_PRECISE,
/* Unmeasurable clock type: no base, created by taking the difference
between two times */
GPR_TIMESPAN
} gpr_clock_type;
/* Analogous to struct timespec. On some machines, absolute times may be in
* local time. */
typedef struct gpr_timespec {
int64_t tv_sec;
int32_t tv_nsec;
/** Against which clock was this time measured? (or GPR_TIMESPAN if
this is a relative time meaure) */
gpr_clock_type clock_type;
} gpr_timespec;
/* Slice API
A slice represents a contiguous reference counted array of bytes.
It is cheap to take references to a slice, and it is cheap to create a
slice pointing to a subset of another slice.
The data-structure for slices is exposed here to allow non-gpr code to
build slices from whatever data they have available.
When defining interfaces that handle slices, care should be taken to define
reference ownership semantics (who should call unref?) and mutability
constraints (is the callee allowed to modify the slice?) */
/* Reference count container for gpr_slice. Contains function pointers to
increment and decrement reference counts. Implementations should cleanup
when the reference count drops to zero.
Typically client code should not touch this, and use gpr_slice_malloc,
gpr_slice_new, or gpr_slice_new_with_len instead. */
typedef struct gpr_slice_refcount {
void (*ref)(void *);
void (*unref)(void *);
} gpr_slice_refcount;
#define GPR_SLICE_INLINED_SIZE (sizeof(size_t) + sizeof(uint8_t *) - 1)
/* A gpr_slice s, if initialized, represents the byte range
s.bytes[0..s.length-1].
It can have an associated ref count which has a destruction routine to be run
when the ref count reaches zero (see gpr_slice_new() and grp_slice_unref()).
Multiple gpr_slice values may share a ref count.
If the slice does not have a refcount, it represents an inlined small piece
of data that is copied by value. */
typedef struct gpr_slice {
struct gpr_slice_refcount *refcount;
union {
struct {
uint8_t *bytes;
size_t length;
} refcounted;
struct {
uint8_t length;
uint8_t bytes[GPR_SLICE_INLINED_SIZE];
} inlined;
} data;
} gpr_slice;
#define GRPC_SLICE_BUFFER_INLINE_ELEMENTS 8
/* Represents an expandable array of slices, to be interpreted as a
single item. */
typedef struct {
/* slices in the array */
gpr_slice *slices;
/* the number of slices in the array */
size_t count;
/* the number of slices allocated in the array */
size_t capacity;
/* the combined length of all slices in the array */
size_t length;
/* inlined elements to avoid allocations */
gpr_slice inlined[GRPC_SLICE_BUFFER_INLINE_ELEMENTS];
} gpr_slice_buffer;
#ifdef __cplusplus
}
#endif
#endif /* GRPC_IMPL_CODEGEN_GPR_TYPES_H */

@ -34,15 +34,37 @@
#ifndef GRPC_IMPL_CODEGEN_GRPC_TYPES_H #ifndef GRPC_IMPL_CODEGEN_GRPC_TYPES_H
#define GRPC_IMPL_CODEGEN_GRPC_TYPES_H #define GRPC_IMPL_CODEGEN_GRPC_TYPES_H
#include <grpc/impl/codegen/byte_buffer.h> #include <grpc/impl/codegen/gpr_types.h>
#include <grpc/impl/codegen/compression_types.h>
#include <grpc/impl/codegen/status.h> #include <grpc/impl/codegen/status.h>
#include <stddef.h> #include <stddef.h>
#include <stdint.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
typedef enum {
GRPC_BB_RAW
/* Future types may include GRPC_BB_PROTOBUF, etc. */
} grpc_byte_buffer_type;
typedef struct grpc_byte_buffer {
void *reserved;
grpc_byte_buffer_type type;
union {
struct {
void *reserved[8];
} reserved;
struct {
grpc_compression_algorithm compression;
gpr_slice_buffer slice_buffer;
} raw;
} data;
} grpc_byte_buffer;
/** Completion Queues enable notification of the completion of asynchronous /** Completion Queues enable notification of the completion of asynchronous
actions. */ actions. */
typedef struct grpc_completion_queue grpc_completion_queue; typedef struct grpc_completion_queue grpc_completion_queue;
@ -142,6 +164,11 @@ typedef struct {
/** How much memory to use for hpack encoding. Int valued, bytes. */ /** How much memory to use for hpack encoding. Int valued, bytes. */
#define GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_ENCODER \ #define GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_ENCODER \
"grpc.http2.hpack_table_size.encoder" "grpc.http2.hpack_table_size.encoder"
/** How big a frame are we willing to receive via HTTP2.
Min 16384, max 16777215.
Larger values give lower CPU usage for large messages, but more head of line
blocking for small messages. */
#define GRPC_ARG_HTTP2_MAX_FRAME_SIZE "grpc.http2.max_frame_size"
/** Default authority to pass if none specified on call construction. A string. /** Default authority to pass if none specified on call construction. A string.
* */ * */
#define GRPC_ARG_DEFAULT_AUTHORITY "grpc.default_authority" #define GRPC_ARG_DEFAULT_AUTHORITY "grpc.default_authority"
@ -222,10 +249,14 @@ typedef enum grpc_call_error {
#define GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST (0x00000010u) #define GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST (0x00000010u)
/** Signal that the call should not return UNAVAILABLE before it has started */ /** Signal that the call should not return UNAVAILABLE before it has started */
#define GRPC_INITIAL_METADATA_IGNORE_CONNECTIVITY (0x00000020u) #define GRPC_INITIAL_METADATA_IGNORE_CONNECTIVITY (0x00000020u)
/** Signal that the call is cacheable. GRPC is free to use GET verb */
#define GRPC_INITIAL_METADATA_CACHEABLE_REQUEST (0x00000040u)
/** Mask of all valid flags */ /** Mask of all valid flags */
#define GRPC_INITIAL_METADATA_USED_MASK \ #define GRPC_INITIAL_METADATA_USED_MASK \
(GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST | \ (GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST | \
GRPC_INITIAL_METADATA_IGNORE_CONNECTIVITY) GRPC_INITIAL_METADATA_IGNORE_CONNECTIVITY | \
GRPC_INITIAL_METADATA_CACHEABLE_REQUEST)
/** A single metadata element */ /** A single metadata element */
typedef struct grpc_metadata { typedef struct grpc_metadata {
@ -327,6 +358,8 @@ typedef enum {
GRPC_OP_RECV_CLOSE_ON_SERVER GRPC_OP_RECV_CLOSE_ON_SERVER
} grpc_op_type; } grpc_op_type;
struct grpc_byte_buffer;
/** Operation data: one field for each op type (except SEND_CLOSE_FROM_CLIENT /** Operation data: one field for each op type (except SEND_CLOSE_FROM_CLIENT
which has no arguments) */ which has no arguments) */
typedef struct grpc_op { typedef struct grpc_op {
@ -351,7 +384,7 @@ typedef struct grpc_op {
grpc_compression_level level; grpc_compression_level level;
} maybe_compression_level; } maybe_compression_level;
} send_initial_metadata; } send_initial_metadata;
grpc_byte_buffer *send_message; struct grpc_byte_buffer *send_message;
struct { struct {
size_t trailing_metadata_count; size_t trailing_metadata_count;
grpc_metadata *trailing_metadata; grpc_metadata *trailing_metadata;
@ -367,7 +400,7 @@ typedef struct grpc_op {
/** ownership of the byte buffer is moved to the caller; the caller must /** ownership of the byte buffer is moved to the caller; the caller must
call grpc_byte_buffer_destroy on this value, or reuse it in a future op. call grpc_byte_buffer_destroy on this value, or reuse it in a future op.
*/ */
grpc_byte_buffer **recv_message; struct grpc_byte_buffer **recv_message;
struct { struct {
/** ownership of the array is with the caller, but ownership of the /** ownership of the array is with the caller, but ownership of the
elements stays with the call object (ie key, value members are owned elements stays with the call object (ie key, value members are owned

@ -1,118 +0,0 @@
/*
*
* Copyright 2015, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef GRPC_IMPL_CODEGEN_LOG_H
#define GRPC_IMPL_CODEGEN_LOG_H
#include <inttypes.h>
#include <stdarg.h>
#include <stdlib.h> /* for abort() */
#include <grpc/impl/codegen/port_platform.h>
#ifdef __cplusplus
extern "C" {
#endif
/* GPR log API.
Usage (within grpc):
int argument1 = 3;
char* argument2 = "hello";
gpr_log(GPR_DEBUG, "format string %d", argument1);
gpr_log(GPR_INFO, "hello world");
gpr_log(GPR_ERROR, "%d %s!!", argument1, argument2); */
/* The severity of a log message - use the #defines below when calling into
gpr_log to additionally supply file and line data */
typedef enum gpr_log_severity {
GPR_LOG_SEVERITY_DEBUG,
GPR_LOG_SEVERITY_INFO,
GPR_LOG_SEVERITY_ERROR
} gpr_log_severity;
#define GPR_LOG_VERBOSITY_UNSET -1
/* Returns a string representation of the log severity */
const char *gpr_log_severity_string(gpr_log_severity severity);
/* Macros to build log contexts at various severity levels */
#define GPR_DEBUG __FILE__, __LINE__, GPR_LOG_SEVERITY_DEBUG
#define GPR_INFO __FILE__, __LINE__, GPR_LOG_SEVERITY_INFO
#define GPR_ERROR __FILE__, __LINE__, GPR_LOG_SEVERITY_ERROR
/* Log a message. It's advised to use GPR_xxx above to generate the context
* for each message */
GPRAPI void gpr_log(const char *file, int line, gpr_log_severity severity,
const char *format, ...) GPRC_PRINT_FORMAT_CHECK(4, 5);
GPRAPI void gpr_log_message(const char *file, int line,
gpr_log_severity severity, const char *message);
/* Set global log verbosity */
GPRAPI void gpr_set_log_verbosity(gpr_log_severity min_severity_to_print);
GPRAPI void gpr_log_verbosity_init();
/* Log overrides: applications can use this API to intercept logging calls
and use their own implementations */
typedef struct {
const char *file;
int line;
gpr_log_severity severity;
const char *message;
} gpr_log_func_args;
typedef void (*gpr_log_func)(gpr_log_func_args *args);
GPRAPI void gpr_set_log_function(gpr_log_func func);
/* abort() the process if x is zero, having written a line to the log.
Intended for internal invariants. If the error can be recovered from,
without the possibility of corruption, or might best be reflected via
an exception in a higher-level language, consider returning error code. */
#define GPR_ASSERT(x) \
do { \
if (!(x)) { \
gpr_log(GPR_ERROR, "assertion failed: %s", #x); \
abort(); \
} \
} while (0)
#ifdef __cplusplus
}
#endif
#endif /* GRPC_IMPL_CODEGEN_LOG_H */

@ -234,6 +234,7 @@
#define GPR_ARCH_32 1 #define GPR_ARCH_32 1
#endif /* _LP64 */ #endif /* _LP64 */
#elif defined(__APPLE__) #elif defined(__APPLE__)
#include <Availability.h>
#include <TargetConditionals.h> #include <TargetConditionals.h>
#ifndef _BSD_SOURCE #ifndef _BSD_SOURCE
#define _BSD_SOURCE #define _BSD_SOURCE
@ -246,8 +247,18 @@
#define GPR_PTHREAD_TLS 1 #define GPR_PTHREAD_TLS 1
#else /* TARGET_OS_IPHONE */ #else /* TARGET_OS_IPHONE */
#define GPR_PLATFORM_STRING "osx" #define GPR_PLATFORM_STRING "osx"
#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED
#if __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_7
#define GPR_CPU_IPHONE 1
#define GPR_PTHREAD_TLS 1
#else /* __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_7 */
#define GPR_CPU_POSIX 1
#define GPR_GCC_TLS 1
#endif
#else /* __MAC_OS_X_VERSION_MIN_REQUIRED */
#define GPR_CPU_POSIX 1 #define GPR_CPU_POSIX 1
#define GPR_GCC_TLS 1 #define GPR_GCC_TLS 1
#endif
#define GPR_POSIX_CRASH_HANDLER 1 #define GPR_POSIX_CRASH_HANDLER 1
#endif #endif
#define GPR_GCC_ATOMIC 1 #define GPR_GCC_ATOMIC 1

@ -34,62 +34,8 @@
#ifndef GRPC_IMPL_CODEGEN_SLICE_H #ifndef GRPC_IMPL_CODEGEN_SLICE_H
#define GRPC_IMPL_CODEGEN_SLICE_H #define GRPC_IMPL_CODEGEN_SLICE_H
#include <grpc/impl/codegen/sync.h>
#include <stddef.h> #include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Slice API
A slice represents a contiguous reference counted array of bytes.
It is cheap to take references to a slice, and it is cheap to create a
slice pointing to a subset of another slice.
The data-structure for slices is exposed here to allow non-gpr code to
build slices from whatever data they have available.
When defining interfaces that handle slices, care should be taken to define
reference ownership semantics (who should call unref?) and mutability
constraints (is the callee allowed to modify the slice?) */
/* Reference count container for gpr_slice. Contains function pointers to
increment and decrement reference counts. Implementations should cleanup
when the reference count drops to zero.
Typically client code should not touch this, and use gpr_slice_malloc,
gpr_slice_new, or gpr_slice_new_with_len instead. */
typedef struct gpr_slice_refcount {
void (*ref)(void *);
void (*unref)(void *);
} gpr_slice_refcount;
#define GPR_SLICE_INLINED_SIZE (sizeof(size_t) + sizeof(uint8_t *) - 1)
/* A gpr_slice s, if initialized, represents the byte range
s.bytes[0..s.length-1].
It can have an associated ref count which has a destruction routine to be run
when the ref count reaches zero (see gpr_slice_new() and grp_slice_unref()).
Multiple gpr_slice values may share a ref count.
If the slice does not have a refcount, it represents an inlined small piece
of data that is copied by value. */
typedef struct gpr_slice {
struct gpr_slice_refcount *refcount;
union {
struct {
uint8_t *bytes;
size_t length;
} refcounted;
struct {
uint8_t length;
uint8_t bytes[GPR_SLICE_INLINED_SIZE];
} inlined;
} data;
} gpr_slice;
#define GPR_SLICE_START_PTR(slice) \ #define GPR_SLICE_START_PTR(slice) \
((slice).refcount ? (slice).data.refcounted.bytes \ ((slice).refcount ? (slice).data.refcounted.bytes \
: (slice).data.inlined.bytes) : (slice).data.inlined.bytes)
@ -103,88 +49,4 @@ typedef struct gpr_slice {
GPR_SLICE_START_PTR(slice) + GPR_SLICE_LENGTH(slice) GPR_SLICE_START_PTR(slice) + GPR_SLICE_LENGTH(slice)
#define GPR_SLICE_IS_EMPTY(slice) (GPR_SLICE_LENGTH(slice) == 0) #define GPR_SLICE_IS_EMPTY(slice) (GPR_SLICE_LENGTH(slice) == 0)
/* Increment the refcount of s. Requires slice is initialized.
Returns s. */
GPRAPI gpr_slice gpr_slice_ref(gpr_slice s);
/* Decrement the ref count of s. If the ref count of s reaches zero, all
slices sharing the ref count are destroyed, and considered no longer
initialized. If s is ultimately derived from a call to gpr_slice_new(start,
len, dest) where dest!=NULL , then (*dest)(start) is called, else if s is
ultimately derived from a call to gpr_slice_new_with_len(start, len, dest)
where dest!=NULL , then (*dest)(start, len). Requires s initialized. */
GPRAPI void gpr_slice_unref(gpr_slice s);
/* Create a slice pointing at some data. Calls malloc to allocate a refcount
for the object, and arranges that destroy will be called with the pointer
passed in at destruction. */
GPRAPI gpr_slice gpr_slice_new(void *p, size_t len, void (*destroy)(void *));
/* Equivalent to gpr_slice_new, but with a separate pointer that is
passed to the destroy function. This function can be useful when
the data is part of a larger structure that must be destroyed when
the data is no longer needed. */
GPRAPI gpr_slice gpr_slice_new_with_user_data(void *p, size_t len,
void (*destroy)(void *),
void *user_data);
/* Equivalent to gpr_slice_new, but with a two argument destroy function that
also takes the slice length. */
GPRAPI gpr_slice gpr_slice_new_with_len(void *p, size_t len,
void (*destroy)(void *, size_t));
/* Equivalent to gpr_slice_new(malloc(len), len, free), but saves one malloc()
call.
Aborts if malloc() fails. */
GPRAPI gpr_slice gpr_slice_malloc(size_t length);
/* Create a slice by copying a string.
Does not preserve null terminators.
Equivalent to:
size_t len = strlen(source);
gpr_slice slice = gpr_slice_malloc(len);
memcpy(slice->data, source, len); */
GPRAPI gpr_slice gpr_slice_from_copied_string(const char *source);
/* Create a slice by copying a buffer.
Equivalent to:
gpr_slice slice = gpr_slice_malloc(len);
memcpy(slice->data, source, len); */
GPRAPI gpr_slice gpr_slice_from_copied_buffer(const char *source, size_t len);
/* Create a slice pointing to constant memory */
GPRAPI gpr_slice gpr_slice_from_static_string(const char *source);
/* Return a result slice derived from s, which shares a ref count with s, where
result.data==s.data+begin, and result.length==end-begin.
The ref count of s is increased by one.
Requires s initialized, begin <= end, begin <= s.length, and
end <= source->length. */
GPRAPI gpr_slice gpr_slice_sub(gpr_slice s, size_t begin, size_t end);
/* The same as gpr_slice_sub, but without altering the ref count */
GPRAPI gpr_slice gpr_slice_sub_no_ref(gpr_slice s, size_t begin, size_t end);
/* Splits s into two: modifies s to be s[0:split], and returns a new slice,
sharing a refcount with s, that contains s[split:s.length].
Requires s intialized, split <= s.length */
GPRAPI gpr_slice gpr_slice_split_tail(gpr_slice *s, size_t split);
/* Splits s into two: modifies s to be s[split:s.length], and returns a new
slice, sharing a refcount with s, that contains s[0:split].
Requires s intialized, split <= s.length */
GPRAPI gpr_slice gpr_slice_split_head(gpr_slice *s, size_t split);
GPRAPI gpr_slice gpr_empty_slice(void);
/* Returns <0 if a < b, ==0 if a == b, >0 if a > b
The order is arbitrary, and is not guaranteed to be stable across different
versions of the API. */
GPRAPI int gpr_slice_cmp(gpr_slice a, gpr_slice b);
GPRAPI int gpr_slice_str_cmp(gpr_slice a, const char *b);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_IMPL_CODEGEN_SLICE_H */ #endif /* GRPC_IMPL_CODEGEN_SLICE_H */

@ -1,104 +0,0 @@
/*
*
* Copyright 2015, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef GRPC_IMPL_CODEGEN_SLICE_BUFFER_H
#define GRPC_IMPL_CODEGEN_SLICE_BUFFER_H
#include <grpc/impl/codegen/slice.h>
#ifdef __cplusplus
extern "C" {
#endif
#define GRPC_SLICE_BUFFER_INLINE_ELEMENTS 8
/* Represents an expandable array of slices, to be interpreted as a
single item. */
typedef struct {
/* slices in the array */
gpr_slice *slices;
/* the number of slices in the array */
size_t count;
/* the number of slices allocated in the array */
size_t capacity;
/* the combined length of all slices in the array */
size_t length;
/* inlined elements to avoid allocations */
gpr_slice inlined[GRPC_SLICE_BUFFER_INLINE_ELEMENTS];
} gpr_slice_buffer;
/* initialize a slice buffer */
GPRAPI void gpr_slice_buffer_init(gpr_slice_buffer *sb);
/* destroy a slice buffer - unrefs any held elements */
GPRAPI void gpr_slice_buffer_destroy(gpr_slice_buffer *sb);
/* Add an element to a slice buffer - takes ownership of the slice.
This function is allowed to concatenate the passed in slice to the end of
some other slice if desired by the slice buffer. */
GPRAPI void gpr_slice_buffer_add(gpr_slice_buffer *sb, gpr_slice slice);
/* add an element to a slice buffer - takes ownership of the slice and returns
the index of the slice.
Guarantees that the slice will not be concatenated at the end of another
slice (i.e. the data for this slice will begin at the first byte of the
slice at the returned index in sb->slices)
The implementation MAY decide to concatenate data at the end of a small
slice added in this fashion. */
GPRAPI size_t gpr_slice_buffer_add_indexed(gpr_slice_buffer *sb,
gpr_slice slice);
GPRAPI void gpr_slice_buffer_addn(gpr_slice_buffer *sb, gpr_slice *slices,
size_t n);
/* add a very small (less than 8 bytes) amount of data to the end of a slice
buffer: returns a pointer into which to add the data */
GPRAPI uint8_t *gpr_slice_buffer_tiny_add(gpr_slice_buffer *sb, size_t len);
/* pop the last buffer, but don't unref it */
GPRAPI void gpr_slice_buffer_pop(gpr_slice_buffer *sb);
/* clear a slice buffer, unref all elements */
GPRAPI void gpr_slice_buffer_reset_and_unref(gpr_slice_buffer *sb);
/* swap the contents of two slice buffers */
GPRAPI void gpr_slice_buffer_swap(gpr_slice_buffer *a, gpr_slice_buffer *b);
/* move all of the elements of src into dst */
GPRAPI void gpr_slice_buffer_move_into(gpr_slice_buffer *src,
gpr_slice_buffer *dst);
/* remove n bytes from the end of a slice buffer */
GPRAPI void gpr_slice_buffer_trim_end(gpr_slice_buffer *src, size_t n,
gpr_slice_buffer *garbage);
/* move the first n bytes of src into dst */
GPRAPI void gpr_slice_buffer_move_first(gpr_slice_buffer *src, size_t n,
gpr_slice_buffer *dst);
/* take the first slice in the slice buffer */
GPRAPI gpr_slice gpr_slice_buffer_take_first(gpr_slice_buffer *src);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_IMPL_CODEGEN_SLICE_BUFFER_H */

@ -64,257 +64,4 @@
#error Unable to determine platform for sync #error Unable to determine platform for sync
#endif #endif
#include <grpc/impl/codegen/time.h> /* for gpr_timespec */
#ifdef __cplusplus
extern "C" {
#endif
/* --- Mutex interface ---
At most one thread may hold an exclusive lock on a mutex at any given time.
Actions taken by a thread that holds a mutex exclusively happen after
actions taken by all previous holders of the mutex. Variables of type
gpr_mu are uninitialized when first declared. */
/* Initialize *mu. Requires: *mu uninitialized. */
GPRAPI void gpr_mu_init(gpr_mu *mu);
/* Cause *mu no longer to be initialized, freeing any memory in use. Requires:
*mu initialized; no other concurrent operation on *mu. */
GPRAPI void gpr_mu_destroy(gpr_mu *mu);
/* Wait until no thread has a lock on *mu, cause the calling thread to own an
exclusive lock on *mu, then return. May block indefinitely or crash if the
calling thread has a lock on *mu. Requires: *mu initialized. */
GPRAPI void gpr_mu_lock(gpr_mu *mu);
/* Release an exclusive lock on *mu held by the calling thread. Requires: *mu
initialized; the calling thread holds an exclusive lock on *mu. */
GPRAPI void gpr_mu_unlock(gpr_mu *mu);
/* Without blocking, attempt to acquire an exclusive lock on *mu for the
calling thread, then return non-zero iff success. Fail, if any thread holds
the lock; succeeds with high probability if no thread holds the lock.
Requires: *mu initialized. */
GPRAPI int gpr_mu_trylock(gpr_mu *mu);
/* --- Condition variable interface ---
A while-loop should be used with gpr_cv_wait() when waiting for conditions
to become true. See the example below. Variables of type gpr_cv are
uninitialized when first declared. */
/* Initialize *cv. Requires: *cv uninitialized. */
GPRAPI void gpr_cv_init(gpr_cv *cv);
/* Cause *cv no longer to be initialized, freeing any memory in use. Requires:
*cv initialized; no other concurrent operation on *cv.*/
GPRAPI void gpr_cv_destroy(gpr_cv *cv);
/* Atomically release *mu and wait on *cv. When the calling thread is woken
from *cv or the deadline abs_deadline is exceeded, execute gpr_mu_lock(mu)
and return whether the deadline was exceeded. Use
abs_deadline==gpr_inf_future for no deadline. abs_deadline can be either
an absolute deadline, or a GPR_TIMESPAN. May return even when not
woken explicitly. Requires: *mu and *cv initialized; the calling thread
holds an exclusive lock on *mu. */
GPRAPI int gpr_cv_wait(gpr_cv *cv, gpr_mu *mu, gpr_timespec abs_deadline);
/* If any threads are waiting on *cv, wake at least one.
Clients may treat this as an optimization of gpr_cv_broadcast()
for use in the case where waking more than one waiter is not useful.
Requires: *cv initialized. */
GPRAPI void gpr_cv_signal(gpr_cv *cv);
/* Wake all threads waiting on *cv. Requires: *cv initialized. */
GPRAPI void gpr_cv_broadcast(gpr_cv *cv);
/* --- One-time initialization ---
gpr_once must be declared with static storage class, and initialized with
GPR_ONCE_INIT. e.g.,
static gpr_once once_var = GPR_ONCE_INIT; */
/* Ensure that (*init_routine)() has been called exactly once (for the
specified gpr_once instance) and then return.
If multiple threads call gpr_once() on the same gpr_once instance, one of
them will call (*init_routine)(), and the others will block until that call
finishes.*/
GPRAPI void gpr_once_init(gpr_once *once, void (*init_routine)(void));
/* --- One-time event notification ---
These operations act on a gpr_event, which should be initialized with
gpr_ev_init(), or with GPR_EVENT_INIT if static, e.g.,
static gpr_event event_var = GPR_EVENT_INIT;
It requires no destruction. */
/* Initialize *ev. */
GPRAPI void gpr_event_init(gpr_event *ev);
/* Set *ev so that gpr_event_get() and gpr_event_wait() will return value.
Requires: *ev initialized; value != NULL; no prior or concurrent calls to
gpr_event_set(ev, ...) since initialization. */
GPRAPI void gpr_event_set(gpr_event *ev, void *value);
/* Return the value set by gpr_event_set(ev, ...), or NULL if no such call has
completed. If the result is non-NULL, all operations that occurred prior to
the gpr_event_set(ev, ...) set will be visible after this call returns.
Requires: *ev initialized. This operation is faster than acquiring a mutex
on most platforms. */
GPRAPI void *gpr_event_get(gpr_event *ev);
/* Wait until *ev is set by gpr_event_set(ev, ...), or abs_deadline is
exceeded, then return gpr_event_get(ev). Requires: *ev initialized. Use
abs_deadline==gpr_inf_future for no deadline. When the event has been
signalled before the call, this operation is faster than acquiring a mutex
on most platforms. */
GPRAPI void *gpr_event_wait(gpr_event *ev, gpr_timespec abs_deadline);
/* --- Reference counting ---
These calls act on the type gpr_refcount. It requires no destruction. */
/* Initialize *r to value n. */
GPRAPI void gpr_ref_init(gpr_refcount *r, int n);
/* Increment the reference count *r. Requires *r initialized. */
GPRAPI void gpr_ref(gpr_refcount *r);
/* Increment the reference count *r. Requires *r initialized.
Crashes if refcount is zero */
GPRAPI void gpr_ref_non_zero(gpr_refcount *r);
/* Increment the reference count *r by n. Requires *r initialized, n > 0. */
GPRAPI void gpr_refn(gpr_refcount *r, int n);
/* Decrement the reference count *r and return non-zero iff it has reached
zero. . Requires *r initialized. */
GPRAPI int gpr_unref(gpr_refcount *r);
/* --- Stats counters ---
These calls act on the integral type gpr_stats_counter. It requires no
destruction. Static instances may be initialized with
gpr_stats_counter c = GPR_STATS_INIT;
Beware: These operations do not imply memory barriers. Do not use them to
synchronize other events. */
/* Initialize *c to the value n. */
GPRAPI void gpr_stats_init(gpr_stats_counter *c, intptr_t n);
/* *c += inc. Requires: *c initialized. */
GPRAPI void gpr_stats_inc(gpr_stats_counter *c, intptr_t inc);
/* Return *c. Requires: *c initialized. */
GPRAPI intptr_t gpr_stats_read(const gpr_stats_counter *c);
/* ==================Example use of interface===================
A producer-consumer queue of up to N integers,
illustrating the use of the calls in this interface. */
#if 0
#define N 4
typedef struct queue {
gpr_cv non_empty; /* Signalled when length becomes non-zero. */
gpr_cv non_full; /* Signalled when length becomes non-N. */
gpr_mu mu; /* Protects all fields below.
(That is, except during initialization or
destruction, the fields below should be accessed
only by a thread that holds mu.) */
int head; /* Index of head of queue 0..N-1. */
int length; /* Number of valid elements in queue 0..N. */
int elem[N]; /* elem[head .. head+length-1] are queue elements. */
} queue;
/* Initialize *q. */
void queue_init(queue *q) {
gpr_mu_init(&q->mu);
gpr_cv_init(&q->non_empty);
gpr_cv_init(&q->non_full);
q->head = 0;
q->length = 0;
}
/* Free storage associated with *q. */
void queue_destroy(queue *q) {
gpr_mu_destroy(&q->mu);
gpr_cv_destroy(&q->non_empty);
gpr_cv_destroy(&q->non_full);
}
/* Wait until there is room in *q, then append x to *q. */
void queue_append(queue *q, int x) {
gpr_mu_lock(&q->mu);
/* To wait for a predicate without a deadline, loop on the negation of the
predicate, and use gpr_cv_wait(..., gpr_inf_future) inside the loop
to release the lock, wait, and reacquire on each iteration. Code that
makes the condition true should use gpr_cv_broadcast() on the
corresponding condition variable. The predicate must be on state
protected by the lock. */
while (q->length == N) {
gpr_cv_wait(&q->non_full, &q->mu, gpr_inf_future);
}
if (q->length == 0) { /* Wake threads blocked in queue_remove(). */
/* It's normal to use gpr_cv_broadcast() or gpr_signal() while
holding the lock. */
gpr_cv_broadcast(&q->non_empty);
}
q->elem[(q->head + q->length) % N] = x;
q->length++;
gpr_mu_unlock(&q->mu);
}
/* If it can be done without blocking, append x to *q and return non-zero.
Otherwise return 0. */
int queue_try_append(queue *q, int x) {
int result = 0;
if (gpr_mu_trylock(&q->mu)) {
if (q->length != N) {
if (q->length == 0) { /* Wake threads blocked in queue_remove(). */
gpr_cv_broadcast(&q->non_empty);
}
q->elem[(q->head + q->length) % N] = x;
q->length++;
result = 1;
}
gpr_mu_unlock(&q->mu);
}
return result;
}
/* Wait until the *q is non-empty or deadline abs_deadline passes. If the
queue is non-empty, remove its head entry, place it in *head, and return
non-zero. Otherwise return 0. */
int queue_remove(queue *q, int *head, gpr_timespec abs_deadline) {
int result = 0;
gpr_mu_lock(&q->mu);
/* To wait for a predicate with a deadline, loop on the negation of the
predicate or until gpr_cv_wait() returns true. Code that makes
the condition true should use gpr_cv_broadcast() on the corresponding
condition variable. The predicate must be on state protected by the
lock. */
while (q->length == 0 &&
!gpr_cv_wait(&q->non_empty, &q->mu, abs_deadline)) {
}
if (q->length != 0) { /* Queue is non-empty. */
result = 1;
if (q->length == N) { /* Wake threads blocked in queue_append(). */
gpr_cv_broadcast(&q->non_full);
}
*head = q->elem[q->head];
q->head = (q->head + 1) % N;
q->length--;
} /* else deadline exceeded */
gpr_mu_unlock(&q->mu);
return result;
}
#endif /* 0 */
#ifdef __cplusplus
}
#endif
#endif /* GRPC_IMPL_CODEGEN_SYNC_H */ #endif /* GRPC_IMPL_CODEGEN_SYNC_H */

@ -1,130 +0,0 @@
/*
*
* Copyright 2015, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef GRPC_IMPL_CODEGEN_TIME_H
#define GRPC_IMPL_CODEGEN_TIME_H
/* Time support.
We use gpr_timespec, which is analogous to struct timespec. On some
machines, absolute times may be in local time. */
#include <grpc/impl/codegen/port_platform.h>
#include <stddef.h>
#include <time.h>
#ifdef __cplusplus
extern "C" {
#endif
/* The clocks we support. */
typedef enum {
/* Monotonic clock. Epoch undefined. Always moves forwards. */
GPR_CLOCK_MONOTONIC = 0,
/* Realtime clock. May jump forwards or backwards. Settable by
the system administrator. Has its epoch at 0:00:00 UTC 1 Jan 1970. */
GPR_CLOCK_REALTIME,
/* CPU cycle time obtained by rdtsc instruction on x86 platforms. Epoch
undefined. Degrades to GPR_CLOCK_REALTIME on other platforms. */
GPR_CLOCK_PRECISE,
/* Unmeasurable clock type: no base, created by taking the difference
between two times */
GPR_TIMESPAN
} gpr_clock_type;
typedef struct gpr_timespec {
int64_t tv_sec;
int32_t tv_nsec;
/** Against which clock was this time measured? (or GPR_TIMESPAN if
this is a relative time meaure) */
gpr_clock_type clock_type;
} gpr_timespec;
/* Time constants. */
GPRAPI gpr_timespec
gpr_time_0(gpr_clock_type type); /* The zero time interval. */
GPRAPI gpr_timespec gpr_inf_future(gpr_clock_type type); /* The far future */
GPRAPI gpr_timespec gpr_inf_past(gpr_clock_type type); /* The far past. */
#define GPR_MS_PER_SEC 1000
#define GPR_US_PER_SEC 1000000
#define GPR_NS_PER_SEC 1000000000
#define GPR_NS_PER_MS 1000000
#define GPR_NS_PER_US 1000
#define GPR_US_PER_MS 1000
/* initialize time subsystem */
GPRAPI void gpr_time_init(void);
/* Return the current time measured from the given clocks epoch. */
GPRAPI gpr_timespec gpr_now(gpr_clock_type clock);
/* Convert a timespec from one clock to another */
GPRAPI gpr_timespec gpr_convert_clock_type(gpr_timespec t,
gpr_clock_type target_clock);
/* Return -ve, 0, or +ve according to whether a < b, a == b, or a > b
respectively. */
GPRAPI int gpr_time_cmp(gpr_timespec a, gpr_timespec b);
GPRAPI gpr_timespec gpr_time_max(gpr_timespec a, gpr_timespec b);
GPRAPI gpr_timespec gpr_time_min(gpr_timespec a, gpr_timespec b);
/* Add and subtract times. Calculations saturate at infinities. */
GPRAPI gpr_timespec gpr_time_add(gpr_timespec a, gpr_timespec b);
GPRAPI gpr_timespec gpr_time_sub(gpr_timespec a, gpr_timespec b);
/* Return a timespec representing a given number of time units. INT64_MIN is
interpreted as gpr_inf_past, and INT64_MAX as gpr_inf_future. */
GPRAPI gpr_timespec gpr_time_from_micros(int64_t x, gpr_clock_type clock_type);
GPRAPI gpr_timespec gpr_time_from_nanos(int64_t x, gpr_clock_type clock_type);
GPRAPI gpr_timespec gpr_time_from_millis(int64_t x, gpr_clock_type clock_type);
GPRAPI gpr_timespec gpr_time_from_seconds(int64_t x, gpr_clock_type clock_type);
GPRAPI gpr_timespec gpr_time_from_minutes(int64_t x, gpr_clock_type clock_type);
GPRAPI gpr_timespec gpr_time_from_hours(int64_t x, gpr_clock_type clock_type);
GPRAPI int32_t gpr_time_to_millis(gpr_timespec timespec);
/* Return 1 if two times are equal or within threshold of each other,
0 otherwise */
GPRAPI int gpr_time_similar(gpr_timespec a, gpr_timespec b,
gpr_timespec threshold);
/* Sleep until at least 'until' - an absolute timeout */
GPRAPI void gpr_sleep_until(gpr_timespec until);
GPRAPI double gpr_timespec_to_micros(gpr_timespec t);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_IMPL_CODEGEN_TIME_H */

@ -4,8 +4,6 @@ framework module grpc {
header "byte_buffer_reader.h" header "byte_buffer_reader.h"
header "grpc_security.h" header "grpc_security.h"
header "grpc_security_constants.h" header "grpc_security_constants.h"
header "impl/codegen/alloc.h"
header "impl/codegen/byte_buffer_reader.h"
header "support/alloc.h" header "support/alloc.h"
header "support/port_platform.h" header "support/port_platform.h"
header "support/string_util.h" header "support/string_util.h"

@ -34,6 +34,41 @@
#ifndef GRPC_SUPPORT_ALLOC_H #ifndef GRPC_SUPPORT_ALLOC_H
#define GRPC_SUPPORT_ALLOC_H #define GRPC_SUPPORT_ALLOC_H
#include <grpc/impl/codegen/alloc.h> #include <stddef.h>
#include <grpc/impl/codegen/port_platform.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct gpr_allocation_functions {
void *(*malloc_fn)(size_t size);
void *(*realloc_fn)(void *ptr, size_t size);
void (*free_fn)(void *ptr);
} gpr_allocation_functions;
/* malloc, never returns NULL */
GPRAPI void *gpr_malloc(size_t size);
/* free */
GPRAPI void gpr_free(void *ptr);
/* realloc, never returns NULL */
GPRAPI void *gpr_realloc(void *p, size_t size);
/* aligned malloc, never returns NULL, will align to 1 << alignment_log */
GPRAPI void *gpr_malloc_aligned(size_t size, size_t alignment_log);
/* free memory allocated by gpr_malloc_aligned */
GPRAPI void gpr_free_aligned(void *ptr);
/** Request the family of allocation functions in \a functions be used. NOTE
* that this request will be honored in a *best effort* basis and that no
* guarantees are made about the default functions (eg, malloc) being called. */
GPRAPI void gpr_set_allocation_functions(gpr_allocation_functions functions);
/** Return the family of allocation functions currently in effect. */
GPRAPI gpr_allocation_functions gpr_get_allocation_functions();
#ifdef __cplusplus
}
#endif
#endif /* GRPC_SUPPORT_ALLOC_H */ #endif /* GRPC_SUPPORT_ALLOC_H */

@ -34,6 +34,85 @@
#ifndef GRPC_SUPPORT_LOG_H #ifndef GRPC_SUPPORT_LOG_H
#define GRPC_SUPPORT_LOG_H #define GRPC_SUPPORT_LOG_H
#include <grpc/impl/codegen/log.h> #include <inttypes.h>
#include <stdarg.h>
#include <stdlib.h> /* for abort() */
#include <grpc/impl/codegen/port_platform.h>
#ifdef __cplusplus
extern "C" {
#endif
/* GPR log API.
Usage (within grpc):
int argument1 = 3;
char* argument2 = "hello";
gpr_log(GPR_DEBUG, "format string %d", argument1);
gpr_log(GPR_INFO, "hello world");
gpr_log(GPR_ERROR, "%d %s!!", argument1, argument2); */
/* The severity of a log message - use the #defines below when calling into
gpr_log to additionally supply file and line data */
typedef enum gpr_log_severity {
GPR_LOG_SEVERITY_DEBUG,
GPR_LOG_SEVERITY_INFO,
GPR_LOG_SEVERITY_ERROR
} gpr_log_severity;
#define GPR_LOG_VERBOSITY_UNSET -1
/* Returns a string representation of the log severity */
const char *gpr_log_severity_string(gpr_log_severity severity);
/* Macros to build log contexts at various severity levels */
#define GPR_DEBUG __FILE__, __LINE__, GPR_LOG_SEVERITY_DEBUG
#define GPR_INFO __FILE__, __LINE__, GPR_LOG_SEVERITY_INFO
#define GPR_ERROR __FILE__, __LINE__, GPR_LOG_SEVERITY_ERROR
/* Log a message. It's advised to use GPR_xxx above to generate the context
* for each message */
GPRAPI void gpr_log(const char *file, int line, gpr_log_severity severity,
const char *format, ...) GPRC_PRINT_FORMAT_CHECK(4, 5);
GPRAPI void gpr_log_message(const char *file, int line,
gpr_log_severity severity, const char *message);
/* Set global log verbosity */
GPRAPI void gpr_set_log_verbosity(gpr_log_severity min_severity_to_print);
GPRAPI void gpr_log_verbosity_init();
/* Log overrides: applications can use this API to intercept logging calls
and use their own implementations */
typedef struct {
const char *file;
int line;
gpr_log_severity severity;
const char *message;
} gpr_log_func_args;
typedef void (*gpr_log_func)(gpr_log_func_args *args);
GPRAPI void gpr_set_log_function(gpr_log_func func);
/* abort() the process if x is zero, having written a line to the log.
Intended for internal invariants. If the error can be recovered from,
without the possibility of corruption, or might best be reflected via
an exception in a higher-level language, consider returning error code. */
#define GPR_ASSERT(x) \
do { \
if (!(x)) { \
gpr_log(GPR_ERROR, "assertion failed: %s", #x); \
abort(); \
} \
} while (0)
#ifdef __cplusplus
}
#endif
#endif /* GRPC_SUPPORT_LOG_H */ #endif /* GRPC_SUPPORT_LOG_H */

@ -35,5 +35,94 @@
#define GRPC_SUPPORT_SLICE_H #define GRPC_SUPPORT_SLICE_H
#include <grpc/impl/codegen/slice.h> #include <grpc/impl/codegen/slice.h>
#include <grpc/support/sync.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Increment the refcount of s. Requires slice is initialized.
Returns s. */
GPRAPI gpr_slice gpr_slice_ref(gpr_slice s);
/* Decrement the ref count of s. If the ref count of s reaches zero, all
slices sharing the ref count are destroyed, and considered no longer
initialized. If s is ultimately derived from a call to gpr_slice_new(start,
len, dest) where dest!=NULL , then (*dest)(start) is called, else if s is
ultimately derived from a call to gpr_slice_new_with_len(start, len, dest)
where dest!=NULL , then (*dest)(start, len). Requires s initialized. */
GPRAPI void gpr_slice_unref(gpr_slice s);
/* Create a slice pointing at some data. Calls malloc to allocate a refcount
for the object, and arranges that destroy will be called with the pointer
passed in at destruction. */
GPRAPI gpr_slice gpr_slice_new(void *p, size_t len, void (*destroy)(void *));
/* Equivalent to gpr_slice_new, but with a separate pointer that is
passed to the destroy function. This function can be useful when
the data is part of a larger structure that must be destroyed when
the data is no longer needed. */
GPRAPI gpr_slice gpr_slice_new_with_user_data(void *p, size_t len,
void (*destroy)(void *),
void *user_data);
/* Equivalent to gpr_slice_new, but with a two argument destroy function that
also takes the slice length. */
GPRAPI gpr_slice gpr_slice_new_with_len(void *p, size_t len,
void (*destroy)(void *, size_t));
/* Equivalent to gpr_slice_new(malloc(len), len, free), but saves one malloc()
call.
Aborts if malloc() fails. */
GPRAPI gpr_slice gpr_slice_malloc(size_t length);
/* Create a slice by copying a string.
Does not preserve null terminators.
Equivalent to:
size_t len = strlen(source);
gpr_slice slice = gpr_slice_malloc(len);
memcpy(slice->data, source, len); */
GPRAPI gpr_slice gpr_slice_from_copied_string(const char *source);
/* Create a slice by copying a buffer.
Equivalent to:
gpr_slice slice = gpr_slice_malloc(len);
memcpy(slice->data, source, len); */
GPRAPI gpr_slice gpr_slice_from_copied_buffer(const char *source, size_t len);
/* Create a slice pointing to constant memory */
GPRAPI gpr_slice gpr_slice_from_static_string(const char *source);
/* Return a result slice derived from s, which shares a ref count with s, where
result.data==s.data+begin, and result.length==end-begin.
The ref count of s is increased by one.
Requires s initialized, begin <= end, begin <= s.length, and
end <= source->length. */
GPRAPI gpr_slice gpr_slice_sub(gpr_slice s, size_t begin, size_t end);
/* The same as gpr_slice_sub, but without altering the ref count */
GPRAPI gpr_slice gpr_slice_sub_no_ref(gpr_slice s, size_t begin, size_t end);
/* Splits s into two: modifies s to be s[0:split], and returns a new slice,
sharing a refcount with s, that contains s[split:s.length].
Requires s intialized, split <= s.length */
GPRAPI gpr_slice gpr_slice_split_tail(gpr_slice *s, size_t split);
/* Splits s into two: modifies s to be s[split:s.length], and returns a new
slice, sharing a refcount with s, that contains s[0:split].
Requires s intialized, split <= s.length */
GPRAPI gpr_slice gpr_slice_split_head(gpr_slice *s, size_t split);
GPRAPI gpr_slice gpr_empty_slice(void);
/* Returns <0 if a < b, ==0 if a == b, >0 if a > b
The order is arbitrary, and is not guaranteed to be stable across different
versions of the API. */
GPRAPI int gpr_slice_cmp(gpr_slice a, gpr_slice b);
GPRAPI int gpr_slice_str_cmp(gpr_slice a, const char *b);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_SUPPORT_SLICE_H */ #endif /* GRPC_SUPPORT_SLICE_H */

@ -34,6 +34,54 @@
#ifndef GRPC_SUPPORT_SLICE_BUFFER_H #ifndef GRPC_SUPPORT_SLICE_BUFFER_H
#define GRPC_SUPPORT_SLICE_BUFFER_H #define GRPC_SUPPORT_SLICE_BUFFER_H
#include <grpc/impl/codegen/slice_buffer.h> #include <grpc/support/slice.h>
#ifdef __cplusplus
extern "C" {
#endif
/* initialize a slice buffer */
GPRAPI void gpr_slice_buffer_init(gpr_slice_buffer *sb);
/* destroy a slice buffer - unrefs any held elements */
GPRAPI void gpr_slice_buffer_destroy(gpr_slice_buffer *sb);
/* Add an element to a slice buffer - takes ownership of the slice.
This function is allowed to concatenate the passed in slice to the end of
some other slice if desired by the slice buffer. */
GPRAPI void gpr_slice_buffer_add(gpr_slice_buffer *sb, gpr_slice slice);
/* add an element to a slice buffer - takes ownership of the slice and returns
the index of the slice.
Guarantees that the slice will not be concatenated at the end of another
slice (i.e. the data for this slice will begin at the first byte of the
slice at the returned index in sb->slices)
The implementation MAY decide to concatenate data at the end of a small
slice added in this fashion. */
GPRAPI size_t gpr_slice_buffer_add_indexed(gpr_slice_buffer *sb,
gpr_slice slice);
GPRAPI void gpr_slice_buffer_addn(gpr_slice_buffer *sb, gpr_slice *slices,
size_t n);
/* add a very small (less than 8 bytes) amount of data to the end of a slice
buffer: returns a pointer into which to add the data */
GPRAPI uint8_t *gpr_slice_buffer_tiny_add(gpr_slice_buffer *sb, size_t len);
/* pop the last buffer, but don't unref it */
GPRAPI void gpr_slice_buffer_pop(gpr_slice_buffer *sb);
/* clear a slice buffer, unref all elements */
GPRAPI void gpr_slice_buffer_reset_and_unref(gpr_slice_buffer *sb);
/* swap the contents of two slice buffers */
GPRAPI void gpr_slice_buffer_swap(gpr_slice_buffer *a, gpr_slice_buffer *b);
/* move all of the elements of src into dst */
GPRAPI void gpr_slice_buffer_move_into(gpr_slice_buffer *src,
gpr_slice_buffer *dst);
/* remove n bytes from the end of a slice buffer */
GPRAPI void gpr_slice_buffer_trim_end(gpr_slice_buffer *src, size_t n,
gpr_slice_buffer *garbage);
/* move the first n bytes of src into dst */
GPRAPI void gpr_slice_buffer_move_first(gpr_slice_buffer *src, size_t n,
gpr_slice_buffer *dst);
/* take the first slice in the slice buffer */
GPRAPI gpr_slice gpr_slice_buffer_take_first(gpr_slice_buffer *src);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_SUPPORT_SLICE_BUFFER_H */ #endif /* GRPC_SUPPORT_SLICE_BUFFER_H */

@ -34,6 +34,258 @@
#ifndef GRPC_SUPPORT_SYNC_H #ifndef GRPC_SUPPORT_SYNC_H
#define GRPC_SUPPORT_SYNC_H #define GRPC_SUPPORT_SYNC_H
#include <grpc/impl/codegen/gpr_types.h> /* for gpr_timespec */
#include <grpc/impl/codegen/sync.h> #include <grpc/impl/codegen/sync.h>
#ifdef __cplusplus
extern "C" {
#endif
/* --- Mutex interface ---
At most one thread may hold an exclusive lock on a mutex at any given time.
Actions taken by a thread that holds a mutex exclusively happen after
actions taken by all previous holders of the mutex. Variables of type
gpr_mu are uninitialized when first declared. */
/* Initialize *mu. Requires: *mu uninitialized. */
GPRAPI void gpr_mu_init(gpr_mu *mu);
/* Cause *mu no longer to be initialized, freeing any memory in use. Requires:
*mu initialized; no other concurrent operation on *mu. */
GPRAPI void gpr_mu_destroy(gpr_mu *mu);
/* Wait until no thread has a lock on *mu, cause the calling thread to own an
exclusive lock on *mu, then return. May block indefinitely or crash if the
calling thread has a lock on *mu. Requires: *mu initialized. */
GPRAPI void gpr_mu_lock(gpr_mu *mu);
/* Release an exclusive lock on *mu held by the calling thread. Requires: *mu
initialized; the calling thread holds an exclusive lock on *mu. */
GPRAPI void gpr_mu_unlock(gpr_mu *mu);
/* Without blocking, attempt to acquire an exclusive lock on *mu for the
calling thread, then return non-zero iff success. Fail, if any thread holds
the lock; succeeds with high probability if no thread holds the lock.
Requires: *mu initialized. */
GPRAPI int gpr_mu_trylock(gpr_mu *mu);
/* --- Condition variable interface ---
A while-loop should be used with gpr_cv_wait() when waiting for conditions
to become true. See the example below. Variables of type gpr_cv are
uninitialized when first declared. */
/* Initialize *cv. Requires: *cv uninitialized. */
GPRAPI void gpr_cv_init(gpr_cv *cv);
/* Cause *cv no longer to be initialized, freeing any memory in use. Requires:
*cv initialized; no other concurrent operation on *cv.*/
GPRAPI void gpr_cv_destroy(gpr_cv *cv);
/* Atomically release *mu and wait on *cv. When the calling thread is woken
from *cv or the deadline abs_deadline is exceeded, execute gpr_mu_lock(mu)
and return whether the deadline was exceeded. Use
abs_deadline==gpr_inf_future for no deadline. abs_deadline can be either
an absolute deadline, or a GPR_TIMESPAN. May return even when not
woken explicitly. Requires: *mu and *cv initialized; the calling thread
holds an exclusive lock on *mu. */
GPRAPI int gpr_cv_wait(gpr_cv *cv, gpr_mu *mu, gpr_timespec abs_deadline);
/* If any threads are waiting on *cv, wake at least one.
Clients may treat this as an optimization of gpr_cv_broadcast()
for use in the case where waking more than one waiter is not useful.
Requires: *cv initialized. */
GPRAPI void gpr_cv_signal(gpr_cv *cv);
/* Wake all threads waiting on *cv. Requires: *cv initialized. */
GPRAPI void gpr_cv_broadcast(gpr_cv *cv);
/* --- One-time initialization ---
gpr_once must be declared with static storage class, and initialized with
GPR_ONCE_INIT. e.g.,
static gpr_once once_var = GPR_ONCE_INIT; */
/* Ensure that (*init_routine)() has been called exactly once (for the
specified gpr_once instance) and then return.
If multiple threads call gpr_once() on the same gpr_once instance, one of
them will call (*init_routine)(), and the others will block until that call
finishes.*/
GPRAPI void gpr_once_init(gpr_once *once, void (*init_routine)(void));
/* --- One-time event notification ---
These operations act on a gpr_event, which should be initialized with
gpr_ev_init(), or with GPR_EVENT_INIT if static, e.g.,
static gpr_event event_var = GPR_EVENT_INIT;
It requires no destruction. */
/* Initialize *ev. */
GPRAPI void gpr_event_init(gpr_event *ev);
/* Set *ev so that gpr_event_get() and gpr_event_wait() will return value.
Requires: *ev initialized; value != NULL; no prior or concurrent calls to
gpr_event_set(ev, ...) since initialization. */
GPRAPI void gpr_event_set(gpr_event *ev, void *value);
/* Return the value set by gpr_event_set(ev, ...), or NULL if no such call has
completed. If the result is non-NULL, all operations that occurred prior to
the gpr_event_set(ev, ...) set will be visible after this call returns.
Requires: *ev initialized. This operation is faster than acquiring a mutex
on most platforms. */
GPRAPI void *gpr_event_get(gpr_event *ev);
/* Wait until *ev is set by gpr_event_set(ev, ...), or abs_deadline is
exceeded, then return gpr_event_get(ev). Requires: *ev initialized. Use
abs_deadline==gpr_inf_future for no deadline. When the event has been
signalled before the call, this operation is faster than acquiring a mutex
on most platforms. */
GPRAPI void *gpr_event_wait(gpr_event *ev, gpr_timespec abs_deadline);
/* --- Reference counting ---
These calls act on the type gpr_refcount. It requires no destruction. */
/* Initialize *r to value n. */
GPRAPI void gpr_ref_init(gpr_refcount *r, int n);
/* Increment the reference count *r. Requires *r initialized. */
GPRAPI void gpr_ref(gpr_refcount *r);
/* Increment the reference count *r. Requires *r initialized.
Crashes if refcount is zero */
GPRAPI void gpr_ref_non_zero(gpr_refcount *r);
/* Increment the reference count *r by n. Requires *r initialized, n > 0. */
GPRAPI void gpr_refn(gpr_refcount *r, int n);
/* Decrement the reference count *r and return non-zero iff it has reached
zero. . Requires *r initialized. */
GPRAPI int gpr_unref(gpr_refcount *r);
/* --- Stats counters ---
These calls act on the integral type gpr_stats_counter. It requires no
destruction. Static instances may be initialized with
gpr_stats_counter c = GPR_STATS_INIT;
Beware: These operations do not imply memory barriers. Do not use them to
synchronize other events. */
/* Initialize *c to the value n. */
GPRAPI void gpr_stats_init(gpr_stats_counter *c, intptr_t n);
/* *c += inc. Requires: *c initialized. */
GPRAPI void gpr_stats_inc(gpr_stats_counter *c, intptr_t inc);
/* Return *c. Requires: *c initialized. */
GPRAPI intptr_t gpr_stats_read(const gpr_stats_counter *c);
/* ==================Example use of interface===================
A producer-consumer queue of up to N integers,
illustrating the use of the calls in this interface. */
#if 0
#define N 4
typedef struct queue {
gpr_cv non_empty; /* Signalled when length becomes non-zero. */
gpr_cv non_full; /* Signalled when length becomes non-N. */
gpr_mu mu; /* Protects all fields below.
(That is, except during initialization or
destruction, the fields below should be accessed
only by a thread that holds mu.) */
int head; /* Index of head of queue 0..N-1. */
int length; /* Number of valid elements in queue 0..N. */
int elem[N]; /* elem[head .. head+length-1] are queue elements. */
} queue;
/* Initialize *q. */
void queue_init(queue *q) {
gpr_mu_init(&q->mu);
gpr_cv_init(&q->non_empty);
gpr_cv_init(&q->non_full);
q->head = 0;
q->length = 0;
}
/* Free storage associated with *q. */
void queue_destroy(queue *q) {
gpr_mu_destroy(&q->mu);
gpr_cv_destroy(&q->non_empty);
gpr_cv_destroy(&q->non_full);
}
/* Wait until there is room in *q, then append x to *q. */
void queue_append(queue *q, int x) {
gpr_mu_lock(&q->mu);
/* To wait for a predicate without a deadline, loop on the negation of the
predicate, and use gpr_cv_wait(..., gpr_inf_future) inside the loop
to release the lock, wait, and reacquire on each iteration. Code that
makes the condition true should use gpr_cv_broadcast() on the
corresponding condition variable. The predicate must be on state
protected by the lock. */
while (q->length == N) {
gpr_cv_wait(&q->non_full, &q->mu, gpr_inf_future);
}
if (q->length == 0) { /* Wake threads blocked in queue_remove(). */
/* It's normal to use gpr_cv_broadcast() or gpr_signal() while
holding the lock. */
gpr_cv_broadcast(&q->non_empty);
}
q->elem[(q->head + q->length) % N] = x;
q->length++;
gpr_mu_unlock(&q->mu);
}
/* If it can be done without blocking, append x to *q and return non-zero.
Otherwise return 0. */
int queue_try_append(queue *q, int x) {
int result = 0;
if (gpr_mu_trylock(&q->mu)) {
if (q->length != N) {
if (q->length == 0) { /* Wake threads blocked in queue_remove(). */
gpr_cv_broadcast(&q->non_empty);
}
q->elem[(q->head + q->length) % N] = x;
q->length++;
result = 1;
}
gpr_mu_unlock(&q->mu);
}
return result;
}
/* Wait until the *q is non-empty or deadline abs_deadline passes. If the
queue is non-empty, remove its head entry, place it in *head, and return
non-zero. Otherwise return 0. */
int queue_remove(queue *q, int *head, gpr_timespec abs_deadline) {
int result = 0;
gpr_mu_lock(&q->mu);
/* To wait for a predicate with a deadline, loop on the negation of the
predicate or until gpr_cv_wait() returns true. Code that makes
the condition true should use gpr_cv_broadcast() on the corresponding
condition variable. The predicate must be on state protected by the
lock. */
while (q->length == 0 &&
!gpr_cv_wait(&q->non_empty, &q->mu, abs_deadline)) {
}
if (q->length != 0) { /* Queue is non-empty. */
result = 1;
if (q->length == N) { /* Wake threads blocked in queue_append(). */
gpr_cv_broadcast(&q->non_full);
}
*head = q->elem[q->head];
q->head = (q->head + 1) % N;
q->length--;
} /* else deadline exceeded */
gpr_mu_unlock(&q->mu);
return result;
}
#endif /* 0 */
#ifdef __cplusplus
}
#endif
#endif /* GRPC_SUPPORT_SYNC_H */ #endif /* GRPC_SUPPORT_SYNC_H */

@ -34,6 +34,72 @@
#ifndef GRPC_SUPPORT_TIME_H #ifndef GRPC_SUPPORT_TIME_H
#define GRPC_SUPPORT_TIME_H #define GRPC_SUPPORT_TIME_H
#include <grpc/impl/codegen/time.h> #include <grpc/impl/codegen/gpr_types.h>
#include <stddef.h>
#include <time.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Time constants. */
GPRAPI gpr_timespec
gpr_time_0(gpr_clock_type type); /* The zero time interval. */
GPRAPI gpr_timespec gpr_inf_future(gpr_clock_type type); /* The far future */
GPRAPI gpr_timespec gpr_inf_past(gpr_clock_type type); /* The far past. */
#define GPR_MS_PER_SEC 1000
#define GPR_US_PER_SEC 1000000
#define GPR_NS_PER_SEC 1000000000
#define GPR_NS_PER_MS 1000000
#define GPR_NS_PER_US 1000
#define GPR_US_PER_MS 1000
/* initialize time subsystem */
GPRAPI void gpr_time_init(void);
/* Return the current time measured from the given clocks epoch. */
GPRAPI gpr_timespec gpr_now(gpr_clock_type clock);
/* Convert a timespec from one clock to another */
GPRAPI gpr_timespec gpr_convert_clock_type(gpr_timespec t,
gpr_clock_type target_clock);
/* Return -ve, 0, or +ve according to whether a < b, a == b, or a > b
respectively. */
GPRAPI int gpr_time_cmp(gpr_timespec a, gpr_timespec b);
GPRAPI gpr_timespec gpr_time_max(gpr_timespec a, gpr_timespec b);
GPRAPI gpr_timespec gpr_time_min(gpr_timespec a, gpr_timespec b);
/* Add and subtract times. Calculations saturate at infinities. */
GPRAPI gpr_timespec gpr_time_add(gpr_timespec a, gpr_timespec b);
GPRAPI gpr_timespec gpr_time_sub(gpr_timespec a, gpr_timespec b);
/* Return a timespec representing a given number of time units. INT64_MIN is
interpreted as gpr_inf_past, and INT64_MAX as gpr_inf_future. */
GPRAPI gpr_timespec gpr_time_from_micros(int64_t x, gpr_clock_type clock_type);
GPRAPI gpr_timespec gpr_time_from_nanos(int64_t x, gpr_clock_type clock_type);
GPRAPI gpr_timespec gpr_time_from_millis(int64_t x, gpr_clock_type clock_type);
GPRAPI gpr_timespec gpr_time_from_seconds(int64_t x, gpr_clock_type clock_type);
GPRAPI gpr_timespec gpr_time_from_minutes(int64_t x, gpr_clock_type clock_type);
GPRAPI gpr_timespec gpr_time_from_hours(int64_t x, gpr_clock_type clock_type);
GPRAPI int32_t gpr_time_to_millis(gpr_timespec timespec);
/* Return 1 if two times are equal or within threshold of each other,
0 otherwise */
GPRAPI int gpr_time_similar(gpr_timespec a, gpr_timespec b,
gpr_timespec threshold);
/* Sleep until at least 'until' - an absolute timeout */
GPRAPI void gpr_sleep_until(gpr_timespec until);
GPRAPI double gpr_timespec_to_micros(gpr_timespec t);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_SUPPORT_TIME_H */ #endif /* GRPC_SUPPORT_TIME_H */

@ -22,7 +22,7 @@
</stability> </stability>
<license>BSD</license> <license>BSD</license>
<notes> <notes>
- TBD - Reject metadata keys which are not legal #7881
</notes> </notes>
<contents> <contents>
<dir baseinstalldir="/" name="/"> <dir baseinstalldir="/" name="/">
@ -79,25 +79,24 @@
<file baseinstalldir="/" name="include/grpc/support/tls_msvc.h" role="src" /> <file baseinstalldir="/" name="include/grpc/support/tls_msvc.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/tls_pthread.h" role="src" /> <file baseinstalldir="/" name="include/grpc/support/tls_pthread.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/useful.h" role="src" /> <file baseinstalldir="/" name="include/grpc/support/useful.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/alloc.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/atm.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/atm.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/atm_gcc_atomic.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/atm_gcc_atomic.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/atm_gcc_sync.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/atm_gcc_sync.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/atm_windows.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/atm_windows.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/log.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/gpr_types.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/port_platform.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/port_platform.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/slice.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/slice.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/slice_buffer.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/sync.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/sync.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/sync_generic.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/sync_generic.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/sync_posix.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/sync_posix.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/sync_windows.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/sync_windows.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/time.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/profiling/timers.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/profiling/timers.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/backoff.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/backoff.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/block_annotate.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/block_annotate.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/env.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/env.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/mpscq.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/murmur_hash.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/murmur_hash.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/percent_encoding.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/stack_lockfree.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/stack_lockfree.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/string.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/string.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/string_windows.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/string_windows.h" role="src" />
@ -124,7 +123,9 @@
<file baseinstalldir="/" name="src/core/lib/support/log_linux.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/log_linux.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/log_posix.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/log_posix.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/log_windows.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/log_windows.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/mpscq.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/murmur_hash.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/murmur_hash.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/percent_encoding.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/slice.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/slice.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/slice_buffer.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/slice_buffer.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/stack_lockfree.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/support/stack_lockfree.c" role="src" />
@ -156,27 +157,23 @@
<file baseinstalldir="/" name="include/grpc/grpc_posix.h" role="src" /> <file baseinstalldir="/" name="include/grpc/grpc_posix.h" role="src" />
<file baseinstalldir="/" name="include/grpc/grpc_security_constants.h" role="src" /> <file baseinstalldir="/" name="include/grpc/grpc_security_constants.h" role="src" />
<file baseinstalldir="/" name="include/grpc/status.h" role="src" /> <file baseinstalldir="/" name="include/grpc/status.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/byte_buffer.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/byte_buffer_reader.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/byte_buffer_reader.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/compression_types.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/compression_types.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/connectivity_state.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/connectivity_state.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/grpc_types.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/grpc_types.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/propagation_bits.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/propagation_bits.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/status.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/status.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/alloc.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/atm.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/atm.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/atm_gcc_atomic.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/atm_gcc_atomic.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/atm_gcc_sync.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/atm_gcc_sync.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/atm_windows.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/atm_windows.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/log.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/gpr_types.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/port_platform.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/port_platform.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/slice.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/slice.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/slice_buffer.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/sync.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/sync.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/sync_generic.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/sync_generic.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/sync_posix.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/sync_posix.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/sync_windows.h" role="src" /> <file baseinstalldir="/" name="include/grpc/impl/codegen/sync_windows.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/time.h" role="src" />
<file baseinstalldir="/" name="include/grpc/grpc_security.h" role="src" /> <file baseinstalldir="/" name="include/grpc/grpc_security.h" role="src" />
<file baseinstalldir="/" name="include/grpc/census.h" role="src" /> <file baseinstalldir="/" name="include/grpc/census.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/channel/channel_args.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/channel/channel_args.h" role="src" />
@ -195,6 +192,7 @@
<file baseinstalldir="/" name="src/core/lib/http/httpcli.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/http/httpcli.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/http/parser.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/http/parser.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/closure.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/closure.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/combiner.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/endpoint.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/endpoint.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/endpoint_pair.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/endpoint_pair.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/error.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/error.h" role="src" />
@ -306,7 +304,6 @@
<file baseinstalldir="/" name="src/core/lib/tsi/transport_security_interface.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/tsi/transport_security_interface.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/client_channel.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/client_config/client_channel.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/client_channel_factory.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/client_config/client_channel_factory.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/client_config.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/connector.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/client_config/connector.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/initial_connect_string.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/client_config/initial_connect_string.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/lb_policy.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/client_config/lb_policy.h" role="src" />
@ -316,8 +313,8 @@
<file baseinstalldir="/" name="src/core/ext/client_config/resolver.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/client_config/resolver.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/resolver_factory.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/client_config/resolver_factory.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/resolver_registry.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/client_config/resolver_registry.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/resolver_result.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/subchannel.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/client_config/subchannel.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/subchannel_call_holder.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/subchannel_index.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/client_config/subchannel_index.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/uri_parser.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/client_config/uri_parser.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/lb_policy/grpclb/grpclb.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/lb_policy/grpclb/grpclb.h" role="src" />
@ -334,6 +331,7 @@
<file baseinstalldir="/" name="src/core/ext/census/census_interface.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/census/census_interface.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/census_rpc_stats.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/census/census_rpc_stats.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/gen/census.pb.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/census/gen/census.pb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/gen/trace_context.pb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/grpc_filter.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/census/grpc_filter.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/mlog.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/census/mlog.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/resource.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/census/resource.h" role="src" />
@ -354,6 +352,7 @@
<file baseinstalldir="/" name="src/core/lib/http/httpcli.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/http/httpcli.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/http/parser.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/http/parser.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/closure.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/closure.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/combiner.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/endpoint.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/endpoint.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/endpoint_pair_posix.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/endpoint_pair_posix.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/endpoint_pair_windows.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/endpoint_pair_windows.c" role="src" />
@ -483,7 +482,6 @@
<file baseinstalldir="/" name="src/core/ext/client_config/channel_connectivity.c" role="src" /> <file baseinstalldir="/" name="src/core/ext/client_config/channel_connectivity.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/client_channel.c" role="src" /> <file baseinstalldir="/" name="src/core/ext/client_config/client_channel.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/client_channel_factory.c" role="src" /> <file baseinstalldir="/" name="src/core/ext/client_config/client_channel_factory.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/client_config.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/client_config_plugin.c" role="src" /> <file baseinstalldir="/" name="src/core/ext/client_config/client_config_plugin.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/connector.c" role="src" /> <file baseinstalldir="/" name="src/core/ext/client_config/connector.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/default_initial_connect_string.c" role="src" /> <file baseinstalldir="/" name="src/core/ext/client_config/default_initial_connect_string.c" role="src" />
@ -495,8 +493,8 @@
<file baseinstalldir="/" name="src/core/ext/client_config/resolver.c" role="src" /> <file baseinstalldir="/" name="src/core/ext/client_config/resolver.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/resolver_factory.c" role="src" /> <file baseinstalldir="/" name="src/core/ext/client_config/resolver_factory.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/resolver_registry.c" role="src" /> <file baseinstalldir="/" name="src/core/ext/client_config/resolver_registry.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/resolver_result.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/subchannel.c" role="src" /> <file baseinstalldir="/" name="src/core/ext/client_config/subchannel.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/subchannel_call_holder.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/subchannel_index.c" role="src" /> <file baseinstalldir="/" name="src/core/ext/client_config/subchannel_index.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/client_config/uri_parser.c" role="src" /> <file baseinstalldir="/" name="src/core/ext/client_config/uri_parser.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/server/insecure/server_chttp2.c" role="src" /> <file baseinstalldir="/" name="src/core/ext/transport/chttp2/server/insecure/server_chttp2.c" role="src" />
@ -518,6 +516,7 @@
<file baseinstalldir="/" name="src/core/ext/census/base_resources.c" role="src" /> <file baseinstalldir="/" name="src/core/ext/census/base_resources.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/context.c" role="src" /> <file baseinstalldir="/" name="src/core/ext/census/context.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/gen/census.pb.c" role="src" /> <file baseinstalldir="/" name="src/core/ext/census/gen/census.pb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/gen/trace_context.pb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/grpc_context.c" role="src" /> <file baseinstalldir="/" name="src/core/ext/census/grpc_context.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/grpc_filter.c" role="src" /> <file baseinstalldir="/" name="src/core/ext/census/grpc_filter.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/grpc_plugin.c" role="src" /> <file baseinstalldir="/" name="src/core/ext/census/grpc_plugin.c" role="src" />
@ -1181,7 +1180,7 @@ Update to wrap gRPC C Core version 0.10.0
<date>2016-08-22</date> <date>2016-08-22</date>
<license>BSD</license> <license>BSD</license>
<notes> <notes>
- TBD - Reject metadata keys which are not legal #7881
</notes> </notes>
</release> </release>
</changelog> </changelog>

@ -198,12 +198,14 @@ PACKAGE_DIRECTORIES = {
INSTALL_REQUIRES = ( INSTALL_REQUIRES = (
'six>=1.5.2', 'six>=1.5.2',
'enum34>=1.0.4', 'enum34>=1.0.4',
'futures>=2.2.0',
# TODO(atash): eventually split the grpcio package into a metapackage # TODO(atash): eventually split the grpcio package into a metapackage
# depending on protobuf and the runtime component (independent of protobuf) # depending on protobuf and the runtime component (independent of protobuf)
'protobuf>=3.0.0', 'protobuf>=3.0.0',
) )
if not PY3:
INSTALL_REQUIRES += ('futures>=2.2.0',)
SETUP_REQUIRES = INSTALL_REQUIRES + ( SETUP_REQUIRES = INSTALL_REQUIRES + (
'sphinx>=1.3', 'sphinx>=1.3',
'sphinx_rtd_theme>=0.1.8', 'sphinx_rtd_theme>=0.1.8',

@ -130,6 +130,7 @@ grpc::string GetHeaderIncludes(File *file, const Parameters &params) {
static const char *headers_strs[] = { static const char *headers_strs[] = {
"grpc++/impl/codegen/async_stream.h", "grpc++/impl/codegen/async_stream.h",
"grpc++/impl/codegen/async_unary_call.h", "grpc++/impl/codegen/async_unary_call.h",
"grpc++/impl/codegen/method_handler_impl.h",
"grpc++/impl/codegen/proto_utils.h", "grpc++/impl/codegen/proto_utils.h",
"grpc++/impl/codegen/rpc_method.h", "grpc++/impl/codegen/rpc_method.h",
"grpc++/impl/codegen/service_type.h", "grpc++/impl/codegen/service_type.h",
@ -604,6 +605,57 @@ void PrintHeaderServerMethodAsync(Printer *printer, const Method *method,
printer->Print(*vars, "};\n"); printer->Print(*vars, "};\n");
} }
void PrintHeaderServerMethodStreamedUnary(
Printer *printer, const Method *method,
std::map<grpc::string, grpc::string> *vars) {
(*vars)["Method"] = method->name();
(*vars)["Request"] = method->input_type_name();
(*vars)["Response"] = method->output_type_name();
if (method->NoStreaming()) {
printer->Print(*vars, "template <class BaseClass>\n");
printer->Print(*vars,
"class WithStreamedUnaryMethod_$Method$ : "
"public BaseClass {\n");
printer->Print(
" private:\n"
" void BaseClassMustBeDerivedFromService(const Service *service) "
"{}\n");
printer->Print(" public:\n");
printer->Indent();
printer->Print(*vars,
"WithStreamedUnaryMethod_$Method$() {\n"
" ::grpc::Service::MarkMethodStreamedUnary($Idx$,\n"
" new ::grpc::StreamedUnaryHandler< $Request$, "
"$Response$>(std::bind"
"(&WithStreamedUnaryMethod_$Method$<BaseClass>::"
"Streamed$Method$, this, std::placeholders::_1, "
"std::placeholders::_2)));\n"
"}\n");
printer->Print(*vars,
"~WithStreamedUnaryMethod_$Method$() GRPC_OVERRIDE {\n"
" BaseClassMustBeDerivedFromService(this);\n"
"}\n");
printer->Print(
*vars,
"// disable regular version of this method\n"
"::grpc::Status $Method$("
"::grpc::ServerContext* context, const $Request$* request, "
"$Response$* response) GRPC_FINAL GRPC_OVERRIDE {\n"
" abort();\n"
" return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, \"\");\n"
"}\n");
printer->Print(*vars,
"// replace default version of method with streamed unary\n"
"virtual ::grpc::Status Streamed$Method$("
"::grpc::ServerContext* context, "
"::grpc::ServerUnaryStreamer< "
"$Request$,$Response$>* server_unary_streamer)"
" = 0;\n");
printer->Outdent();
printer->Print(*vars, "};\n");
}
}
void PrintHeaderServerMethodGeneric( void PrintHeaderServerMethodGeneric(
Printer *printer, const Method *method, Printer *printer, const Method *method,
std::map<grpc::string, grpc::string> *vars) { std::map<grpc::string, grpc::string> *vars) {
@ -770,6 +822,28 @@ void PrintHeaderService(Printer *printer, const Service *service,
PrintHeaderServerMethodGeneric(printer, service->method(i).get(), vars); PrintHeaderServerMethodGeneric(printer, service->method(i).get(), vars);
} }
// Server side - Streamed Unary
for (int i = 0; i < service->method_count(); ++i) {
(*vars)["Idx"] = as_string(i);
PrintHeaderServerMethodStreamedUnary(printer, service->method(i).get(),
vars);
}
printer->Print("typedef ");
for (int i = 0; i < service->method_count(); ++i) {
(*vars)["method_name"] = service->method(i).get()->name();
if (service->method(i)->NoStreaming()) {
printer->Print(*vars, "WithStreamedUnaryMethod_$method_name$<");
}
}
printer->Print("Service");
for (int i = 0; i < service->method_count(); ++i) {
if (service->method(i)->NoStreaming()) {
printer->Print(" >");
}
}
printer->Print(" StreamedUnaryService;\n");
printer->Outdent(); printer->Outdent();
printer->Print("};\n"); printer->Print("};\n");
printer->Print(service->GetTrailingComments().c_str()); printer->Print(service->GetTrailingComments().c_str());
@ -1080,6 +1154,9 @@ void PrintSourceService(Printer *printer, const Service *service,
(*vars)["Idx"] = as_string(i); (*vars)["Idx"] = as_string(i);
if (method->NoStreaming()) { if (method->NoStreaming()) {
(*vars)["StreamingType"] = "NORMAL_RPC"; (*vars)["StreamingType"] = "NORMAL_RPC";
// NOTE: There is no reason to consider streamed-unary as a separate
// category here since this part is setting up the client-side stub
// and this appears as a NORMAL_RPC from the client-side.
} else if (method->ClientOnlyStreaming()) { } else if (method->ClientOnlyStreaming()) {
(*vars)["StreamingType"] = "CLIENT_STREAMING"; (*vars)["StreamingType"] = "CLIENT_STREAMING";
} else if (method->ServerOnlyStreaming()) { } else if (method->ServerOnlyStreaming()) {

@ -4,3 +4,7 @@ Files generated for use by Census stats and trace recording subsystem.
* census.pb.{h,c} - Generated from src/core/ext/census/census.proto, using the * census.pb.{h,c} - Generated from src/core/ext/census/census.proto, using the
script `tools/codegen/core/gen_nano_proto.sh src/proto/census/census.proto script `tools/codegen/core/gen_nano_proto.sh src/proto/census/census.proto
$PWD/src/core/ext/census/gen src/core/ext/census/gen` $PWD/src/core/ext/census/gen src/core/ext/census/gen`
* trace_context.pb.{h,c} - Generated from
src/core/ext/census/trace_context.proto, using the script
`tools/codegen/core/gen_nano_proto.sh src/proto/census/trace_context.proto
$PWD/src/core/ext/census/gen src/core/ext/census/gen`

@ -0,0 +1,81 @@
/*
*
* Copyright 2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* Automatically generated nanopb constant definitions */
/* Generated by nanopb-0.3.5-dev */
#include "src/core/ext/census/gen/trace_context.pb.h"
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
const pb_field_t google_trace_TraceId_fields[3] = {
PB_FIELD( 1, FIXED64 , OPTIONAL, STATIC , FIRST, google_trace_TraceId, hi, hi, 0),
PB_FIELD( 2, FIXED64 , OPTIONAL, STATIC , OTHER, google_trace_TraceId, lo, hi, 0),
PB_LAST_FIELD
};
const pb_field_t google_trace_TraceContext_fields[4] = {
PB_FIELD( 1, MESSAGE , OPTIONAL, STATIC , FIRST, google_trace_TraceContext, trace_id, trace_id, &google_trace_TraceId_fields),
PB_FIELD( 2, FIXED64 , OPTIONAL, STATIC , OTHER, google_trace_TraceContext, span_id, trace_id, 0),
PB_FIELD( 3, BOOL , OPTIONAL, STATIC , OTHER, google_trace_TraceContext, is_sampled, span_id, 0),
PB_LAST_FIELD
};
/* Check that field information fits in pb_field_t */
#if !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_32BIT
* compile-time option. You can do that in pb.h or on compiler command line.
*
* The reason you need to do this is that some of your messages contain tag
* numbers or field sizes that are larger than what can fit in 8 or 16 bit
* field descriptors.
*/
PB_STATIC_ASSERT((pb_membersize(google_trace_TraceContext, trace_id) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_google_trace_TraceId_google_trace_TraceContext)
#endif
#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT)
/* If you get an error here, it means that you need to define PB_FIELD_16BIT
* compile-time option. You can do that in pb.h or on compiler command line.
*
* The reason you need to do this is that some of your messages contain tag
* numbers or field sizes that are larger than what can fit in the default
* 8 bit descriptors.
*/
PB_STATIC_ASSERT((pb_membersize(google_trace_TraceContext, trace_id) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_google_trace_TraceId_google_trace_TraceContext)
#endif

@ -0,0 +1,99 @@
/*
*
* Copyright 2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* Automatically generated nanopb header */
/* Generated by nanopb-0.3.5-dev */
#ifndef GRPC_CORE_EXT_CENSUS_GEN_TRACE_CONTEXT_PB_H
#define GRPC_CORE_EXT_CENSUS_GEN_TRACE_CONTEXT_PB_H
#include "third_party/nanopb/pb.h"
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* Struct definitions */
typedef struct _google_trace_TraceId {
bool has_hi;
uint64_t hi;
bool has_lo;
uint64_t lo;
} google_trace_TraceId;
typedef struct _google_trace_TraceContext {
bool has_trace_id;
google_trace_TraceId trace_id;
bool has_span_id;
uint64_t span_id;
bool has_is_sampled;
bool is_sampled;
} google_trace_TraceContext;
/* Default values for struct fields */
/* Initializer values for message structs */
#define google_trace_TraceId_init_default {false, 0, false, 0}
#define google_trace_TraceContext_init_default {false, google_trace_TraceId_init_default, false, 0, false, 0}
#define google_trace_TraceId_init_zero {false, 0, false, 0}
#define google_trace_TraceContext_init_zero {false, google_trace_TraceId_init_zero, false, 0, false, 0}
/* Field tags (for use in manual encoding/decoding) */
#define google_trace_TraceId_hi_tag 1
#define google_trace_TraceId_lo_tag 2
#define google_trace_TraceContext_trace_id_tag 1
#define google_trace_TraceContext_span_id_tag 2
#define google_trace_TraceContext_is_sampled_tag 3
/* Struct field encoding specification for nanopb */
extern const pb_field_t google_trace_TraceId_fields[3];
extern const pb_field_t google_trace_TraceContext_fields[4];
/* Maximum encoded size of messages (where known) */
#define google_trace_TraceId_size 18
#define google_trace_TraceContext_size 31
/* Message IDs (where set with "msgid" option) */
#ifdef PB_MSGID
#define TRACE_CONTEXT_MESSAGES \
#endif
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif

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

Loading…
Cancel
Save