Merge pull request #1154 from soltanmm/pypi
Enable PyPI package management
diff --git a/BUILD b/BUILD
new file mode 100644
index 0000000..ccff9c0
--- /dev/null
+++ b/BUILD
@@ -0,0 +1,566 @@
+# GRPC Bazel BUILD file.
+# This currently builds C and C++ code.
+
+# 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.
+
+licenses(["notice"]) # 3-clause BSD
+
+
+
+cc_library(
+ name = "gpr",
+ srcs = [
+ "src/core/support/env.h",
+ "src/core/support/file.h",
+ "src/core/support/murmur_hash.h",
+ "src/core/support/string.h",
+ "src/core/support/string_win32.h",
+ "src/core/support/thd_internal.h",
+ "src/core/support/alloc.c",
+ "src/core/support/cancellable.c",
+ "src/core/support/cmdline.c",
+ "src/core/support/cpu_iphone.c",
+ "src/core/support/cpu_linux.c",
+ "src/core/support/cpu_posix.c",
+ "src/core/support/cpu_windows.c",
+ "src/core/support/env_linux.c",
+ "src/core/support/env_posix.c",
+ "src/core/support/env_win32.c",
+ "src/core/support/file.c",
+ "src/core/support/file_posix.c",
+ "src/core/support/file_win32.c",
+ "src/core/support/histogram.c",
+ "src/core/support/host_port.c",
+ "src/core/support/log.c",
+ "src/core/support/log_android.c",
+ "src/core/support/log_linux.c",
+ "src/core/support/log_posix.c",
+ "src/core/support/log_win32.c",
+ "src/core/support/murmur_hash.c",
+ "src/core/support/slice.c",
+ "src/core/support/slice_buffer.c",
+ "src/core/support/string.c",
+ "src/core/support/string_posix.c",
+ "src/core/support/string_win32.c",
+ "src/core/support/sync.c",
+ "src/core/support/sync_posix.c",
+ "src/core/support/sync_win32.c",
+ "src/core/support/thd.c",
+ "src/core/support/thd_posix.c",
+ "src/core/support/thd_win32.c",
+ "src/core/support/time.c",
+ "src/core/support/time_posix.c",
+ "src/core/support/time_win32.c",
+ ],
+ hdrs = [
+ "include/grpc/support/alloc.h",
+ "include/grpc/support/atm.h",
+ "include/grpc/support/atm_gcc_atomic.h",
+ "include/grpc/support/atm_gcc_sync.h",
+ "include/grpc/support/atm_win32.h",
+ "include/grpc/support/cancellable_platform.h",
+ "include/grpc/support/cmdline.h",
+ "include/grpc/support/cpu.h",
+ "include/grpc/support/histogram.h",
+ "include/grpc/support/host_port.h",
+ "include/grpc/support/log.h",
+ "include/grpc/support/log_win32.h",
+ "include/grpc/support/port_platform.h",
+ "include/grpc/support/slice.h",
+ "include/grpc/support/slice_buffer.h",
+ "include/grpc/support/sync.h",
+ "include/grpc/support/sync_generic.h",
+ "include/grpc/support/sync_posix.h",
+ "include/grpc/support/sync_win32.h",
+ "include/grpc/support/thd.h",
+ "include/grpc/support/time.h",
+ "include/grpc/support/useful.h",
+ ],
+ includes = [
+ "include",
+ ".",
+ ],
+ deps = [
+ ],
+)
+
+
+
+
+cc_library(
+ name = "grpc",
+ srcs = [
+ "src/core/httpcli/format_request.h",
+ "src/core/httpcli/httpcli.h",
+ "src/core/httpcli/httpcli_security_context.h",
+ "src/core/httpcli/parser.h",
+ "src/core/security/auth.h",
+ "src/core/security/base64.h",
+ "src/core/security/credentials.h",
+ "src/core/security/json_token.h",
+ "src/core/security/secure_endpoint.h",
+ "src/core/security/secure_transport_setup.h",
+ "src/core/security/security_context.h",
+ "src/core/tsi/fake_transport_security.h",
+ "src/core/tsi/ssl_transport_security.h",
+ "src/core/tsi/transport_security.h",
+ "src/core/tsi/transport_security_interface.h",
+ "src/core/channel/census_filter.h",
+ "src/core/channel/channel_args.h",
+ "src/core/channel/channel_stack.h",
+ "src/core/channel/child_channel.h",
+ "src/core/channel/client_channel.h",
+ "src/core/channel/client_setup.h",
+ "src/core/channel/connected_channel.h",
+ "src/core/channel/http_client_filter.h",
+ "src/core/channel/http_filter.h",
+ "src/core/channel/http_server_filter.h",
+ "src/core/channel/metadata_buffer.h",
+ "src/core/channel/noop_filter.h",
+ "src/core/compression/algorithm.h",
+ "src/core/compression/message_compress.h",
+ "src/core/debug/trace.h",
+ "src/core/iomgr/alarm.h",
+ "src/core/iomgr/alarm_heap.h",
+ "src/core/iomgr/alarm_internal.h",
+ "src/core/iomgr/endpoint.h",
+ "src/core/iomgr/endpoint_pair.h",
+ "src/core/iomgr/fd_posix.h",
+ "src/core/iomgr/iocp_windows.h",
+ "src/core/iomgr/iomgr.h",
+ "src/core/iomgr/iomgr_internal.h",
+ "src/core/iomgr/iomgr_posix.h",
+ "src/core/iomgr/pollset.h",
+ "src/core/iomgr/pollset_kick.h",
+ "src/core/iomgr/pollset_kick_posix.h",
+ "src/core/iomgr/pollset_kick_windows.h",
+ "src/core/iomgr/pollset_posix.h",
+ "src/core/iomgr/pollset_windows.h",
+ "src/core/iomgr/resolve_address.h",
+ "src/core/iomgr/sockaddr.h",
+ "src/core/iomgr/sockaddr_posix.h",
+ "src/core/iomgr/sockaddr_utils.h",
+ "src/core/iomgr/sockaddr_win32.h",
+ "src/core/iomgr/socket_utils_posix.h",
+ "src/core/iomgr/socket_windows.h",
+ "src/core/iomgr/tcp_client.h",
+ "src/core/iomgr/tcp_posix.h",
+ "src/core/iomgr/tcp_server.h",
+ "src/core/iomgr/tcp_windows.h",
+ "src/core/iomgr/time_averaged_stats.h",
+ "src/core/iomgr/wakeup_fd_pipe.h",
+ "src/core/iomgr/wakeup_fd_posix.h",
+ "src/core/json/json.h",
+ "src/core/json/json_common.h",
+ "src/core/json/json_reader.h",
+ "src/core/json/json_writer.h",
+ "src/core/statistics/census_interface.h",
+ "src/core/statistics/census_log.h",
+ "src/core/statistics/census_rpc_stats.h",
+ "src/core/statistics/census_tracing.h",
+ "src/core/statistics/hash_table.h",
+ "src/core/statistics/window_stats.h",
+ "src/core/surface/byte_buffer_queue.h",
+ "src/core/surface/call.h",
+ "src/core/surface/channel.h",
+ "src/core/surface/client.h",
+ "src/core/surface/completion_queue.h",
+ "src/core/surface/event_string.h",
+ "src/core/surface/init.h",
+ "src/core/surface/server.h",
+ "src/core/surface/surface_trace.h",
+ "src/core/transport/chttp2/alpn.h",
+ "src/core/transport/chttp2/bin_encoder.h",
+ "src/core/transport/chttp2/frame.h",
+ "src/core/transport/chttp2/frame_data.h",
+ "src/core/transport/chttp2/frame_goaway.h",
+ "src/core/transport/chttp2/frame_ping.h",
+ "src/core/transport/chttp2/frame_rst_stream.h",
+ "src/core/transport/chttp2/frame_settings.h",
+ "src/core/transport/chttp2/frame_window_update.h",
+ "src/core/transport/chttp2/hpack_parser.h",
+ "src/core/transport/chttp2/hpack_table.h",
+ "src/core/transport/chttp2/http2_errors.h",
+ "src/core/transport/chttp2/huffsyms.h",
+ "src/core/transport/chttp2/status_conversion.h",
+ "src/core/transport/chttp2/stream_encoder.h",
+ "src/core/transport/chttp2/stream_map.h",
+ "src/core/transport/chttp2/timeout_encoding.h",
+ "src/core/transport/chttp2/varint.h",
+ "src/core/transport/chttp2_transport.h",
+ "src/core/transport/metadata.h",
+ "src/core/transport/stream_op.h",
+ "src/core/transport/transport.h",
+ "src/core/transport/transport_impl.h",
+ "src/core/httpcli/format_request.c",
+ "src/core/httpcli/httpcli.c",
+ "src/core/httpcli/httpcli_security_context.c",
+ "src/core/httpcli/parser.c",
+ "src/core/security/auth.c",
+ "src/core/security/base64.c",
+ "src/core/security/credentials.c",
+ "src/core/security/credentials_posix.c",
+ "src/core/security/credentials_win32.c",
+ "src/core/security/factories.c",
+ "src/core/security/google_default_credentials.c",
+ "src/core/security/json_token.c",
+ "src/core/security/secure_endpoint.c",
+ "src/core/security/secure_transport_setup.c",
+ "src/core/security/security_context.c",
+ "src/core/security/server_secure_chttp2.c",
+ "src/core/surface/init_secure.c",
+ "src/core/surface/secure_channel_create.c",
+ "src/core/tsi/fake_transport_security.c",
+ "src/core/tsi/ssl_transport_security.c",
+ "src/core/tsi/transport_security.c",
+ "src/core/channel/call_op_string.c",
+ "src/core/channel/census_filter.c",
+ "src/core/channel/channel_args.c",
+ "src/core/channel/channel_stack.c",
+ "src/core/channel/child_channel.c",
+ "src/core/channel/client_channel.c",
+ "src/core/channel/client_setup.c",
+ "src/core/channel/connected_channel.c",
+ "src/core/channel/http_client_filter.c",
+ "src/core/channel/http_filter.c",
+ "src/core/channel/http_server_filter.c",
+ "src/core/channel/metadata_buffer.c",
+ "src/core/channel/noop_filter.c",
+ "src/core/compression/algorithm.c",
+ "src/core/compression/message_compress.c",
+ "src/core/debug/trace.c",
+ "src/core/iomgr/alarm.c",
+ "src/core/iomgr/alarm_heap.c",
+ "src/core/iomgr/endpoint.c",
+ "src/core/iomgr/endpoint_pair_posix.c",
+ "src/core/iomgr/fd_posix.c",
+ "src/core/iomgr/iocp_windows.c",
+ "src/core/iomgr/iomgr.c",
+ "src/core/iomgr/iomgr_posix.c",
+ "src/core/iomgr/iomgr_windows.c",
+ "src/core/iomgr/pollset_kick.c",
+ "src/core/iomgr/pollset_multipoller_with_epoll.c",
+ "src/core/iomgr/pollset_multipoller_with_poll_posix.c",
+ "src/core/iomgr/pollset_posix.c",
+ "src/core/iomgr/pollset_windows.c",
+ "src/core/iomgr/resolve_address_posix.c",
+ "src/core/iomgr/resolve_address_windows.c",
+ "src/core/iomgr/sockaddr_utils.c",
+ "src/core/iomgr/socket_utils_common_posix.c",
+ "src/core/iomgr/socket_utils_linux.c",
+ "src/core/iomgr/socket_utils_posix.c",
+ "src/core/iomgr/socket_windows.c",
+ "src/core/iomgr/tcp_client_posix.c",
+ "src/core/iomgr/tcp_client_windows.c",
+ "src/core/iomgr/tcp_posix.c",
+ "src/core/iomgr/tcp_server_posix.c",
+ "src/core/iomgr/tcp_server_windows.c",
+ "src/core/iomgr/tcp_windows.c",
+ "src/core/iomgr/time_averaged_stats.c",
+ "src/core/iomgr/wakeup_fd_eventfd.c",
+ "src/core/iomgr/wakeup_fd_nospecial.c",
+ "src/core/iomgr/wakeup_fd_pipe.c",
+ "src/core/iomgr/wakeup_fd_posix.c",
+ "src/core/json/json.c",
+ "src/core/json/json_reader.c",
+ "src/core/json/json_string.c",
+ "src/core/json/json_writer.c",
+ "src/core/statistics/census_init.c",
+ "src/core/statistics/census_log.c",
+ "src/core/statistics/census_rpc_stats.c",
+ "src/core/statistics/census_tracing.c",
+ "src/core/statistics/hash_table.c",
+ "src/core/statistics/window_stats.c",
+ "src/core/surface/byte_buffer.c",
+ "src/core/surface/byte_buffer_queue.c",
+ "src/core/surface/byte_buffer_reader.c",
+ "src/core/surface/call.c",
+ "src/core/surface/call_details.c",
+ "src/core/surface/call_log_batch.c",
+ "src/core/surface/channel.c",
+ "src/core/surface/channel_create.c",
+ "src/core/surface/client.c",
+ "src/core/surface/completion_queue.c",
+ "src/core/surface/event_string.c",
+ "src/core/surface/init.c",
+ "src/core/surface/lame_client.c",
+ "src/core/surface/metadata_array.c",
+ "src/core/surface/server.c",
+ "src/core/surface/server_chttp2.c",
+ "src/core/surface/server_create.c",
+ "src/core/surface/surface_trace.c",
+ "src/core/transport/chttp2/alpn.c",
+ "src/core/transport/chttp2/bin_encoder.c",
+ "src/core/transport/chttp2/frame_data.c",
+ "src/core/transport/chttp2/frame_goaway.c",
+ "src/core/transport/chttp2/frame_ping.c",
+ "src/core/transport/chttp2/frame_rst_stream.c",
+ "src/core/transport/chttp2/frame_settings.c",
+ "src/core/transport/chttp2/frame_window_update.c",
+ "src/core/transport/chttp2/hpack_parser.c",
+ "src/core/transport/chttp2/hpack_table.c",
+ "src/core/transport/chttp2/huffsyms.c",
+ "src/core/transport/chttp2/status_conversion.c",
+ "src/core/transport/chttp2/stream_encoder.c",
+ "src/core/transport/chttp2/stream_map.c",
+ "src/core/transport/chttp2/timeout_encoding.c",
+ "src/core/transport/chttp2/varint.c",
+ "src/core/transport/chttp2_transport.c",
+ "src/core/transport/metadata.c",
+ "src/core/transport/stream_op.c",
+ "src/core/transport/transport.c",
+ ],
+ hdrs = [
+ "include/grpc/grpc_security.h",
+ "include/grpc/byte_buffer.h",
+ "include/grpc/byte_buffer_reader.h",
+ "include/grpc/grpc.h",
+ "include/grpc/grpc_http.h",
+ "include/grpc/status.h",
+ ],
+ includes = [
+ "include",
+ ".",
+ ],
+ deps = [
+ ":gpr",
+ ],
+)
+
+
+
+
+cc_library(
+ name = "grpc_unsecure",
+ srcs = [
+ "src/core/channel/census_filter.h",
+ "src/core/channel/channel_args.h",
+ "src/core/channel/channel_stack.h",
+ "src/core/channel/child_channel.h",
+ "src/core/channel/client_channel.h",
+ "src/core/channel/client_setup.h",
+ "src/core/channel/connected_channel.h",
+ "src/core/channel/http_client_filter.h",
+ "src/core/channel/http_filter.h",
+ "src/core/channel/http_server_filter.h",
+ "src/core/channel/metadata_buffer.h",
+ "src/core/channel/noop_filter.h",
+ "src/core/compression/algorithm.h",
+ "src/core/compression/message_compress.h",
+ "src/core/debug/trace.h",
+ "src/core/iomgr/alarm.h",
+ "src/core/iomgr/alarm_heap.h",
+ "src/core/iomgr/alarm_internal.h",
+ "src/core/iomgr/endpoint.h",
+ "src/core/iomgr/endpoint_pair.h",
+ "src/core/iomgr/fd_posix.h",
+ "src/core/iomgr/iocp_windows.h",
+ "src/core/iomgr/iomgr.h",
+ "src/core/iomgr/iomgr_internal.h",
+ "src/core/iomgr/iomgr_posix.h",
+ "src/core/iomgr/pollset.h",
+ "src/core/iomgr/pollset_kick.h",
+ "src/core/iomgr/pollset_kick_posix.h",
+ "src/core/iomgr/pollset_kick_windows.h",
+ "src/core/iomgr/pollset_posix.h",
+ "src/core/iomgr/pollset_windows.h",
+ "src/core/iomgr/resolve_address.h",
+ "src/core/iomgr/sockaddr.h",
+ "src/core/iomgr/sockaddr_posix.h",
+ "src/core/iomgr/sockaddr_utils.h",
+ "src/core/iomgr/sockaddr_win32.h",
+ "src/core/iomgr/socket_utils_posix.h",
+ "src/core/iomgr/socket_windows.h",
+ "src/core/iomgr/tcp_client.h",
+ "src/core/iomgr/tcp_posix.h",
+ "src/core/iomgr/tcp_server.h",
+ "src/core/iomgr/tcp_windows.h",
+ "src/core/iomgr/time_averaged_stats.h",
+ "src/core/iomgr/wakeup_fd_pipe.h",
+ "src/core/iomgr/wakeup_fd_posix.h",
+ "src/core/json/json.h",
+ "src/core/json/json_common.h",
+ "src/core/json/json_reader.h",
+ "src/core/json/json_writer.h",
+ "src/core/statistics/census_interface.h",
+ "src/core/statistics/census_log.h",
+ "src/core/statistics/census_rpc_stats.h",
+ "src/core/statistics/census_tracing.h",
+ "src/core/statistics/hash_table.h",
+ "src/core/statistics/window_stats.h",
+ "src/core/surface/byte_buffer_queue.h",
+ "src/core/surface/call.h",
+ "src/core/surface/channel.h",
+ "src/core/surface/client.h",
+ "src/core/surface/completion_queue.h",
+ "src/core/surface/event_string.h",
+ "src/core/surface/init.h",
+ "src/core/surface/server.h",
+ "src/core/surface/surface_trace.h",
+ "src/core/transport/chttp2/alpn.h",
+ "src/core/transport/chttp2/bin_encoder.h",
+ "src/core/transport/chttp2/frame.h",
+ "src/core/transport/chttp2/frame_data.h",
+ "src/core/transport/chttp2/frame_goaway.h",
+ "src/core/transport/chttp2/frame_ping.h",
+ "src/core/transport/chttp2/frame_rst_stream.h",
+ "src/core/transport/chttp2/frame_settings.h",
+ "src/core/transport/chttp2/frame_window_update.h",
+ "src/core/transport/chttp2/hpack_parser.h",
+ "src/core/transport/chttp2/hpack_table.h",
+ "src/core/transport/chttp2/http2_errors.h",
+ "src/core/transport/chttp2/huffsyms.h",
+ "src/core/transport/chttp2/status_conversion.h",
+ "src/core/transport/chttp2/stream_encoder.h",
+ "src/core/transport/chttp2/stream_map.h",
+ "src/core/transport/chttp2/timeout_encoding.h",
+ "src/core/transport/chttp2/varint.h",
+ "src/core/transport/chttp2_transport.h",
+ "src/core/transport/metadata.h",
+ "src/core/transport/stream_op.h",
+ "src/core/transport/transport.h",
+ "src/core/transport/transport_impl.h",
+ "src/core/surface/init_unsecure.c",
+ "src/core/channel/call_op_string.c",
+ "src/core/channel/census_filter.c",
+ "src/core/channel/channel_args.c",
+ "src/core/channel/channel_stack.c",
+ "src/core/channel/child_channel.c",
+ "src/core/channel/client_channel.c",
+ "src/core/channel/client_setup.c",
+ "src/core/channel/connected_channel.c",
+ "src/core/channel/http_client_filter.c",
+ "src/core/channel/http_filter.c",
+ "src/core/channel/http_server_filter.c",
+ "src/core/channel/metadata_buffer.c",
+ "src/core/channel/noop_filter.c",
+ "src/core/compression/algorithm.c",
+ "src/core/compression/message_compress.c",
+ "src/core/debug/trace.c",
+ "src/core/iomgr/alarm.c",
+ "src/core/iomgr/alarm_heap.c",
+ "src/core/iomgr/endpoint.c",
+ "src/core/iomgr/endpoint_pair_posix.c",
+ "src/core/iomgr/fd_posix.c",
+ "src/core/iomgr/iocp_windows.c",
+ "src/core/iomgr/iomgr.c",
+ "src/core/iomgr/iomgr_posix.c",
+ "src/core/iomgr/iomgr_windows.c",
+ "src/core/iomgr/pollset_kick.c",
+ "src/core/iomgr/pollset_multipoller_with_epoll.c",
+ "src/core/iomgr/pollset_multipoller_with_poll_posix.c",
+ "src/core/iomgr/pollset_posix.c",
+ "src/core/iomgr/pollset_windows.c",
+ "src/core/iomgr/resolve_address_posix.c",
+ "src/core/iomgr/resolve_address_windows.c",
+ "src/core/iomgr/sockaddr_utils.c",
+ "src/core/iomgr/socket_utils_common_posix.c",
+ "src/core/iomgr/socket_utils_linux.c",
+ "src/core/iomgr/socket_utils_posix.c",
+ "src/core/iomgr/socket_windows.c",
+ "src/core/iomgr/tcp_client_posix.c",
+ "src/core/iomgr/tcp_client_windows.c",
+ "src/core/iomgr/tcp_posix.c",
+ "src/core/iomgr/tcp_server_posix.c",
+ "src/core/iomgr/tcp_server_windows.c",
+ "src/core/iomgr/tcp_windows.c",
+ "src/core/iomgr/time_averaged_stats.c",
+ "src/core/iomgr/wakeup_fd_eventfd.c",
+ "src/core/iomgr/wakeup_fd_nospecial.c",
+ "src/core/iomgr/wakeup_fd_pipe.c",
+ "src/core/iomgr/wakeup_fd_posix.c",
+ "src/core/json/json.c",
+ "src/core/json/json_reader.c",
+ "src/core/json/json_string.c",
+ "src/core/json/json_writer.c",
+ "src/core/statistics/census_init.c",
+ "src/core/statistics/census_log.c",
+ "src/core/statistics/census_rpc_stats.c",
+ "src/core/statistics/census_tracing.c",
+ "src/core/statistics/hash_table.c",
+ "src/core/statistics/window_stats.c",
+ "src/core/surface/byte_buffer.c",
+ "src/core/surface/byte_buffer_queue.c",
+ "src/core/surface/byte_buffer_reader.c",
+ "src/core/surface/call.c",
+ "src/core/surface/call_details.c",
+ "src/core/surface/call_log_batch.c",
+ "src/core/surface/channel.c",
+ "src/core/surface/channel_create.c",
+ "src/core/surface/client.c",
+ "src/core/surface/completion_queue.c",
+ "src/core/surface/event_string.c",
+ "src/core/surface/init.c",
+ "src/core/surface/lame_client.c",
+ "src/core/surface/metadata_array.c",
+ "src/core/surface/server.c",
+ "src/core/surface/server_chttp2.c",
+ "src/core/surface/server_create.c",
+ "src/core/surface/surface_trace.c",
+ "src/core/transport/chttp2/alpn.c",
+ "src/core/transport/chttp2/bin_encoder.c",
+ "src/core/transport/chttp2/frame_data.c",
+ "src/core/transport/chttp2/frame_goaway.c",
+ "src/core/transport/chttp2/frame_ping.c",
+ "src/core/transport/chttp2/frame_rst_stream.c",
+ "src/core/transport/chttp2/frame_settings.c",
+ "src/core/transport/chttp2/frame_window_update.c",
+ "src/core/transport/chttp2/hpack_parser.c",
+ "src/core/transport/chttp2/hpack_table.c",
+ "src/core/transport/chttp2/huffsyms.c",
+ "src/core/transport/chttp2/status_conversion.c",
+ "src/core/transport/chttp2/stream_encoder.c",
+ "src/core/transport/chttp2/stream_map.c",
+ "src/core/transport/chttp2/timeout_encoding.c",
+ "src/core/transport/chttp2/varint.c",
+ "src/core/transport/chttp2_transport.c",
+ "src/core/transport/metadata.c",
+ "src/core/transport/stream_op.c",
+ "src/core/transport/transport.c",
+ ],
+ hdrs = [
+ "include/grpc/byte_buffer.h",
+ "include/grpc/byte_buffer_reader.h",
+ "include/grpc/grpc.h",
+ "include/grpc/grpc_http.h",
+ "include/grpc/status.h",
+ ],
+ includes = [
+ "include",
+ ".",
+ ],
+ deps = [
+ ":gpr",
+ ],
+)
+
+
+
+
diff --git a/Makefile b/Makefile
index 0b2fe07..4e99231 100644
--- a/Makefile
+++ b/Makefile
@@ -94,6 +94,15 @@
LDFLAGS_dbg =
DEFINES_dbg = _DEBUG DEBUG
+VALID_CONFIG_mutrace = 1
+CC_mutrace = $(DEFAULT_CC)
+CXX_mutrace = $(DEFAULT_CXX)
+LD_mutrace = $(DEFAULT_CC)
+LDXX_mutrace = $(DEFAULT_CXX)
+CPPFLAGS_mutrace = -O0
+LDFLAGS_mutrace = -rdynamic
+DEFINES_mutrace = _DEBUG DEBUG
+
VALID_CONFIG_valgrind = 1
REQUIRE_CUSTOM_LIBRARIES_valgrind = 1
CC_valgrind = $(DEFAULT_CC)
@@ -2325,6 +2334,7 @@
src/core/support/sync.c \
src/core/support/sync_posix.c \
src/core/support/sync_win32.c \
+ src/core/support/thd.c \
src/core/support/thd_posix.c \
src/core/support/thd_win32.c \
src/core/support/time.c \
@@ -2419,6 +2429,7 @@
$(OBJDIR)/$(CONFIG)/src/core/support/sync.o:
$(OBJDIR)/$(CONFIG)/src/core/support/sync_posix.o:
$(OBJDIR)/$(CONFIG)/src/core/support/sync_win32.o:
+$(OBJDIR)/$(CONFIG)/src/core/support/thd.o:
$(OBJDIR)/$(CONFIG)/src/core/support/thd_posix.o:
$(OBJDIR)/$(CONFIG)/src/core/support/thd_win32.o:
$(OBJDIR)/$(CONFIG)/src/core/support/time.o:
diff --git a/README.md b/README.md
index fa60b83..b78745f 100644
--- a/README.md
+++ b/README.md
@@ -5,6 +5,10 @@
Copyright 2015 Google Inc.
+#Documentation
+
+You can find more detailed documentation and examples in the [grpc-common repository](http://github.com/grpc/grpc-common).
+
#Installation
See grpc/INSTALL for installation instructions for various platforms.
@@ -25,10 +29,6 @@
Java source code is in [grpc-java] (http://github.com/grpc/grpc-java) repository.
Go source code is in [grpc-go] (http://github.com/grpc/grpc-go) repository.
-#Documentation
-
-You can find more detailed documentation and examples in the [grpc-common repository](http://github.com/grpc/grpc-common).
-
#Current Status of libraries
Libraries in different languages are in different state of development. We are seeking contributions for all of these libraries.
diff --git a/build.json b/build.json
index 9e9a1ce..06adfee 100644
--- a/build.json
+++ b/build.json
@@ -337,6 +337,7 @@
"src/core/support/sync.c",
"src/core/support/sync_posix.c",
"src/core/support/sync_win32.c",
+ "src/core/support/thd.c",
"src/core/support/thd_posix.c",
"src/core/support/thd_win32.c",
"src/core/support/time.c",
@@ -350,6 +351,9 @@
"name": "gpr_test_util",
"build": "private",
"language": "c",
+ "headers": [
+ "test/core/util/test_config.h"
+ ],
"src": [
"test/core/util/test_config.c"
],
@@ -434,6 +438,7 @@
],
"deps": [
"gpr",
+ "gpr_test_util",
"grpc"
],
"vs_project_guid": "{17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}"
diff --git a/include/grpc++/impl/call.h b/include/grpc++/impl/call.h
index e117ac6..b14c41d 100644
--- a/include/grpc++/impl/call.h
+++ b/include/grpc++/impl/call.h
@@ -109,7 +109,9 @@
char* status_details_;
size_t status_details_capacity_;
// Server send status
- const Status* send_status_;
+ bool send_status_available_;
+ grpc_status_code send_status_code_;
+ grpc::string send_status_details_;
size_t trailing_metadata_count_;
grpc_metadata* trailing_metadata_;
int cancelled_buf_;
diff --git a/include/grpc/support/port_platform.h b/include/grpc/support/port_platform.h
index 9b639cf..41185db 100644
--- a/include/grpc/support/port_platform.h
+++ b/include/grpc/support/port_platform.h
@@ -199,7 +199,7 @@
#endif
#if defined(GPR_POSIX_SOCKET) + defined(GPR_WIN32) != 1
-#error Must define exactly one of GPR_POSIX_POLLSET, GPR_WIN32
+#error Must define exactly one of GPR_POSIX_SOCKET, GPR_WIN32
#endif
typedef int16_t gpr_int16;
diff --git a/include/grpc/support/thd.h b/include/grpc/support/thd.h
index 64d5bed..8126992 100644
--- a/include/grpc/support/thd.h
+++ b/include/grpc/support/thd.h
@@ -52,9 +52,8 @@
/* Thread creation options. */
typedef struct {
- int flags; /* Flags below can be set here. Default value 0. */
+ int flags; /* Opaque field. Get and set with accessors below. */
} gpr_thd_options;
-/* No flags are currently defined. */
/* Create a new thread running (*thd_body)(arg) and place its thread identifier
in *t, and return true. If there are insufficient resources, return false.
@@ -66,9 +65,25 @@
/* Return a gpr_thd_options struct with all fields set to defaults. */
gpr_thd_options gpr_thd_options_default(void);
+/* Set the thread to become detached on startup - this is the default. */
+void gpr_thd_options_set_detached(gpr_thd_options *options);
+
+/* Set the thread to become joinable - mutually exclusive with detached. */
+void gpr_thd_options_set_joinable(gpr_thd_options *options);
+
+/* Returns non-zero if the option detached is set. */
+int gpr_thd_options_is_detached(const gpr_thd_options *options);
+
+/* Returns non-zero if the option joinable is set. */
+int gpr_thd_options_is_joinable(const gpr_thd_options *options);
+
/* Returns the identifier of the current thread. */
gpr_thd_id gpr_thd_currentid(void);
+/* Blocks until the specified thread properly terminates.
+ Calling this on a detached thread has unpredictable results. */
+void gpr_thd_join(gpr_thd_id t);
+
#ifdef __cplusplus
}
#endif
diff --git a/src/compiler/python_generator.cc b/src/compiler/python_generator.cc
index 748417e..72149bc 100644
--- a/src/compiler/python_generator.cc
+++ b/src/compiler/python_generator.cc
@@ -271,7 +271,7 @@
bool PrintServerFactory(const grpc::string& package_qualified_service_name,
const ServiceDescriptor* service, Printer* out) {
out->Print("def early_adopter_create_$Service$_server(servicer, port, "
- "root_certificates, key_chain_pairs):\n",
+ "private_key=None, certificate_chain=None):\n",
"Service", service->name());
{
IndentScope raii_create_server_indent(out);
@@ -339,10 +339,10 @@
}
out->Print("}\n");
out->Print(
- "return implementations.secure_server("
+ "return implementations.server("
"\"$PackageQualifiedServiceName$\","
- " method_service_descriptions, port, root_certificates,"
- " key_chain_pairs)\n",
+ " method_service_descriptions, port, private_key=private_key,"
+ " certificate_chain=certificate_chain)\n",
"PackageQualifiedServiceName", package_qualified_service_name);
}
return true;
@@ -353,7 +353,10 @@
map<grpc::string, grpc::string> dict = ListToDict({
"Service", service->name(),
});
- out->Print(dict, "def early_adopter_create_$Service$_stub(host, port):\n");
+ out->Print(dict, "def early_adopter_create_$Service$_stub(host, port,"
+ " metadata_transformer=None,"
+ " secure=False, root_certificates=None, private_key=None,"
+ " certificate_chain=None, server_host_override=None):\n");
{
IndentScope raii_create_server_indent(out);
map<grpc::string, grpc::string> method_description_constructors;
@@ -419,9 +422,13 @@
}
out->Print("}\n");
out->Print(
- "return implementations.insecure_stub("
+ "return implementations.stub("
"\"$PackageQualifiedServiceName$\","
- " method_invocation_descriptions, host, port)\n",
+ " method_invocation_descriptions, host, port,"
+ " metadata_transformer=metadata_transformer, secure=secure,"
+ " root_certificates=root_certificates, private_key=private_key,"
+ " certificate_chain=certificate_chain,"
+ " server_host_override=server_host_override)\n",
"PackageQualifiedServiceName", package_qualified_service_name);
}
return true;
diff --git a/src/core/httpcli/parser.c b/src/core/httpcli/parser.c
index f4decda..7b2a620 100644
--- a/src/core/httpcli/parser.c
+++ b/src/core/httpcli/parser.c
@@ -177,6 +177,8 @@
}
gpr_log(GPR_ERROR, "should never reach here");
abort();
+
+ return 0;
}
void grpc_httpcli_parser_init(grpc_httpcli_parser *parser) {
diff --git a/src/core/support/thd.c b/src/core/support/thd.c
new file mode 100644
index 0000000..ec308f3
--- /dev/null
+++ b/src/core/support/thd.c
@@ -0,0 +1,66 @@
+/*
+ *
+ * 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.
+ *
+ */
+
+/* Posix implementation for gpr threads. */
+
+#include <memory.h>
+
+#include <grpc/support/thd.h>
+
+enum {
+ GPR_THD_JOINABLE = 1
+};
+
+gpr_thd_options gpr_thd_options_default(void) {
+ gpr_thd_options options;
+ memset(&options, 0, sizeof(options));
+ return options;
+}
+
+void gpr_thd_options_set_detached(gpr_thd_options *options) {
+ options->flags &= ~GPR_THD_JOINABLE;
+}
+
+void gpr_thd_options_set_joinable(gpr_thd_options *options) {
+ options->flags |= GPR_THD_JOINABLE;
+}
+
+int gpr_thd_options_is_detached(const gpr_thd_options *options) {
+ if (!options) return 1;
+ return (options->flags & GPR_THD_JOINABLE) == 0;
+}
+
+int gpr_thd_options_is_joinable(const gpr_thd_options *options) {
+ if (!options) return 0;
+ return (options->flags & GPR_THD_JOINABLE) == GPR_THD_JOINABLE;
+}
diff --git a/src/core/support/thd_posix.c b/src/core/support/thd_posix.c
index f50ea58..7bf5272 100644
--- a/src/core/support/thd_posix.c
+++ b/src/core/support/thd_posix.c
@@ -68,7 +68,11 @@
a->arg = arg;
GPR_ASSERT(pthread_attr_init(&attr) == 0);
- GPR_ASSERT(pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED) == 0);
+ if (gpr_thd_options_is_detached(options)) {
+ GPR_ASSERT(pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED) == 0);
+ } else {
+ GPR_ASSERT(pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE) == 0);
+ }
thread_started = (pthread_create(&p, &attr, &thread_body, a) == 0);
GPR_ASSERT(pthread_attr_destroy(&attr) == 0);
if (!thread_started) {
@@ -78,14 +82,12 @@
return thread_started;
}
-gpr_thd_options gpr_thd_options_default(void) {
- gpr_thd_options options;
- memset(&options, 0, sizeof(options));
- return options;
-}
-
gpr_thd_id gpr_thd_currentid(void) {
return (gpr_thd_id)pthread_self();
}
+void gpr_thd_join(gpr_thd_id t) {
+ pthread_join(t, NULL);
+}
+
#endif /* GPR_POSIX_SYNC */
diff --git a/src/core/support/thd_win32.c b/src/core/support/thd_win32.c
index 347cad5..f92fb64 100644
--- a/src/core/support/thd_win32.c
+++ b/src/core/support/thd_win32.c
@@ -31,7 +31,7 @@
*
*/
-/* Posix implementation for gpr threads. */
+/* Windows implementation for gpr threads. */
#include <grpc/support/port_platform.h>
@@ -40,47 +40,81 @@
#include <windows.h>
#include <string.h>
#include <grpc/support/alloc.h>
+#include <grpc/support/log.h>
#include <grpc/support/thd.h>
-struct thd_arg {
+#if defined(_MSC_VER)
+#define thread_local __declspec(thread)
+#elif defined(__GNUC__)
+#define thread_local __thread
+#else
+#error "Unknown compiler - please file a bug report"
+#endif
+
+struct thd_info {
void (*body)(void *arg); /* body of a thread */
void *arg; /* argument to a thread */
+ HANDLE join_event; /* if joinable, the join event */
+ int joinable; /* true if not detached */
};
+static thread_local struct thd_info *g_thd_info;
+
+/* Destroys a thread info */
+static destroy_thread(struct thd_info *t) {
+ if (t->joinable) CloseHandle(t->join_event);
+ gpr_free(t);
+}
+
/* Body of every thread started via gpr_thd_new. */
static DWORD WINAPI thread_body(void *v) {
- struct thd_arg a = *(struct thd_arg *)v;
- gpr_free(v);
- (*a.body)(a.arg);
+ g_thd_info = (struct thd_info *)v;
+ g_thd_info->body(g_thd_info->arg);
+ if (g_thd_info->joinable) {
+ BOOL ret = SetEvent(g_thd_info->join_event);
+ GPR_ASSERT(ret);
+ } else {
+ destroy_thread(g_thd_info);
+ }
return 0;
}
int gpr_thd_new(gpr_thd_id *t, void (*thd_body)(void *arg), void *arg,
const gpr_thd_options *options) {
HANDLE handle;
- DWORD thread_id;
- struct thd_arg *a = gpr_malloc(sizeof(*a));
- a->body = thd_body;
- a->arg = arg;
+ struct thd_info *info = gpr_malloc(sizeof(*info));
+ info->body = thd_body;
+ info->arg = arg;
*t = 0;
- handle = CreateThread(NULL, 64 * 1024, thread_body, a, 0, &thread_id);
- if (handle == NULL) {
- gpr_free(a);
+ if (gpr_thd_options_is_joinable(options)) {
+ info->joinable = 1;
+ info->join_event = CreateEvent(NULL, FALSE, FALSE, NULL);
+ if (info->join_event == NULL) {
+ gpr_free(info);
+ return 0;
+ }
} else {
- CloseHandle(handle); /* threads are "detached" */
+ info->joinable = 0;
}
- *t = (gpr_thd_id)thread_id;
+ handle = CreateThread(NULL, 64 * 1024, thread_body, info, 0, NULL);
+ if (handle == NULL) {
+ destroy_thread(info);
+ } else {
+ *t = (gpr_thd_id)info;
+ CloseHandle(handle);
+ }
return handle != NULL;
}
-gpr_thd_options gpr_thd_options_default(void) {
- gpr_thd_options options;
- memset(&options, 0, sizeof(options));
- return options;
+gpr_thd_id gpr_thd_currentid(void) {
+ return (gpr_thd_id)g_thd_info;
}
-gpr_thd_id gpr_thd_currentid(void) {
- return (gpr_thd_id)GetCurrentThreadId();
+void gpr_thd_join(gpr_thd_id t) {
+ struct thd_info *info = (struct thd_info *)t;
+ DWORD ret = WaitForSingleObject(info->join_event, INFINITE);
+ GPR_ASSERT(ret == WAIT_OBJECT_0);
+ destroy_thread(info);
}
#endif /* GPR_WIN32 */
diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c
index 2b15b2a..4c0394d 100644
--- a/src/core/transport/chttp2_transport.c
+++ b/src/core/transport/chttp2_transport.c
@@ -1710,6 +1710,8 @@
gpr_log(GPR_ERROR, "should never reach here");
abort();
+
+ return 0;
}
/* tcp read callback */
diff --git a/src/core/transport/metadata.c b/src/core/transport/metadata.c
index 1c15716..066cc26 100644
--- a/src/core/transport/metadata.c
+++ b/src/core/transport/metadata.c
@@ -97,7 +97,7 @@
static void internal_string_unref(internal_string *s);
static void discard_metadata(grpc_mdctx *ctx);
static void gc_mdtab(grpc_mdctx *ctx);
-static void metadata_context_destroy(grpc_mdctx *ctx);
+static void metadata_context_destroy_locked(grpc_mdctx *ctx);
static void lock(grpc_mdctx *ctx) { gpr_mu_lock(&ctx->mu); }
@@ -122,8 +122,7 @@
discard_metadata(ctx);
}
if (ctx->strtab_count == 0) {
- gpr_mu_unlock(&ctx->mu);
- metadata_context_destroy(ctx);
+ metadata_context_destroy_locked(ctx);
return;
}
}
@@ -185,8 +184,7 @@
}
}
-static void metadata_context_destroy(grpc_mdctx *ctx) {
- gpr_mu_lock(&ctx->mu);
+static void metadata_context_destroy_locked(grpc_mdctx *ctx) {
GPR_ASSERT(ctx->strtab_count == 0);
GPR_ASSERT(ctx->mdtab_count == 0);
GPR_ASSERT(ctx->mdtab_free == 0);
diff --git a/src/cpp/common/call.cc b/src/cpp/common/call.cc
index 1599e51..e75e77e 100644
--- a/src/cpp/common/call.cc
+++ b/src/cpp/common/call.cc
@@ -60,7 +60,8 @@
status_code_(GRPC_STATUS_OK),
status_details_(nullptr),
status_details_capacity_(0),
- send_status_(nullptr),
+ send_status_available_(false),
+ send_status_code_(GRPC_STATUS_OK),
trailing_metadata_count_(0),
trailing_metadata_(nullptr),
cancelled_buf_(0),
@@ -104,7 +105,9 @@
status_code_ = GRPC_STATUS_OK;
- send_status_ = nullptr;
+ send_status_available_ = false;
+ send_status_code_ = GRPC_STATUS_OK;
+ send_status_details_.clear();
trailing_metadata_count_ = 0;
trailing_metadata_ = nullptr;
@@ -208,7 +211,9 @@
} else {
trailing_metadata_count_ = 0;
}
- send_status_ = &status;
+ send_status_available_ = true;
+ send_status_code_ = static_cast<grpc_status_code>(status.code());
+ send_status_details_ = status.details();
}
void CallOpBuffer::FillOps(grpc_op* ops, size_t* nops) {
@@ -257,16 +262,15 @@
&status_details_capacity_;
(*nops)++;
}
- if (send_status_) {
+ if (send_status_available_) {
ops[*nops].op = GRPC_OP_SEND_STATUS_FROM_SERVER;
ops[*nops].data.send_status_from_server.trailing_metadata_count =
trailing_metadata_count_;
ops[*nops].data.send_status_from_server.trailing_metadata =
trailing_metadata_;
- ops[*nops].data.send_status_from_server.status =
- static_cast<grpc_status_code>(send_status_->code());
+ ops[*nops].data.send_status_from_server.status = send_status_code_;
ops[*nops].data.send_status_from_server.status_details =
- send_status_->details().c_str();
+ send_status_details_.empty() ? nullptr : send_status_details_.c_str();
(*nops)++;
}
if (recv_closed_) {
diff --git a/src/cpp/server/server.cc b/src/cpp/server/server.cc
index 8e6a6cf..bd0a237 100644
--- a/src/cpp/server/server.cc
+++ b/src/cpp/server/server.cc
@@ -107,6 +107,7 @@
request_payload_(mrd->request_payload_),
method_(mrd->method_) {
ctx_.call_ = mrd->call_;
+ ctx_.cq_ = &cq_;
GPR_ASSERT(mrd->in_flight_);
mrd->in_flight_ = false;
mrd->request_metadata_.count = 0;
@@ -364,6 +365,7 @@
}
}
ctx->call_ = call_;
+ ctx->cq_ = cq_;
Call call(call_, server_, cq_);
if (orig_status && call_) {
ctx->BeginCompletionOp(&call);
diff --git a/src/csharp/Grpc.Examples.MathClient/MathClient.cs b/src/csharp/Grpc.Examples.MathClient/MathClient.cs
index f5956bd..ca7683d 100644
--- a/src/csharp/Grpc.Examples.MathClient/MathClient.cs
+++ b/src/csharp/Grpc.Examples.MathClient/MathClient.cs
@@ -46,11 +46,15 @@
MathGrpc.IMathServiceClient stub = new MathGrpc.MathServiceClientStub(channel);
MathExamples.DivExample(stub);
- MathExamples.FibExample(stub);
+ MathExamples.DivAsyncExample(stub).Wait();
- MathExamples.SumExample(stub);
+ MathExamples.FibExample(stub).Wait();
- MathExamples.DivManyExample(stub);
+ MathExamples.SumExample(stub).Wait();
+
+ MathExamples.DivManyExample(stub).Wait();
+
+ MathExamples.DependendRequestsExample(stub).Wait();
}
GrpcEnvironment.Shutdown();
diff --git a/src/csharp/Grpc.Examples.Tests/Grpc.Examples.Tests.csproj b/src/csharp/Grpc.Examples.Tests/Grpc.Examples.Tests.csproj
index cf5a640..f9c1caf 100644
--- a/src/csharp/Grpc.Examples.Tests/Grpc.Examples.Tests.csproj
+++ b/src/csharp/Grpc.Examples.Tests/Grpc.Examples.Tests.csproj
@@ -37,6 +37,18 @@
<Reference Include="Google.ProtocolBuffers">
<HintPath>..\packages\Google.ProtocolBuffers.2.4.1.521\lib\net40\Google.ProtocolBuffers.dll</HintPath>
</Reference>
+ <Reference Include="System.Reactive.Interfaces">
+ <HintPath>..\packages\Rx-Interfaces.2.2.5\lib\net45\System.Reactive.Interfaces.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Reactive.Core">
+ <HintPath>..\packages\Rx-Core.2.2.5\lib\net45\System.Reactive.Core.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Reactive.Linq">
+ <HintPath>..\packages\Rx-Linq.2.2.5\lib\net45\System.Reactive.Linq.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Reactive.PlatformServices">
+ <HintPath>..\packages\Rx-PlatformServices.2.2.5\lib\net45\System.Reactive.PlatformServices.dll</HintPath>
+ </Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
diff --git a/src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs b/src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs
index 85f213c..fa5d668 100644
--- a/src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs
+++ b/src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs
@@ -33,6 +33,7 @@
using System;
using System.Collections.Generic;
+using System.Reactive.Linq;
using System.Threading;
using System.Threading.Tasks;
using Grpc.Core;
@@ -120,14 +121,12 @@
[Test]
public void Sum()
{
- var res = client.Sum();
- foreach (var num in new long[] { 10, 20, 30 })
- {
- res.Inputs.OnNext(Num.CreateBuilder().SetNum_(num).Build());
- }
- res.Inputs.OnCompleted();
+ var clientStreamingResult = client.Sum();
+ var numList = new List<long> { 10, 20, 30 }.ConvertAll(
+ n => Num.CreateBuilder().SetNum_(n).Build());
+ numList.Subscribe(clientStreamingResult.Inputs);
- Assert.AreEqual(60, res.Task.Result.Num_);
+ Assert.AreEqual(60, clientStreamingResult.Task.Result.Num_);
}
[Test]
@@ -142,13 +141,7 @@
var recorder = new RecordingObserver<DivReply>();
var requestObserver = client.DivMany(recorder);
-
- foreach (var arg in divArgsList)
- {
- requestObserver.OnNext(arg);
- }
- requestObserver.OnCompleted();
-
+ divArgsList.Subscribe(requestObserver);
var result = recorder.ToList().Result;
CollectionAssert.AreEqual(new long[] { 3, 4, 3 }, result.ConvertAll((divReply) => divReply.Quotient));
diff --git a/src/csharp/Grpc.Examples.Tests/packages.config b/src/csharp/Grpc.Examples.Tests/packages.config
index 51c17bc..06c5e6a 100644
--- a/src/csharp/Grpc.Examples.Tests/packages.config
+++ b/src/csharp/Grpc.Examples.Tests/packages.config
@@ -1,5 +1,10 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
- <package id="Google.ProtocolBuffers" version="2.4.1.521" targetFramework="net45" />
- <package id="NUnit" version="2.6.4" targetFramework="net45" />
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="Google.ProtocolBuffers" version="2.4.1.521" targetFramework="net45" />
+ <package id="NUnit" version="2.6.4" targetFramework="net45" />
+ <package id="Rx-Core" version="2.2.5" targetFramework="net45" />
+ <package id="Rx-Interfaces" version="2.2.5" targetFramework="net45" />
+ <package id="Rx-Linq" version="2.2.5" targetFramework="net45" />
+ <package id="Rx-Main" version="2.2.5" targetFramework="net45" />
+ <package id="Rx-PlatformServices" version="2.2.5" targetFramework="net45" />
</packages>
\ No newline at end of file
diff --git a/src/csharp/Grpc.Examples/MathExamples.cs b/src/csharp/Grpc.Examples/MathExamples.cs
index b8bb7ea..032372b 100644
--- a/src/csharp/Grpc.Examples/MathExamples.cs
+++ b/src/csharp/Grpc.Examples/MathExamples.cs
@@ -45,51 +45,45 @@
Console.WriteLine("Div Result: " + result);
}
- public static void DivAsyncExample(MathGrpc.IMathServiceClient stub)
+ public static async Task DivAsyncExample(MathGrpc.IMathServiceClient stub)
{
- Task<DivReply> call = stub.DivAsync(new DivArgs.Builder { Dividend = 4, Divisor = 5 }.Build());
- DivReply result = call.Result;
+ Task<DivReply> resultTask = stub.DivAsync(new DivArgs.Builder { Dividend = 4, Divisor = 5 }.Build());
+ DivReply result = await resultTask;
+ Console.WriteLine("DivAsync Result: " + result);
+ }
+
+ public static async Task DivAsyncWithCancellationExample(MathGrpc.IMathServiceClient stub)
+ {
+ Task<DivReply> resultTask = stub.DivAsync(new DivArgs.Builder { Dividend = 4, Divisor = 5 }.Build());
+ DivReply result = await resultTask;
Console.WriteLine(result);
}
- public static void DivAsyncWithCancellationExample(MathGrpc.IMathServiceClient stub)
- {
- Task<DivReply> call = stub.DivAsync(new DivArgs.Builder { Dividend = 4, Divisor = 5 }.Build());
- DivReply result = call.Result;
- Console.WriteLine(result);
- }
-
- public static void FibExample(MathGrpc.IMathServiceClient stub)
+ public static async Task FibExample(MathGrpc.IMathServiceClient stub)
{
var recorder = new RecordingObserver<Num>();
stub.Fib(new FibArgs.Builder { Limit = 5 }.Build(), recorder);
-
- List<Num> numbers = recorder.ToList().Result;
- Console.WriteLine("Fib Result: " + string.Join("|", recorder.ToList().Result));
+ List<Num> result = await recorder.ToList();
+ Console.WriteLine("Fib Result: " + string.Join("|", result));
}
- public static void SumExample(MathGrpc.IMathServiceClient stub)
+ public static async Task SumExample(MathGrpc.IMathServiceClient stub)
{
- List<Num> numbers = new List<Num>
+ var numbers = new List<Num>
{
new Num.Builder { Num_ = 1 }.Build(),
new Num.Builder { Num_ = 2 }.Build(),
new Num.Builder { Num_ = 3 }.Build()
};
- var res = stub.Sum();
- foreach (var num in numbers)
- {
- res.Inputs.OnNext(num);
- }
- res.Inputs.OnCompleted();
-
- Console.WriteLine("Sum Result: " + res.Task.Result);
+ var clientStreamingResult = stub.Sum();
+ numbers.Subscribe(clientStreamingResult.Inputs);
+ Console.WriteLine("Sum Result: " + await clientStreamingResult.Task);
}
- public static void DivManyExample(MathGrpc.IMathServiceClient stub)
+ public static async Task DivManyExample(MathGrpc.IMathServiceClient stub)
{
- List<DivArgs> divArgsList = new List<DivArgs>
+ var divArgsList = new List<DivArgs>
{
new DivArgs.Builder { Dividend = 10, Divisor = 3 }.Build(),
new DivArgs.Builder { Dividend = 100, Divisor = 21 }.Build(),
@@ -97,26 +91,27 @@
};
var recorder = new RecordingObserver<DivReply>();
-
var inputs = stub.DivMany(recorder);
- foreach (var input in divArgsList)
- {
- inputs.OnNext(input);
- }
- inputs.OnCompleted();
-
- Console.WriteLine("DivMany Result: " + string.Join("|", recorder.ToList().Result));
+ divArgsList.Subscribe(inputs);
+ var result = await recorder.ToList();
+ Console.WriteLine("DivMany Result: " + string.Join("|", result));
}
- public static void DependendRequestsExample(MathGrpc.IMathServiceClient stub)
+ public static async Task DependendRequestsExample(MathGrpc.IMathServiceClient stub)
{
- var numberList = new List<Num>
+ var numbers = new List<Num>
{
- new Num.Builder { Num_ = 1 }.Build(),
- new Num.Builder { Num_ = 2 }.Build(), new Num.Builder { Num_ = 3 }.Build()
+ new Num.Builder { Num_ = 1 }.Build(),
+ new Num.Builder { Num_ = 2 }.Build(),
+ new Num.Builder { Num_ = 3 }.Build()
};
- numberList.ToObservable();
+ var clientStreamingResult = stub.Sum();
+ numbers.Subscribe(clientStreamingResult.Inputs);
+ Num sum = await clientStreamingResult.Task;
+
+ DivReply result = await stub.DivAsync(new DivArgs.Builder { Dividend = sum.Num_, Divisor = numbers.Count }.Build());
+ Console.WriteLine("Avg Result: " + result);
}
}
}
diff --git a/src/node/binding.gyp b/src/node/binding.gyp
index 7ef3bdf..83f72fa 100644
--- a/src/node/binding.gyp
+++ b/src/node/binding.gyp
@@ -18,12 +18,29 @@
],
'link_settings': {
'libraries': [
- '-lrt',
'-lpthread',
'-lgrpc',
'-lgpr'
- ],
+ ]
},
+ "conditions": [
+ ['OS == "mac"', {
+ 'xcode_settings': {
+ 'MACOSX_DEPLOYMENT_TARGET': '10.9',
+ 'OTHER_CFLAGS': [
+ '-std=c++11',
+ '-stdlib=libc++'
+ ]
+ }
+ }],
+ ['OS != "mac"', {
+ 'link_settings': {
+ 'libraries': [
+ '-lrt'
+ ]
+ }
+ }]
+ ],
"target_name": "grpc",
"sources": [
"ext/byte_buffer.cc",
diff --git a/src/node/ext/byte_buffer.cc b/src/node/ext/byte_buffer.cc
index 82b54b5..01bd92e 100644
--- a/src/node/ext/byte_buffer.cc
+++ b/src/node/ext/byte_buffer.cc
@@ -32,7 +32,6 @@
*/
#include <string.h>
-#include <malloc.h>
#include <node.h>
#include <nan.h>
diff --git a/src/node/ext/channel.cc b/src/node/ext/channel.cc
index 787e274..d37bf76 100644
--- a/src/node/ext/channel.cc
+++ b/src/node/ext/channel.cc
@@ -31,8 +31,6 @@
*
*/
-#include <malloc.h>
-
#include <vector>
#include <node.h>
diff --git a/src/node/ext/server.cc b/src/node/ext/server.cc
index e47bac8..3c2396b 100644
--- a/src/node/ext/server.cc
+++ b/src/node/ext/server.cc
@@ -38,8 +38,6 @@
#include <node.h>
#include <nan.h>
-#include <malloc.h>
-
#include <vector>
#include "grpc/grpc.h"
#include "grpc/grpc_security.h"
diff --git a/src/node/interop/interop_client.js b/src/node/interop/interop_client.js
index 77804cf..3341486 100644
--- a/src/node/interop/interop_client.js
+++ b/src/node/interop/interop_client.js
@@ -318,8 +318,8 @@
empty_stream: emptyStream,
cancel_after_begin: cancelAfterBegin,
cancel_after_first_response: cancelAfterFirstResponse,
- compute_engine_creds: _.partial(authTest, AUTH_USER),
- service_account_creds: _.partial(authTest, COMPUTE_ENGINE_USER)
+ compute_engine_creds: _.partial(authTest, COMPUTE_ENGINE_USER),
+ service_account_creds: _.partial(authTest, AUTH_USER)
};
/**
diff --git a/src/node/src/client.js b/src/node/src/client.js
index c46f7d0..fad369c 100644
--- a/src/node/src/client.js
+++ b/src/node/src/client.js
@@ -241,13 +241,13 @@
callback(err);
return;
}
+ emitter.emit('status', response.status);
if (response.status.code !== grpc.status.OK) {
var error = new Error(response.status.details);
error.code = response.status.code;
callback(error);
return;
}
- emitter.emit('status', response.status);
emitter.emit('metadata', response.metadata);
callback(null, deserialize(response.read));
});
@@ -312,13 +312,13 @@
callback(err);
return;
}
+ stream.emit('status', response.status);
if (response.status.code !== grpc.status.OK) {
var error = new Error(response.status.details);
error.code = response.status.code;
callback(error);
return;
}
- stream.emit('status', response.status);
callback(null, deserialize(response.read));
});
});
diff --git a/src/node/src/server.js b/src/node/src/server.js
index 8a26a43..05de162 100644
--- a/src/node/src/server.js
+++ b/src/node/src/server.js
@@ -70,6 +70,9 @@
status.details = error.details;
}
}
+ if (error.hasOwnProperty('metadata')) {
+ status.metadata = error.metadata;
+ }
var error_batch = {};
error_batch[grpc.opType.SEND_STATUS_FROM_SERVER] = status;
call.startBatch(error_batch, function(){});
@@ -102,15 +105,20 @@
* @param {*} value The value to respond with
* @param {function(*):Buffer=} serialize Serialization function for the
* response
+ * @param {Object=} metadata Optional trailing metadata to send with status
*/
-function sendUnaryResponse(call, value, serialize) {
+function sendUnaryResponse(call, value, serialize, metadata) {
var end_batch = {};
- end_batch[grpc.opType.SEND_MESSAGE] = serialize(value);
- end_batch[grpc.opType.SEND_STATUS_FROM_SERVER] = {
+ var status = {
code: grpc.status.OK,
details: 'OK',
metadata: {}
};
+ if (metadata) {
+ status.metadata = metadata;
+ }
+ end_batch[grpc.opType.SEND_MESSAGE] = serialize(value);
+ end_batch[grpc.opType.SEND_STATUS_FROM_SERVER] = status;
call.startBatch(end_batch, function (){});
}
@@ -143,6 +151,7 @@
function setStatus(err) {
var code = grpc.status.INTERNAL;
var details = 'Unknown Error';
+ var metadata = {};
if (err.hasOwnProperty('message')) {
details = err.message;
}
@@ -152,7 +161,10 @@
details = err.details;
}
}
- stream.status = {code: code, details: details, metadata: {}};
+ if (err.hasOwnProperty('metadata')) {
+ metadata = err.metadata;
+ }
+ stream.status = {code: code, details: details, metadata: metadata};
}
/**
* Terminate the call. This includes indicating that reads are done, draining
@@ -166,6 +178,17 @@
stream.end();
}
stream.on('error', terminateCall);
+ /**
+ * Override of Writable#end method that allows for sending metadata with a
+ * success status.
+ * @param {Object=} metadata Metadata to send with the status
+ */
+ stream.end = function(metadata) {
+ if (metadata) {
+ stream.status.metadata = metadata;
+ }
+ Writable.prototype.end.call(this);
+ };
}
/**
@@ -335,11 +358,13 @@
if (emitter.cancelled) {
return;
}
- handler.func(emitter, function sendUnaryData(err, value) {
+ handler.func(emitter, function sendUnaryData(err, value, trailer) {
if (err) {
+ err.metadata = trailer;
handleError(call, err);
+ } else {
+ sendUnaryResponse(call, value, handler.serialize, trailer);
}
- sendUnaryResponse(call, value, handler.serialize);
});
});
}
@@ -378,12 +403,14 @@
var metadata_batch = {};
metadata_batch[grpc.opType.SEND_INITIAL_METADATA] = metadata;
call.startBatch(metadata_batch, function() {});
- handler.func(stream, function(err, value) {
+ handler.func(stream, function(err, value, trailer) {
stream.terminate();
if (err) {
+ err.metadata = trailer;
handleError(call, err);
+ } else {
+ sendUnaryResponse(call, value, handler.serialize, trailer);
}
- sendUnaryResponse(call, value, handler.serialize);
});
}
diff --git a/src/node/test/surface_test.js b/src/node/test/surface_test.js
index 96b4781..590c644 100644
--- a/src/node/test/surface_test.js
+++ b/src/node/test/surface_test.js
@@ -126,6 +126,167 @@
});
});
});
+describe('Trailing metadata', function() {
+ var client;
+ var server;
+ before(function() {
+ var test_proto = ProtoBuf.loadProtoFile(__dirname + '/test_service.proto');
+ var test_service = test_proto.lookup('TestService');
+ var Server = grpc.buildServer([test_service]);
+ server = new Server({
+ TestService: {
+ unary: function(call, cb) {
+ var req = call.request;
+ if (req.error) {
+ cb(new Error('Requested error'), null, {metadata: ['yes']});
+ } else {
+ cb(null, {count: 1}, {metadata: ['yes']});
+ }
+ },
+ clientStream: function(stream, cb){
+ var count = 0;
+ var errored;
+ stream.on('data', function(data) {
+ if (data.error) {
+ errored = true;
+ cb(new Error('Requested error'), null, {metadata: ['yes']});
+ } else {
+ count += 1;
+ }
+ });
+ stream.on('end', function() {
+ if (!errored) {
+ cb(null, {count: count}, {metadata: ['yes']});
+ }
+ });
+ },
+ serverStream: function(stream) {
+ var req = stream.request;
+ if (req.error) {
+ var err = new Error('Requested error');
+ err.metadata = {metadata: ['yes']};
+ stream.emit('error', err);
+ } else {
+ for (var i = 0; i < 5; i++) {
+ stream.write({count: i});
+ }
+ stream.end({metadata: ['yes']});
+ }
+ },
+ bidiStream: function(stream) {
+ var count = 0;
+ stream.on('data', function(data) {
+ if (data.error) {
+ var err = new Error('Requested error');
+ err.metadata = {
+ metadata: ['yes'],
+ count: ['' + count]
+ };
+ stream.emit('error', err);
+ } else {
+ stream.write({count: count});
+ count += 1;
+ }
+ });
+ stream.on('end', function() {
+ stream.end({metadata: ['yes']});
+ });
+ }
+ }
+ });
+ var port = server.bind('localhost:0');
+ var Client = surface_client.makeProtobufClientConstructor(test_service);
+ client = new Client('localhost:' + port);
+ server.listen();
+ });
+ after(function() {
+ server.shutdown();
+ });
+ it('should be present when a unary call succeeds', function(done) {
+ var call = client.unary({error: false}, function(err, data) {
+ assert.ifError(err);
+ });
+ call.on('status', function(status) {
+ assert.deepEqual(status.metadata.metadata, ['yes']);
+ done();
+ });
+ });
+ it('should be present when a unary call fails', function(done) {
+ var call = client.unary({error: true}, function(err, data) {
+ assert(err);
+ });
+ call.on('status', function(status) {
+ assert.deepEqual(status.metadata.metadata, ['yes']);
+ done();
+ });
+ });
+ it('should be present when a client stream call succeeds', function(done) {
+ var call = client.clientStream(function(err, data) {
+ assert.ifError(err);
+ });
+ call.write({error: false});
+ call.write({error: false});
+ call.end();
+ call.on('status', function(status) {
+ assert.deepEqual(status.metadata.metadata, ['yes']);
+ done();
+ });
+ });
+ it('should be present when a client stream call fails', function(done) {
+ var call = client.clientStream(function(err, data) {
+ assert(err);
+ });
+ call.write({error: false});
+ call.write({error: true});
+ call.end();
+ call.on('status', function(status) {
+ assert.deepEqual(status.metadata.metadata, ['yes']);
+ done();
+ });
+ });
+ it('should be present when a server stream call succeeds', function(done) {
+ var call = client.serverStream({error: false});
+ call.on('data', function(){});
+ call.on('status', function(status) {
+ assert.strictEqual(status.code, grpc.status.OK);
+ assert.deepEqual(status.metadata.metadata, ['yes']);
+ done();
+ });
+ });
+ it('should be present when a server stream call fails', function(done) {
+ var call = client.serverStream({error: true});
+ call.on('data', function(){});
+ call.on('status', function(status) {
+ assert.notStrictEqual(status.code, grpc.status.OK);
+ assert.deepEqual(status.metadata.metadata, ['yes']);
+ done();
+ });
+ });
+ it('should be present when a bidi stream succeeds', function(done) {
+ var call = client.bidiStream();
+ call.write({error: false});
+ call.write({error: false});
+ call.end();
+ call.on('data', function(){});
+ call.on('status', function(status) {
+ assert.strictEqual(status.code, grpc.status.OK);
+ assert.deepEqual(status.metadata.metadata, ['yes']);
+ done();
+ });
+ });
+ it('should be present when a bidi stream fails', function(done) {
+ var call = client.bidiStream();
+ call.write({error: false});
+ call.write({error: true});
+ call.end();
+ call.on('data', function(){});
+ call.on('status', function(status) {
+ assert.notStrictEqual(status.code, grpc.status.OK);
+ assert.deepEqual(status.metadata.metadata, ['yes']);
+ done();
+ });
+ });
+});
describe('Cancelling surface client', function() {
var client;
var server;
diff --git a/src/node/test/test_service.proto b/src/node/test/test_service.proto
new file mode 100644
index 0000000..5d3d891
--- /dev/null
+++ b/src/node/test/test_service.proto
@@ -0,0 +1,52 @@
+// 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.
+
+syntax = "proto2";
+
+message Request {
+ optional bool error = 1;
+}
+
+message Response {
+ optional int32 count = 1;
+}
+
+service TestService {
+ rpc Unary (Request) returns (Response) {
+ }
+
+ rpc ClientStream (stream Request) returns (Response) {
+ }
+
+ rpc ServerStream (Request) returns (stream Response) {
+ }
+
+ rpc BidiStream (stream Request) returns (stream Response) {
+ }
+}
\ No newline at end of file
diff --git a/src/php/bin/interop_client.sh b/src/php/bin/interop_client.sh
index 2c61ea8..22e4a49 100755
--- a/src/php/bin/interop_client.sh
+++ b/src/php/bin/interop_client.sh
@@ -31,5 +31,8 @@
set +e
cd $(dirname $0)
-php -d extension_dir=../ext/grpc/modules/ -d extension=grpc.so \
+
+module_dir=`php --version | grep -q 'PHP 5.6' && echo '../ext/grpc' || echo '../ext/grpc/modules'`
+
+php -d extension_dir=$module_dir -d extension=grpc.so \
../tests/interop/interop_client.php $@ 1>&2
diff --git a/src/php/bin/run_tests.sh b/src/php/bin/run_tests.sh
index c3358ed..1335672 100755
--- a/src/php/bin/run_tests.sh
+++ b/src/php/bin/run_tests.sh
@@ -34,13 +34,15 @@
cd $(dirname $0)
default_extension_dir=`php -i | grep extension_dir | sed 's/.*=> //g'`
+module_dir=`php --version | grep -q 'PHP 5.6' && echo '../ext/grpc' || echo '../ext/grpc/modules'`
+
# sym-link in system supplied extensions
for f in $default_extension_dir/*.so
do
- ln -s $f ../ext/grpc/modules/$(basename $f) &> /dev/null || true
+ ln -s $f $module_dir/$(basename $f) &> /dev/null || true
done
php \
- -d extension_dir=../ext/grpc/modules/ \
+ -d extension_dir=$module_dir \
-d extension=grpc.so \
`which phpunit` -v --debug --strict ../tests/unit_tests
diff --git a/src/php/ext/grpc/byte_buffer.c b/src/php/ext/grpc/byte_buffer.c
index 9f122d6..4f3e6b6 100644
--- a/src/php/ext/grpc/byte_buffer.c
+++ b/src/php/ext/grpc/byte_buffer.c
@@ -35,18 +35,18 @@
#include "config.h"
#endif
-#include "php.h"
-#include "php_ini.h"
-#include "ext/standard/info.h"
-#include "ext/spl/spl_exceptions.h"
+#include <php.h>
+#include <php_ini.h>
+#include <ext/standard/info.h>
+#include <ext/spl/spl_exceptions.h>
#include "php_grpc.h"
#include <string.h>
#include "byte_buffer.h"
-#include "grpc/grpc.h"
-#include "grpc/support/slice.h"
+#include <grpc/grpc.h>
+#include <grpc/support/slice.h>
grpc_byte_buffer *string_to_byte_buffer(char *string, size_t length) {
gpr_slice slice = gpr_slice_from_copied_buffer(string, length);
diff --git a/src/php/ext/grpc/byte_buffer.h b/src/php/ext/grpc/byte_buffer.h
index 7a40638..0e9d1e7 100644
--- a/src/php/ext/grpc/byte_buffer.h
+++ b/src/php/ext/grpc/byte_buffer.h
@@ -34,7 +34,7 @@
#ifndef NET_GRPC_PHP_GRPC_BYTE_BUFFER_H_
#define NET_GRPC_PHP_GRPC_BYTE_BUFFER_H_
-#include "grpc/grpc.h"
+#include <grpc/grpc.h>
grpc_byte_buffer *string_to_byte_buffer(char *string, size_t length);
diff --git a/src/php/ext/grpc/call.c b/src/php/ext/grpc/call.c
index ba1b2a4..6bc65b5 100644
--- a/src/php/ext/grpc/call.c
+++ b/src/php/ext/grpc/call.c
@@ -37,20 +37,20 @@
#include "config.h"
#endif
-#include "php.h"
-#include "php_ini.h"
-#include "ext/standard/info.h"
-#include "ext/spl/spl_exceptions.h"
+#include <php.h>
+#include <php_ini.h>
+#include <ext/standard/info.h>
+#include <ext/spl/spl_exceptions.h>
#include "php_grpc.h"
-#include "zend_exceptions.h"
-#include "zend_hash.h"
+#include <zend_exceptions.h>
+#include <zend_hash.h>
#include <stdbool.h>
-#include "grpc/support/log.h"
-#include "grpc/support/alloc.h"
-#include "grpc/grpc.h"
+#include <grpc/support/log.h>
+#include <grpc/support/alloc.h>
+#include <grpc/grpc.h>
#include "timeval.h"
#include "channel.h"
@@ -263,7 +263,7 @@
* @param array batch Array of actions to take
* @return object Object with results of all actions
*/
-PHP_METHOD(Call, start_batch) {
+PHP_METHOD(Call, startBatch) {
wrapped_grpc_call *call =
(wrapped_grpc_call *)zend_object_store_get_object(getThis() TSRMLS_CC);
grpc_op ops[8];
@@ -494,7 +494,7 @@
static zend_function_entry call_methods[] = {
PHP_ME(Call, __construct, NULL, ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
- PHP_ME(Call, start_batch, NULL, ZEND_ACC_PUBLIC)
+ PHP_ME(Call, startBatch, NULL, ZEND_ACC_PUBLIC)
PHP_ME(Call, cancel, NULL, ZEND_ACC_PUBLIC) PHP_FE_END};
void grpc_init_call(TSRMLS_D) {
diff --git a/src/php/ext/grpc/call.h b/src/php/ext/grpc/call.h
index 743effe..e7eb9a7 100644
--- a/src/php/ext/grpc/call.h
+++ b/src/php/ext/grpc/call.h
@@ -38,12 +38,12 @@
#include "config.h"
#endif
-#include "php.h"
-#include "php_ini.h"
-#include "ext/standard/info.h"
+#include <php.h>
+#include <php_ini.h>
+#include <ext/standard/info.h>
#include "php_grpc.h"
-#include "grpc/grpc.h"
+#include <grpc/grpc.h>
/* Class entry for the Call PHP class */
extern zend_class_entry *grpc_ce_call;
diff --git a/src/php/ext/grpc/channel.c b/src/php/ext/grpc/channel.c
index c96fb12..51a3eae 100644
--- a/src/php/ext/grpc/channel.c
+++ b/src/php/ext/grpc/channel.c
@@ -37,19 +37,19 @@
#include "config.h"
#endif
-#include "php.h"
-#include "php_ini.h"
-#include "ext/standard/info.h"
-#include "ext/spl/spl_exceptions.h"
+#include <php.h>
+#include <php_ini.h>
+#include <ext/standard/info.h>
+#include <ext/spl/spl_exceptions.h>
#include "php_grpc.h"
-#include "zend_exceptions.h"
+#include <zend_exceptions.h>
#include <stdbool.h>
-#include "grpc/grpc.h"
-#include "grpc/support/log.h"
-#include "grpc/grpc_security.h"
+#include <grpc/grpc.h>
+#include <grpc/support/log.h>
+#include <grpc/grpc_security.h>
#include "server.h"
#include "credentials.h"
diff --git a/src/php/ext/grpc/channel.h b/src/php/ext/grpc/channel.h
index 2c79668..c13fa4c 100755
--- a/src/php/ext/grpc/channel.h
+++ b/src/php/ext/grpc/channel.h
@@ -38,12 +38,12 @@
#include "config.h"
#endif
-#include "php.h"
-#include "php_ini.h"
-#include "ext/standard/info.h"
+#include <php.h>
+#include <php_ini.h>
+#include <ext/standard/info.h>
#include "php_grpc.h"
-#include "grpc/grpc.h"
+#include <grpc/grpc.h>
/* Class entry for the PHP Channel class */
extern zend_class_entry *grpc_ce_channel;
diff --git a/src/php/ext/grpc/config.m4 b/src/php/ext/grpc/config.m4
index d1a8dec..11778e3 100755
--- a/src/php/ext/grpc/config.m4
+++ b/src/php/ext/grpc/config.m4
@@ -66,5 +66,5 @@
PHP_SUBST(GRPC_SHARED_LIBADD)
- PHP_NEW_EXTENSION(grpc, byte_buffer.c call.c channel.c credentials.c timeval.c server.c server_credentials.c php_grpc.c, $ext_shared, , -Wall -Werror -pedantic -std=c99)
+ PHP_NEW_EXTENSION(grpc, byte_buffer.c call.c channel.c credentials.c timeval.c server.c server_credentials.c php_grpc.c, $ext_shared, , -Wall -Werror -std=c11)
fi
diff --git a/src/php/ext/grpc/credentials.c b/src/php/ext/grpc/credentials.c
index a94b0ea..a262b99 100644
--- a/src/php/ext/grpc/credentials.c
+++ b/src/php/ext/grpc/credentials.c
@@ -37,17 +37,17 @@
#include "config.h"
#endif
-#include "php.h"
-#include "php_ini.h"
-#include "ext/standard/info.h"
-#include "ext/spl/spl_exceptions.h"
+#include <php.h>
+#include <php_ini.h>
+#include <ext/standard/info.h>
+#include <ext/spl/spl_exceptions.h>
#include "php_grpc.h"
-#include "zend_exceptions.h"
-#include "zend_hash.h"
+#include <zend_exceptions.h>
+#include <zend_hash.h>
-#include "grpc/grpc.h"
-#include "grpc/grpc_security.h"
+#include <grpc/grpc.h>
+#include <grpc/grpc_security.h>
zend_class_entry *grpc_ce_credentials;
diff --git a/src/php/ext/grpc/php_grpc.c b/src/php/ext/grpc/php_grpc.c
index 1f9edfe..3e669ec 100644
--- a/src/php/ext/grpc/php_grpc.c
+++ b/src/php/ext/grpc/php_grpc.c
@@ -42,9 +42,9 @@
#include "config.h"
#endif
-#include "php.h"
-#include "php_ini.h"
-#include "ext/standard/info.h"
+#include <php.h>
+#include <php_ini.h>
+#include <ext/standard/info.h>
#include "php_grpc.h"
// ZEND_DECLARE_MODULE_GLOBALS(grpc)
diff --git a/src/php/ext/grpc/server.c b/src/php/ext/grpc/server.c
index 86b2995..dbb9425 100644
--- a/src/php/ext/grpc/server.c
+++ b/src/php/ext/grpc/server.c
@@ -37,19 +37,19 @@
#include "config.h"
#endif
-#include "php.h"
-#include "php_ini.h"
-#include "ext/standard/info.h"
-#include "ext/spl/spl_exceptions.h"
+#include <php.h>
+#include <php_ini.h>
+#include <ext/standard/info.h>
+#include <ext/spl/spl_exceptions.h>
#include "php_grpc.h"
-#include "zend_exceptions.h"
+#include <zend_exceptions.h>
#include <stdbool.h>
-#include "grpc/grpc.h"
-#include "grpc/support/log.h"
-#include "grpc/grpc_security.h"
+#include <grpc/grpc.h>
+#include <grpc/support/log.h>
+#include <grpc/grpc_security.h>
#include "server.h"
#include "channel.h"
@@ -133,7 +133,7 @@
* @param long $tag_cancel The tag to use if the call is cancelled
* @return Void
*/
-PHP_METHOD(Server, request_call) {
+PHP_METHOD(Server, requestCall) {
grpc_call_error error_code;
wrapped_grpc_server *server =
(wrapped_grpc_server *)zend_object_store_get_object(getThis() TSRMLS_CC);
@@ -178,7 +178,7 @@
* @param string $addr The address to add
* @return true on success, false on failure
*/
-PHP_METHOD(Server, add_http2_port) {
+PHP_METHOD(Server, addHttp2Port) {
wrapped_grpc_server *server =
(wrapped_grpc_server *)zend_object_store_get_object(getThis() TSRMLS_CC);
const char *addr;
@@ -193,7 +193,7 @@
RETURN_LONG(grpc_server_add_http2_port(server->wrapped, addr));
}
-PHP_METHOD(Server, add_secure_http2_port) {
+PHP_METHOD(Server, addSecureHttp2Port) {
wrapped_grpc_server *server =
(wrapped_grpc_server *)zend_object_store_get_object(getThis() TSRMLS_CC);
const char *addr;
@@ -227,9 +227,9 @@
static zend_function_entry server_methods[] = {
PHP_ME(Server, __construct, NULL, ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
- PHP_ME(Server, request_call, NULL, ZEND_ACC_PUBLIC)
- PHP_ME(Server, add_http2_port, NULL, ZEND_ACC_PUBLIC)
- PHP_ME(Server, add_secure_http2_port, NULL, ZEND_ACC_PUBLIC)
+ PHP_ME(Server, requestCall, NULL, ZEND_ACC_PUBLIC)
+ PHP_ME(Server, addHttp2Port, NULL, ZEND_ACC_PUBLIC)
+ PHP_ME(Server, addSecureHttp2Port, NULL, ZEND_ACC_PUBLIC)
PHP_ME(Server, start, NULL, ZEND_ACC_PUBLIC) PHP_FE_END};
void grpc_init_server(TSRMLS_D) {
diff --git a/src/php/ext/grpc/server.h b/src/php/ext/grpc/server.h
index ebb8d25..a2ee2ff 100755
--- a/src/php/ext/grpc/server.h
+++ b/src/php/ext/grpc/server.h
@@ -38,12 +38,12 @@
#include "config.h"
#endif
-#include "php.h"
-#include "php_ini.h"
-#include "ext/standard/info.h"
+#include <php.h>
+#include <php_ini.h>
+#include <ext/standard/info.h>
#include "php_grpc.h"
-#include "grpc/grpc.h"
+#include <grpc/grpc.h>
/* Class entry for the Server PHP class */
extern zend_class_entry *grpc_ce_server;
diff --git a/src/php/ext/grpc/server_credentials.c b/src/php/ext/grpc/server_credentials.c
index df64e65..c4c1fab 100644
--- a/src/php/ext/grpc/server_credentials.c
+++ b/src/php/ext/grpc/server_credentials.c
@@ -37,17 +37,17 @@
#include "config.h"
#endif
-#include "php.h"
-#include "php_ini.h"
-#include "ext/standard/info.h"
-#include "ext/spl/spl_exceptions.h"
+#include <php.h>
+#include <php_ini.h>
+#include <ext/standard/info.h>
+#include <ext/spl/spl_exceptions.h>
#include "php_grpc.h"
-#include "zend_exceptions.h"
-#include "zend_hash.h"
+#include <zend_exceptions.h>
+#include <zend_hash.h>
-#include "grpc/grpc.h"
-#include "grpc/grpc_security.h"
+#include <grpc/grpc.h>
+#include <grpc/grpc_security.h>
zend_class_entry *grpc_ce_server_credentials;
diff --git a/src/php/ext/grpc/server_credentials.h b/src/php/ext/grpc/server_credentials.h
index 8ed3697..7101d65 100755
--- a/src/php/ext/grpc/server_credentials.h
+++ b/src/php/ext/grpc/server_credentials.h
@@ -38,13 +38,13 @@
#include "config.h"
#endif
-#include "php.h"
-#include "php_ini.h"
-#include "ext/standard/info.h"
+#include <php.h>
+#include <php_ini.h>
+#include <ext/standard/info.h>
#include "php_grpc.h"
-#include "grpc/grpc.h"
-#include "grpc/grpc_security.h"
+#include <grpc/grpc.h>
+#include <grpc/grpc_security.h>
/* Class entry for the Server_Credentials PHP class */
extern zend_class_entry *grpc_ce_server_credentials;
diff --git a/src/php/ext/grpc/timeval.c b/src/php/ext/grpc/timeval.c
index f90f006..8a278d6 100644
--- a/src/php/ext/grpc/timeval.c
+++ b/src/php/ext/grpc/timeval.c
@@ -37,18 +37,18 @@
#include "config.h"
#endif
-#include "php.h"
-#include "php_ini.h"
-#include "ext/standard/info.h"
-#include "ext/spl/spl_exceptions.h"
+#include <php.h>
+#include <php_ini.h>
+#include <ext/standard/info.h>
+#include <ext/spl/spl_exceptions.h>
#include "php_grpc.h"
-#include "zend_exceptions.h"
+#include <zend_exceptions.h>
#include <stdbool.h>
-#include "grpc/grpc.h"
-#include "grpc/support/time.h"
+#include <grpc/grpc.h>
+#include <grpc/support/time.h>
zend_class_entry *grpc_ce_timeval;
@@ -227,7 +227,7 @@
* Returns the infinite future time value as a timeval object
* @return Timeval Infinite future time value
*/
-PHP_METHOD(Timeval, inf_future) {
+PHP_METHOD(Timeval, infFuture) {
zval *grpc_php_timeval_inf_future = grpc_php_wrap_timeval(gpr_inf_future);
RETURN_DESTROY_ZVAL(grpc_php_timeval_inf_future);
}
@@ -236,7 +236,7 @@
* Returns the infinite past time value as a timeval object
* @return Timeval Infinite past time value
*/
-PHP_METHOD(Timeval, inf_past) {
+PHP_METHOD(Timeval, infPast) {
zval *grpc_php_timeval_inf_past = grpc_php_wrap_timeval(gpr_inf_past);
RETURN_DESTROY_ZVAL(grpc_php_timeval_inf_past);
}
@@ -245,7 +245,7 @@
* Sleep until this time, interpreted as an absolute timeout
* @return void
*/
-PHP_METHOD(Timeval, sleep_until) {
+PHP_METHOD(Timeval, sleepUntil) {
wrapped_grpc_timeval *this =
(wrapped_grpc_timeval *)zend_object_store_get_object(getThis() TSRMLS_CC);
gpr_sleep_until(this->wrapped);
@@ -255,11 +255,11 @@
PHP_ME(Timeval, __construct, NULL, ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
PHP_ME(Timeval, add, NULL, ZEND_ACC_PUBLIC)
PHP_ME(Timeval, compare, NULL, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
- PHP_ME(Timeval, inf_future, NULL, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
- PHP_ME(Timeval, inf_past, NULL, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
+ PHP_ME(Timeval, infFuture, NULL, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
+ PHP_ME(Timeval, infPast, NULL, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
PHP_ME(Timeval, now, NULL, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
PHP_ME(Timeval, similar, NULL, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
- PHP_ME(Timeval, sleep_until, NULL, ZEND_ACC_PUBLIC)
+ PHP_ME(Timeval, sleepUntil, NULL, ZEND_ACC_PUBLIC)
PHP_ME(Timeval, subtract, NULL, ZEND_ACC_PUBLIC)
PHP_ME(Timeval, zero, NULL, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) PHP_FE_END};
diff --git a/src/php/ext/grpc/timeval.h b/src/php/ext/grpc/timeval.h
index e3183f6..07cef03 100755
--- a/src/php/ext/grpc/timeval.h
+++ b/src/php/ext/grpc/timeval.h
@@ -38,13 +38,13 @@
#include "config.h"
#endif
-#include "php.h"
-#include "php_ini.h"
-#include "ext/standard/info.h"
+#include <php.h>
+#include <php_ini.h>
+#include <ext/standard/info.h>
#include "php_grpc.h"
-#include "grpc/grpc.h"
-#include "grpc/support/time.h"
+#include <grpc/grpc.h>
+#include <grpc/support/time.h>
/* Class entry for the Timeval PHP Class */
extern zend_class_entry *grpc_ce_timeval;
diff --git a/src/php/lib/Grpc/AbstractCall.php b/src/php/lib/Grpc/AbstractCall.php
index d81df97..1add972 100644
--- a/src/php/lib/Grpc/AbstractCall.php
+++ b/src/php/lib/Grpc/AbstractCall.php
@@ -45,8 +45,9 @@
* @param string $method The method to call on the remote server
*/
public function __construct(Channel $channel, $method, $deserialize) {
- $this->call = new Call($channel, $method, Timeval::inf_future());
+ $this->call = new Call($channel, $method, Timeval::infFuture());
$this->deserialize = $deserialize;
+ $this->metadata = null;
}
/**
diff --git a/src/php/lib/Grpc/BidiStreamingCall.php b/src/php/lib/Grpc/BidiStreamingCall.php
index 454f762..76c642b 100644
--- a/src/php/lib/Grpc/BidiStreamingCall.php
+++ b/src/php/lib/Grpc/BidiStreamingCall.php
@@ -43,10 +43,7 @@
* @param array $metadata Metadata to send with the call, if applicable
*/
public function start($metadata) {
- $event = $this->call->start_batch([
- OP_SEND_INITIAL_METADATA => $metadata,
- OP_RECV_INITIAL_METADATA => true]);
- $this->metadata = $event->metadata;
+ $this->call->startBatch([OP_SEND_INITIAL_METADATA => $metadata]);
}
/**
@@ -54,7 +51,14 @@
* @return The next value from the server, or null if there is none
*/
public function read() {
- $read_event = $this->call->start_batch([OP_RECV_MESSAGE => true]);
+ $batch = [OP_RECV_MESSAGE => true];
+ if ($this->metadata === null) {
+ $batch[OP_RECV_INITIAL_METADATA] = true;
+ }
+ $read_event = $this->call->startBatch($batch);
+ if ($this->metadata === null) {
+ $this->metadata = $read_event->metadata;
+ }
return $this->deserializeResponse($read_event->message);
}
@@ -64,14 +68,14 @@
* @param ByteBuffer $data The data to write
*/
public function write($data) {
- $this->call->start_batch([OP_SEND_MESSAGE => $data->serialize()]);
+ $this->call->startBatch([OP_SEND_MESSAGE => $data->serialize()]);
}
/**
* Indicate that no more writes will be sent.
*/
public function writesDone() {
- $this->call->start_batch([OP_SEND_CLOSE_FROM_CLIENT => true]);
+ $this->call->startBatch([OP_SEND_CLOSE_FROM_CLIENT => true]);
}
/**
@@ -80,7 +84,7 @@
* and array $metadata members
*/
public function getStatus() {
- $status_event = $this->call->start_batch([
+ $status_event = $this->call->startBatch([
OP_RECV_STATUS_ON_CLIENT => true
]);
return $status_event->status;
diff --git a/src/php/lib/Grpc/ClientStreamingCall.php b/src/php/lib/Grpc/ClientStreamingCall.php
index fa29037..61439d3 100644
--- a/src/php/lib/Grpc/ClientStreamingCall.php
+++ b/src/php/lib/Grpc/ClientStreamingCall.php
@@ -44,14 +44,11 @@
* @param array $metadata Metadata to send with the call, if applicable
*/
public function start($arg_iter, $metadata = array()) {
- $event = $this->call->start_batch([
- OP_SEND_INITIAL_METADATA => $metadata,
- OP_RECV_INITIAL_METADATA => true]);
- $this->metadata = $event->metadata;
+ $event = $this->call->startBatch([OP_SEND_INITIAL_METADATA => $metadata]);
foreach($arg_iter as $arg) {
- $this->call->start_batch([OP_SEND_MESSAGE => $arg->serialize()]);
+ $this->call->startBatch([OP_SEND_MESSAGE => $arg->serialize()]);
}
- $this->call->start_batch([OP_SEND_CLOSE_FROM_CLIENT => true]);
+ $this->call->startBatch([OP_SEND_CLOSE_FROM_CLIENT => true]);
}
/**
@@ -59,9 +56,11 @@
* @return [response data, status]
*/
public function wait() {
- $event = $this->call->start_batch([
+ $event = $this->call->startBatch([
+ OP_RECV_INITIAL_METADATA => true,
OP_RECV_MESSAGE => true,
OP_RECV_STATUS_ON_CLIENT => true]);
+ $this->metadata = $event->metadata;
return array($this->deserializeResponse($event->message), $event->status);
}
}
\ No newline at end of file
diff --git a/src/php/lib/Grpc/ServerStreamingCall.php b/src/php/lib/Grpc/ServerStreamingCall.php
index 574c1bb..631c863 100644
--- a/src/php/lib/Grpc/ServerStreamingCall.php
+++ b/src/php/lib/Grpc/ServerStreamingCall.php
@@ -44,7 +44,7 @@
* @param array $metadata Metadata to send with the call, if applicable
*/
public function start($arg, $metadata = array()) {
- $event = $this->call->start_batch([
+ $event = $this->call->startBatch([
OP_SEND_INITIAL_METADATA => $metadata,
OP_RECV_INITIAL_METADATA => true,
OP_SEND_MESSAGE => $arg->serialize(),
@@ -56,10 +56,10 @@
* @return An iterator of response values
*/
public function responses() {
- $response = $this->call->start_batch([OP_RECV_MESSAGE => true])->message;
+ $response = $this->call->startBatch([OP_RECV_MESSAGE => true])->message;
while($response !== null) {
yield $this->deserializeResponse($response);
- $response = $this->call->start_batch([OP_RECV_MESSAGE => true])->message;
+ $response = $this->call->startBatch([OP_RECV_MESSAGE => true])->message;
}
}
@@ -69,7 +69,7 @@
* and array $metadata members
*/
public function getStatus() {
- $status_event = $this->call->start_batch([
+ $status_event = $this->call->startBatch([
OP_RECV_STATUS_ON_CLIENT => true
]);
return $status_event->status;
diff --git a/src/php/lib/Grpc/UnaryCall.php b/src/php/lib/Grpc/UnaryCall.php
index 814d477..97a10a4 100644
--- a/src/php/lib/Grpc/UnaryCall.php
+++ b/src/php/lib/Grpc/UnaryCall.php
@@ -44,7 +44,7 @@
* @param array $metadata Metadata to send with the call, if applicable
*/
public function start($arg, $metadata = array()) {
- $event = $this->call->start_batch([
+ $event = $this->call->startBatch([
OP_SEND_INITIAL_METADATA => $metadata,
OP_RECV_INITIAL_METADATA => true,
OP_SEND_MESSAGE => $arg->serialize(),
@@ -57,7 +57,7 @@
* @return [response data, status]
*/
public function wait() {
- $event = $this->call->start_batch([
+ $event = $this->call->startBatch([
OP_RECV_MESSAGE => true,
OP_RECV_STATUS_ON_CLIENT => true]);
return array($this->deserializeResponse($event->message), $event->status);
diff --git a/src/php/tests/generated_code/GeneratedCodeTest.php b/src/php/tests/generated_code/GeneratedCodeTest.php
index afd7f21..927d24c 100755
--- a/src/php/tests/generated_code/GeneratedCodeTest.php
+++ b/src/php/tests/generated_code/GeneratedCodeTest.php
@@ -41,7 +41,8 @@
protected static $client;
protected static $timeout;
public static function setUpBeforeClass() {
- self::$client = new math\MathClient(getenv('GRPC_TEST_HOST'));
+ self::$client = new math\MathClient(new Grpc\BaseStub(
+ getenv('GRPC_TEST_HOST'), []));
}
public function testSimpleRequest() {
diff --git a/src/php/tests/generated_code/math.php b/src/php/tests/generated_code/math.php
deleted file mode 100755
index e97a5cf..0000000
--- a/src/php/tests/generated_code/math.php
+++ /dev/null
@@ -1,479 +0,0 @@
-<?php
-// DO NOT EDIT! Generated by Protobuf-PHP protoc plugin 1.0
-// Source: math.proto
-// Date: 2014-11-14 00:00:41
-
-namespace math {
-
- class DivArgs extends \DrSlump\Protobuf\Message {
-
- /** @var int */
- public $dividend = null;
-
- /** @var int */
- public $divisor = null;
-
-
- /** @var \Closure[] */
- protected static $__extensions = array();
-
- public static function descriptor()
- {
- $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'math.DivArgs');
-
- // REQUIRED INT64 dividend = 1
- $f = new \DrSlump\Protobuf\Field();
- $f->number = 1;
- $f->name = "dividend";
- $f->type = \DrSlump\Protobuf::TYPE_INT64;
- $f->rule = \DrSlump\Protobuf::RULE_REQUIRED;
- $descriptor->addField($f);
-
- // REQUIRED INT64 divisor = 2
- $f = new \DrSlump\Protobuf\Field();
- $f->number = 2;
- $f->name = "divisor";
- $f->type = \DrSlump\Protobuf::TYPE_INT64;
- $f->rule = \DrSlump\Protobuf::RULE_REQUIRED;
- $descriptor->addField($f);
-
- foreach (self::$__extensions as $cb) {
- $descriptor->addField($cb(), true);
- }
-
- return $descriptor;
- }
-
- /**
- * Check if <dividend> has a value
- *
- * @return boolean
- */
- public function hasDividend(){
- return $this->_has(1);
- }
-
- /**
- * Clear <dividend> value
- *
- * @return \math\DivArgs
- */
- public function clearDividend(){
- return $this->_clear(1);
- }
-
- /**
- * Get <dividend> value
- *
- * @return int
- */
- public function getDividend(){
- return $this->_get(1);
- }
-
- /**
- * Set <dividend> value
- *
- * @param int $value
- * @return \math\DivArgs
- */
- public function setDividend( $value){
- return $this->_set(1, $value);
- }
-
- /**
- * Check if <divisor> has a value
- *
- * @return boolean
- */
- public function hasDivisor(){
- return $this->_has(2);
- }
-
- /**
- * Clear <divisor> value
- *
- * @return \math\DivArgs
- */
- public function clearDivisor(){
- return $this->_clear(2);
- }
-
- /**
- * Get <divisor> value
- *
- * @return int
- */
- public function getDivisor(){
- return $this->_get(2);
- }
-
- /**
- * Set <divisor> value
- *
- * @param int $value
- * @return \math\DivArgs
- */
- public function setDivisor( $value){
- return $this->_set(2, $value);
- }
- }
-}
-
-namespace math {
-
- class DivReply extends \DrSlump\Protobuf\Message {
-
- /** @var int */
- public $quotient = null;
-
- /** @var int */
- public $remainder = null;
-
-
- /** @var \Closure[] */
- protected static $__extensions = array();
-
- public static function descriptor()
- {
- $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'math.DivReply');
-
- // REQUIRED INT64 quotient = 1
- $f = new \DrSlump\Protobuf\Field();
- $f->number = 1;
- $f->name = "quotient";
- $f->type = \DrSlump\Protobuf::TYPE_INT64;
- $f->rule = \DrSlump\Protobuf::RULE_REQUIRED;
- $descriptor->addField($f);
-
- // REQUIRED INT64 remainder = 2
- $f = new \DrSlump\Protobuf\Field();
- $f->number = 2;
- $f->name = "remainder";
- $f->type = \DrSlump\Protobuf::TYPE_INT64;
- $f->rule = \DrSlump\Protobuf::RULE_REQUIRED;
- $descriptor->addField($f);
-
- foreach (self::$__extensions as $cb) {
- $descriptor->addField($cb(), true);
- }
-
- return $descriptor;
- }
-
- /**
- * Check if <quotient> has a value
- *
- * @return boolean
- */
- public function hasQuotient(){
- return $this->_has(1);
- }
-
- /**
- * Clear <quotient> value
- *
- * @return \math\DivReply
- */
- public function clearQuotient(){
- return $this->_clear(1);
- }
-
- /**
- * Get <quotient> value
- *
- * @return int
- */
- public function getQuotient(){
- return $this->_get(1);
- }
-
- /**
- * Set <quotient> value
- *
- * @param int $value
- * @return \math\DivReply
- */
- public function setQuotient( $value){
- return $this->_set(1, $value);
- }
-
- /**
- * Check if <remainder> has a value
- *
- * @return boolean
- */
- public function hasRemainder(){
- return $this->_has(2);
- }
-
- /**
- * Clear <remainder> value
- *
- * @return \math\DivReply
- */
- public function clearRemainder(){
- return $this->_clear(2);
- }
-
- /**
- * Get <remainder> value
- *
- * @return int
- */
- public function getRemainder(){
- return $this->_get(2);
- }
-
- /**
- * Set <remainder> value
- *
- * @param int $value
- * @return \math\DivReply
- */
- public function setRemainder( $value){
- return $this->_set(2, $value);
- }
- }
-}
-
-namespace math {
-
- class FibArgs extends \DrSlump\Protobuf\Message {
-
- /** @var int */
- public $limit = null;
-
-
- /** @var \Closure[] */
- protected static $__extensions = array();
-
- public static function descriptor()
- {
- $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'math.FibArgs');
-
- // OPTIONAL INT64 limit = 1
- $f = new \DrSlump\Protobuf\Field();
- $f->number = 1;
- $f->name = "limit";
- $f->type = \DrSlump\Protobuf::TYPE_INT64;
- $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
- $descriptor->addField($f);
-
- foreach (self::$__extensions as $cb) {
- $descriptor->addField($cb(), true);
- }
-
- return $descriptor;
- }
-
- /**
- * Check if <limit> has a value
- *
- * @return boolean
- */
- public function hasLimit(){
- return $this->_has(1);
- }
-
- /**
- * Clear <limit> value
- *
- * @return \math\FibArgs
- */
- public function clearLimit(){
- return $this->_clear(1);
- }
-
- /**
- * Get <limit> value
- *
- * @return int
- */
- public function getLimit(){
- return $this->_get(1);
- }
-
- /**
- * Set <limit> value
- *
- * @param int $value
- * @return \math\FibArgs
- */
- public function setLimit( $value){
- return $this->_set(1, $value);
- }
- }
-}
-
-namespace math {
-
- class Num extends \DrSlump\Protobuf\Message {
-
- /** @var int */
- public $num = null;
-
-
- /** @var \Closure[] */
- protected static $__extensions = array();
-
- public static function descriptor()
- {
- $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'math.Num');
-
- // REQUIRED INT64 num = 1
- $f = new \DrSlump\Protobuf\Field();
- $f->number = 1;
- $f->name = "num";
- $f->type = \DrSlump\Protobuf::TYPE_INT64;
- $f->rule = \DrSlump\Protobuf::RULE_REQUIRED;
- $descriptor->addField($f);
-
- foreach (self::$__extensions as $cb) {
- $descriptor->addField($cb(), true);
- }
-
- return $descriptor;
- }
-
- /**
- * Check if <num> has a value
- *
- * @return boolean
- */
- public function hasNum(){
- return $this->_has(1);
- }
-
- /**
- * Clear <num> value
- *
- * @return \math\Num
- */
- public function clearNum(){
- return $this->_clear(1);
- }
-
- /**
- * Get <num> value
- *
- * @return int
- */
- public function getNum(){
- return $this->_get(1);
- }
-
- /**
- * Set <num> value
- *
- * @param int $value
- * @return \math\Num
- */
- public function setNum( $value){
- return $this->_set(1, $value);
- }
- }
-}
-
-namespace math {
-
- class FibReply extends \DrSlump\Protobuf\Message {
-
- /** @var int */
- public $count = null;
-
-
- /** @var \Closure[] */
- protected static $__extensions = array();
-
- public static function descriptor()
- {
- $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'math.FibReply');
-
- // REQUIRED INT64 count = 1
- $f = new \DrSlump\Protobuf\Field();
- $f->number = 1;
- $f->name = "count";
- $f->type = \DrSlump\Protobuf::TYPE_INT64;
- $f->rule = \DrSlump\Protobuf::RULE_REQUIRED;
- $descriptor->addField($f);
-
- foreach (self::$__extensions as $cb) {
- $descriptor->addField($cb(), true);
- }
-
- return $descriptor;
- }
-
- /**
- * Check if <count> has a value
- *
- * @return boolean
- */
- public function hasCount(){
- return $this->_has(1);
- }
-
- /**
- * Clear <count> value
- *
- * @return \math\FibReply
- */
- public function clearCount(){
- return $this->_clear(1);
- }
-
- /**
- * Get <count> value
- *
- * @return int
- */
- public function getCount(){
- return $this->_get(1);
- }
-
- /**
- * Set <count> value
- *
- * @param int $value
- * @return \math\FibReply
- */
- public function setCount( $value){
- return $this->_set(1, $value);
- }
- }
-}
-
-namespace math {
-
- class MathClient extends \Grpc\BaseStub {
- /**
- * @param math\DivArgs $input
- * @return math\DivReply
- */
- public function Div(\math\DivArgs $argument, $metadata = array()) {
- return $this->_simpleRequest('/Math/Div', $argument, '\math\DivReply::deserialize', $metadata);
- }
- /**
- * @param math\DivArgs $input
- * @return math\DivReply
- */
- public function DivMany($metadata = array()) {
- return $this->_bidiRequest('/Math/DivMany', '\math\DivReply::deserialize', $metadata);
- }
- /**
- * @param math\FibArgs $input
- * @return math\Num
- */
- public function Fib($argument, $metadata = array()) {
- return $this->_serverStreamRequest('/Math/Fib', $argument, '\math\Num::deserialize', $metadata);
- }
- /**
- * @param math\Num $input
- * @return math\Num
- */
- public function Sum($arguments, $metadata = array()) {
- return $this->_clientStreamRequest('/Math/Sum', $arguments, '\math\Num::deserialize', $metadata);
- }
- }
-}
diff --git a/src/php/tests/generated_code/math.proto b/src/php/tests/generated_code/math.proto
new file mode 100644
index 0000000..e34ad5e
--- /dev/null
+++ b/src/php/tests/generated_code/math.proto
@@ -0,0 +1,80 @@
+
+// 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.
+
+syntax = "proto3";
+
+package math;
+
+message DivArgs {
+ optional int64 dividend = 1;
+ optional int64 divisor = 2;
+}
+
+message DivReply {
+ optional int64 quotient = 1;
+ optional int64 remainder = 2;
+}
+
+message FibArgs {
+ optional int64 limit = 1;
+}
+
+message Num {
+ optional int64 num = 1;
+}
+
+message FibReply {
+ optional int64 count = 1;
+}
+
+service Math {
+ // Div divides args.dividend by args.divisor and returns the quotient and
+ // remainder.
+ rpc Div (DivArgs) returns (DivReply) {
+ }
+
+ // DivMany accepts an arbitrary number of division args from the client stream
+ // and sends back the results in the reply stream. The stream continues until
+ // the client closes its end; the server does the same after sending all the
+ // replies. The stream ends immediately if either end aborts.
+ rpc DivMany (stream DivArgs) returns (stream DivReply) {
+ }
+
+ // Fib generates numbers in the Fibonacci sequence. If args.limit > 0, Fib
+ // generates up to limit numbers; otherwise it continues until the call is
+ // canceled. Unlike Fib above, Fib has no final FibReply.
+ rpc Fib (FibArgs) returns (stream Num) {
+ }
+
+ // Sum sums a stream of numbers, returning the final result once the stream
+ // is closed.
+ rpc Sum (stream Num) returns (Num) {
+ }
+}
diff --git a/src/php/tests/interop/empty.php b/src/php/tests/interop/empty.php
deleted file mode 100755
index 22b1180..0000000
--- a/src/php/tests/interop/empty.php
+++ /dev/null
@@ -1,25 +0,0 @@
-<?php
-// DO NOT EDIT! Generated by Protobuf-PHP protoc plugin 1.0
-// Source: test/cpp/interop/empty.proto
-// Date: 2015-01-30 23:30:46
-
-namespace grpc\testing {
-
- class EmptyMessage extends \DrSlump\Protobuf\Message {
-
-
- /** @var \Closure[] */
- protected static $__extensions = array();
-
- public static function descriptor()
- {
- $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'grpc.testing.EmptyMessage');
-
- foreach (self::$__extensions as $cb) {
- $descriptor->addField($cb(), true);
- }
-
- return $descriptor;
- }
- }
-}
diff --git a/src/php/tests/interop/empty.proto b/src/php/tests/interop/empty.proto
new file mode 100644
index 0000000..4200d7b
--- /dev/null
+++ b/src/php/tests/interop/empty.proto
@@ -0,0 +1,43 @@
+
+// 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.
+
+syntax = "proto2";
+
+package grpc.testing;
+
+// An empty message that you can re-use to avoid defining duplicated empty
+// messages in your project. A typical example is to use it as argument or the
+// return value of a service API. For instance:
+//
+// service Foo {
+// rpc Bar (grpc.testing.EmptyMessage) returns (grpc.testing.EmptyMessage) { };
+// };
+//
+message EmptyMessage {}
diff --git a/src/php/tests/interop/interop_client.php b/src/php/tests/interop/interop_client.php
index 873fa00..6f81bfa 100755
--- a/src/php/tests/interop/interop_client.php
+++ b/src/php/tests/interop/interop_client.php
@@ -241,6 +241,7 @@
break;
case 'cancel_after_first_response':
cancelAfterFirstResponse($stub);
+ break;
default:
exit(1);
}
diff --git a/src/php/tests/interop/messages.php b/src/php/tests/interop/messages.php
deleted file mode 100755
index a626a17..0000000
--- a/src/php/tests/interop/messages.php
+++ /dev/null
@@ -1,1074 +0,0 @@
-<?php
-// DO NOT EDIT! Generated by Protobuf-PHP protoc plugin 1.0
-// Source: test/cpp/interop/messages.proto
-// Date: 2015-01-30 23:30:46
-
-namespace grpc\testing {
-
- class PayloadType extends \DrSlump\Protobuf\Enum {
- const COMPRESSABLE = 0;
- const UNCOMPRESSABLE = 1;
- const RANDOM = 2;
- }
-}
-namespace grpc\testing {
-
- class Payload extends \DrSlump\Protobuf\Message {
-
- /** @var int - \grpc\testing\PayloadType */
- public $type = null;
-
- /** @var string */
- public $body = null;
-
-
- /** @var \Closure[] */
- protected static $__extensions = array();
-
- public static function descriptor()
- {
- $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'grpc.testing.Payload');
-
- // OPTIONAL ENUM type = 1
- $f = new \DrSlump\Protobuf\Field();
- $f->number = 1;
- $f->name = "type";
- $f->type = \DrSlump\Protobuf::TYPE_ENUM;
- $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
- $f->reference = '\grpc\testing\PayloadType';
- $descriptor->addField($f);
-
- // OPTIONAL BYTES body = 2
- $f = new \DrSlump\Protobuf\Field();
- $f->number = 2;
- $f->name = "body";
- $f->type = \DrSlump\Protobuf::TYPE_BYTES;
- $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
- $descriptor->addField($f);
-
- foreach (self::$__extensions as $cb) {
- $descriptor->addField($cb(), true);
- }
-
- return $descriptor;
- }
-
- /**
- * Check if <type> has a value
- *
- * @return boolean
- */
- public function hasType(){
- return $this->_has(1);
- }
-
- /**
- * Clear <type> value
- *
- * @return \grpc\testing\Payload
- */
- public function clearType(){
- return $this->_clear(1);
- }
-
- /**
- * Get <type> value
- *
- * @return int - \grpc\testing\PayloadType
- */
- public function getType(){
- return $this->_get(1);
- }
-
- /**
- * Set <type> value
- *
- * @param int - \grpc\testing\PayloadType $value
- * @return \grpc\testing\Payload
- */
- public function setType( $value){
- return $this->_set(1, $value);
- }
-
- /**
- * Check if <body> has a value
- *
- * @return boolean
- */
- public function hasBody(){
- return $this->_has(2);
- }
-
- /**
- * Clear <body> value
- *
- * @return \grpc\testing\Payload
- */
- public function clearBody(){
- return $this->_clear(2);
- }
-
- /**
- * Get <body> value
- *
- * @return string
- */
- public function getBody(){
- return $this->_get(2);
- }
-
- /**
- * Set <body> value
- *
- * @param string $value
- * @return \grpc\testing\Payload
- */
- public function setBody( $value){
- return $this->_set(2, $value);
- }
- }
-}
-
-namespace grpc\testing {
-
- class SimpleRequest extends \DrSlump\Protobuf\Message {
-
- /** @var int - \grpc\testing\PayloadType */
- public $response_type = null;
-
- /** @var int */
- public $response_size = null;
-
- /** @var \grpc\testing\Payload */
- public $payload = null;
-
- /** @var boolean */
- public $fill_username = null;
-
- /** @var boolean */
- public $fill_oauth_scope = null;
-
-
- /** @var \Closure[] */
- protected static $__extensions = array();
-
- public static function descriptor()
- {
- $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'grpc.testing.SimpleRequest');
-
- // OPTIONAL ENUM response_type = 1
- $f = new \DrSlump\Protobuf\Field();
- $f->number = 1;
- $f->name = "response_type";
- $f->type = \DrSlump\Protobuf::TYPE_ENUM;
- $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
- $f->reference = '\grpc\testing\PayloadType';
- $descriptor->addField($f);
-
- // OPTIONAL INT32 response_size = 2
- $f = new \DrSlump\Protobuf\Field();
- $f->number = 2;
- $f->name = "response_size";
- $f->type = \DrSlump\Protobuf::TYPE_INT32;
- $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
- $descriptor->addField($f);
-
- // OPTIONAL MESSAGE payload = 3
- $f = new \DrSlump\Protobuf\Field();
- $f->number = 3;
- $f->name = "payload";
- $f->type = \DrSlump\Protobuf::TYPE_MESSAGE;
- $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
- $f->reference = '\grpc\testing\Payload';
- $descriptor->addField($f);
-
- // OPTIONAL BOOL fill_username = 4
- $f = new \DrSlump\Protobuf\Field();
- $f->number = 4;
- $f->name = "fill_username";
- $f->type = \DrSlump\Protobuf::TYPE_BOOL;
- $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
- $descriptor->addField($f);
-
- // OPTIONAL BOOL fill_oauth_scope = 5
- $f = new \DrSlump\Protobuf\Field();
- $f->number = 5;
- $f->name = "fill_oauth_scope";
- $f->type = \DrSlump\Protobuf::TYPE_BOOL;
- $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
- $descriptor->addField($f);
-
- foreach (self::$__extensions as $cb) {
- $descriptor->addField($cb(), true);
- }
-
- return $descriptor;
- }
-
- /**
- * Check if <response_type> has a value
- *
- * @return boolean
- */
- public function hasResponseType(){
- return $this->_has(1);
- }
-
- /**
- * Clear <response_type> value
- *
- * @return \grpc\testing\SimpleRequest
- */
- public function clearResponseType(){
- return $this->_clear(1);
- }
-
- /**
- * Get <response_type> value
- *
- * @return int - \grpc\testing\PayloadType
- */
- public function getResponseType(){
- return $this->_get(1);
- }
-
- /**
- * Set <response_type> value
- *
- * @param int - \grpc\testing\PayloadType $value
- * @return \grpc\testing\SimpleRequest
- */
- public function setResponseType( $value){
- return $this->_set(1, $value);
- }
-
- /**
- * Check if <response_size> has a value
- *
- * @return boolean
- */
- public function hasResponseSize(){
- return $this->_has(2);
- }
-
- /**
- * Clear <response_size> value
- *
- * @return \grpc\testing\SimpleRequest
- */
- public function clearResponseSize(){
- return $this->_clear(2);
- }
-
- /**
- * Get <response_size> value
- *
- * @return int
- */
- public function getResponseSize(){
- return $this->_get(2);
- }
-
- /**
- * Set <response_size> value
- *
- * @param int $value
- * @return \grpc\testing\SimpleRequest
- */
- public function setResponseSize( $value){
- return $this->_set(2, $value);
- }
-
- /**
- * Check if <payload> has a value
- *
- * @return boolean
- */
- public function hasPayload(){
- return $this->_has(3);
- }
-
- /**
- * Clear <payload> value
- *
- * @return \grpc\testing\SimpleRequest
- */
- public function clearPayload(){
- return $this->_clear(3);
- }
-
- /**
- * Get <payload> value
- *
- * @return \grpc\testing\Payload
- */
- public function getPayload(){
- return $this->_get(3);
- }
-
- /**
- * Set <payload> value
- *
- * @param \grpc\testing\Payload $value
- * @return \grpc\testing\SimpleRequest
- */
- public function setPayload(\grpc\testing\Payload $value){
- return $this->_set(3, $value);
- }
-
- /**
- * Check if <fill_username> has a value
- *
- * @return boolean
- */
- public function hasFillUsername(){
- return $this->_has(4);
- }
-
- /**
- * Clear <fill_username> value
- *
- * @return \grpc\testing\SimpleRequest
- */
- public function clearFillUsername(){
- return $this->_clear(4);
- }
-
- /**
- * Get <fill_username> value
- *
- * @return boolean
- */
- public function getFillUsername(){
- return $this->_get(4);
- }
-
- /**
- * Set <fill_username> value
- *
- * @param boolean $value
- * @return \grpc\testing\SimpleRequest
- */
- public function setFillUsername( $value){
- return $this->_set(4, $value);
- }
-
- /**
- * Check if <fill_oauth_scope> has a value
- *
- * @return boolean
- */
- public function hasFillOauthScope(){
- return $this->_has(5);
- }
-
- /**
- * Clear <fill_oauth_scope> value
- *
- * @return \grpc\testing\SimpleRequest
- */
- public function clearFillOauthScope(){
- return $this->_clear(5);
- }
-
- /**
- * Get <fill_oauth_scope> value
- *
- * @return boolean
- */
- public function getFillOauthScope(){
- return $this->_get(5);
- }
-
- /**
- * Set <fill_oauth_scope> value
- *
- * @param boolean $value
- * @return \grpc\testing\SimpleRequest
- */
- public function setFillOauthScope( $value){
- return $this->_set(5, $value);
- }
- }
-}
-
-namespace grpc\testing {
-
- class SimpleResponse extends \DrSlump\Protobuf\Message {
-
- /** @var \grpc\testing\Payload */
- public $payload = null;
-
- /** @var string */
- public $username = null;
-
- /** @var string */
- public $oauth_scope = null;
-
-
- /** @var \Closure[] */
- protected static $__extensions = array();
-
- public static function descriptor()
- {
- $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'grpc.testing.SimpleResponse');
-
- // OPTIONAL MESSAGE payload = 1
- $f = new \DrSlump\Protobuf\Field();
- $f->number = 1;
- $f->name = "payload";
- $f->type = \DrSlump\Protobuf::TYPE_MESSAGE;
- $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
- $f->reference = '\grpc\testing\Payload';
- $descriptor->addField($f);
-
- // OPTIONAL STRING username = 2
- $f = new \DrSlump\Protobuf\Field();
- $f->number = 2;
- $f->name = "username";
- $f->type = \DrSlump\Protobuf::TYPE_STRING;
- $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
- $descriptor->addField($f);
-
- // OPTIONAL STRING oauth_scope = 3
- $f = new \DrSlump\Protobuf\Field();
- $f->number = 3;
- $f->name = "oauth_scope";
- $f->type = \DrSlump\Protobuf::TYPE_STRING;
- $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
- $descriptor->addField($f);
-
- foreach (self::$__extensions as $cb) {
- $descriptor->addField($cb(), true);
- }
-
- return $descriptor;
- }
-
- /**
- * Check if <payload> has a value
- *
- * @return boolean
- */
- public function hasPayload(){
- return $this->_has(1);
- }
-
- /**
- * Clear <payload> value
- *
- * @return \grpc\testing\SimpleResponse
- */
- public function clearPayload(){
- return $this->_clear(1);
- }
-
- /**
- * Get <payload> value
- *
- * @return \grpc\testing\Payload
- */
- public function getPayload(){
- return $this->_get(1);
- }
-
- /**
- * Set <payload> value
- *
- * @param \grpc\testing\Payload $value
- * @return \grpc\testing\SimpleResponse
- */
- public function setPayload(\grpc\testing\Payload $value){
- return $this->_set(1, $value);
- }
-
- /**
- * Check if <username> has a value
- *
- * @return boolean
- */
- public function hasUsername(){
- return $this->_has(2);
- }
-
- /**
- * Clear <username> value
- *
- * @return \grpc\testing\SimpleResponse
- */
- public function clearUsername(){
- return $this->_clear(2);
- }
-
- /**
- * Get <username> value
- *
- * @return string
- */
- public function getUsername(){
- return $this->_get(2);
- }
-
- /**
- * Set <username> value
- *
- * @param string $value
- * @return \grpc\testing\SimpleResponse
- */
- public function setUsername( $value){
- return $this->_set(2, $value);
- }
-
- /**
- * Check if <oauth_scope> has a value
- *
- * @return boolean
- */
- public function hasOauthScope(){
- return $this->_has(3);
- }
-
- /**
- * Clear <oauth_scope> value
- *
- * @return \grpc\testing\SimpleResponse
- */
- public function clearOauthScope(){
- return $this->_clear(3);
- }
-
- /**
- * Get <oauth_scope> value
- *
- * @return string
- */
- public function getOauthScope(){
- return $this->_get(3);
- }
-
- /**
- * Set <oauth_scope> value
- *
- * @param string $value
- * @return \grpc\testing\SimpleResponse
- */
- public function setOauthScope( $value){
- return $this->_set(3, $value);
- }
- }
-}
-
-namespace grpc\testing {
-
- class StreamingInputCallRequest extends \DrSlump\Protobuf\Message {
-
- /** @var \grpc\testing\Payload */
- public $payload = null;
-
-
- /** @var \Closure[] */
- protected static $__extensions = array();
-
- public static function descriptor()
- {
- $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'grpc.testing.StreamingInputCallRequest');
-
- // OPTIONAL MESSAGE payload = 1
- $f = new \DrSlump\Protobuf\Field();
- $f->number = 1;
- $f->name = "payload";
- $f->type = \DrSlump\Protobuf::TYPE_MESSAGE;
- $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
- $f->reference = '\grpc\testing\Payload';
- $descriptor->addField($f);
-
- foreach (self::$__extensions as $cb) {
- $descriptor->addField($cb(), true);
- }
-
- return $descriptor;
- }
-
- /**
- * Check if <payload> has a value
- *
- * @return boolean
- */
- public function hasPayload(){
- return $this->_has(1);
- }
-
- /**
- * Clear <payload> value
- *
- * @return \grpc\testing\StreamingInputCallRequest
- */
- public function clearPayload(){
- return $this->_clear(1);
- }
-
- /**
- * Get <payload> value
- *
- * @return \grpc\testing\Payload
- */
- public function getPayload(){
- return $this->_get(1);
- }
-
- /**
- * Set <payload> value
- *
- * @param \grpc\testing\Payload $value
- * @return \grpc\testing\StreamingInputCallRequest
- */
- public function setPayload(\grpc\testing\Payload $value){
- return $this->_set(1, $value);
- }
- }
-}
-
-namespace grpc\testing {
-
- class StreamingInputCallResponse extends \DrSlump\Protobuf\Message {
-
- /** @var int */
- public $aggregated_payload_size = null;
-
-
- /** @var \Closure[] */
- protected static $__extensions = array();
-
- public static function descriptor()
- {
- $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'grpc.testing.StreamingInputCallResponse');
-
- // OPTIONAL INT32 aggregated_payload_size = 1
- $f = new \DrSlump\Protobuf\Field();
- $f->number = 1;
- $f->name = "aggregated_payload_size";
- $f->type = \DrSlump\Protobuf::TYPE_INT32;
- $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
- $descriptor->addField($f);
-
- foreach (self::$__extensions as $cb) {
- $descriptor->addField($cb(), true);
- }
-
- return $descriptor;
- }
-
- /**
- * Check if <aggregated_payload_size> has a value
- *
- * @return boolean
- */
- public function hasAggregatedPayloadSize(){
- return $this->_has(1);
- }
-
- /**
- * Clear <aggregated_payload_size> value
- *
- * @return \grpc\testing\StreamingInputCallResponse
- */
- public function clearAggregatedPayloadSize(){
- return $this->_clear(1);
- }
-
- /**
- * Get <aggregated_payload_size> value
- *
- * @return int
- */
- public function getAggregatedPayloadSize(){
- return $this->_get(1);
- }
-
- /**
- * Set <aggregated_payload_size> value
- *
- * @param int $value
- * @return \grpc\testing\StreamingInputCallResponse
- */
- public function setAggregatedPayloadSize( $value){
- return $this->_set(1, $value);
- }
- }
-}
-
-namespace grpc\testing {
-
- class ResponseParameters extends \DrSlump\Protobuf\Message {
-
- /** @var int */
- public $size = null;
-
- /** @var int */
- public $interval_us = null;
-
-
- /** @var \Closure[] */
- protected static $__extensions = array();
-
- public static function descriptor()
- {
- $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'grpc.testing.ResponseParameters');
-
- // OPTIONAL INT32 size = 1
- $f = new \DrSlump\Protobuf\Field();
- $f->number = 1;
- $f->name = "size";
- $f->type = \DrSlump\Protobuf::TYPE_INT32;
- $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
- $descriptor->addField($f);
-
- // OPTIONAL INT32 interval_us = 2
- $f = new \DrSlump\Protobuf\Field();
- $f->number = 2;
- $f->name = "interval_us";
- $f->type = \DrSlump\Protobuf::TYPE_INT32;
- $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
- $descriptor->addField($f);
-
- foreach (self::$__extensions as $cb) {
- $descriptor->addField($cb(), true);
- }
-
- return $descriptor;
- }
-
- /**
- * Check if <size> has a value
- *
- * @return boolean
- */
- public function hasSize(){
- return $this->_has(1);
- }
-
- /**
- * Clear <size> value
- *
- * @return \grpc\testing\ResponseParameters
- */
- public function clearSize(){
- return $this->_clear(1);
- }
-
- /**
- * Get <size> value
- *
- * @return int
- */
- public function getSize(){
- return $this->_get(1);
- }
-
- /**
- * Set <size> value
- *
- * @param int $value
- * @return \grpc\testing\ResponseParameters
- */
- public function setSize( $value){
- return $this->_set(1, $value);
- }
-
- /**
- * Check if <interval_us> has a value
- *
- * @return boolean
- */
- public function hasIntervalUs(){
- return $this->_has(2);
- }
-
- /**
- * Clear <interval_us> value
- *
- * @return \grpc\testing\ResponseParameters
- */
- public function clearIntervalUs(){
- return $this->_clear(2);
- }
-
- /**
- * Get <interval_us> value
- *
- * @return int
- */
- public function getIntervalUs(){
- return $this->_get(2);
- }
-
- /**
- * Set <interval_us> value
- *
- * @param int $value
- * @return \grpc\testing\ResponseParameters
- */
- public function setIntervalUs( $value){
- return $this->_set(2, $value);
- }
- }
-}
-
-namespace grpc\testing {
-
- class StreamingOutputCallRequest extends \DrSlump\Protobuf\Message {
-
- /** @var int - \grpc\testing\PayloadType */
- public $response_type = null;
-
- /** @var \grpc\testing\ResponseParameters[] */
- public $response_parameters = array();
-
- /** @var \grpc\testing\Payload */
- public $payload = null;
-
-
- /** @var \Closure[] */
- protected static $__extensions = array();
-
- public static function descriptor()
- {
- $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'grpc.testing.StreamingOutputCallRequest');
-
- // OPTIONAL ENUM response_type = 1
- $f = new \DrSlump\Protobuf\Field();
- $f->number = 1;
- $f->name = "response_type";
- $f->type = \DrSlump\Protobuf::TYPE_ENUM;
- $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
- $f->reference = '\grpc\testing\PayloadType';
- $descriptor->addField($f);
-
- // REPEATED MESSAGE response_parameters = 2
- $f = new \DrSlump\Protobuf\Field();
- $f->number = 2;
- $f->name = "response_parameters";
- $f->type = \DrSlump\Protobuf::TYPE_MESSAGE;
- $f->rule = \DrSlump\Protobuf::RULE_REPEATED;
- $f->reference = '\grpc\testing\ResponseParameters';
- $descriptor->addField($f);
-
- // OPTIONAL MESSAGE payload = 3
- $f = new \DrSlump\Protobuf\Field();
- $f->number = 3;
- $f->name = "payload";
- $f->type = \DrSlump\Protobuf::TYPE_MESSAGE;
- $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
- $f->reference = '\grpc\testing\Payload';
- $descriptor->addField($f);
-
- foreach (self::$__extensions as $cb) {
- $descriptor->addField($cb(), true);
- }
-
- return $descriptor;
- }
-
- /**
- * Check if <response_type> has a value
- *
- * @return boolean
- */
- public function hasResponseType(){
- return $this->_has(1);
- }
-
- /**
- * Clear <response_type> value
- *
- * @return \grpc\testing\StreamingOutputCallRequest
- */
- public function clearResponseType(){
- return $this->_clear(1);
- }
-
- /**
- * Get <response_type> value
- *
- * @return int - \grpc\testing\PayloadType
- */
- public function getResponseType(){
- return $this->_get(1);
- }
-
- /**
- * Set <response_type> value
- *
- * @param int - \grpc\testing\PayloadType $value
- * @return \grpc\testing\StreamingOutputCallRequest
- */
- public function setResponseType( $value){
- return $this->_set(1, $value);
- }
-
- /**
- * Check if <response_parameters> has a value
- *
- * @return boolean
- */
- public function hasResponseParameters(){
- return $this->_has(2);
- }
-
- /**
- * Clear <response_parameters> value
- *
- * @return \grpc\testing\StreamingOutputCallRequest
- */
- public function clearResponseParameters(){
- return $this->_clear(2);
- }
-
- /**
- * Get <response_parameters> value
- *
- * @param int $idx
- * @return \grpc\testing\ResponseParameters
- */
- public function getResponseParameters($idx = NULL){
- return $this->_get(2, $idx);
- }
-
- /**
- * Set <response_parameters> value
- *
- * @param \grpc\testing\ResponseParameters $value
- * @return \grpc\testing\StreamingOutputCallRequest
- */
- public function setResponseParameters(\grpc\testing\ResponseParameters $value, $idx = NULL){
- return $this->_set(2, $value, $idx);
- }
-
- /**
- * Get all elements of <response_parameters>
- *
- * @return \grpc\testing\ResponseParameters[]
- */
- public function getResponseParametersList(){
- return $this->_get(2);
- }
-
- /**
- * Add a new element to <response_parameters>
- *
- * @param \grpc\testing\ResponseParameters $value
- * @return \grpc\testing\StreamingOutputCallRequest
- */
- public function addResponseParameters(\grpc\testing\ResponseParameters $value){
- return $this->_add(2, $value);
- }
-
- /**
- * Check if <payload> has a value
- *
- * @return boolean
- */
- public function hasPayload(){
- return $this->_has(3);
- }
-
- /**
- * Clear <payload> value
- *
- * @return \grpc\testing\StreamingOutputCallRequest
- */
- public function clearPayload(){
- return $this->_clear(3);
- }
-
- /**
- * Get <payload> value
- *
- * @return \grpc\testing\Payload
- */
- public function getPayload(){
- return $this->_get(3);
- }
-
- /**
- * Set <payload> value
- *
- * @param \grpc\testing\Payload $value
- * @return \grpc\testing\StreamingOutputCallRequest
- */
- public function setPayload(\grpc\testing\Payload $value){
- return $this->_set(3, $value);
- }
- }
-}
-
-namespace grpc\testing {
-
- class StreamingOutputCallResponse extends \DrSlump\Protobuf\Message {
-
- /** @var \grpc\testing\Payload */
- public $payload = null;
-
-
- /** @var \Closure[] */
- protected static $__extensions = array();
-
- public static function descriptor()
- {
- $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'grpc.testing.StreamingOutputCallResponse');
-
- // OPTIONAL MESSAGE payload = 1
- $f = new \DrSlump\Protobuf\Field();
- $f->number = 1;
- $f->name = "payload";
- $f->type = \DrSlump\Protobuf::TYPE_MESSAGE;
- $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
- $f->reference = '\grpc\testing\Payload';
- $descriptor->addField($f);
-
- foreach (self::$__extensions as $cb) {
- $descriptor->addField($cb(), true);
- }
-
- return $descriptor;
- }
-
- /**
- * Check if <payload> has a value
- *
- * @return boolean
- */
- public function hasPayload(){
- return $this->_has(1);
- }
-
- /**
- * Clear <payload> value
- *
- * @return \grpc\testing\StreamingOutputCallResponse
- */
- public function clearPayload(){
- return $this->_clear(1);
- }
-
- /**
- * Get <payload> value
- *
- * @return \grpc\testing\Payload
- */
- public function getPayload(){
- return $this->_get(1);
- }
-
- /**
- * Set <payload> value
- *
- * @param \grpc\testing\Payload $value
- * @return \grpc\testing\StreamingOutputCallResponse
- */
- public function setPayload(\grpc\testing\Payload $value){
- return $this->_set(1, $value);
- }
- }
-}
-
diff --git a/src/php/tests/interop/messages.proto b/src/php/tests/interop/messages.proto
new file mode 100644
index 0000000..de0b1a2
--- /dev/null
+++ b/src/php/tests/interop/messages.proto
@@ -0,0 +1,132 @@
+
+// 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.
+
+// Message definitions to be used by integration test service definitions.
+
+syntax = "proto2";
+
+package grpc.testing;
+
+// The type of payload that should be returned.
+enum PayloadType {
+ // Compressable text format.
+ COMPRESSABLE = 0;
+
+ // Uncompressable binary format.
+ UNCOMPRESSABLE = 1;
+
+ // Randomly chosen from all other formats defined in this enum.
+ RANDOM = 2;
+}
+
+// A block of data, to simply increase gRPC message size.
+message Payload {
+ // The type of data in body.
+ optional PayloadType type = 1 [default = COMPRESSABLE];
+ // Primary contents of payload.
+ optional bytes body = 2;
+}
+
+// Unary request.
+message SimpleRequest {
+ // Desired payload type in the response from the server.
+ // If response_type is RANDOM, server randomly chooses one from other formats.
+ optional PayloadType response_type = 1 [default = COMPRESSABLE];
+
+ // Desired payload size in the response from the server.
+ // If response_type is COMPRESSABLE, this denotes the size before compression.
+ optional int32 response_size = 2;
+
+ // Optional input payload sent along with the request.
+ optional Payload payload = 3;
+
+ // Whether SimpleResponse should include username.
+ optional bool fill_username = 4;
+
+ // Whether SimpleResponse should include OAuth scope.
+ optional bool fill_oauth_scope = 5;
+}
+
+// Unary response, as configured by the request.
+message SimpleResponse {
+ // Payload to increase message size.
+ optional Payload payload = 1;
+ // The user the request came from, for verifying authentication was
+ // successful when the client expected it.
+ optional string username = 2;
+ // OAuth scope.
+ optional string oauth_scope = 3;
+}
+
+// Client-streaming request.
+message StreamingInputCallRequest {
+ // Optional input payload sent along with the request.
+ optional Payload payload = 1;
+
+ // Not expecting any payload from the response.
+}
+
+// Client-streaming response.
+message StreamingInputCallResponse {
+ // Aggregated size of payloads received from the client.
+ optional int32 aggregated_payload_size = 1;
+}
+
+// Configuration for a particular response.
+message ResponseParameters {
+ // Desired payload sizes in responses from the server.
+ // If response_type is COMPRESSABLE, this denotes the size before compression.
+ optional int32 size = 1;
+
+ // Desired interval between consecutive responses in the response stream in
+ // microseconds.
+ optional int32 interval_us = 2;
+}
+
+// Server-streaming request.
+message StreamingOutputCallRequest {
+ // Desired payload type in the response from the server.
+ // If response_type is RANDOM, the payload from each response in the stream
+ // might be of different types. This is to simulate a mixed type of payload
+ // stream.
+ optional PayloadType response_type = 1 [default = COMPRESSABLE];
+
+ // Configuration for each expected response message.
+ repeated ResponseParameters response_parameters = 2;
+
+ // Optional input payload sent along with the request.
+ optional Payload payload = 3;
+}
+
+// Server-streaming response, as configured by the request and parameters.
+message StreamingOutputCallResponse {
+ // Payload to increase response size.
+ optional Payload payload = 1;
+}
diff --git a/src/php/tests/interop/test.php b/src/php/tests/interop/test.php
deleted file mode 100755
index 014bbc9..0000000
--- a/src/php/tests/interop/test.php
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-// DO NOT EDIT! Generated by Protobuf-PHP protoc plugin 1.0
-// Source: test/cpp/interop/test.proto
-// Date: 2015-01-30 23:30:46
-
-namespace grpc\testing {
-
- class TestServiceClient{
-
- private $rpc_impl;
-
- public function __construct($rpc_impl) {
- $this->rpc_impl = $rpc_impl;
- }
- /**
- * @param grpc\testing\EmptyMessage $input
- */
- public function EmptyCall(\grpc\testing\EmptyMessage $argument, $metadata = array()) {
- return $this->rpc_impl->_simpleRequest('/grpc.testing.TestService/EmptyCall', $argument, '\grpc\testing\EmptyMessage::deserialize', $metadata);
- }
- /**
- * @param grpc\testing\SimpleRequest $input
- */
- public function UnaryCall(\grpc\testing\SimpleRequest $argument, $metadata = array()) {
- return $this->rpc_impl->_simpleRequest('/grpc.testing.TestService/UnaryCall', $argument, '\grpc\testing\SimpleResponse::deserialize', $metadata);
- }
- /**
- * @param grpc\testing\StreamingOutputCallRequest $input
- */
- public function StreamingOutputCall($argument, $metadata = array()) {
- return $this->rpc_impl->_serverStreamRequest('/grpc.testing.TestService/StreamingOutputCall', $argument, '\grpc\testing\StreamingOutputCallResponse::deserialize', $metadata);
- }
- /**
- * @param grpc\testing\StreamingInputCallRequest $input
- */
- public function StreamingInputCall($arguments, $metadata = array()) {
- return $this->rpc_impl->_clientStreamRequest('/grpc.testing.TestService/StreamingInputCall', $arguments, '\grpc\testing\StreamingInputCallResponse::deserialize', $metadata);
- }
- /**
- * @param grpc\testing\StreamingOutputCallRequest $input
- */
- public function FullDuplexCall($metadata = array()) {
- return $this->rpc_impl->_bidiRequest('/grpc.testing.TestService/FullDuplexCall', '\grpc\testing\StreamingOutputCallResponse::deserialize', $metadata);
- }
- /**
- * @param grpc\testing\StreamingOutputCallRequest $input
- */
- public function HalfDuplexCall($metadata = array()) {
- return $this->rpc_impl->_bidiRequest('/grpc.testing.TestService/HalfDuplexCall', '\grpc\testing\StreamingOutputCallResponse::deserialize', $metadata);
- }
- }
-}
diff --git a/src/php/tests/interop/test.proto b/src/php/tests/interop/test.proto
new file mode 100644
index 0000000..39c08f3
--- /dev/null
+++ b/src/php/tests/interop/test.proto
@@ -0,0 +1,72 @@
+
+// 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.
+
+// An integration test service that covers all the method signature permutations
+// of unary/streaming requests/responses.
+syntax = "proto2";
+
+import "empty.proto";
+import "messages.proto";
+
+package grpc.testing;
+
+// A simple service to test the various types of RPCs and experiment with
+// performance with various types of payload.
+service TestService {
+ // One empty request followed by one empty response.
+ rpc EmptyCall(grpc.testing.EmptyMessage) returns (grpc.testing.EmptyMessage);
+
+ // One request followed by one response.
+ // TODO(Issue 527): Describe required server behavior.
+ rpc UnaryCall(SimpleRequest) returns (SimpleResponse);
+
+ // One request followed by a sequence of responses (streamed download).
+ // The server returns the payload with client desired type and sizes.
+ rpc StreamingOutputCall(StreamingOutputCallRequest)
+ returns (stream StreamingOutputCallResponse);
+
+ // A sequence of requests followed by one response (streamed upload).
+ // The server returns the aggregated size of client payload as the result.
+ rpc StreamingInputCall(stream StreamingInputCallRequest)
+ returns (StreamingInputCallResponse);
+
+ // A sequence of requests with each request served by the server immediately.
+ // As one request could lead to multiple responses, this interface
+ // demonstrates the idea of full duplexing.
+ rpc FullDuplexCall(stream StreamingOutputCallRequest)
+ returns (stream StreamingOutputCallResponse);
+
+ // A sequence of requests followed by a sequence of responses.
+ // The server buffers all the client requests and then serves them in order. A
+ // stream of responses are returned to the client when the server starts with
+ // first request.
+ rpc HalfDuplexCall(stream StreamingOutputCallRequest)
+ returns (stream StreamingOutputCallResponse);
+}
diff --git a/src/php/tests/unit_tests/CallTest.php b/src/php/tests/unit_tests/CallTest.php
index d361ce0..77a2d86 100755
--- a/src/php/tests/unit_tests/CallTest.php
+++ b/src/php/tests/unit_tests/CallTest.php
@@ -37,21 +37,21 @@
public static function setUpBeforeClass() {
self::$server = new Grpc\Server([]);
- self::$port = self::$server->add_http2_port('0.0.0.0:0');
+ self::$port = self::$server->addHttp2Port('0.0.0.0:0');
}
public function setUp() {
$this->channel = new Grpc\Channel('localhost:' . self::$port, []);
$this->call = new Grpc\Call($this->channel,
'/foo',
- Grpc\Timeval::inf_future());
+ Grpc\Timeval::infFuture());
}
public function testAddEmptyMetadata() {
$batch = [
Grpc\OP_SEND_INITIAL_METADATA => []
];
- $result = $this->call->start_batch($batch);
+ $result = $this->call->startBatch($batch);
$this->assertTrue($result->send_metadata);
}
@@ -59,7 +59,7 @@
$batch = [
Grpc\OP_SEND_INITIAL_METADATA => ['key' => ['value']]
];
- $result = $this->call->start_batch($batch);
+ $result = $this->call->startBatch($batch);
$this->assertTrue($result->send_metadata);
}
@@ -67,7 +67,7 @@
$batch = [
Grpc\OP_SEND_INITIAL_METADATA => ['key' => ['value1', 'value2']]
];
- $result = $this->call->start_batch($batch);
+ $result = $this->call->startBatch($batch);
$this->assertTrue($result->send_metadata);
}
@@ -76,7 +76,7 @@
Grpc\OP_SEND_INITIAL_METADATA => ['key1' => ['value1'],
'key2' => ['value2', 'value3']]
];
- $result = $this->call->start_batch($batch);
+ $result = $this->call->startBatch($batch);
$this->assertTrue($result->send_metadata);
}
}
diff --git a/src/php/tests/unit_tests/EndToEndTest.php b/src/php/tests/unit_tests/EndToEndTest.php
index 3e165b7..296873f 100755
--- a/src/php/tests/unit_tests/EndToEndTest.php
+++ b/src/php/tests/unit_tests/EndToEndTest.php
@@ -34,7 +34,7 @@
class EndToEndTest extends PHPUnit_Framework_TestCase{
public function setUp() {
$this->server = new Grpc\Server([]);
- $port = $this->server->add_http2_port('0.0.0.0:0');
+ $port = $this->server->addHttp2Port('0.0.0.0:0');
$this->channel = new Grpc\Channel('localhost:' . $port, []);
$this->server->start();
}
@@ -45,13 +45,13 @@
}
public function testSimpleRequestBody() {
- $deadline = Grpc\Timeval::inf_future();
+ $deadline = Grpc\Timeval::infFuture();
$status_text = 'xyz';
$call = new Grpc\Call($this->channel,
'dummy_method',
$deadline);
- $event = $call->start_batch([
+ $event = $call->startBatch([
Grpc\OP_SEND_INITIAL_METADATA => [],
Grpc\OP_SEND_CLOSE_FROM_CLIENT => true
]);
@@ -59,12 +59,12 @@
$this->assertTrue($event->send_metadata);
$this->assertTrue($event->send_close);
- $event = $this->server->request_call();
+ $event = $this->server->requestCall();
$this->assertSame('dummy_method', $event->method);
$this->assertSame([], $event->metadata);
$server_call = $event->call;
- $event = $server_call->start_batch([
+ $event = $server_call->startBatch([
Grpc\OP_SEND_INITIAL_METADATA => [],
Grpc\OP_SEND_STATUS_FROM_SERVER => [
'metadata' => [],
@@ -78,7 +78,7 @@
$this->assertTrue($event->send_status);
$this->assertFalse($event->cancelled);
- $event = $call->start_batch([
+ $event = $call->startBatch([
Grpc\OP_RECV_INITIAL_METADATA => true,
Grpc\OP_RECV_STATUS_ON_CLIENT => true
]);
@@ -94,7 +94,7 @@
}
public function testClientServerFullRequestResponse() {
- $deadline = Grpc\Timeval::inf_future();
+ $deadline = Grpc\Timeval::infFuture();
$req_text = 'client_server_full_request_response';
$reply_text = 'reply:client_server_full_request_response';
$status_text = 'status:client_server_full_response_text';
@@ -103,7 +103,7 @@
'dummy_method',
$deadline);
- $event = $call->start_batch([
+ $event = $call->startBatch([
Grpc\OP_SEND_INITIAL_METADATA => [],
Grpc\OP_SEND_CLOSE_FROM_CLIENT => true,
Grpc\OP_SEND_MESSAGE => $req_text
@@ -113,11 +113,11 @@
$this->assertTrue($event->send_close);
$this->assertTrue($event->send_message);
- $event = $this->server->request_call();
+ $event = $this->server->requestCall();
$this->assertSame('dummy_method', $event->method);
$server_call = $event->call;
- $event = $server_call->start_batch([
+ $event = $server_call->startBatch([
Grpc\OP_SEND_INITIAL_METADATA => [],
Grpc\OP_SEND_MESSAGE => $reply_text,
Grpc\OP_SEND_STATUS_FROM_SERVER => [
@@ -135,7 +135,7 @@
$this->assertFalse($event->cancelled);
$this->assertSame($req_text, $event->message);
- $event = $call->start_batch([
+ $event = $call->startBatch([
Grpc\OP_RECV_INITIAL_METADATA => true,
Grpc\OP_RECV_MESSAGE => true,
Grpc\OP_RECV_STATUS_ON_CLIENT => true,
diff --git a/src/php/tests/unit_tests/SecureEndToEndTest.php b/src/php/tests/unit_tests/SecureEndToEndTest.php
index 2d62fe9..0c18cd3 100755
--- a/src/php/tests/unit_tests/SecureEndToEndTest.php
+++ b/src/php/tests/unit_tests/SecureEndToEndTest.php
@@ -40,8 +40,8 @@
file_get_contents(dirname(__FILE__) . '/../data/server1.key'),
file_get_contents(dirname(__FILE__) . '/../data/server1.pem'));
$this->server = new Grpc\Server();
- $port = $this->server->add_secure_http2_port('0.0.0.0:0',
- $server_credentials);
+ $port = $this->server->addSecureHttp2Port('0.0.0.0:0',
+ $server_credentials);
$this->server->start();
$this->channel = new Grpc\Channel(
'localhost:' . $port,
@@ -57,13 +57,13 @@
}
public function testSimpleRequestBody() {
- $deadline = Grpc\Timeval::inf_future();
+ $deadline = Grpc\Timeval::infFuture();
$status_text = 'xyz';
$call = new Grpc\Call($this->channel,
'dummy_method',
$deadline);
- $event = $call->start_batch([
+ $event = $call->startBatch([
Grpc\OP_SEND_INITIAL_METADATA => [],
Grpc\OP_SEND_CLOSE_FROM_CLIENT => true
]);
@@ -71,12 +71,12 @@
$this->assertTrue($event->send_metadata);
$this->assertTrue($event->send_close);
- $event = $this->server->request_call();
+ $event = $this->server->requestCall();
$this->assertSame('dummy_method', $event->method);
$this->assertSame([], $event->metadata);
$server_call = $event->call;
- $event = $server_call->start_batch([
+ $event = $server_call->startBatch([
Grpc\OP_SEND_INITIAL_METADATA => [],
Grpc\OP_SEND_STATUS_FROM_SERVER => [
'metadata' => [],
@@ -90,7 +90,7 @@
$this->assertTrue($event->send_status);
$this->assertFalse($event->cancelled);
- $event = $call->start_batch([
+ $event = $call->startBatch([
Grpc\OP_RECV_INITIAL_METADATA => true,
Grpc\OP_RECV_STATUS_ON_CLIENT => true
]);
@@ -106,7 +106,7 @@
}
public function testClientServerFullRequestResponse() {
- $deadline = Grpc\Timeval::inf_future();
+ $deadline = Grpc\Timeval::infFuture();
$req_text = 'client_server_full_request_response';
$reply_text = 'reply:client_server_full_request_response';
$status_text = 'status:client_server_full_response_text';
@@ -115,7 +115,7 @@
'dummy_method',
$deadline);
- $event = $call->start_batch([
+ $event = $call->startBatch([
Grpc\OP_SEND_INITIAL_METADATA => [],
Grpc\OP_SEND_CLOSE_FROM_CLIENT => true,
Grpc\OP_SEND_MESSAGE => $req_text
@@ -125,11 +125,11 @@
$this->assertTrue($event->send_close);
$this->assertTrue($event->send_message);
- $event = $this->server->request_call();
+ $event = $this->server->requestCall();
$this->assertSame('dummy_method', $event->method);
$server_call = $event->call;
- $event = $server_call->start_batch([
+ $event = $server_call->startBatch([
Grpc\OP_SEND_INITIAL_METADATA => [],
Grpc\OP_SEND_MESSAGE => $reply_text,
Grpc\OP_SEND_STATUS_FROM_SERVER => [
@@ -147,7 +147,7 @@
$this->assertFalse($event->cancelled);
$this->assertSame($req_text, $event->message);
- $event = $call->start_batch([
+ $event = $call->startBatch([
Grpc\OP_RECV_INITIAL_METADATA => true,
Grpc\OP_RECV_MESSAGE => true,
Grpc\OP_RECV_STATUS_ON_CLIENT => true,
diff --git a/src/php/tests/unit_tests/TimevalTest.php b/src/php/tests/unit_tests/TimevalTest.php
index d20069a..a8bfcf0 100755
--- a/src/php/tests/unit_tests/TimevalTest.php
+++ b/src/php/tests/unit_tests/TimevalTest.php
@@ -39,14 +39,14 @@
public function testPastIsLessThanZero() {
$zero = Grpc\Timeval::zero();
- $past = Grpc\Timeval::inf_past();
+ $past = Grpc\Timeval::infPast();
$this->assertLessThan(0, Grpc\Timeval::compare($past, $zero));
$this->assertGreaterThan(0, Grpc\Timeval::compare($zero, $past));
}
public function testFutureIsGreaterThanZero() {
$zero = Grpc\Timeval::zero();
- $future = Grpc\Timeval::inf_future();
+ $future = Grpc\Timeval::infFuture();
$this->assertLessThan(0, Grpc\Timeval::compare($zero, $future));
$this->assertGreaterThan(0, Grpc\Timeval::compare($future, $zero));
}
@@ -56,7 +56,7 @@
*/
public function testNowIsBetweenZeroAndFuture() {
$zero = Grpc\Timeval::zero();
- $future = Grpc\Timeval::inf_future();
+ $future = Grpc\Timeval::infFuture();
$now = Grpc\Timeval::now();
$this->assertLessThan(0, Grpc\Timeval::compare($zero, $now));
$this->assertLessThan(0, Grpc\Timeval::compare($now, $future));
diff --git a/src/python/interop/interop/_insecure_interop_test.py b/src/python/interop/interop/_insecure_interop_test.py
index e4ddff1..42e7a4d 100644
--- a/src/python/interop/interop/_insecure_interop_test.py
+++ b/src/python/interop/interop/_insecure_interop_test.py
@@ -42,11 +42,11 @@
unittest.TestCase):
def setUp(self):
- self.server = implementations.insecure_server(
+ self.server = implementations.server(
methods.SERVICE_NAME, methods.SERVER_METHODS, 0)
self.server.start()
port = self.server.port()
- self.stub = implementations.insecure_stub(
+ self.stub = implementations.stub(
methods.SERVICE_NAME, methods.CLIENT_METHODS, 'localhost', port)
def tearDown(self):
diff --git a/src/python/interop/interop/_secure_interop_test.py b/src/python/interop/interop/_secure_interop_test.py
index 214212d..27e7631 100644
--- a/src/python/interop/interop/_secure_interop_test.py
+++ b/src/python/interop/interop/_secure_interop_test.py
@@ -45,14 +45,15 @@
unittest.TestCase):
def setUp(self):
- self.server = implementations.secure_server(
+ self.server = implementations.server(
methods.SERVICE_NAME, methods.SERVER_METHODS, 0,
- resources.private_key(), resources.certificate_chain())
+ private_key=resources.private_key(),
+ certificate_chain=resources.certificate_chain())
self.server.start()
port = self.server.port()
- self.stub = implementations.secure_stub(
+ self.stub = implementations.stub(
methods.SERVICE_NAME, methods.CLIENT_METHODS, 'localhost', port,
- resources.test_root_certificates(), None, None,
+ secure=True, root_certificates=resources.test_root_certificates(),
server_host_override=_SERVER_HOST_OVERRIDE)
def tearDown(self):
diff --git a/src/python/interop/interop/client.py b/src/python/interop/interop/client.py
index fb7dfb5..85a0dcd 100644
--- a/src/python/interop/interop/client.py
+++ b/src/python/interop/interop/client.py
@@ -66,14 +66,14 @@
else:
root_certificates = resources.prod_root_certificates()
- stub = implementations.secure_stub(
+ stub = implementations.stub(
methods.SERVICE_NAME, methods.CLIENT_METHODS, args.server_host,
- args.server_port, root_certificates, None, None,
+ args.server_port, secure=True, root_certificates=root_certificates,
server_host_override=args.server_host_override)
else:
- stub = implementations.insecure_stub(
+ stub = implementations.stub(
methods.SERVICE_NAME, methods.CLIENT_METHODS, args.server_host,
- args.server_port)
+ args.server_port, secure=False)
return stub
diff --git a/src/python/interop/interop/empty_pb2.py b/src/python/interop/interop/empty_pb2.py
index 732a358..8c1ce2f 100644
--- a/src/python/interop/interop/empty_pb2.py
+++ b/src/python/interop/interop/empty_pb2.py
@@ -57,6 +57,7 @@
_sym_db.RegisterMessage(Empty)
-from grpc.framework.face import demonstration as _face_testing
-from grpc.framework.face import interfaces as _face_interfaces
+import abc
+from grpc.early_adopter import implementations
+from grpc.framework.alpha import utilities
# @@protoc_insertion_point(module_scope)
diff --git a/src/python/interop/interop/messages_pb2.py b/src/python/interop/interop/messages_pb2.py
index d449a99..0bf3d86 100644
--- a/src/python/interop/interop/messages_pb2.py
+++ b/src/python/interop/interop/messages_pb2.py
@@ -441,6 +441,7 @@
_sym_db.RegisterMessage(StreamingOutputCallResponse)
-from grpc.framework.face import demonstration as _face_testing
-from grpc.framework.face import interfaces as _face_interfaces
+import abc
+from grpc.early_adopter import implementations
+from grpc.framework.alpha import utilities
# @@protoc_insertion_point(module_scope)
diff --git a/src/python/interop/interop/server.py b/src/python/interop/interop/server.py
index 5791203..a67d412 100644
--- a/src/python/interop/interop/server.py
+++ b/src/python/interop/interop/server.py
@@ -53,11 +53,11 @@
if args.use_tls:
private_key = resources.private_key()
certificate_chain = resources.certificate_chain()
- server = implementations.secure_server(
- methods.SERVICE_NAME, methods.SERVER_METHODS, args.port, private_key,
- certificate_chain)
+ server = implementations.server(
+ methods.SERVICE_NAME, methods.SERVER_METHODS, args.port,
+ private_key=private_key, certificate_chain=certificate_chain)
else:
- server = implementations.insecure_server(
+ server = implementations.server(
methods.SERVICE_NAME, methods.SERVER_METHODS, args.port)
server.start()
diff --git a/src/python/interop/interop/test_pb2.py b/src/python/interop/interop/test_pb2.py
index e860946..71325d5 100644
--- a/src/python/interop/interop/test_pb2.py
+++ b/src/python/interop/interop/test_pb2.py
@@ -29,121 +29,150 @@
-from grpc.framework.face import demonstration as _face_testing
-from grpc.framework.face import interfaces as _face_interfaces
-class TestServiceService(object):
+import abc
+from grpc.early_adopter import implementations
+from grpc.framework.alpha import utilities
+class EarlyAdopterTestServiceServicer(object):
"""<fill me in later!>"""
- def __init__(self):
- pass
-class TestServiceServicer(object):
+ __metaclass__ = abc.ABCMeta
+ @abc.abstractmethod
+ def EmptyCall(self, request, context):
+ raise NotImplementedError()
+ @abc.abstractmethod
+ def UnaryCall(self, request, context):
+ raise NotImplementedError()
+ @abc.abstractmethod
+ def StreamingOutputCall(self, request, context):
+ raise NotImplementedError()
+ @abc.abstractmethod
+ def StreamingInputCall(self, request_iterator, context):
+ raise NotImplementedError()
+ @abc.abstractmethod
+ def FullDuplexCall(self, request_iterator, context):
+ raise NotImplementedError()
+ @abc.abstractmethod
+ def HalfDuplexCall(self, request_iterator, context):
+ raise NotImplementedError()
+class EarlyAdopterTestServiceServer(object):
"""<fill me in later!>"""
- def EmptyCall(self, arg):
+ __metaclass__ = abc.ABCMeta
+ @abc.abstractmethod
+ def start(self):
raise NotImplementedError()
- def UnaryCall(self, arg):
+ @abc.abstractmethod
+ def stop(self):
raise NotImplementedError()
- def StreamingOutputCall(self, arg):
- raise NotImplementedError()
- def StreamingInputCall(self, arg):
- raise NotImplementedError()
- def FullDuplexCall(self, arg):
- raise NotImplementedError()
- def HalfDuplexCall(self, arg):
- raise NotImplementedError()
-class TestServiceStub(object):
+class EarlyAdopterTestServiceStub(object):
"""<fill me in later!>"""
- def EmptyCall(self, arg):
+ __metaclass__ = abc.ABCMeta
+ @abc.abstractmethod
+ def EmptyCall(self, request):
raise NotImplementedError()
EmptyCall.async = None
- def UnaryCall(self, arg):
+ @abc.abstractmethod
+ def UnaryCall(self, request):
raise NotImplementedError()
UnaryCall.async = None
- def StreamingOutputCall(self, arg):
+ @abc.abstractmethod
+ def StreamingOutputCall(self, request):
raise NotImplementedError()
StreamingOutputCall.async = None
- def StreamingInputCall(self, arg):
+ @abc.abstractmethod
+ def StreamingInputCall(self, request_iterator):
raise NotImplementedError()
StreamingInputCall.async = None
- def FullDuplexCall(self, arg):
+ @abc.abstractmethod
+ def FullDuplexCall(self, request_iterator):
raise NotImplementedError()
FullDuplexCall.async = None
- def HalfDuplexCall(self, arg):
+ @abc.abstractmethod
+ def HalfDuplexCall(self, request_iterator):
raise NotImplementedError()
HalfDuplexCall.async = None
-class _TestServiceStub(TestServiceStub):
- def __init__(self, face_stub, default_timeout):
- self._face_stub = face_stub
- self._default_timeout = default_timeout
- stub_self = self
- class EmptyCall(object):
- def __call__(self, arg):
- return stub_self._face_stub.blocking_value_in_value_out("EmptyCall", arg, stub_self._default_timeout)
- def async(self, arg):
- return stub_self._face_stub.future_value_in_value_out("EmptyCall", arg, stub_self._default_timeout)
- self.EmptyCall = EmptyCall()
- class UnaryCall(object):
- def __call__(self, arg):
- return stub_self._face_stub.blocking_value_in_value_out("UnaryCall", arg, stub_self._default_timeout)
- def async(self, arg):
- return stub_self._face_stub.future_value_in_value_out("UnaryCall", arg, stub_self._default_timeout)
- self.UnaryCall = UnaryCall()
- class StreamingOutputCall(object):
- def __call__(self, arg):
- return stub_self._face_stub.inline_value_in_stream_out("StreamingOutputCall", arg, stub_self._default_timeout)
- def async(self, arg):
- return stub_self._face_stub.inline_value_in_stream_out("StreamingOutputCall", arg, stub_self._default_timeout)
- self.StreamingOutputCall = StreamingOutputCall()
- class StreamingInputCall(object):
- def __call__(self, arg):
- return stub_self._face_stub.blocking_stream_in_value_out("StreamingInputCall", arg, stub_self._default_timeout)
- def async(self, arg):
- return stub_self._face_stub.future_stream_in_value_out("StreamingInputCall", arg, stub_self._default_timeout)
- self.StreamingInputCall = StreamingInputCall()
- class FullDuplexCall(object):
- def __call__(self, arg):
- return stub_self._face_stub.inline_stream_in_stream_out("FullDuplexCall", arg, stub_self._default_timeout)
- def async(self, arg):
- return stub_self._face_stub.inline_stream_in_stream_out("FullDuplexCall", arg, stub_self._default_timeout)
- self.FullDuplexCall = FullDuplexCall()
- class HalfDuplexCall(object):
- def __call__(self, arg):
- return stub_self._face_stub.inline_stream_in_stream_out("HalfDuplexCall", arg, stub_self._default_timeout)
- def async(self, arg):
- return stub_self._face_stub.inline_stream_in_stream_out("HalfDuplexCall", arg, stub_self._default_timeout)
- self.HalfDuplexCall = HalfDuplexCall()
-def mock_TestService(servicer, default_timeout):
- value_in_value_out = {}
- value_in_stream_out = {}
- stream_in_value_out = {}
- stream_in_stream_out = {}
- class EmptyCall(_face_interfaces.InlineValueInValueOutMethod):
- def service(self, request, context):
- return servicer.EmptyCall(request)
- value_in_value_out['EmptyCall'] = EmptyCall()
- class UnaryCall(_face_interfaces.InlineValueInValueOutMethod):
- def service(self, request, context):
- return servicer.UnaryCall(request)
- value_in_value_out['UnaryCall'] = UnaryCall()
- class StreamingOutputCall(_face_interfaces.InlineValueInStreamOutMethod):
- def service(self, request, context):
- return servicer.StreamingOutputCall(request)
- value_in_stream_out['StreamingOutputCall'] = StreamingOutputCall()
- class StreamingInputCall(_face_interfaces.InlineStreamInValueOutMethod):
- def service(self, request, context):
- return servicer.StreamingInputCall(request)
- stream_in_value_out['StreamingInputCall'] = StreamingInputCall()
- class FullDuplexCall(_face_interfaces.InlineStreamInStreamOutMethod):
- def service(self, request, context):
- return servicer.FullDuplexCall(request)
- stream_in_stream_out['FullDuplexCall'] = FullDuplexCall()
- class HalfDuplexCall(_face_interfaces.InlineStreamInStreamOutMethod):
- def service(self, request, context):
- return servicer.HalfDuplexCall(request)
- stream_in_stream_out['HalfDuplexCall'] = HalfDuplexCall()
- face_linked_pair = _face_testing.server_and_stub(default_timeout,inline_value_in_value_out_methods=value_in_value_out,inline_value_in_stream_out_methods=value_in_stream_out,inline_stream_in_value_out_methods=stream_in_value_out,inline_stream_in_stream_out_methods=stream_in_stream_out)
- class LinkedPair(object):
- def __init__(self, server, stub):
- self.server = server
- self.stub = stub
- stub = _TestServiceStub(face_linked_pair.stub, default_timeout)
- return LinkedPair(None, stub)
+def early_adopter_create_TestService_server(servicer, port, private_key=None, certificate_chain=None):
+ import test.cpp.interop.empty_pb2
+ import test.cpp.interop.empty_pb2
+ import test.cpp.interop.messages_pb2
+ import test.cpp.interop.messages_pb2
+ import test.cpp.interop.messages_pb2
+ import test.cpp.interop.messages_pb2
+ import test.cpp.interop.messages_pb2
+ import test.cpp.interop.messages_pb2
+ import test.cpp.interop.messages_pb2
+ import test.cpp.interop.messages_pb2
+ import test.cpp.interop.messages_pb2
+ import test.cpp.interop.messages_pb2
+ method_service_descriptions = {
+ "EmptyCall": utilities.unary_unary_service_description(
+ servicer.EmptyCall,
+ test.cpp.interop.empty_pb2.Empty.FromString,
+ test.cpp.interop.empty_pb2.Empty.SerializeToString,
+ ),
+ "FullDuplexCall": utilities.stream_stream_service_description(
+ servicer.FullDuplexCall,
+ test.cpp.interop.messages_pb2.StreamingOutputCallRequest.FromString,
+ test.cpp.interop.messages_pb2.StreamingOutputCallResponse.SerializeToString,
+ ),
+ "HalfDuplexCall": utilities.stream_stream_service_description(
+ servicer.HalfDuplexCall,
+ test.cpp.interop.messages_pb2.StreamingOutputCallRequest.FromString,
+ test.cpp.interop.messages_pb2.StreamingOutputCallResponse.SerializeToString,
+ ),
+ "StreamingInputCall": utilities.stream_unary_service_description(
+ servicer.StreamingInputCall,
+ test.cpp.interop.messages_pb2.StreamingInputCallRequest.FromString,
+ test.cpp.interop.messages_pb2.StreamingInputCallResponse.SerializeToString,
+ ),
+ "StreamingOutputCall": utilities.unary_stream_service_description(
+ servicer.StreamingOutputCall,
+ test.cpp.interop.messages_pb2.StreamingOutputCallRequest.FromString,
+ test.cpp.interop.messages_pb2.StreamingOutputCallResponse.SerializeToString,
+ ),
+ "UnaryCall": utilities.unary_unary_service_description(
+ servicer.UnaryCall,
+ test.cpp.interop.messages_pb2.SimpleRequest.FromString,
+ test.cpp.interop.messages_pb2.SimpleResponse.SerializeToString,
+ ),
+ }
+ return implementations.server("grpc.testing.TestService", method_service_descriptions, port, private_key=private_key, certificate_chain=certificate_chain)
+def early_adopter_create_TestService_stub(host, port, metadata_transformer=None, secure=False, root_certificates=None, private_key=None, certificate_chain=None, server_host_override=None):
+ import test.cpp.interop.empty_pb2
+ import test.cpp.interop.empty_pb2
+ import test.cpp.interop.messages_pb2
+ import test.cpp.interop.messages_pb2
+ import test.cpp.interop.messages_pb2
+ import test.cpp.interop.messages_pb2
+ import test.cpp.interop.messages_pb2
+ import test.cpp.interop.messages_pb2
+ import test.cpp.interop.messages_pb2
+ import test.cpp.interop.messages_pb2
+ import test.cpp.interop.messages_pb2
+ import test.cpp.interop.messages_pb2
+ method_invocation_descriptions = {
+ "EmptyCall": utilities.unary_unary_invocation_description(
+ test.cpp.interop.empty_pb2.Empty.SerializeToString,
+ test.cpp.interop.empty_pb2.Empty.FromString,
+ ),
+ "FullDuplexCall": utilities.stream_stream_invocation_description(
+ test.cpp.interop.messages_pb2.StreamingOutputCallRequest.SerializeToString,
+ test.cpp.interop.messages_pb2.StreamingOutputCallResponse.FromString,
+ ),
+ "HalfDuplexCall": utilities.stream_stream_invocation_description(
+ test.cpp.interop.messages_pb2.StreamingOutputCallRequest.SerializeToString,
+ test.cpp.interop.messages_pb2.StreamingOutputCallResponse.FromString,
+ ),
+ "StreamingInputCall": utilities.stream_unary_invocation_description(
+ test.cpp.interop.messages_pb2.StreamingInputCallRequest.SerializeToString,
+ test.cpp.interop.messages_pb2.StreamingInputCallResponse.FromString,
+ ),
+ "StreamingOutputCall": utilities.unary_stream_invocation_description(
+ test.cpp.interop.messages_pb2.StreamingOutputCallRequest.SerializeToString,
+ test.cpp.interop.messages_pb2.StreamingOutputCallResponse.FromString,
+ ),
+ "UnaryCall": utilities.unary_unary_invocation_description(
+ test.cpp.interop.messages_pb2.SimpleRequest.SerializeToString,
+ test.cpp.interop.messages_pb2.SimpleResponse.FromString,
+ ),
+ }
+ return implementations.stub("grpc.testing.TestService", method_invocation_descriptions, host, port, metadata_transformer=metadata_transformer, secure=secure, root_certificates=root_certificates, private_key=private_key, certificate_chain=certificate_chain, server_host_override=server_host_override)
# @@protoc_insertion_point(module_scope)
diff --git a/src/python/src/grpc/_adapter/_call.c b/src/python/src/grpc/_adapter/_call.c
index d8806e5..bf96c1a 100644
--- a/src/python/src/grpc/_adapter/_call.c
+++ b/src/python/src/grpc/_adapter/_call.c
@@ -160,8 +160,22 @@
return result;
}
+static const PyObject *pygrpc_call_add_metadata(Call *self, PyObject *args) {
+ const char* key = NULL;
+ const char* value = NULL;
+ int value_length = 0;
+ grpc_metadata metadata;
+ if (!PyArg_ParseTuple(args, "ss#", &key, &value, &value_length)) {
+ return NULL;
+ }
+ metadata.key = key;
+ metadata.value = value;
+ metadata.value_length = value_length;
+ return pygrpc_translate_call_error(
+ grpc_call_add_metadata_old(self->c_call, &metadata, 0));
+}
+
static const PyObject *pygrpc_call_premetadata(Call *self) {
- /* TODO(nathaniel): Metadata support. */
return pygrpc_translate_call_error(
grpc_call_server_end_initial_metadata_old(self->c_call, 0));
}
@@ -236,6 +250,11 @@
{"complete", (PyCFunction)pygrpc_call_complete, METH_O,
"Complete writes to this call."},
{"accept", (PyCFunction)pygrpc_call_accept, METH_VARARGS, "Accept an RPC."},
+ {"add_metadata", (PyCFunction)pygrpc_call_add_metadata, METH_VARARGS,
+ "Add metadata to the call. May not be called after invoke on the client "
+ "side. On the server side: when called before premetadata it provides "
+ "'leading' metadata, when called after premetadata but before status it "
+ "provides 'trailing metadata'; may not be called after status."},
{"premetadata", (PyCFunction)pygrpc_call_premetadata, METH_VARARGS,
"Indicate the end of leading metadata in the response."},
{"read", (PyCFunction)pygrpc_call_read, METH_O,
diff --git a/src/python/src/grpc/_adapter/_call.h b/src/python/src/grpc/_adapter/_call.h
index a936e23..c04a228 100644
--- a/src/python/src/grpc/_adapter/_call.h
+++ b/src/python/src/grpc/_adapter/_call.h
@@ -37,7 +37,10 @@
#include <Python.h>
#include <grpc/grpc.h>
-typedef struct { PyObject_HEAD grpc_call *c_call; } Call;
+typedef struct {
+ PyObject_HEAD
+ grpc_call *c_call;
+} Call;
PyTypeObject pygrpc_CallType;
diff --git a/src/python/src/grpc/_adapter/_channel.h b/src/python/src/grpc/_adapter/_channel.h
index 6241ccd..afc0f80 100644
--- a/src/python/src/grpc/_adapter/_channel.h
+++ b/src/python/src/grpc/_adapter/_channel.h
@@ -37,7 +37,10 @@
#include <Python.h>
#include <grpc/grpc.h>
-typedef struct { PyObject_HEAD grpc_channel *c_channel; } Channel;
+typedef struct {
+ PyObject_HEAD
+ grpc_channel *c_channel;
+} Channel;
PyTypeObject pygrpc_ChannelType;
diff --git a/src/python/src/grpc/_adapter/_client_credentials.h b/src/python/src/grpc/_adapter/_client_credentials.h
index 664dc80..bb9f7f0 100644
--- a/src/python/src/grpc/_adapter/_client_credentials.h
+++ b/src/python/src/grpc/_adapter/_client_credentials.h
@@ -38,7 +38,8 @@
#include <grpc/grpc_security.h>
typedef struct {
- PyObject_HEAD grpc_credentials *c_client_credentials;
+ PyObject_HEAD
+ grpc_credentials *c_client_credentials;
} ClientCredentials;
PyTypeObject pygrpc_ClientCredentialsType;
diff --git a/src/python/src/grpc/_adapter/_completion_queue.c b/src/python/src/grpc/_adapter/_completion_queue.c
index b56ca19..a639eff 100644
--- a/src/python/src/grpc/_adapter/_completion_queue.c
+++ b/src/python/src/grpc/_adapter/_completion_queue.c
@@ -115,35 +115,56 @@
}
}
+static PyObject *pygrpc_metadata_collection_get(
+ grpc_metadata *metadata_elements, size_t count) {
+ PyObject *metadata = PyList_New(count);
+ size_t i;
+ for (i = 0; i < count; ++i) {
+ grpc_metadata elem = metadata_elements[i];
+ PyObject *key = PyString_FromString(elem.key);
+ PyObject *value = PyString_FromStringAndSize(elem.value, elem.value_length);
+ PyObject* kvp = PyTuple_Pack(2, key, value);
+ /* n.b. PyList_SetItem *steals* a reference to the set element. */
+ PyList_SetItem(metadata, i, kvp);
+ Py_DECREF(key);
+ Py_DECREF(value);
+ }
+ return metadata;
+}
+
static PyObject *pygrpc_stop_event_args(grpc_event *c_event) {
- return PyTuple_Pack(7, stop_event_kind, Py_None, Py_None, Py_None,
- Py_None, Py_None, Py_None);
+ return PyTuple_Pack(8, stop_event_kind, Py_None, Py_None, Py_None,
+ Py_None, Py_None, Py_None, Py_None);
}
static PyObject *pygrpc_write_event_args(grpc_event *c_event) {
PyObject *write_accepted =
c_event->data.write_accepted == GRPC_OP_OK ? Py_True : Py_False;
- return PyTuple_Pack(7, write_event_kind, (PyObject *)c_event->tag,
- write_accepted, Py_None, Py_None, Py_None, Py_None);
+ return PyTuple_Pack(8, write_event_kind, (PyObject *)c_event->tag,
+ write_accepted, Py_None, Py_None, Py_None, Py_None,
+ Py_None);
}
static PyObject *pygrpc_complete_event_args(grpc_event *c_event) {
PyObject *complete_accepted =
c_event->data.finish_accepted == GRPC_OP_OK ? Py_True : Py_False;
- return PyTuple_Pack(7, complete_event_kind, (PyObject *)c_event->tag,
- Py_None, complete_accepted, Py_None, Py_None, Py_None);
+ return PyTuple_Pack(8, complete_event_kind, (PyObject *)c_event->tag,
+ Py_None, complete_accepted, Py_None, Py_None, Py_None,
+ Py_None);
}
static PyObject *pygrpc_service_event_args(grpc_event *c_event) {
if (c_event->data.server_rpc_new.method == NULL) {
- return PyTuple_Pack(7, service_event_kind, c_event->tag,
- Py_None, Py_None, Py_None, Py_None, Py_None);
+ return PyTuple_Pack(
+ 8, service_event_kind, c_event->tag, Py_None, Py_None, Py_None, Py_None,
+ Py_None, Py_None);
} else {
PyObject *method = NULL;
PyObject *host = NULL;
PyObject *service_deadline = NULL;
Call *call = NULL;
PyObject *service_acceptance = NULL;
+ PyObject *metadata = NULL;
PyObject *event_args = NULL;
method = PyBytes_FromString(c_event->data.server_rpc_new.method);
@@ -173,11 +194,16 @@
goto error;
}
- event_args = PyTuple_Pack(7, service_event_kind,
+ metadata = pygrpc_metadata_collection_get(
+ c_event->data.server_rpc_new.metadata_elements,
+ c_event->data.server_rpc_new.metadata_count);
+ event_args = PyTuple_Pack(8, service_event_kind,
(PyObject *)c_event->tag, Py_None, Py_None,
- service_acceptance, Py_None, Py_None);
+ service_acceptance, Py_None, Py_None,
+ metadata);
Py_DECREF(service_acceptance);
+ Py_DECREF(metadata);
error:
Py_XDECREF(call);
Py_XDECREF(method);
@@ -190,8 +216,8 @@
static PyObject *pygrpc_read_event_args(grpc_event *c_event) {
if (c_event->data.read == NULL) {
- return PyTuple_Pack(7, read_event_kind, (PyObject *)c_event->tag,
- Py_None, Py_None, Py_None, Py_None, Py_None);
+ return PyTuple_Pack(8, read_event_kind, (PyObject *)c_event->tag,
+ Py_None, Py_None, Py_None, Py_None, Py_None, Py_None);
} else {
size_t length;
size_t offset;
@@ -216,17 +242,23 @@
if (bytes == NULL) {
return NULL;
}
- event_args = PyTuple_Pack(7, read_event_kind, (PyObject *)c_event->tag,
- Py_None, Py_None, Py_None, bytes, Py_None);
+ event_args = PyTuple_Pack(8, read_event_kind, (PyObject *)c_event->tag,
+ Py_None, Py_None, Py_None, bytes, Py_None,
+ Py_None);
Py_DECREF(bytes);
return event_args;
}
}
static PyObject *pygrpc_metadata_event_args(grpc_event *c_event) {
- /* TODO(nathaniel): Actual transmission of metadata. */
- return PyTuple_Pack(7, metadata_event_kind, (PyObject *)c_event->tag,
- Py_None, Py_None, Py_None, Py_None, Py_None);
+ PyObject *metadata = pygrpc_metadata_collection_get(
+ c_event->data.client_metadata_read.elements,
+ c_event->data.client_metadata_read.count);
+ PyObject* result = PyTuple_Pack(
+ 8, metadata_event_kind, (PyObject *)c_event->tag, Py_None, Py_None,
+ Py_None, Py_None, Py_None, metadata);
+ Py_DECREF(metadata);
+ return result;
}
static PyObject *pygrpc_finished_event_args(grpc_event *c_event) {
@@ -234,6 +266,7 @@
PyObject *details;
PyObject *status;
PyObject *event_args;
+ PyObject *metadata;
code = pygrpc_status_code(c_event->data.finished.status);
if (code == NULL) {
@@ -253,9 +286,14 @@
if (status == NULL) {
return NULL;
}
- event_args = PyTuple_Pack(7, finish_event_kind, (PyObject *)c_event->tag,
- Py_None, Py_None, Py_None, Py_None, status);
+ metadata = pygrpc_metadata_collection_get(
+ c_event->data.finished.metadata_elements,
+ c_event->data.finished.metadata_count);
+ event_args = PyTuple_Pack(8, finish_event_kind, (PyObject *)c_event->tag,
+ Py_None, Py_None, Py_None, Py_None, status,
+ metadata);
Py_DECREF(status);
+ Py_DECREF(metadata);
return event_args;
}
diff --git a/src/python/src/grpc/_adapter/_completion_queue.h b/src/python/src/grpc/_adapter/_completion_queue.h
index 8e5ee9f..9b377d1 100644
--- a/src/python/src/grpc/_adapter/_completion_queue.h
+++ b/src/python/src/grpc/_adapter/_completion_queue.h
@@ -38,7 +38,8 @@
#include <grpc/grpc.h>
typedef struct {
- PyObject_HEAD grpc_completion_queue *c_completion_queue;
+ PyObject_HEAD
+ grpc_completion_queue *c_completion_queue;
} CompletionQueue;
PyTypeObject pygrpc_CompletionQueueType;
diff --git a/src/python/src/grpc/_adapter/_datatypes.py b/src/python/src/grpc/_adapter/_datatypes.py
index e271ec8..3b22784 100644
--- a/src/python/src/grpc/_adapter/_datatypes.py
+++ b/src/python/src/grpc/_adapter/_datatypes.py
@@ -70,7 +70,7 @@
collections.namedtuple(
'Event',
['kind', 'tag', 'write_accepted', 'complete_accepted',
- 'service_acceptance', 'bytes', 'status'])):
+ 'service_acceptance', 'bytes', 'status', 'metadata'])):
"""Describes an event emitted from a completion queue."""
@enum.unique
diff --git a/src/python/src/grpc/_adapter/_links_test.py b/src/python/src/grpc/_adapter/_links_test.py
index cfdcc2c..4987be3 100644
--- a/src/python/src/grpc/_adapter/_links_test.py
+++ b/src/python/src/grpc/_adapter/_links_test.py
@@ -43,6 +43,14 @@
_TIMEOUT = 2
+# TODO(nathaniel): End-to-end metadata testing.
+def _transform_metadata(unused_metadata):
+ return (
+ ('one unused key', 'one unused value'),
+ ('another unused key', 'another unused value'),
+)
+
+
class RoundTripTest(unittest.TestCase):
def setUp(self):
@@ -76,7 +84,8 @@
rear_link = rear.RearLink(
'localhost', port, self.rear_link_pool, {test_method: None},
- {test_method: None}, False, None, None, None)
+ {test_method: None}, False, None, None, None,
+ metadata_transformer=_transform_metadata)
rear_link.join_fore_link(test_fore_link)
test_fore_link.join_rear_link(rear_link)
rear_link.start()
diff --git a/src/python/src/grpc/_adapter/_low_test.py b/src/python/src/grpc/_adapter/_low_test.py
index b04ac1c..e88b709 100644
--- a/src/python/src/grpc/_adapter/_low_test.py
+++ b/src/python/src/grpc/_adapter/_low_test.py
@@ -115,6 +115,18 @@
def _perform_echo_test(self, test_data):
method = 'test method'
details = 'test details'
+ server_leading_metadata_key = 'my_server_leading_key'
+ server_leading_metadata_value = 'my_server_leading_value'
+ server_trailing_metadata_key = 'my_server_trailing_key'
+ server_trailing_metadata_value = 'my_server_trailing_value'
+ client_metadata_key = 'my_client_key'
+ client_metadata_value = 'my_client_value'
+ server_leading_binary_metadata_key = 'my_server_leading_key-bin'
+ server_leading_binary_metadata_value = b'\0'*2047
+ server_trailing_binary_metadata_key = 'my_server_trailing_key-bin'
+ server_trailing_binary_metadata_value = b'\0'*2047
+ client_binary_metadata_key = 'my_client_key-bin'
+ client_binary_metadata_value = b'\0'*2047
deadline = _FUTURE
metadata_tag = object()
finish_tag = object()
@@ -128,6 +140,9 @@
client_data = []
client_call = _low.Call(self.channel, method, self.host, deadline)
+ client_call.add_metadata(client_metadata_key, client_metadata_value)
+ client_call.add_metadata(client_binary_metadata_key,
+ client_binary_metadata_value)
client_call.invoke(self.client_completion_queue, metadata_tag, finish_tag)
@@ -139,15 +154,31 @@
self.assertEqual(method, service_accepted.service_acceptance.method)
self.assertEqual(self.host, service_accepted.service_acceptance.host)
self.assertIsNotNone(service_accepted.service_acceptance.call)
+ metadata = dict(service_accepted.metadata)
+ self.assertIn(client_metadata_key, metadata)
+ self.assertEqual(client_metadata_value, metadata[client_metadata_key])
+ self.assertIn(client_binary_metadata_key, metadata)
+ self.assertEqual(client_binary_metadata_value,
+ metadata[client_binary_metadata_key])
server_call = service_accepted.service_acceptance.call
server_call.accept(self.server_completion_queue, finish_tag)
+ server_call.add_metadata(server_leading_metadata_key,
+ server_leading_metadata_value)
+ server_call.add_metadata(server_leading_binary_metadata_key,
+ server_leading_binary_metadata_value)
server_call.premetadata()
metadata_accepted = self.client_completion_queue.get(_FUTURE)
self.assertIsNotNone(metadata_accepted)
self.assertEqual(_low.Event.Kind.METADATA_ACCEPTED, metadata_accepted.kind)
self.assertEqual(metadata_tag, metadata_accepted.tag)
- # TODO(nathaniel): Test transmission and reception of metadata.
+ metadata = dict(metadata_accepted.metadata)
+ self.assertIn(server_leading_metadata_key, metadata)
+ self.assertEqual(server_leading_metadata_value,
+ metadata[server_leading_metadata_key])
+ self.assertIn(server_leading_binary_metadata_key, metadata)
+ self.assertEqual(server_leading_binary_metadata_value,
+ metadata[server_leading_binary_metadata_key])
for datum in test_data:
client_call.write(datum, write_tag)
@@ -194,6 +225,11 @@
self.assertEqual(read_tag, read_accepted.tag)
self.assertIsNone(read_accepted.bytes)
+ server_call.add_metadata(server_trailing_metadata_key,
+ server_trailing_metadata_value)
+ server_call.add_metadata(server_trailing_binary_metadata_key,
+ server_trailing_binary_metadata_value)
+
server_call.status(_low.Status(_low.Code.OK, details), status_tag)
server_terminal_event_one = self.server_completion_queue.get(_FUTURE)
server_terminal_event_two = self.server_completion_queue.get(_FUTURE)
@@ -229,6 +265,13 @@
self.assertEqual(_low.Event.Kind.FINISH, finish_accepted.kind)
self.assertEqual(finish_tag, finish_accepted.tag)
self.assertEqual(_low.Status(_low.Code.OK, details), finish_accepted.status)
+ metadata = dict(finish_accepted.metadata)
+ self.assertIn(server_trailing_metadata_key, metadata)
+ self.assertEqual(server_trailing_metadata_value,
+ metadata[server_trailing_metadata_key])
+ self.assertIn(server_trailing_binary_metadata_key, metadata)
+ self.assertEqual(server_trailing_binary_metadata_value,
+ metadata[server_trailing_binary_metadata_key])
server_timeout_none_event = self.server_completion_queue.get(0)
self.assertIsNone(server_timeout_none_event)
diff --git a/src/python/src/grpc/_adapter/_server.h b/src/python/src/grpc/_adapter/_server.h
index 0c517e3..4836bb6 100644
--- a/src/python/src/grpc/_adapter/_server.h
+++ b/src/python/src/grpc/_adapter/_server.h
@@ -37,7 +37,10 @@
#include <Python.h>
#include <grpc/grpc.h>
-typedef struct { PyObject_HEAD grpc_server *c_server; } Server;
+typedef struct {
+ PyObject_HEAD
+ grpc_server *c_server;
+} Server;
int pygrpc_add_server(PyObject *module);
diff --git a/src/python/src/grpc/_adapter/_server_credentials.h b/src/python/src/grpc/_adapter/_server_credentials.h
index 2e56efd..6090404 100644
--- a/src/python/src/grpc/_adapter/_server_credentials.h
+++ b/src/python/src/grpc/_adapter/_server_credentials.h
@@ -38,7 +38,8 @@
#include <grpc/grpc_security.h>
typedef struct {
- PyObject_HEAD grpc_server_credentials *c_server_credentials;
+ PyObject_HEAD
+ grpc_server_credentials *c_server_credentials;
} ServerCredentials;
PyTypeObject pygrpc_ServerCredentialsType;
diff --git a/src/python/src/grpc/_adapter/rear.py b/src/python/src/grpc/_adapter/rear.py
index f19321c..2b93aa6 100644
--- a/src/python/src/grpc/_adapter/rear.py
+++ b/src/python/src/grpc/_adapter/rear.py
@@ -93,7 +93,7 @@
def __init__(
self, host, port, pool, request_serializers, response_deserializers,
secure, root_certificates, private_key, certificate_chain,
- server_host_override=None):
+ metadata_transformer=None, server_host_override=None):
"""Constructor.
Args:
@@ -111,6 +111,9 @@
key should be used.
certificate_chain: The PEM-encoded certificate chain to use or None if
no certificate chain should be used.
+ metadata_transformer: A function that given a metadata object produces
+ another metadata to be used in the underlying communication on the
+ wire.
server_host_override: (For testing only) the target name used for SSL
host name checking.
"""
@@ -134,6 +137,7 @@
self._root_certificates = root_certificates
self._private_key = private_key
self._certificate_chain = certificate_chain
+ self._metadata_transformer = metadata_transformer
self._server_host_override = server_host_override
def _on_write_event(self, operation_id, event, rpc_state):
@@ -243,6 +247,10 @@
"""
request_serializer = self._request_serializers[name]
call = _low.Call(self._channel, name, self._host, time.time() + timeout)
+ if self._metadata_transformer is not None:
+ metadata = self._metadata_transformer([])
+ for metadata_key, metadata_value in metadata:
+ call.add_metadata(metadata_key, metadata_value)
call.invoke(self._completion_queue, operation_id, operation_id)
outstanding = set(_INVOCATION_EVENT_KINDS)
diff --git a/src/python/src/grpc/early_adopter/implementations.py b/src/python/src/grpc/early_adopter/implementations.py
index cc0b8ec..35456d3 100644
--- a/src/python/src/grpc/early_adopter/implementations.py
+++ b/src/python/src/grpc/early_adopter/implementations.py
@@ -114,7 +114,7 @@
def __init__(
self, breakdown, host, port, secure, root_certificates, private_key,
- certificate_chain, server_host_override=None):
+ certificate_chain, metadata_transformer=None, server_host_override=None):
self._lock = threading.Lock()
self._breakdown = breakdown
self._host = host
@@ -123,6 +123,7 @@
self._root_certificates = root_certificates
self._private_key = private_key
self._certificate_chain = certificate_chain
+ self._metadata_transformer = metadata_transformer
self._server_host_override = server_host_override
self._pool = None
@@ -141,6 +142,7 @@
self._breakdown.request_serializers,
self._breakdown.response_deserializers, self._secure,
self._root_certificates, self._private_key, self._certificate_chain,
+ metadata_transformer=self._metadata_transformer,
server_host_override=self._server_host_override)
self._front.join_rear_link(self._rear_link)
self._rear_link.join_fore_link(self._front)
@@ -188,22 +190,11 @@
raise AttributeError(attr)
-def _build_stub(
- service_name, methods, host, port, secure, root_certificates, private_key,
- certificate_chain, server_host_override=None):
- breakdown = _face_utilities.break_down_invocation(service_name, methods)
- return _Stub(
- breakdown, host, port, secure, root_certificates, private_key,
- certificate_chain, server_host_override=server_host_override)
-
-
-def _build_server(service_name, methods, port, private_key, certificate_chain):
- breakdown = _face_utilities.break_down_service(service_name, methods)
- return _Server(breakdown, port, private_key, certificate_chain)
-
-
-def insecure_stub(service_name, methods, host, port):
- """Constructs an insecure interfaces.Stub.
+def stub(
+ service_name, methods, host, port, metadata_transformer=None, secure=False,
+ root_certificates=None, private_key=None, certificate_chain=None,
+ server_host_override=None):
+ """Constructs an interfaces.Stub.
Args:
service_name: The package-qualified full name of the service.
@@ -213,27 +204,10 @@
not qualified by the service name or decorated in any other way.
host: The host to which to connect for RPC service.
port: The port to which to connect for RPC service.
-
- Returns:
- An interfaces.Stub affording RPC invocation.
- """
- return _build_stub(
- service_name, methods, host, port, False, None, None, None)
-
-
-def secure_stub(
- service_name, methods, host, port, root_certificates, private_key,
- certificate_chain, server_host_override=None):
- """Constructs an insecure interfaces.Stub.
-
- Args:
- service_name: The package-qualified full name of the service.
- methods: A dictionary from RPC method name to
- interfaces.RpcMethodInvocationDescription describing the RPCs to be
- supported by the created stub. The RPC method names in the dictionary are
- not qualified by the service name or decorated in any other way.
- host: The host to which to connect for RPC service.
- port: The port to which to connect for RPC service.
+ metadata_transformer: A callable that given a metadata object produces
+ another metadata object to be used in the underlying communication on the
+ wire.
+ secure: Whether or not to construct the stub with a secure connection.
root_certificates: The PEM-encoded root certificates or None to ask for
them to be retrieved from a default location.
private_key: The PEM-encoded private key to use or None if no private key
@@ -246,32 +220,15 @@
Returns:
An interfaces.Stub affording RPC invocation.
"""
- return _build_stub(
- service_name, methods, host, port, True, root_certificates, private_key,
+ breakdown = _face_utilities.break_down_invocation(service_name, methods)
+ return _Stub(
+ breakdown, host, port, secure, root_certificates, private_key,
certificate_chain, server_host_override=server_host_override)
-def insecure_server(service_name, methods, port):
- """Constructs an insecure interfaces.Server.
-
- Args:
- service_name: The package-qualified full name of the service.
- methods: A dictionary from RPC method name to
- interfaces.RpcMethodServiceDescription describing the RPCs to
- be serviced by the created server. The RPC method names in the dictionary
- are not qualified by the service name or decorated in any other way.
- port: The desired port on which to serve or zero to ask for a port to
- be automatically selected.
-
- Returns:
- An interfaces.Server that will run with no security and
- service unsecured raw requests.
- """
- return _build_server(service_name, methods, port, None, None)
-
-
-def secure_server(service_name, methods, port, private_key, certificate_chain):
- """Constructs a secure interfaces.Server.
+def server(
+ service_name, methods, port, private_key=None, certificate_chain=None):
+ """Constructs an interfaces.Server.
Args:
service_name: The package-qualified full name of the service.
@@ -281,11 +238,12 @@
are not qualified by the service name or decorated in any other way.
port: The port on which to serve or zero to ask for a port to be
automatically selected.
- private_key: A pem-encoded private key.
- certificate_chain: A pem-encoded certificate chain.
+ private_key: A pem-encoded private key, or None for an insecure server.
+ certificate_chain: A pem-encoded certificate chain, or None for an insecure
+ server.
Returns:
An interfaces.Server that will serve secure traffic.
"""
- return _build_server(
- service_name, methods, port, private_key, certificate_chain)
+ breakdown = _face_utilities.break_down_service(service_name, methods)
+ return _Server(breakdown, port, private_key, certificate_chain)
diff --git a/src/python/src/grpc/early_adopter/implementations_test.py b/src/python/src/grpc/early_adopter/implementations_test.py
index ae4adad..32b9747 100644
--- a/src/python/src/grpc/early_adopter/implementations_test.py
+++ b/src/python/src/grpc/early_adopter/implementations_test.py
@@ -106,11 +106,11 @@
class EarlyAdopterImplementationsTest(unittest.TestCase):
def setUp(self):
- self.server = implementations.insecure_server(
+ self.server = implementations.server(
SERVICE_NAME, _SERVICE_DESCRIPTIONS, 0)
self.server.start()
port = self.server.port()
- self.stub = implementations.insecure_stub(
+ self.stub = implementations.stub(
SERVICE_NAME, _INVOCATION_DESCRIPTIONS, 'localhost', port)
def tearDown(self):
diff --git a/templates/BUILD.template b/templates/BUILD.template
new file mode 100644
index 0000000..997c55b
--- /dev/null
+++ b/templates/BUILD.template
@@ -0,0 +1,69 @@
+# GRPC Bazel BUILD file.
+# This currently builds C and C++ code.
+
+# 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.
+
+licenses(["notice"]) # 3-clause BSD
+
+% for lib in libs:
+% if lib.build == "all" and lib.language == 'c':
+${makelib(lib)}
+% endif
+% endfor
+
+<%def name="makelib(lib)">
+
+cc_library(
+ name = "${lib.name}",
+ srcs = [
+% for hdr in lib.get("headers", []):
+ "${hdr}",
+% endfor
+% for src in lib.src:
+ "${src}",
+% endfor
+ ],
+ hdrs = [
+% for hdr in lib.get("public_headers", []):
+ "${hdr}",
+% endfor
+ ],
+ includes = [
+ "include",
+ ".",
+ ],
+ deps = [
+% for dep in lib.get("deps", []):
+ ":${dep}",
+% endfor
+ ],
+)
+
+</%def>
diff --git a/templates/Makefile.template b/templates/Makefile.template
index 36d1142..340cf23 100644
--- a/templates/Makefile.template
+++ b/templates/Makefile.template
@@ -111,6 +111,15 @@
LDFLAGS_dbg =
DEFINES_dbg = _DEBUG DEBUG
+VALID_CONFIG_mutrace = 1
+CC_mutrace = $(DEFAULT_CC)
+CXX_mutrace = $(DEFAULT_CXX)
+LD_mutrace = $(DEFAULT_CC)
+LDXX_mutrace = $(DEFAULT_CXX)
+CPPFLAGS_mutrace = -O0
+LDFLAGS_mutrace = -rdynamic
+DEFINES_mutrace = _DEBUG DEBUG
+
VALID_CONFIG_valgrind = 1
REQUIRE_CUSTOM_LIBRARIES_valgrind = 1
CC_valgrind = $(DEFAULT_CC)
diff --git a/templates/vsprojects/vs2010/Grpc.mak.template b/templates/vsprojects/vs2010/Grpc.mak.template
new file mode 100644
index 0000000..8e1b33b
--- /dev/null
+++ b/templates/vsprojects/vs2010/Grpc.mak.template
@@ -0,0 +1,107 @@
+# 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.
+<%!
+ import re
+%>\
+<%def name="to_windows_path(path)">${path.replace('/','\\')}</%def>\
+<%
+ allowed_dependencies = set(['gpr', 'grpc', 'gpr_test_util', 'grpc_test_util'])
+ buildable_targets = [ target for target in targets if set(target.deps).issubset(allowed_dependencies) and all([src.endswith('.c') for src in target.src])]
+ test_targets = [ target for target in buildable_targets if target.name.endswith('_test') ]
+%>\
+# NMake file to build secondary gRPC targets on Windows.
+# Use grpc.sln to solution to build the gRPC libraries.
+
+OUT_DIR=test_bin
+
+CC=cl.exe
+LINK=link.exe
+
+INCLUDES=/I..\.. /I..\..\include /I..\..\third_party\zlib /I..\third_party /I..\..\third_party\openssl\inc32
+DEFINES=/D WIN32 /D _LIB /D _USE_32BIT_TIME_T /D _UNICODE /D UNICODE /D _CRT_SECURE_NO_WARNINGS
+CFLAGS=/c $(INCLUDES) /nologo /Z7 /W3 /WX- /sdl $(DEFINES) /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Gd /TC /analyze-
+LFLAGS=/DEBUG /INCREMENTAL /NOLOGO /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /MACHINE:X86
+
+OPENSSL_LIBS=..\..\third_party\openssl\out32\ssleay32.lib ..\..\third_party\openssl\out32\libeay32.lib
+WINSOCK_LIBS=ws2_32.lib
+ZLIB_LIBS=Debug\zlibwapi.lib
+LIBS=$(OPENSSL_LIBS) $(WINSOCK_LIBS) $(ZLIB_LIBS)
+
+gpr_test_util:
+ MSBuild.exe gpr_test_util.vcxproj /p:Configuration=Debug
+
+grpc_test_util:
+ MSBuild.exe grpc_test_util.vcxproj /p:Configuration=Debug
+
+$(OUT_DIR):
+ mkdir $(OUT_DIR)
+
+buildtests: \
+% for target in test_targets:
+${target.name}.exe \
+% endfor
+
+ echo All tests built.
+
+test: \
+% for target in test_targets:
+${target.name} \
+% endfor
+
+ echo All tests ran.
+
+test_gpr: \
+% for target in [ tgt for tgt in test_targets if tgt.name.startswith('gpr_')]:
+${target.name} \
+% endfor
+
+ echo All tests ran.
+
+% for target in buildable_targets:
+${target.name}.exe: grpc_test_util
+ echo Building ${target.name}
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ \
+%for source in target.src:
+..\..\${to_windows_path(source)} \
+%endfor
+
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\${target.name}.exe" \
+%for dep in target.deps:
+Debug\${dep}.lib \
+%endfor
+$(LIBS) \
+%for source in target.src:
+$(OUT_DIR)\${re.search('([^/]+)\.c$', source).group(1)}.obj \
+%endfor
+
+${target.name}: ${target.name}.exe
+ echo Running ${target.name}
+ $(OUT_DIR)\${target.name}.exe
+
+% endfor
diff --git a/templates/vsprojects/vs2013/gpr_shared.vcxproj.filters.template b/templates/vsprojects/vs2010/gpr.vcxproj.filters.template
similarity index 100%
rename from templates/vsprojects/vs2013/gpr_shared.vcxproj.filters.template
rename to templates/vsprojects/vs2010/gpr.vcxproj.filters.template
diff --git a/templates/vsprojects/vs2010/gpr.vcxproj.template b/templates/vsprojects/vs2010/gpr.vcxproj.template
new file mode 100644
index 0000000..c478aad
--- /dev/null
+++ b/templates/vsprojects/vs2010/gpr.vcxproj.template
@@ -0,0 +1,2 @@
+<%namespace file="vcxproj_defs.include" import="gen_project"/>\
+${gen_project('gpr', libs, targets)}
diff --git a/templates/vsprojects/vs2010/gpr_test_util.vcxproj.template b/templates/vsprojects/vs2010/gpr_test_util.vcxproj.template
new file mode 100644
index 0000000..1f1bc0a
--- /dev/null
+++ b/templates/vsprojects/vs2010/gpr_test_util.vcxproj.template
@@ -0,0 +1,2 @@
+<%namespace file="vcxproj_defs.include" import="gen_project"/>\
+${gen_project('gpr_test_util', libs, targets)}
\ No newline at end of file
diff --git a/templates/vsprojects/vs2010/grpc++.vcxproj.filters.template b/templates/vsprojects/vs2010/grpc++.vcxproj.filters.template
new file mode 100644
index 0000000..d74cce8
--- /dev/null
+++ b/templates/vsprojects/vs2010/grpc++.vcxproj.filters.template
@@ -0,0 +1,2 @@
+<%namespace file="vcxproj.filters_defs.include" import="gen_filters"/>\
+${gen_filters('grpc++', libs, targets)}
diff --git a/templates/vsprojects/vs2010/grpc++.vcxproj.template b/templates/vsprojects/vs2010/grpc++.vcxproj.template
new file mode 100644
index 0000000..93994bb
--- /dev/null
+++ b/templates/vsprojects/vs2010/grpc++.vcxproj.template
@@ -0,0 +1,2 @@
+<%namespace file="vcxproj_defs.include" import="gen_project"/>\
+${gen_project('grpc++', libs, targets)}
\ No newline at end of file
diff --git a/templates/vsprojects/vs2010/grpc.sln.template b/templates/vsprojects/vs2010/grpc.sln.template
new file mode 100644
index 0000000..47aa03c
--- /dev/null
+++ b/templates/vsprojects/vs2010/grpc.sln.template
@@ -0,0 +1,59 @@
+## Template for Visual Studio solution
+## based on http://msdn.microsoft.com/en-us/library/bb165951(v=vs.90).aspx
+## NOTE: tabs in this file are needed by Visual Studio to correctly interpret
+## the file.
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual C++ Express 2010
+<%
+## Visual Studio uses GUIDs for project types
+## http://msdn.microsoft.com/en-us/library/hb23x61k%28v=vs.80%29.aspx
+cpp_proj_type = "{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}"
+%>\
+% for project in vsprojects:
+Project("${cpp_proj_type}") = "${project.name}", "${project.name}.vcxproj", "${project.vs_project_guid}"
+ % if project.get('deps', None):
+ ProjectSection(ProjectDependencies) = postProject
+ % for dep in project.get('deps', []):
+ ${vsproject_dict[dep].vs_project_guid} = ${vsproject_dict[dep].vs_project_guid}
+ % endfor
+ EndProjectSection
+ % endif
+EndProject
+% endfor
+Project("${cpp_proj_type}") = "grpc_csharp_ext_shared", "grpc_csharp_ext_shared.vcxproj", "{C26D04A8-37C6-44C7-B458-906C9FCE928C}"
+EndProject
+Project("${cpp_proj_type}") = "zlibvc", "third_party\zlibvc.vcxproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+% for project in vsprojects:
+ ${project.vs_project_guid}.Debug|Win32.ActiveCfg = Debug|Win32
+ ${project.vs_project_guid}.Debug|Win32.Build.0 = Debug|Win32
+ ${project.vs_project_guid}.Release|Win32.ActiveCfg = Release|Win32
+ ${project.vs_project_guid}.Release|Win32.Build.0 = Release|Win32
+% endfor
+ {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.ActiveCfg = Debug|Win32
+ {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.Build.0 = Debug|Win32
+ {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32
+ {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32
+ {3D304D6B-AAF8-428B-AC7D-A698DDDE93C0}.Debug|Win32.ActiveCfg = Debug|Win32
+ {3D304D6B-AAF8-428B-AC7D-A698DDDE93C0}.Debug|Win32.Build.0 = Debug|Win32
+ {3D304D6B-AAF8-428B-AC7D-A698DDDE93C0}.Release|Win32.ActiveCfg = Release|Win32
+ {3D304D6B-AAF8-428B-AC7D-A698DDDE93C0}.Release|Win32.Build.0 = Release|Win32
+ {F2EE8FDB-F1E0-43A0-A297-6F255BB52AAA}.Debug|Win32.ActiveCfg = Debug|Win32
+ {F2EE8FDB-F1E0-43A0-A297-6F255BB52AAA}.Debug|Win32.Build.0 = Debug|Win32
+ {F2EE8FDB-F1E0-43A0-A297-6F255BB52AAA}.Release|Win32.ActiveCfg = Release|Win32
+ {F2EE8FDB-F1E0-43A0-A297-6F255BB52AAA}.Release|Win32.Build.0 = Release|Win32
+ {C26D04A8-37C6-44C7-B458-906C9FCE928C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C26D04A8-37C6-44C7-B458-906C9FCE928C}.Debug|Win32.Build.0 = Debug|Win32
+ {C26D04A8-37C6-44C7-B458-906C9FCE928C}.Release|Win32.ActiveCfg = Release|Win32
+ {C26D04A8-37C6-44C7-B458-906C9FCE928C}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/templates/vsprojects/vs2013/grpc_shared.vcxproj.filters.template b/templates/vsprojects/vs2010/grpc.vcxproj.filters.template
similarity index 100%
rename from templates/vsprojects/vs2013/grpc_shared.vcxproj.filters.template
rename to templates/vsprojects/vs2010/grpc.vcxproj.filters.template
diff --git a/templates/vsprojects/vs2010/grpc.vcxproj.template b/templates/vsprojects/vs2010/grpc.vcxproj.template
new file mode 100644
index 0000000..3de6453
--- /dev/null
+++ b/templates/vsprojects/vs2010/grpc.vcxproj.template
@@ -0,0 +1,2 @@
+<%namespace file="vcxproj_defs.include" import="gen_project"/>\
+${gen_project('grpc', libs, targets)}
\ No newline at end of file
diff --git a/templates/vsprojects/vs2010/grpc_csharp_ext.vcxproj.template b/templates/vsprojects/vs2010/grpc_csharp_ext.vcxproj.template
new file mode 100644
index 0000000..84aa502
--- /dev/null
+++ b/templates/vsprojects/vs2010/grpc_csharp_ext.vcxproj.template
@@ -0,0 +1,2 @@
+<%namespace file="vcxproj_defs.include" import="gen_project"/>\
+${gen_project('grpc_csharp_ext', libs, targets)}
diff --git a/templates/vsprojects/vs2010/grpc_csharp_ext_shared.vcxproj.template b/templates/vsprojects/vs2010/grpc_csharp_ext_shared.vcxproj.template
new file mode 100644
index 0000000..193a2cd
--- /dev/null
+++ b/templates/vsprojects/vs2010/grpc_csharp_ext_shared.vcxproj.template
@@ -0,0 +1,2 @@
+<%namespace file="vcxproj_defs.include" import="gen_project"/>\
+${gen_project('grpc_csharp_ext', libs, targets, configuration_type = 'DynamicLibrary', project_guid = '{C26D04A8-37C6-44C7-B458-906C9FCE928C}', additional_props = ['winsock', 'ssl'])}
diff --git a/templates/vsprojects/vs2010/grpc_test_util.vcxproj.template b/templates/vsprojects/vs2010/grpc_test_util.vcxproj.template
new file mode 100644
index 0000000..72e625d
--- /dev/null
+++ b/templates/vsprojects/vs2010/grpc_test_util.vcxproj.template
@@ -0,0 +1,2 @@
+<%namespace file="vcxproj_defs.include" import="gen_project"/>\
+${gen_project('grpc_test_util', libs, targets)}
\ No newline at end of file
diff --git a/templates/vsprojects/vs2010/grpc_unsecure.vcxproj.filters.template b/templates/vsprojects/vs2010/grpc_unsecure.vcxproj.filters.template
new file mode 100644
index 0000000..ef91892
--- /dev/null
+++ b/templates/vsprojects/vs2010/grpc_unsecure.vcxproj.filters.template
@@ -0,0 +1,2 @@
+<%namespace file="vcxproj.filters_defs.include" import="gen_filters"/>\
+${gen_filters('grpc_unsecure', libs, targets)}
diff --git a/templates/vsprojects/vs2010/grpc_unsecure.vcxproj.template b/templates/vsprojects/vs2010/grpc_unsecure.vcxproj.template
new file mode 100644
index 0000000..4f62b85
--- /dev/null
+++ b/templates/vsprojects/vs2010/grpc_unsecure.vcxproj.template
@@ -0,0 +1,2 @@
+<%namespace file="vcxproj_defs.include" import="gen_project"/>\
+${gen_project('grpc_unsecure', libs, targets)}
\ No newline at end of file
diff --git a/templates/vsprojects/vs2010/vcxproj.filters_defs.include b/templates/vsprojects/vs2010/vcxproj.filters_defs.include
new file mode 100644
index 0000000..539ae93
--- /dev/null
+++ b/templates/vsprojects/vs2010/vcxproj.filters_defs.include
@@ -0,0 +1,64 @@
+<%!
+ import re
+ import hashlib
+
+ def calc_to_filter(path):
+ return '\\'.join(path.split('/')[:-1])
+%>\
+<%def name="to_windows_path(path)">${path.replace('/','\\')}</%def>\
+<%def name="to_filter(path)">${calc_to_filter(path)}</%def>\
+<%def name="filter_to_guid(proj, filter)">${re.sub('(........)(....)(....)(....)', r'\1-\2-\3-\4-', hashlib.md5(''.join([filter, proj])).hexdigest())}</%def>\
+<%def name="gen_filters(name, libs, targets)">\
+% for project in vsprojects:
+ % if project.name == name:
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ % if project.get('src',[]):
+ <ItemGroup>
+ % for src_name in project.src:
+ <ClCompile Include="..\..\${to_windows_path(src_name)}">
+ <Filter>${to_filter(src_name)}</Filter>
+ </ClCompile>
+ % endfor
+ </ItemGroup>
+ % endif
+ % if project.get('public_headers',[]):
+ <ItemGroup>
+ % for public_header in project.public_headers:
+ <ClInclude Include="..\..\${to_windows_path(public_header)}">
+ <Filter>${to_filter(public_header)}</Filter>
+ </ClInclude>
+ % endfor
+ </ItemGroup>
+ % endif
+ % if project.get('headers',[]):
+ <ItemGroup>
+ % for header in project.headers:
+ <ClInclude Include="..\..\${to_windows_path(header)}">
+ <Filter>${to_filter(header)}</Filter>
+ </ClInclude>
+ % endfor
+ </ItemGroup>
+ % endif
+<%
+ filters = set()
+ files = project.get('src', []) + project.get('public_headers', []) + project.get('headers', [])
+ for file in files:
+ filter = calc_to_filter(file)
+ paths = filter.split('\\')
+ for i in range(len(paths)):
+ filters.add('\\'.join(paths[:i + 1]))
+
+ filters = sorted(filters)
+%>
+ <ItemGroup>
+ % for filter in filters:
+ <Filter Include="${filter}">
+ <UniqueIdentifier>{${filter_to_guid(project.name, filter)}}</UniqueIdentifier>
+ </Filter>
+ % endfor
+ </ItemGroup>
+</Project>
+ % endif
+% endfor
+</%def>\
\ No newline at end of file
diff --git a/templates/vsprojects/vs2010/vcxproj_defs.include b/templates/vsprojects/vs2010/vcxproj_defs.include
new file mode 100644
index 0000000..8fd78a3
--- /dev/null
+++ b/templates/vsprojects/vs2010/vcxproj_defs.include
@@ -0,0 +1,131 @@
+<%def name="to_windows_path(path)">${path.replace('/','\\')}</%def>\
+<%def name="get_subsystem(is_library)">${'Windows' if is_library else 'Console'}</%def>\
+<%def name="gen_project(name, libs, targets, configuration_type = 'StaticLibrary', project_guid = None, additional_props = [], depends_on_zlib = False)">\
+% for project in vsprojects:
+ % if project.name == name:
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>${project_guid if project_guid else project.vs_project_guid}</ProjectGuid>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>${configuration_type}</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ <IntDir>$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>${configuration_type}</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ <IntDir>$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="global.props" />
+ % for prop in additional_props:
+ <Import Project="${prop}.props" />
+ % endfor
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="global.props" />
+ % for prop in additional_props:
+ <Import Project="${prop}.props" />
+ % endfor
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <TargetName>${name}</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <TargetName>${name}</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <SDLCheck>true</SDLCheck>
+ </ClCompile>
+ <Link>
+ <SubSystem>${get_subsystem(project.is_library)}</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <SDLCheck>true</SDLCheck>
+ </ClCompile>
+ <Link>
+ <SubSystem>${get_subsystem(project.is_library)}</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ % if project.get('public_headers',[]):
+ <ItemGroup>
+ % for public_header in project.public_headers:
+ <ClInclude Include="..\..\${to_windows_path(public_header)}" />
+ % endfor
+ </ItemGroup>
+ % endif
+ % if project.get('headers',[]):
+ <ItemGroup>
+ % for header in project.headers:
+ <ClInclude Include="..\..\${to_windows_path(header)}" />
+ % endfor
+ </ItemGroup>
+ % endif
+ % if project.get('src',[]):
+ <ItemGroup>
+ % for src_name in project.src:
+ <ClCompile Include="..\..\${to_windows_path(src_name)}">
+ </ClCompile>
+ % endfor
+ </ItemGroup>
+ % endif
+ % if project.get('deps',[]):
+ <ItemGroup>
+ % for dep in project.deps:
+ <ProjectReference Include="${dep}.vcxproj">
+ <Project>${vsproject_dict[dep].vs_project_guid}</Project>
+ </ProjectReference>
+ % endfor
+ % if depends_on_zlib:
+ <ProjectReference Include="third_party\zlibvc.vcxproj">
+ <Project>{8fd826f8-3739-44e6-8cc8-997122e53b8d}</Project>
+ </ProjectReference>
+ % endif
+ </ItemGroup>
+ % endif
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
+ % endif
+% endfor
+</%def>\
\ No newline at end of file
diff --git a/templates/vsprojects/vs2013/gpr_shared.vcxproj.template b/templates/vsprojects/vs2013/gpr_shared.vcxproj.template
deleted file mode 100644
index d1b1dd3..0000000
--- a/templates/vsprojects/vs2013/gpr_shared.vcxproj.template
+++ /dev/null
@@ -1,2 +0,0 @@
-<%namespace file="vcxproj_defs.include" import="gen_project"/>\
-${gen_project('gpr', libs, targets, configuration_type = 'DynamicLibrary', project_guid = '{3D304D6B-AAF8-428B-AC7D-A698DDDE93C0}')}
diff --git a/templates/vsprojects/vs2013/grpc.sln.template b/templates/vsprojects/vs2013/grpc.sln.template
index d17f4a3..2b0f76b 100644
--- a/templates/vsprojects/vs2013/grpc.sln.template
+++ b/templates/vsprojects/vs2013/grpc.sln.template
@@ -23,10 +23,6 @@
% endif
EndProject
% endfor
-Project("${cpp_proj_type}") = "gpr_shared", "gpr_shared.vcxproj", "{3D304D6B-AAF8-428B-AC7D-A698DDDE93C0}"
-EndProject
-Project("${cpp_proj_type}") = "grpc_shared", "grpc_shared.vcxproj", "{F2EE8FDB-F1E0-43A0-A297-6F255BB52AAA}"
-EndProject
Project("${cpp_proj_type}") = "grpc_csharp_ext_shared", "grpc_csharp_ext_shared.vcxproj", "{C26D04A8-37C6-44C7-B458-906C9FCE928C}"
EndProject
Project("${cpp_proj_type}") = "zlibvc", "third_party\zlibvc.vcxproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}"
diff --git a/templates/vsprojects/vs2013/grpc_shared.vcxproj.template b/templates/vsprojects/vs2013/grpc_shared.vcxproj.template
deleted file mode 100644
index 890189c..0000000
--- a/templates/vsprojects/vs2013/grpc_shared.vcxproj.template
+++ /dev/null
@@ -1,2 +0,0 @@
-<%namespace file="vcxproj_defs.include" import="gen_project"/>\
-${gen_project('grpc', libs, targets, configuration_type = 'DynamicLibrary', project_guid = '{F2EE8FDB-F1E0-43A0-A297-6F255BB52AAA}', additional_props = ['ssl', 'winsock'], depends_on_zlib = True)}
diff --git a/test/compiler/python_plugin_test.py b/test/compiler/python_plugin_test.py
index 3d2f117..ad3beba 100644
--- a/test/compiler/python_plugin_test.py
+++ b/test/compiler/python_plugin_test.py
@@ -177,7 +177,7 @@
servicer = Servicer()
server = getattr(
- test_pb2, SERVER_FACTORY_IDENTIFIER)(servicer, 0, None, None)
+ test_pb2, SERVER_FACTORY_IDENTIFIER)(servicer, 0)
with server:
port = server.port()
stub = getattr(test_pb2, STUB_FACTORY_IDENTIFIER)('localhost', port)
diff --git a/test/core/end2end/gen_build_json.py b/test/core/end2end/gen_build_json.py
index 67fc0a6..23349da 100755
--- a/test/core/end2end/gen_build_json.py
+++ b/test/core/end2end/gen_build_json.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.7
+#!/usr/bin/env python
# Copyright 2015, Google Inc.
# All rights reserved.
#
diff --git a/test/core/support/thd_test.c b/test/core/support/thd_test.c
index c03a905..bb3d54a 100644
--- a/test/core/support/thd_test.c
+++ b/test/core/support/thd_test.c
@@ -60,12 +60,16 @@
gpr_mu_unlock(&t->mu);
}
+static void thd_body_joinable(void *v) { }
+
/* Test that we can create a number of threads and wait for them. */
static void test(void) {
int i;
gpr_thd_id thd;
+ gpr_thd_id thds[1000];
struct test t;
int n = 1000;
+ gpr_thd_options options = gpr_thd_options_default();
gpr_mu_init(&t.mu);
gpr_cv_init(&t.done_cv);
t.n = n;
@@ -79,6 +83,13 @@
}
gpr_mu_unlock(&t.mu);
GPR_ASSERT(t.n == 0);
+ gpr_thd_options_set_joinable(&options);
+ for (i = 0; i < n; i++) {
+ GPR_ASSERT(gpr_thd_new(&thds[i], &thd_body_joinable, NULL, &options));
+ }
+ for (i = 0; i < n; i++) {
+ gpr_thd_join(thds[i]);
+ }
}
/* ------------------------------------------------- */
diff --git a/test/core/util/port_posix.c b/test/core/util/port_posix.c
index 36f13e1..7467c2f 100644
--- a/test/core/util/port_posix.c
+++ b/test/core/util/port_posix.c
@@ -32,7 +32,8 @@
*/
#include <grpc/support/port_platform.h>
-#ifdef GPR_POSIX_SOCKET
+#include "test/core/util/test_config.h"
+#if defined(GPR_POSIX_SOCKET) && defined(GRPC_TEST_PICK_PORT)
#include "test/core/util/port.h"
@@ -125,7 +126,7 @@
} else {
port = 0;
}
-
+
if (!is_port_available(&port, is_tcp)) {
continue;
}
@@ -155,4 +156,4 @@
return port;
}
-#endif /* GPR_POSIX_SOCKET */
+#endif /* GPR_POSIX_SOCKET && GRPC_TEST_PICK_PORT */
diff --git a/test/core/util/test_config.h b/test/core/util/test_config.h
index 668a069..0b3c543 100644
--- a/test/core/util/test_config.h
+++ b/test/core/util/test_config.h
@@ -59,6 +59,10 @@
gpr_time_add(gpr_now(), \
gpr_time_from_micros(GRPC_TEST_SLOWDOWN_FACTOR * 1e3 * (x)))
+#ifndef GRPC_TEST_CUSTOM_PICK_PORT
+#define GRPC_TEST_PICK_PORT
+#endif
+
void grpc_test_init(int argc, char **argv);
#ifdef __cplusplus
diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc
index e2649c2..0d5db04 100644
--- a/test/cpp/end2end/end2end_test.cc
+++ b/test/cpp/end2end/end2end_test.cc
@@ -83,10 +83,30 @@
class TestServiceImpl : public ::grpc::cpp::test::util::TestService::Service {
public:
+ TestServiceImpl() : signal_client_(false) {}
+
Status Echo(ServerContext* context, const EchoRequest* request,
EchoResponse* response) GRPC_OVERRIDE {
response->set_message(request->message());
MaybeEchoDeadline(context, request, response);
+ if (request->has_param() && request->param().client_cancel_after_us()) {
+ {
+ std::unique_lock<std::mutex> lock(mu_);
+ signal_client_ = true;
+ }
+ while (!context->IsCancelled()) {
+ std::this_thread::sleep_for(std::chrono::microseconds(
+ request->param().client_cancel_after_us()));
+ }
+ return Status::Cancelled;
+ } else if (request->has_param() &&
+ request->param().server_cancel_after_us()) {
+ std::this_thread::sleep_for(
+ std::chrono::microseconds(request->param().server_cancel_after_us()));
+ return Status::Cancelled;
+ } else {
+ EXPECT_FALSE(context->IsCancelled());
+ }
return Status::OK;
}
@@ -130,6 +150,15 @@
}
return Status::OK;
}
+
+ bool signal_client() {
+ std::unique_lock<std::mutex> lock(mu_);
+ return signal_client_;
+ }
+
+ private:
+ bool signal_client_;
+ std::mutex mu_;
};
class TestServiceImplDupPkg
@@ -151,7 +180,8 @@
server_address_ << "localhost:" << port;
// Setup server
ServerBuilder builder;
- builder.AddListeningPort(server_address_.str(), InsecureServerCredentials());
+ builder.AddListeningPort(server_address_.str(),
+ InsecureServerCredentials());
builder.RegisterService(&service_);
builder.RegisterService(&dup_pkg_service_);
builder.SetThreadPool(&thread_pool_);
@@ -423,6 +453,44 @@
EXPECT_EQ("Rpc sent on a lame channel.", s.details());
}
+void CancelRpc(ClientContext* context, int delay_us, TestServiceImpl* service) {
+ std::this_thread::sleep_for(std::chrono::microseconds(delay_us));
+ while (!service->signal_client()) {
+ }
+ context->TryCancel();
+}
+
+// Client cancels rpc after 10ms
+TEST_F(End2endTest, ClientCancelsRpc) {
+ ResetStub();
+ EchoRequest request;
+ EchoResponse response;
+ request.set_message("Hello");
+ const int kCancelDelayUs = 10 * 1000;
+ request.mutable_param()->set_client_cancel_after_us(kCancelDelayUs);
+
+ ClientContext context;
+ std::thread cancel_thread(CancelRpc, &context, kCancelDelayUs, &service_);
+ Status s = stub_->Echo(&context, request, &response);
+ cancel_thread.join();
+ EXPECT_EQ(StatusCode::CANCELLED, s.code());
+ EXPECT_TRUE(s.details().empty());
+}
+
+// Server cancels rpc after 1ms
+TEST_F(End2endTest, ServerCancelsRpc) {
+ ResetStub();
+ EchoRequest request;
+ EchoResponse response;
+ request.set_message("Hello");
+ request.mutable_param()->set_server_cancel_after_us(1000);
+
+ ClientContext context;
+ Status s = stub_->Echo(&context, request, &response);
+ EXPECT_EQ(StatusCode::CANCELLED, s.code());
+ EXPECT_TRUE(s.details().empty());
+}
+
} // namespace testing
} // namespace grpc
diff --git a/test/cpp/qps/client_async.cc b/test/cpp/qps/client_async.cc
index 590d56d..1ed3c71 100644
--- a/test/cpp/qps/client_async.cc
+++ b/test/cpp/qps/client_async.cc
@@ -47,7 +47,6 @@
#include <grpc++/client_context.h>
#include <grpc++/status.h>
#include <grpc++/stream.h>
-#include "test/core/util/grpc_profiler.h"
#include "test/cpp/util/create_test_channel.h"
#include "test/cpp/qps/qpstest.pb.h"
#include "test/cpp/qps/timer.h"
diff --git a/test/cpp/qps/client_sync.cc b/test/cpp/qps/client_sync.cc
index e4ee45a..77da172 100644
--- a/test/cpp/qps/client_sync.cc
+++ b/test/cpp/qps/client_sync.cc
@@ -53,7 +53,6 @@
#include <grpc++/status.h>
#include <grpc++/stream.h>
#include <gtest/gtest.h>
-#include "test/core/util/grpc_profiler.h"
#include "test/cpp/util/create_test_channel.h"
#include "test/cpp/qps/client.h"
#include "test/cpp/qps/qpstest.pb.h"
diff --git a/test/cpp/qps/server.cc b/test/cpp/qps/server.cc
deleted file mode 100644
index 258c5e1..0000000
--- a/test/cpp/qps/server.cc
+++ /dev/null
@@ -1,172 +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.
- *
- */
-
-#include <sys/time.h>
-#include <sys/resource.h>
-#include <sys/signal.h>
-#include <thread>
-
-#include <unistd.h>
-
-#include <gflags/gflags.h>
-#include <grpc/support/alloc.h>
-#include <grpc/support/host_port.h>
-#include <grpc++/config.h>
-#include <grpc++/server.h>
-#include <grpc++/server_builder.h>
-#include <grpc++/server_context.h>
-#include <grpc++/server_credentials.h>
-#include <grpc++/status.h>
-#include "src/cpp/server/thread_pool.h"
-#include "test/core/util/grpc_profiler.h"
-#include "test/cpp/qps/qpstest.pb.h"
-
-#include <grpc/grpc.h>
-#include <grpc/support/log.h>
-
-DEFINE_bool(enable_ssl, false, "Whether to use ssl/tls.");
-DEFINE_int32(port, 0, "Server port.");
-DEFINE_int32(server_threads, 4, "Number of server threads.");
-
-using grpc::Server;
-using grpc::ServerBuilder;
-using grpc::ServerContext;
-using grpc::ThreadPool;
-using grpc::testing::Payload;
-using grpc::testing::PayloadType;
-using grpc::testing::ServerStats;
-using grpc::testing::SimpleRequest;
-using grpc::testing::SimpleResponse;
-using grpc::testing::StatsRequest;
-using grpc::testing::TestService;
-using grpc::Status;
-
-// In some distros, gflags is in the namespace google, and in some others,
-// in gflags. This hack is enabling us to find both.
-namespace google {}
-namespace gflags {}
-using namespace google;
-using namespace gflags;
-
-static bool got_sigint = false;
-
-static void sigint_handler(int x) { got_sigint = 1; }
-
-static double time_double(struct timeval* tv) {
- return tv->tv_sec + 1e-6 * tv->tv_usec;
-}
-
-static bool SetPayload(PayloadType type, int size, Payload* payload) {
- PayloadType response_type = type;
- // TODO(yangg): Support UNCOMPRESSABLE payload.
- if (type != PayloadType::COMPRESSABLE) {
- return false;
- }
- payload->set_type(response_type);
- std::unique_ptr<char[]> body(new char[size]());
- payload->set_body(body.get(), size);
- return true;
-}
-
-namespace {
-
-class TestServiceImpl GRPC_FINAL : public TestService::Service {
- public:
- Status CollectServerStats(ServerContext* context, const StatsRequest*,
- ServerStats* response) {
- struct rusage usage;
- struct timeval tv;
- gettimeofday(&tv, NULL);
- getrusage(RUSAGE_SELF, &usage);
- response->set_time_now(time_double(&tv));
- response->set_time_user(time_double(&usage.ru_utime));
- response->set_time_system(time_double(&usage.ru_stime));
- return Status::OK;
- }
- Status UnaryCall(ServerContext* context, const SimpleRequest* request,
- SimpleResponse* response) {
- if (request->response_size() > 0) {
- if (!SetPayload(request->response_type(), request->response_size(),
- response->mutable_payload())) {
- return Status(grpc::StatusCode::INTERNAL, "Error creating payload.");
- }
- }
- return Status::OK;
- }
-};
-
-} // namespace
-
-static void RunServer() {
- char* server_address = NULL;
- gpr_join_host_port(&server_address, "::", FLAGS_port);
-
- TestServiceImpl service;
-
- SimpleRequest request;
- SimpleResponse response;
-
- ServerBuilder builder;
- builder.AddListeningPort(server_address, grpc::InsecureServerCredentials());
- builder.RegisterService(&service);
-
- std::unique_ptr<ThreadPool> pool(new ThreadPool(FLAGS_server_threads));
- builder.SetThreadPool(pool.get());
-
- std::unique_ptr<Server> server(builder.BuildAndStart());
- gpr_log(GPR_INFO, "Server listening on %s\n", server_address);
-
- grpc_profiler_start("qps_server.prof");
-
- while (!got_sigint) {
- sleep(5);
- }
-
- grpc_profiler_stop();
-
- gpr_free(server_address);
-}
-
-int main(int argc, char** argv) {
- grpc_init();
- ParseCommandLineFlags(&argc, &argv, true);
-
- signal(SIGINT, sigint_handler);
-
- GPR_ASSERT(FLAGS_port != 0);
- GPR_ASSERT(!FLAGS_enable_ssl);
- RunServer();
-
- grpc_shutdown();
- return 0;
-}
diff --git a/test/cpp/qps/server_async.cc b/test/cpp/qps/server_async.cc
index 83bb08c..65c170a 100644
--- a/test/cpp/qps/server_async.cc
+++ b/test/cpp/qps/server_async.cc
@@ -52,7 +52,6 @@
#include <grpc++/stream.h>
#include <gtest/gtest.h>
#include "src/cpp/server/thread_pool.h"
-#include "test/core/util/grpc_profiler.h"
#include "test/cpp/qps/qpstest.pb.h"
#include "test/cpp/qps/server.h"
diff --git a/test/cpp/qps/server_sync.cc b/test/cpp/qps/server_sync.cc
index 6724b8f..9964429 100644
--- a/test/cpp/qps/server_sync.cc
+++ b/test/cpp/qps/server_sync.cc
@@ -47,7 +47,6 @@
#include <grpc++/status.h>
#include <grpc++/stream.h>
#include "src/cpp/server/thread_pool.h"
-#include "test/core/util/grpc_profiler.h"
#include "test/cpp/qps/qpstest.pb.h"
#include "test/cpp/qps/server.h"
#include "test/cpp/qps/timer.h"
diff --git a/test/cpp/qps/worker.cc b/test/cpp/qps/worker.cc
index dddc4c9..b6830cc 100644
--- a/test/cpp/qps/worker.cc
+++ b/test/cpp/qps/worker.cc
@@ -71,6 +71,8 @@
static bool got_sigint = false;
+static void sigint_handler(int x) {got_sigint = true;}
+
namespace grpc {
namespace testing {
@@ -109,30 +111,10 @@
return Status(RESOURCE_EXHAUSTED);
}
- ClientArgs args;
- if (!stream->Read(&args)) {
- return Status(INVALID_ARGUMENT);
- }
- if (!args.has_setup()) {
- return Status(INVALID_ARGUMENT);
- }
- auto client = CreateClient(args.setup());
- if (!client) {
- return Status(INVALID_ARGUMENT);
- }
- ClientStatus status;
- if (!stream->Write(status)) {
- return Status(UNKNOWN);
- }
- while (stream->Read(&args)) {
- if (!args.has_mark()) {
- return Status(INVALID_ARGUMENT);
- }
- *status.mutable_stats() = client->Mark();
- stream->Write(status);
- }
-
- return Status::OK;
+ grpc_profiler_start("qps_client.prof");
+ Status ret = RunTestBody(ctx,stream);
+ grpc_profiler_stop();
+ return ret;
}
Status RunServer(ServerContext* ctx,
@@ -143,31 +125,10 @@
return Status(RESOURCE_EXHAUSTED);
}
- ServerArgs args;
- if (!stream->Read(&args)) {
- return Status(INVALID_ARGUMENT);
- }
- if (!args.has_setup()) {
- return Status(INVALID_ARGUMENT);
- }
- auto server = CreateServer(args.setup());
- if (!server) {
- return Status(INVALID_ARGUMENT);
- }
- ServerStatus status;
- status.set_port(FLAGS_server_port);
- if (!stream->Write(status)) {
- return Status(UNKNOWN);
- }
- while (stream->Read(&args)) {
- if (!args.has_mark()) {
- return Status(INVALID_ARGUMENT);
- }
- *status.mutable_stats() = server->Mark();
- stream->Write(status);
- }
-
- return Status::OK;
+ grpc_profiler_start("qps_server.prof");
+ Status ret = RunServerBody(ctx,stream);
+ grpc_profiler_stop();
+ return ret;
}
private:
@@ -202,6 +163,63 @@
acquired_ = false;
}
+ Status RunTestBody(ServerContext* ctx,
+ ServerReaderWriter<ClientStatus, ClientArgs>* stream) {
+ ClientArgs args;
+ if (!stream->Read(&args)) {
+ return Status(INVALID_ARGUMENT);
+ }
+ if (!args.has_setup()) {
+ return Status(INVALID_ARGUMENT);
+ }
+ auto client = CreateClient(args.setup());
+ if (!client) {
+ return Status(INVALID_ARGUMENT);
+ }
+ ClientStatus status;
+ if (!stream->Write(status)) {
+ return Status(UNKNOWN);
+ }
+ while (stream->Read(&args)) {
+ if (!args.has_mark()) {
+ return Status(INVALID_ARGUMENT);
+ }
+ *status.mutable_stats() = client->Mark();
+ stream->Write(status);
+ }
+
+ return Status::OK;
+ }
+
+ Status RunServerBody(ServerContext* ctx,
+ ServerReaderWriter<ServerStatus, ServerArgs>* stream) {
+ ServerArgs args;
+ if (!stream->Read(&args)) {
+ return Status(INVALID_ARGUMENT);
+ }
+ if (!args.has_setup()) {
+ return Status(INVALID_ARGUMENT);
+ }
+ auto server = CreateServer(args.setup());
+ if (!server) {
+ return Status(INVALID_ARGUMENT);
+ }
+ ServerStatus status;
+ status.set_port(FLAGS_server_port);
+ if (!stream->Write(status)) {
+ return Status(UNKNOWN);
+ }
+ while (stream->Read(&args)) {
+ if (!args.has_mark()) {
+ return Status(INVALID_ARGUMENT);
+ }
+ *status.mutable_stats() = server->Mark();
+ stream->Write(status);
+ }
+
+ return Status::OK;
+ }
+
std::mutex mu_;
bool acquired_;
};
@@ -232,6 +250,8 @@
grpc_init();
ParseCommandLineFlags(&argc, &argv, true);
+ signal(SIGINT, sigint_handler);
+
grpc::testing::RunServer();
grpc_shutdown();
diff --git a/test/cpp/util/messages.proto b/test/cpp/util/messages.proto
index 9c27f68..a79bce1 100644
--- a/test/cpp/util/messages.proto
+++ b/test/cpp/util/messages.proto
@@ -34,6 +34,8 @@
message RequestParams {
optional bool echo_deadline = 1;
+ optional int32 client_cancel_after_us = 2;
+ optional int32 server_cancel_after_us = 3;
}
message EchoRequest {
diff --git a/tools/buildgen/build-cleaner.py b/tools/buildgen/build-cleaner.py
index 1d9157a..6c5355b 100755
--- a/tools/buildgen/build-cleaner.py
+++ b/tools/buildgen/build-cleaner.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# Copyright 2015, Google Inc.
# All rights reserved.
#
diff --git a/tools/buildgen/mako_renderer.py b/tools/buildgen/mako_renderer.py
index f0dc818..534377e 100755
--- a/tools/buildgen/mako_renderer.py
+++ b/tools/buildgen/mako_renderer.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.7
+#!/usr/bin/env python
# Copyright 2015, Google Inc.
# All rights reserved.
#
diff --git a/tools/distpackages/build_deb_packages.sh b/tools/distpackages/build_deb_packages.sh
index 7b2acb6..7dff8e3 100755
--- a/tools/distpackages/build_deb_packages.sh
+++ b/tools/distpackages/build_deb_packages.sh
@@ -30,11 +30,18 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Where to put resulting .deb packages.
-deb_dest="deb_out"
+deb_dest="/tmp/deb_out"
mkdir -p $deb_dest
-version='0.5.0.0'
+# Update version from default values if the file /version.txt exists
+#
+# - when present, /version.txt will added by the docker build.
pkg_version='0.5.0'
+if [ -f /version.txt ]; then
+ pkg_version=$(cat /version.txt)
+fi
+version="${pkg_version}.0"
+echo "Target release => $pkg_version"
if [ -f /.dockerinit ]; then
# We're in Docker where uname -p returns "unknown".
@@ -110,8 +117,5 @@
dpkg-deb -c $deb_path
echo "Problems reported by lintian:"
lintian $deb_path
-
echo
done
-
-
diff --git a/tools/dockerfile/grpc_build_deb/Dockerfile b/tools/dockerfile/grpc_build_deb/Dockerfile
index 24ffc73..cf8da59 100644
--- a/tools/dockerfile/grpc_build_deb/Dockerfile
+++ b/tools/dockerfile/grpc_build_deb/Dockerfile
@@ -30,6 +30,9 @@
# Dockerfile to build Debian packages for gRPC C core.
FROM grpc/base
+# Add the file containing the gRPC version
+ADD version.txt version.txt
+
# Install dependencies
RUN apt-get update && apt-get install -y lintian
diff --git a/tools/dockerfile/grpc_build_deb/version.txt b/tools/dockerfile/grpc_build_deb/version.txt
new file mode 100644
index 0000000..4b9fcbe
--- /dev/null
+++ b/tools/dockerfile/grpc_build_deb/version.txt
@@ -0,0 +1 @@
+0.5.1
diff --git a/tools/dockerfile/grpc_php/Dockerfile b/tools/dockerfile/grpc_php/Dockerfile
index e84455f..770d0d2 100644
--- a/tools/dockerfile/grpc_php/Dockerfile
+++ b/tools/dockerfile/grpc_php/Dockerfile
@@ -46,4 +46,8 @@
&& ./configure \
&& make
+RUN cd /var/local/git/grpc/src/php && composer install
+
+RUN cd /var/local/git/grpc/src/php && protoc-gen-php -i tests/interop/ -o tests/interop/ tests/interop/test.proto
+
RUN cd /var/local/git/grpc/src/php && ./bin/run_tests.sh
\ No newline at end of file
diff --git a/tools/dockerfile/grpc_php_base/Dockerfile b/tools/dockerfile/grpc_php_base/Dockerfile
index c58cccb..c49d3fe 100644
--- a/tools/dockerfile/grpc_php_base/Dockerfile
+++ b/tools/dockerfile/grpc_php_base/Dockerfile
@@ -32,6 +32,10 @@
# Includes PHP installation dependencies, things that are unlikely to vary.
FROM grpc/base
+RUN echo "deb http://packages.dotdeb.org wheezy-php55 all" >> /etc/apt/sources.list.d/dotdeb.list
+RUN echo "deb-src http://packages.dotdeb.org wheezy-php55 all" >> /etc/apt/sources.list.d/dotdeb.list
+RUN wget http://www.dotdeb.org/dotdeb.gpg -O- |apt-key add -
+
# Install RVM dependencies and other packages
RUN apt-get update && apt-get install -y \
autoconf \
@@ -64,9 +68,12 @@
sqlite3 \
zlib1g-dev
-# Install the version of PHP gRPC is tested against
ENV DEBIAN_FRONTEND noniteractive
+# Install composer
+RUN curl -sS https://getcomposer.org/installer | php
+RUN mv composer.phar /usr/local/bin/composer
+
# Download the patched PHP protobuf so that PHP gRPC clients can be generated
# from proto3 schemas.
RUN git clone https://github.com/murgatroid99/Protobuf-PHP.git /var/local/git/protobuf-php
diff --git a/tools/dockerfile/grpc_scan_build/Dockerfile b/tools/dockerfile/grpc_scan_build/Dockerfile
new file mode 100644
index 0000000..9f26384
--- /dev/null
+++ b/tools/dockerfile/grpc_scan_build/Dockerfile
@@ -0,0 +1,47 @@
+# 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.
+
+FROM grpc/clang:latest
+
+RUN apt-get update && apt-get install -y \
+ autoconf \
+ libtool \
+ libgflags-dev \
+ libgtest-dev \
+ && apt-get clean
+
+RUN git clone --recursive https://github.com/grpc/grpc.git
+
+EXPOSE 8181
+
+CMD \
+ (cd grpc ; git pull) && \
+ (cd grpc ; git submodule update --init --recursive) && \
+ llvm/tools/clang/tools/scan-build/scan-build -o /tmp/grpc --use-analyzer=/usr/local/bin/clang make -C grpc buildtests && \
+ llvm/tools/clang/tools/scan-view/scan-view /tmp/grpc/`ls /tmp/grpc` --host 0.0.0.0 --no-browser --allow-all-hosts
diff --git a/tools/gce_setup/grpc_docker.sh b/tools/gce_setup/grpc_docker.sh
index 497112c..0e82ac1 100755
--- a/tools/gce_setup/grpc_docker.sh
+++ b/tools/gce_setup/grpc_docker.sh
@@ -673,7 +673,7 @@
}
# grpc_build_proto_bins
-#
+#
# - rebuilds the dist_proto docker image
# * doing this builds the protoc and the ruby, python and cpp bins statically
#
@@ -693,11 +693,11 @@
gce_has_instance $grpc_project $host || return 1;
local project_opt="--project $grpc_project"
local zone_opt="--zone $grpc_zone"
-
+
# rebuild the dist_proto image
local label='dist_proto'
grpc_update_image -- -h $host $label || return 1
-
+
# run a command to copy the generated archive to the docker host
local docker_prefix='sudo docker run -v /tmp:/tmp/proto_bins_out'
local tar_name='proto-bins*.tar.gz'
@@ -715,6 +715,58 @@
gcloud compute copy-files $rmt_tar $local_copy $project_opt $zone_opt || return 1
}
+_grpc_build_debs_args() {
+ [[ -n $1 ]] && { # host
+ host=$1
+ shift
+ } || {
+ host='grpc-docker-builder'
+ }
+}
+
+# grpc_build_debs
+#
+# - rebuilds the build_debs
+# * doing this builds a deb package for release debs
+#
+# - runs a docker command that copies the debs from the docker instance to its
+# host
+# - copies the debs from the host to the local machine
+grpc_build_debs() {
+ _grpc_ensure_gcloud_ssh || return 1;
+
+ # declare vars local so that they don't pollute the shell environment
+ # where this func is used.
+ local grpc_zone grpc_project dry_run # set by _grpc_set_project_and_zone
+ # set by _grpc_build_debs_args
+ local host
+
+ # set the project zone and check that all necessary args are provided
+ _grpc_set_project_and_zone -f _grpc_build_debs_args "$@" || return 1
+ gce_has_instance $grpc_project $host || return 1;
+ local project_opt="--project $grpc_project"
+ local zone_opt="--zone $grpc_zone"
+
+ # rebuild the build_deb image
+ local label='build_deb'
+ grpc_update_image -- -h $host $label || return 1
+
+ # run a command to copy the debs from the docker instance to the host.
+ local docker_prefix='sudo docker run -v /tmp:/tmp/host_deb_out'
+ local cp_cmd="/bin/bash -c 'cp -v /tmp/deb_out/*.deb /tmp/host_deb_out'"
+ local cmd="$docker_prefix grpc/$label $cp_cmd"
+ local ssh_cmd="bash -l -c \"$cmd\""
+ echo "will run:"
+ echo " $ssh_cmd"
+ echo "on $host"
+ gcloud compute $project_opt ssh $zone_opt $host --command "$cmd" || return 1
+
+ # copy the debs from host machine to the local one.
+ local rmt_debs="$host:/tmp/*.deb"
+ local local_copy="$(pwd)"
+ gcloud compute copy-files $rmt_debs $local_copy $project_opt $zone_opt || return 1
+}
+
_grpc_launch_servers_args() {
[[ -n $1 ]] && { # host
host=$1
@@ -1310,5 +1362,3 @@
_grpc_gce_test_flags() {
echo " --default_service_account=155450119199-r5aaqa2vqoa9g5mv2m6s3m1l293rlmel@developer.gserviceaccount.com --oauth_scope=https://www.googleapis.com/auth/xapi.zoo"
}
-
-# TODO(grpc-team): add grpc_interop_gen_xxx_cmd for python
diff --git a/vsprojects/vs2010/Grpc.mak b/vsprojects/vs2010/Grpc.mak
new file mode 100644
index 0000000..203c787
--- /dev/null
+++ b/vsprojects/vs2010/Grpc.mak
@@ -0,0 +1,712 @@
+# 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.
+# NMake file to build secondary gRPC targets on Windows.
+# Use grpc.sln to solution to build the gRPC libraries.
+
+OUT_DIR=test_bin
+
+CC=cl.exe
+LINK=link.exe
+
+INCLUDES=/I..\.. /I..\..\include /I..\..\third_party\zlib /I..\third_party /I..\..\third_party\openssl\inc32
+DEFINES=/D WIN32 /D _LIB /D _USE_32BIT_TIME_T /D _UNICODE /D UNICODE /D _CRT_SECURE_NO_WARNINGS
+CFLAGS=/c $(INCLUDES) /nologo /Z7 /W3 /WX- /sdl $(DEFINES) /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Gd /TC /analyze-
+LFLAGS=/DEBUG /INCREMENTAL /NOLOGO /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /MACHINE:X86
+
+OPENSSL_LIBS=..\..\third_party\openssl\out32\ssleay32.lib ..\..\third_party\openssl\out32\libeay32.lib
+WINSOCK_LIBS=ws2_32.lib
+ZLIB_LIBS=Debug\zlibwapi.lib
+LIBS=$(OPENSSL_LIBS) $(WINSOCK_LIBS) $(ZLIB_LIBS)
+
+gpr_test_util:
+ MSBuild.exe gpr_test_util.vcxproj /p:Configuration=Debug
+
+grpc_test_util:
+ MSBuild.exe grpc_test_util.vcxproj /p:Configuration=Debug
+
+$(OUT_DIR):
+ mkdir $(OUT_DIR)
+
+buildtests: alarm_heap_test.exe alarm_list_test.exe alarm_test.exe alpn_test.exe bin_encoder_test.exe census_hash_table_test.exe census_statistics_multiple_writers_circular_buffer_test.exe census_statistics_multiple_writers_test.exe census_statistics_performance_test.exe census_statistics_quick_test.exe census_statistics_small_log_test.exe census_stats_store_test.exe census_stub_test.exe census_trace_store_test.exe census_window_stats_test.exe chttp2_status_conversion_test.exe chttp2_stream_encoder_test.exe chttp2_stream_map_test.exe chttp2_transport_end2end_test.exe dualstack_socket_test.exe echo_test.exe fd_posix_test.exe fling_stream_test.exe fling_test.exe gpr_cancellable_test.exe gpr_cmdline_test.exe gpr_env_test.exe gpr_file_test.exe gpr_histogram_test.exe gpr_host_port_test.exe gpr_log_test.exe gpr_slice_buffer_test.exe gpr_slice_test.exe gpr_string_test.exe gpr_sync_test.exe gpr_thd_test.exe gpr_time_test.exe gpr_useful_test.exe grpc_base64_test.exe grpc_byte_buffer_reader_test.exe grpc_channel_stack_test.exe grpc_completion_queue_test.exe grpc_credentials_test.exe grpc_json_token_test.exe grpc_stream_op_test.exe hpack_parser_test.exe hpack_table_test.exe httpcli_format_request_test.exe httpcli_parser_test.exe httpcli_test.exe json_rewrite_test.exe json_test.exe lame_client_test.exe message_compress_test.exe metadata_buffer_test.exe multi_init_test.exe murmur_hash_test.exe no_server_test.exe poll_kick_posix_test.exe resolve_address_test.exe secure_endpoint_test.exe sockaddr_utils_test.exe tcp_client_posix_test.exe tcp_posix_test.exe tcp_server_posix_test.exe time_averaged_stats_test.exe time_test.exe timeout_encoding_test.exe transport_metadata_test.exe transport_security_test.exe
+ echo All tests built.
+
+test: alarm_heap_test alarm_list_test alarm_test alpn_test bin_encoder_test census_hash_table_test census_statistics_multiple_writers_circular_buffer_test census_statistics_multiple_writers_test census_statistics_performance_test census_statistics_quick_test census_statistics_small_log_test census_stats_store_test census_stub_test census_trace_store_test census_window_stats_test chttp2_status_conversion_test chttp2_stream_encoder_test chttp2_stream_map_test chttp2_transport_end2end_test dualstack_socket_test echo_test fd_posix_test fling_stream_test fling_test gpr_cancellable_test gpr_cmdline_test gpr_env_test gpr_file_test gpr_histogram_test gpr_host_port_test gpr_log_test gpr_slice_buffer_test gpr_slice_test gpr_string_test gpr_sync_test gpr_thd_test gpr_time_test gpr_useful_test grpc_base64_test grpc_byte_buffer_reader_test grpc_channel_stack_test grpc_completion_queue_test grpc_credentials_test grpc_json_token_test grpc_stream_op_test hpack_parser_test hpack_table_test httpcli_format_request_test httpcli_parser_test httpcli_test json_rewrite_test json_test lame_client_test message_compress_test metadata_buffer_test multi_init_test murmur_hash_test no_server_test poll_kick_posix_test resolve_address_test secure_endpoint_test sockaddr_utils_test tcp_client_posix_test tcp_posix_test tcp_server_posix_test time_averaged_stats_test time_test timeout_encoding_test transport_metadata_test transport_security_test
+ echo All tests ran.
+
+test_gpr: gpr_cancellable_test gpr_cmdline_test gpr_env_test gpr_file_test gpr_histogram_test gpr_host_port_test gpr_log_test gpr_slice_buffer_test gpr_slice_test gpr_string_test gpr_sync_test gpr_thd_test gpr_time_test gpr_useful_test
+ echo All tests ran.
+
+alarm_heap_test.exe: grpc_test_util
+ echo Building alarm_heap_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\iomgr\alarm_heap_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\alarm_heap_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\alarm_heap_test.obj
+alarm_heap_test: alarm_heap_test.exe
+ echo Running alarm_heap_test
+ $(OUT_DIR)\alarm_heap_test.exe
+
+alarm_list_test.exe: grpc_test_util
+ echo Building alarm_list_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\iomgr\alarm_list_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\alarm_list_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\alarm_list_test.obj
+alarm_list_test: alarm_list_test.exe
+ echo Running alarm_list_test
+ $(OUT_DIR)\alarm_list_test.exe
+
+alarm_test.exe: grpc_test_util
+ echo Building alarm_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\iomgr\alarm_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\alarm_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\alarm_test.obj
+alarm_test: alarm_test.exe
+ echo Running alarm_test
+ $(OUT_DIR)\alarm_test.exe
+
+alpn_test.exe: grpc_test_util
+ echo Building alpn_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\transport\chttp2\alpn_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\alpn_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\alpn_test.obj
+alpn_test: alpn_test.exe
+ echo Running alpn_test
+ $(OUT_DIR)\alpn_test.exe
+
+bin_encoder_test.exe: grpc_test_util
+ echo Building bin_encoder_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\transport\chttp2\bin_encoder_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\bin_encoder_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\bin_encoder_test.obj
+bin_encoder_test: bin_encoder_test.exe
+ echo Running bin_encoder_test
+ $(OUT_DIR)\bin_encoder_test.exe
+
+census_hash_table_test.exe: grpc_test_util
+ echo Building census_hash_table_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\statistics\hash_table_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\census_hash_table_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\hash_table_test.obj
+census_hash_table_test: census_hash_table_test.exe
+ echo Running census_hash_table_test
+ $(OUT_DIR)\census_hash_table_test.exe
+
+census_statistics_multiple_writers_circular_buffer_test.exe: grpc_test_util
+ echo Building census_statistics_multiple_writers_circular_buffer_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\statistics\multiple_writers_circular_buffer_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\census_statistics_multiple_writers_circular_buffer_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\multiple_writers_circular_buffer_test.obj
+census_statistics_multiple_writers_circular_buffer_test: census_statistics_multiple_writers_circular_buffer_test.exe
+ echo Running census_statistics_multiple_writers_circular_buffer_test
+ $(OUT_DIR)\census_statistics_multiple_writers_circular_buffer_test.exe
+
+census_statistics_multiple_writers_test.exe: grpc_test_util
+ echo Building census_statistics_multiple_writers_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\statistics\multiple_writers_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\census_statistics_multiple_writers_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\multiple_writers_test.obj
+census_statistics_multiple_writers_test: census_statistics_multiple_writers_test.exe
+ echo Running census_statistics_multiple_writers_test
+ $(OUT_DIR)\census_statistics_multiple_writers_test.exe
+
+census_statistics_performance_test.exe: grpc_test_util
+ echo Building census_statistics_performance_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\statistics\performance_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\census_statistics_performance_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\performance_test.obj
+census_statistics_performance_test: census_statistics_performance_test.exe
+ echo Running census_statistics_performance_test
+ $(OUT_DIR)\census_statistics_performance_test.exe
+
+census_statistics_quick_test.exe: grpc_test_util
+ echo Building census_statistics_quick_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\statistics\quick_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\census_statistics_quick_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\quick_test.obj
+census_statistics_quick_test: census_statistics_quick_test.exe
+ echo Running census_statistics_quick_test
+ $(OUT_DIR)\census_statistics_quick_test.exe
+
+census_statistics_small_log_test.exe: grpc_test_util
+ echo Building census_statistics_small_log_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\statistics\small_log_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\census_statistics_small_log_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\small_log_test.obj
+census_statistics_small_log_test: census_statistics_small_log_test.exe
+ echo Running census_statistics_small_log_test
+ $(OUT_DIR)\census_statistics_small_log_test.exe
+
+census_stats_store_test.exe: grpc_test_util
+ echo Building census_stats_store_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\statistics\rpc_stats_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\census_stats_store_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\rpc_stats_test.obj
+census_stats_store_test: census_stats_store_test.exe
+ echo Running census_stats_store_test
+ $(OUT_DIR)\census_stats_store_test.exe
+
+census_stub_test.exe: grpc_test_util
+ echo Building census_stub_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\statistics\census_stub_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\census_stub_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\census_stub_test.obj
+census_stub_test: census_stub_test.exe
+ echo Running census_stub_test
+ $(OUT_DIR)\census_stub_test.exe
+
+census_trace_store_test.exe: grpc_test_util
+ echo Building census_trace_store_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\statistics\trace_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\census_trace_store_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\trace_test.obj
+census_trace_store_test: census_trace_store_test.exe
+ echo Running census_trace_store_test
+ $(OUT_DIR)\census_trace_store_test.exe
+
+census_window_stats_test.exe: grpc_test_util
+ echo Building census_window_stats_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\statistics\window_stats_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\census_window_stats_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\window_stats_test.obj
+census_window_stats_test: census_window_stats_test.exe
+ echo Running census_window_stats_test
+ $(OUT_DIR)\census_window_stats_test.exe
+
+chttp2_status_conversion_test.exe: grpc_test_util
+ echo Building chttp2_status_conversion_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\transport\chttp2\status_conversion_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_status_conversion_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\status_conversion_test.obj
+chttp2_status_conversion_test: chttp2_status_conversion_test.exe
+ echo Running chttp2_status_conversion_test
+ $(OUT_DIR)\chttp2_status_conversion_test.exe
+
+chttp2_stream_encoder_test.exe: grpc_test_util
+ echo Building chttp2_stream_encoder_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\transport\chttp2\stream_encoder_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_stream_encoder_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\stream_encoder_test.obj
+chttp2_stream_encoder_test: chttp2_stream_encoder_test.exe
+ echo Running chttp2_stream_encoder_test
+ $(OUT_DIR)\chttp2_stream_encoder_test.exe
+
+chttp2_stream_map_test.exe: grpc_test_util
+ echo Building chttp2_stream_map_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\transport\chttp2\stream_map_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_stream_map_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\stream_map_test.obj
+chttp2_stream_map_test: chttp2_stream_map_test.exe
+ echo Running chttp2_stream_map_test
+ $(OUT_DIR)\chttp2_stream_map_test.exe
+
+chttp2_transport_end2end_test.exe: grpc_test_util
+ echo Building chttp2_transport_end2end_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\transport\chttp2_transport_end2end_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\chttp2_transport_end2end_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\chttp2_transport_end2end_test.obj
+chttp2_transport_end2end_test: chttp2_transport_end2end_test.exe
+ echo Running chttp2_transport_end2end_test
+ $(OUT_DIR)\chttp2_transport_end2end_test.exe
+
+dualstack_socket_test.exe: grpc_test_util
+ echo Building dualstack_socket_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\end2end\dualstack_socket_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\dualstack_socket_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\dualstack_socket_test.obj
+dualstack_socket_test: dualstack_socket_test.exe
+ echo Running dualstack_socket_test
+ $(OUT_DIR)\dualstack_socket_test.exe
+
+echo_client.exe: grpc_test_util
+ echo Building echo_client
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\echo\client.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\echo_client.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\client.obj
+echo_client: echo_client.exe
+ echo Running echo_client
+ $(OUT_DIR)\echo_client.exe
+
+echo_server.exe: grpc_test_util
+ echo Building echo_server
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\echo\server.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\echo_server.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\server.obj
+echo_server: echo_server.exe
+ echo Running echo_server
+ $(OUT_DIR)\echo_server.exe
+
+echo_test.exe: grpc_test_util
+ echo Building echo_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\echo\echo_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\echo_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\echo_test.obj
+echo_test: echo_test.exe
+ echo Running echo_test
+ $(OUT_DIR)\echo_test.exe
+
+fd_posix_test.exe: grpc_test_util
+ echo Building fd_posix_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\iomgr\fd_posix_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\fd_posix_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\fd_posix_test.obj
+fd_posix_test: fd_posix_test.exe
+ echo Running fd_posix_test
+ $(OUT_DIR)\fd_posix_test.exe
+
+fling_client.exe: grpc_test_util
+ echo Building fling_client
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\fling\client.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\fling_client.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\client.obj
+fling_client: fling_client.exe
+ echo Running fling_client
+ $(OUT_DIR)\fling_client.exe
+
+fling_server.exe: grpc_test_util
+ echo Building fling_server
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\fling\server.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\fling_server.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\server.obj
+fling_server: fling_server.exe
+ echo Running fling_server
+ $(OUT_DIR)\fling_server.exe
+
+fling_stream_test.exe: grpc_test_util
+ echo Building fling_stream_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\fling\fling_stream_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\fling_stream_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\fling_stream_test.obj
+fling_stream_test: fling_stream_test.exe
+ echo Running fling_stream_test
+ $(OUT_DIR)\fling_stream_test.exe
+
+fling_test.exe: grpc_test_util
+ echo Building fling_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\fling\fling_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\fling_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\fling_test.obj
+fling_test: fling_test.exe
+ echo Running fling_test
+ $(OUT_DIR)\fling_test.exe
+
+gen_hpack_tables.exe: grpc_test_util
+ echo Building gen_hpack_tables
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\src\core\transport\chttp2\gen_hpack_tables.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\gen_hpack_tables.exe" Debug\grpc_test_util.lib Debug\gpr.lib Debug\grpc.lib $(LIBS) $(OUT_DIR)\gen_hpack_tables.obj
+gen_hpack_tables: gen_hpack_tables.exe
+ echo Running gen_hpack_tables
+ $(OUT_DIR)\gen_hpack_tables.exe
+
+gpr_cancellable_test.exe: grpc_test_util
+ echo Building gpr_cancellable_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\support\cancellable_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\gpr_cancellable_test.exe" Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\cancellable_test.obj
+gpr_cancellable_test: gpr_cancellable_test.exe
+ echo Running gpr_cancellable_test
+ $(OUT_DIR)\gpr_cancellable_test.exe
+
+gpr_cmdline_test.exe: grpc_test_util
+ echo Building gpr_cmdline_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\support\cmdline_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\gpr_cmdline_test.exe" Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\cmdline_test.obj
+gpr_cmdline_test: gpr_cmdline_test.exe
+ echo Running gpr_cmdline_test
+ $(OUT_DIR)\gpr_cmdline_test.exe
+
+gpr_env_test.exe: grpc_test_util
+ echo Building gpr_env_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\support\env_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\gpr_env_test.exe" Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\env_test.obj
+gpr_env_test: gpr_env_test.exe
+ echo Running gpr_env_test
+ $(OUT_DIR)\gpr_env_test.exe
+
+gpr_file_test.exe: grpc_test_util
+ echo Building gpr_file_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\support\file_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\gpr_file_test.exe" Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\file_test.obj
+gpr_file_test: gpr_file_test.exe
+ echo Running gpr_file_test
+ $(OUT_DIR)\gpr_file_test.exe
+
+gpr_histogram_test.exe: grpc_test_util
+ echo Building gpr_histogram_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\support\histogram_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\gpr_histogram_test.exe" Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\histogram_test.obj
+gpr_histogram_test: gpr_histogram_test.exe
+ echo Running gpr_histogram_test
+ $(OUT_DIR)\gpr_histogram_test.exe
+
+gpr_host_port_test.exe: grpc_test_util
+ echo Building gpr_host_port_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\support\host_port_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\gpr_host_port_test.exe" Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\host_port_test.obj
+gpr_host_port_test: gpr_host_port_test.exe
+ echo Running gpr_host_port_test
+ $(OUT_DIR)\gpr_host_port_test.exe
+
+gpr_log_test.exe: grpc_test_util
+ echo Building gpr_log_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\support\log_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\gpr_log_test.exe" Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\log_test.obj
+gpr_log_test: gpr_log_test.exe
+ echo Running gpr_log_test
+ $(OUT_DIR)\gpr_log_test.exe
+
+gpr_slice_buffer_test.exe: grpc_test_util
+ echo Building gpr_slice_buffer_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\support\slice_buffer_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\gpr_slice_buffer_test.exe" Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\slice_buffer_test.obj
+gpr_slice_buffer_test: gpr_slice_buffer_test.exe
+ echo Running gpr_slice_buffer_test
+ $(OUT_DIR)\gpr_slice_buffer_test.exe
+
+gpr_slice_test.exe: grpc_test_util
+ echo Building gpr_slice_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\support\slice_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\gpr_slice_test.exe" Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\slice_test.obj
+gpr_slice_test: gpr_slice_test.exe
+ echo Running gpr_slice_test
+ $(OUT_DIR)\gpr_slice_test.exe
+
+gpr_string_test.exe: grpc_test_util
+ echo Building gpr_string_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\support\string_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\gpr_string_test.exe" Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\string_test.obj
+gpr_string_test: gpr_string_test.exe
+ echo Running gpr_string_test
+ $(OUT_DIR)\gpr_string_test.exe
+
+gpr_sync_test.exe: grpc_test_util
+ echo Building gpr_sync_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\support\sync_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\gpr_sync_test.exe" Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\sync_test.obj
+gpr_sync_test: gpr_sync_test.exe
+ echo Running gpr_sync_test
+ $(OUT_DIR)\gpr_sync_test.exe
+
+gpr_thd_test.exe: grpc_test_util
+ echo Building gpr_thd_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\support\thd_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\gpr_thd_test.exe" Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\thd_test.obj
+gpr_thd_test: gpr_thd_test.exe
+ echo Running gpr_thd_test
+ $(OUT_DIR)\gpr_thd_test.exe
+
+gpr_time_test.exe: grpc_test_util
+ echo Building gpr_time_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\support\time_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\gpr_time_test.exe" Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\time_test.obj
+gpr_time_test: gpr_time_test.exe
+ echo Running gpr_time_test
+ $(OUT_DIR)\gpr_time_test.exe
+
+gpr_useful_test.exe: grpc_test_util
+ echo Building gpr_useful_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\support\useful_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\gpr_useful_test.exe" Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\useful_test.obj
+gpr_useful_test: gpr_useful_test.exe
+ echo Running gpr_useful_test
+ $(OUT_DIR)\gpr_useful_test.exe
+
+grpc_base64_test.exe: grpc_test_util
+ echo Building grpc_base64_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\security\base64_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\grpc_base64_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\base64_test.obj
+grpc_base64_test: grpc_base64_test.exe
+ echo Running grpc_base64_test
+ $(OUT_DIR)\grpc_base64_test.exe
+
+grpc_byte_buffer_reader_test.exe: grpc_test_util
+ echo Building grpc_byte_buffer_reader_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\surface\byte_buffer_reader_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\grpc_byte_buffer_reader_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\byte_buffer_reader_test.obj
+grpc_byte_buffer_reader_test: grpc_byte_buffer_reader_test.exe
+ echo Running grpc_byte_buffer_reader_test
+ $(OUT_DIR)\grpc_byte_buffer_reader_test.exe
+
+grpc_channel_stack_test.exe: grpc_test_util
+ echo Building grpc_channel_stack_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\channel\channel_stack_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\grpc_channel_stack_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\channel_stack_test.obj
+grpc_channel_stack_test: grpc_channel_stack_test.exe
+ echo Running grpc_channel_stack_test
+ $(OUT_DIR)\grpc_channel_stack_test.exe
+
+grpc_completion_queue_benchmark.exe: grpc_test_util
+ echo Building grpc_completion_queue_benchmark
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\surface\completion_queue_benchmark.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\grpc_completion_queue_benchmark.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\completion_queue_benchmark.obj
+grpc_completion_queue_benchmark: grpc_completion_queue_benchmark.exe
+ echo Running grpc_completion_queue_benchmark
+ $(OUT_DIR)\grpc_completion_queue_benchmark.exe
+
+grpc_completion_queue_test.exe: grpc_test_util
+ echo Building grpc_completion_queue_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\surface\completion_queue_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\grpc_completion_queue_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\completion_queue_test.obj
+grpc_completion_queue_test: grpc_completion_queue_test.exe
+ echo Running grpc_completion_queue_test
+ $(OUT_DIR)\grpc_completion_queue_test.exe
+
+grpc_create_jwt.exe: grpc_test_util
+ echo Building grpc_create_jwt
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\security\create_jwt.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\grpc_create_jwt.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\create_jwt.obj
+grpc_create_jwt: grpc_create_jwt.exe
+ echo Running grpc_create_jwt
+ $(OUT_DIR)\grpc_create_jwt.exe
+
+grpc_credentials_test.exe: grpc_test_util
+ echo Building grpc_credentials_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\security\credentials_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\grpc_credentials_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\credentials_test.obj
+grpc_credentials_test: grpc_credentials_test.exe
+ echo Running grpc_credentials_test
+ $(OUT_DIR)\grpc_credentials_test.exe
+
+grpc_fetch_oauth2.exe: grpc_test_util
+ echo Building grpc_fetch_oauth2
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\security\fetch_oauth2.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\grpc_fetch_oauth2.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\fetch_oauth2.obj
+grpc_fetch_oauth2: grpc_fetch_oauth2.exe
+ echo Running grpc_fetch_oauth2
+ $(OUT_DIR)\grpc_fetch_oauth2.exe
+
+grpc_json_token_test.exe: grpc_test_util
+ echo Building grpc_json_token_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\security\json_token_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\grpc_json_token_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\json_token_test.obj
+grpc_json_token_test: grpc_json_token_test.exe
+ echo Running grpc_json_token_test
+ $(OUT_DIR)\grpc_json_token_test.exe
+
+grpc_print_google_default_creds_token.exe: grpc_test_util
+ echo Building grpc_print_google_default_creds_token
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\security\print_google_default_creds_token.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\grpc_print_google_default_creds_token.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\print_google_default_creds_token.obj
+grpc_print_google_default_creds_token: grpc_print_google_default_creds_token.exe
+ echo Running grpc_print_google_default_creds_token
+ $(OUT_DIR)\grpc_print_google_default_creds_token.exe
+
+grpc_stream_op_test.exe: grpc_test_util
+ echo Building grpc_stream_op_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\transport\stream_op_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\grpc_stream_op_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\stream_op_test.obj
+grpc_stream_op_test: grpc_stream_op_test.exe
+ echo Running grpc_stream_op_test
+ $(OUT_DIR)\grpc_stream_op_test.exe
+
+hpack_parser_test.exe: grpc_test_util
+ echo Building hpack_parser_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\transport\chttp2\hpack_parser_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\hpack_parser_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\hpack_parser_test.obj
+hpack_parser_test: hpack_parser_test.exe
+ echo Running hpack_parser_test
+ $(OUT_DIR)\hpack_parser_test.exe
+
+hpack_table_test.exe: grpc_test_util
+ echo Building hpack_table_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\transport\chttp2\hpack_table_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\hpack_table_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\hpack_table_test.obj
+hpack_table_test: hpack_table_test.exe
+ echo Running hpack_table_test
+ $(OUT_DIR)\hpack_table_test.exe
+
+httpcli_format_request_test.exe: grpc_test_util
+ echo Building httpcli_format_request_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\httpcli\format_request_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\httpcli_format_request_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\format_request_test.obj
+httpcli_format_request_test: httpcli_format_request_test.exe
+ echo Running httpcli_format_request_test
+ $(OUT_DIR)\httpcli_format_request_test.exe
+
+httpcli_parser_test.exe: grpc_test_util
+ echo Building httpcli_parser_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\httpcli\parser_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\httpcli_parser_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\parser_test.obj
+httpcli_parser_test: httpcli_parser_test.exe
+ echo Running httpcli_parser_test
+ $(OUT_DIR)\httpcli_parser_test.exe
+
+httpcli_test.exe: grpc_test_util
+ echo Building httpcli_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\httpcli\httpcli_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\httpcli_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\httpcli_test.obj
+httpcli_test: httpcli_test.exe
+ echo Running httpcli_test
+ $(OUT_DIR)\httpcli_test.exe
+
+json_rewrite.exe: grpc_test_util
+ echo Building json_rewrite
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\json\json_rewrite.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\json_rewrite.exe" Debug\grpc.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\json_rewrite.obj
+json_rewrite: json_rewrite.exe
+ echo Running json_rewrite
+ $(OUT_DIR)\json_rewrite.exe
+
+json_rewrite_test.exe: grpc_test_util
+ echo Building json_rewrite_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\json\json_rewrite_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\json_rewrite_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\json_rewrite_test.obj
+json_rewrite_test: json_rewrite_test.exe
+ echo Running json_rewrite_test
+ $(OUT_DIR)\json_rewrite_test.exe
+
+json_test.exe: grpc_test_util
+ echo Building json_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\json\json_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\json_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\json_test.obj
+json_test: json_test.exe
+ echo Running json_test
+ $(OUT_DIR)\json_test.exe
+
+lame_client_test.exe: grpc_test_util
+ echo Building lame_client_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\surface\lame_client_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\lame_client_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\lame_client_test.obj
+lame_client_test: lame_client_test.exe
+ echo Running lame_client_test
+ $(OUT_DIR)\lame_client_test.exe
+
+low_level_ping_pong_benchmark.exe: grpc_test_util
+ echo Building low_level_ping_pong_benchmark
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\network_benchmarks\low_level_ping_pong.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\low_level_ping_pong_benchmark.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\low_level_ping_pong.obj
+low_level_ping_pong_benchmark: low_level_ping_pong_benchmark.exe
+ echo Running low_level_ping_pong_benchmark
+ $(OUT_DIR)\low_level_ping_pong_benchmark.exe
+
+message_compress_test.exe: grpc_test_util
+ echo Building message_compress_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\compression\message_compress_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\message_compress_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\message_compress_test.obj
+message_compress_test: message_compress_test.exe
+ echo Running message_compress_test
+ $(OUT_DIR)\message_compress_test.exe
+
+metadata_buffer_test.exe: grpc_test_util
+ echo Building metadata_buffer_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\channel\metadata_buffer_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\metadata_buffer_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\metadata_buffer_test.obj
+metadata_buffer_test: metadata_buffer_test.exe
+ echo Running metadata_buffer_test
+ $(OUT_DIR)\metadata_buffer_test.exe
+
+multi_init_test.exe: grpc_test_util
+ echo Building multi_init_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\surface\multi_init_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\multi_init_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\multi_init_test.obj
+multi_init_test: multi_init_test.exe
+ echo Running multi_init_test
+ $(OUT_DIR)\multi_init_test.exe
+
+murmur_hash_test.exe: grpc_test_util
+ echo Building murmur_hash_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\support\murmur_hash_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\murmur_hash_test.exe" Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\murmur_hash_test.obj
+murmur_hash_test: murmur_hash_test.exe
+ echo Running murmur_hash_test
+ $(OUT_DIR)\murmur_hash_test.exe
+
+no_server_test.exe: grpc_test_util
+ echo Building no_server_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\end2end\no_server_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\no_server_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\no_server_test.obj
+no_server_test: no_server_test.exe
+ echo Running no_server_test
+ $(OUT_DIR)\no_server_test.exe
+
+poll_kick_posix_test.exe: grpc_test_util
+ echo Building poll_kick_posix_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\iomgr\poll_kick_posix_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\poll_kick_posix_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\poll_kick_posix_test.obj
+poll_kick_posix_test: poll_kick_posix_test.exe
+ echo Running poll_kick_posix_test
+ $(OUT_DIR)\poll_kick_posix_test.exe
+
+resolve_address_test.exe: grpc_test_util
+ echo Building resolve_address_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\iomgr\resolve_address_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\resolve_address_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\resolve_address_test.obj
+resolve_address_test: resolve_address_test.exe
+ echo Running resolve_address_test
+ $(OUT_DIR)\resolve_address_test.exe
+
+secure_endpoint_test.exe: grpc_test_util
+ echo Building secure_endpoint_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\security\secure_endpoint_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\secure_endpoint_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\secure_endpoint_test.obj
+secure_endpoint_test: secure_endpoint_test.exe
+ echo Running secure_endpoint_test
+ $(OUT_DIR)\secure_endpoint_test.exe
+
+sockaddr_utils_test.exe: grpc_test_util
+ echo Building sockaddr_utils_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\iomgr\sockaddr_utils_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\sockaddr_utils_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\sockaddr_utils_test.obj
+sockaddr_utils_test: sockaddr_utils_test.exe
+ echo Running sockaddr_utils_test
+ $(OUT_DIR)\sockaddr_utils_test.exe
+
+tcp_client_posix_test.exe: grpc_test_util
+ echo Building tcp_client_posix_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\iomgr\tcp_client_posix_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\tcp_client_posix_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\tcp_client_posix_test.obj
+tcp_client_posix_test: tcp_client_posix_test.exe
+ echo Running tcp_client_posix_test
+ $(OUT_DIR)\tcp_client_posix_test.exe
+
+tcp_posix_test.exe: grpc_test_util
+ echo Building tcp_posix_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\iomgr\tcp_posix_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\tcp_posix_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\tcp_posix_test.obj
+tcp_posix_test: tcp_posix_test.exe
+ echo Running tcp_posix_test
+ $(OUT_DIR)\tcp_posix_test.exe
+
+tcp_server_posix_test.exe: grpc_test_util
+ echo Building tcp_server_posix_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\iomgr\tcp_server_posix_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\tcp_server_posix_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\tcp_server_posix_test.obj
+tcp_server_posix_test: tcp_server_posix_test.exe
+ echo Running tcp_server_posix_test
+ $(OUT_DIR)\tcp_server_posix_test.exe
+
+time_averaged_stats_test.exe: grpc_test_util
+ echo Building time_averaged_stats_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\iomgr\time_averaged_stats_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\time_averaged_stats_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\time_averaged_stats_test.obj
+time_averaged_stats_test: time_averaged_stats_test.exe
+ echo Running time_averaged_stats_test
+ $(OUT_DIR)\time_averaged_stats_test.exe
+
+time_test.exe: grpc_test_util
+ echo Building time_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\support\time_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\time_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\time_test.obj
+time_test: time_test.exe
+ echo Running time_test
+ $(OUT_DIR)\time_test.exe
+
+timeout_encoding_test.exe: grpc_test_util
+ echo Building timeout_encoding_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\transport\chttp2\timeout_encoding_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\timeout_encoding_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\timeout_encoding_test.obj
+timeout_encoding_test: timeout_encoding_test.exe
+ echo Running timeout_encoding_test
+ $(OUT_DIR)\timeout_encoding_test.exe
+
+transport_metadata_test.exe: grpc_test_util
+ echo Building transport_metadata_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\transport\metadata_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\transport_metadata_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\metadata_test.obj
+transport_metadata_test: transport_metadata_test.exe
+ echo Running transport_metadata_test
+ $(OUT_DIR)\transport_metadata_test.exe
+
+transport_security_test.exe: grpc_test_util
+ echo Building transport_security_test
+ $(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\tsi\transport_security_test.c
+ $(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\transport_security_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\transport_security_test.obj
+transport_security_test: transport_security_test.exe
+ echo Running transport_security_test
+ $(OUT_DIR)\transport_security_test.exe
+
diff --git a/vsprojects/vs2010/build_openssl_x86.bat b/vsprojects/vs2010/build_openssl_x86.bat
new file mode 100644
index 0000000..9f7a013
--- /dev/null
+++ b/vsprojects/vs2010/build_openssl_x86.bat
@@ -0,0 +1,8 @@
+@echo Building OpenSSL 32bits using Visual Studio 2010.
+
+@call "%VS100COMNTOOLS%\..\..\vc\vcvarsall.bat" x86
+
+cd ..\..\third_party\openssl
+nmake /F ..\..\vsprojects\third_party\openssl\OpenSSL.mak init out32\ssleay32.lib out32\libeay32.lib
+
+pause
diff --git a/vsprojects/vs2010/global.props b/vsprojects/vs2010/global.props
new file mode 100644
index 0000000..e9b9d6c
--- /dev/null
+++ b/vsprojects/vs2010/global.props
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets" />
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup />
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <AdditionalIncludeDirectories>$(SolutionDir)\..\..;$(SolutionDir)\..\..\include;$(SolutionDir)\..\..\third_party\zlib;$(SolutionDir)\..\third_party;$(SolutionDir)\..\..\third_party\openssl\inc32;$(SolutionDir)\..\..\third_party\protobuf\src</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>GRPC_OLD_CXX;_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <WarningLevel>EnableAllWarnings</WarningLevel>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemGroup />
+</Project>
\ No newline at end of file
diff --git a/vsprojects/vs2013/gpr_shared.vcxproj b/vsprojects/vs2010/gpr.vcxproj
similarity index 95%
rename from vsprojects/vs2013/gpr_shared.vcxproj
rename to vsprojects/vs2010/gpr.vcxproj
index 8533965..d23124c 100644
--- a/vsprojects/vs2013/gpr_shared.vcxproj
+++ b/vsprojects/vs2010/gpr.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -11,20 +11,18 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
- <ProjectGuid>{3D304D6B-AAF8-428B-AC7D-A698DDDE93C0}</ProjectGuid>
+ <ProjectGuid>{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v120</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<IntDir>$(Configuration)\$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
- <PlatformToolset>v120</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<IntDir>$(Configuration)\$(ProjectName)\</IntDir>
@@ -168,6 +166,8 @@
</ClCompile>
<ClCompile Include="..\..\src\core\support\sync_win32.c">
</ClCompile>
+ <ClCompile Include="..\..\src\core\support\thd.c">
+ </ClCompile>
<ClCompile Include="..\..\src\core\support\thd_posix.c">
</ClCompile>
<ClCompile Include="..\..\src\core\support\thd_win32.c">
diff --git a/vsprojects/vs2013/gpr_shared.vcxproj.filters b/vsprojects/vs2010/gpr.vcxproj.filters
similarity index 98%
rename from vsprojects/vs2013/gpr_shared.vcxproj.filters
rename to vsprojects/vs2010/gpr.vcxproj.filters
index dffaf1e..1f87944 100644
--- a/vsprojects/vs2013/gpr_shared.vcxproj.filters
+++ b/vsprojects/vs2010/gpr.vcxproj.filters
@@ -88,6 +88,9 @@
<ClCompile Include="..\..\src\core\support\sync_win32.c">
<Filter>src\core\support</Filter>
</ClCompile>
+ <ClCompile Include="..\..\src\core\support\thd.c">
+ <Filter>src\core\support</Filter>
+ </ClCompile>
<ClCompile Include="..\..\src\core\support\thd_posix.c">
<Filter>src\core\support</Filter>
</ClCompile>
diff --git a/vsprojects/vs2010/gpr_test_util.vcxproj b/vsprojects/vs2010/gpr_test_util.vcxproj
new file mode 100644
index 0000000..0568fcf
--- /dev/null
+++ b/vsprojects/vs2010/gpr_test_util.vcxproj
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{EAB0A629-17A9-44DB-B5FF-E91A721FE037}</ProjectGuid>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ <IntDir>$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ <IntDir>$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="global.props" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="global.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <TargetName>gpr_test_util</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <TargetName>gpr_test_util</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <SDLCheck>true</SDLCheck>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <SDLCheck>true</SDLCheck>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\test\core\util\test_config.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\test\core\util\test_config.c">
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="gpr.vcxproj">
+ <Project>{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
diff --git a/vsprojects/vs2010/grpc++.vcxproj b/vsprojects/vs2010/grpc++.vcxproj
new file mode 100644
index 0000000..0ee4331
--- /dev/null
+++ b/vsprojects/vs2010/grpc++.vcxproj
@@ -0,0 +1,177 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{C187A093-A0FE-489D-A40A-6E33DE0F9FEB}</ProjectGuid>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ <IntDir>$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ <IntDir>$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="global.props" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="global.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <TargetName>grpc++</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <TargetName>grpc++</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <SDLCheck>true</SDLCheck>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <SDLCheck>true</SDLCheck>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\include\grpc++\async_generic_service.h" />
+ <ClInclude Include="..\..\include\grpc++\async_unary_call.h" />
+ <ClInclude Include="..\..\include\grpc++\byte_buffer.h" />
+ <ClInclude Include="..\..\include\grpc++\channel_arguments.h" />
+ <ClInclude Include="..\..\include\grpc++\channel_interface.h" />
+ <ClInclude Include="..\..\include\grpc++\client_context.h" />
+ <ClInclude Include="..\..\include\grpc++\completion_queue.h" />
+ <ClInclude Include="..\..\include\grpc++\config.h" />
+ <ClInclude Include="..\..\include\grpc++\create_channel.h" />
+ <ClInclude Include="..\..\include\grpc++\credentials.h" />
+ <ClInclude Include="..\..\include\grpc++\generic_stub.h" />
+ <ClInclude Include="..\..\include\grpc++\impl\call.h" />
+ <ClInclude Include="..\..\include\grpc++\impl\client_unary_call.h" />
+ <ClInclude Include="..\..\include\grpc++\impl\internal_stub.h" />
+ <ClInclude Include="..\..\include\grpc++\impl\rpc_method.h" />
+ <ClInclude Include="..\..\include\grpc++\impl\rpc_service_method.h" />
+ <ClInclude Include="..\..\include\grpc++\impl\service_type.h" />
+ <ClInclude Include="..\..\include\grpc++\server.h" />
+ <ClInclude Include="..\..\include\grpc++\server_builder.h" />
+ <ClInclude Include="..\..\include\grpc++\server_context.h" />
+ <ClInclude Include="..\..\include\grpc++\server_credentials.h" />
+ <ClInclude Include="..\..\include\grpc++\slice.h" />
+ <ClInclude Include="..\..\include\grpc++\status.h" />
+ <ClInclude Include="..\..\include\grpc++\status_code_enum.h" />
+ <ClInclude Include="..\..\include\grpc++\stream.h" />
+ <ClInclude Include="..\..\include\grpc++\thread_pool_interface.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\src\cpp\client\channel.h" />
+ <ClInclude Include="..\..\src\cpp\proto\proto_utils.h" />
+ <ClInclude Include="..\..\src\cpp\server\thread_pool.h" />
+ <ClInclude Include="..\..\src\cpp\util\time.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\src\cpp\client\secure_credentials.cc">
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\server\secure_server_credentials.cc">
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\client\channel.cc">
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\client\channel_arguments.cc">
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\client\client_context.cc">
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\client\client_unary_call.cc">
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\client\create_channel.cc">
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\client\credentials.cc">
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\client\generic_stub.cc">
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\client\insecure_credentials.cc">
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\client\internal_stub.cc">
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\common\call.cc">
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\common\completion_queue.cc">
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\common\rpc_method.cc">
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\proto\proto_utils.cc">
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\server\async_generic_service.cc">
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\server\insecure_server_credentials.cc">
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\server\server.cc">
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\server\server_builder.cc">
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\server\server_context.cc">
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\server\server_credentials.cc">
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\server\thread_pool.cc">
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\util\byte_buffer.cc">
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\util\slice.cc">
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\util\status.cc">
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\util\time.cc">
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="gpr.vcxproj">
+ <Project>{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}</Project>
+ </ProjectReference>
+ <ProjectReference Include="grpc.vcxproj">
+ <Project>{29D16885-7228-4C31-81ED-5F9187C7F2A9}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
diff --git a/vsprojects/vs2010/grpc++.vcxproj.filters b/vsprojects/vs2010/grpc++.vcxproj.filters
new file mode 100644
index 0000000..ed93dae
--- /dev/null
+++ b/vsprojects/vs2010/grpc++.vcxproj.filters
@@ -0,0 +1,211 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <ClCompile Include="..\..\src\cpp\client\secure_credentials.cc">
+ <Filter>src\cpp\client</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\server\secure_server_credentials.cc">
+ <Filter>src\cpp\server</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\client\channel.cc">
+ <Filter>src\cpp\client</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\client\channel_arguments.cc">
+ <Filter>src\cpp\client</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\client\client_context.cc">
+ <Filter>src\cpp\client</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\client\client_unary_call.cc">
+ <Filter>src\cpp\client</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\client\create_channel.cc">
+ <Filter>src\cpp\client</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\client\credentials.cc">
+ <Filter>src\cpp\client</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\client\generic_stub.cc">
+ <Filter>src\cpp\client</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\client\insecure_credentials.cc">
+ <Filter>src\cpp\client</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\client\internal_stub.cc">
+ <Filter>src\cpp\client</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\common\call.cc">
+ <Filter>src\cpp\common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\common\completion_queue.cc">
+ <Filter>src\cpp\common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\common\rpc_method.cc">
+ <Filter>src\cpp\common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\proto\proto_utils.cc">
+ <Filter>src\cpp\proto</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\server\async_generic_service.cc">
+ <Filter>src\cpp\server</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\server\insecure_server_credentials.cc">
+ <Filter>src\cpp\server</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\server\server.cc">
+ <Filter>src\cpp\server</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\server\server_builder.cc">
+ <Filter>src\cpp\server</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\server\server_context.cc">
+ <Filter>src\cpp\server</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\server\server_credentials.cc">
+ <Filter>src\cpp\server</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\server\thread_pool.cc">
+ <Filter>src\cpp\server</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\util\byte_buffer.cc">
+ <Filter>src\cpp\util</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\util\slice.cc">
+ <Filter>src\cpp\util</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\util\status.cc">
+ <Filter>src\cpp\util</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\cpp\util\time.cc">
+ <Filter>src\cpp\util</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\include\grpc++\async_generic_service.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\grpc++\async_unary_call.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\grpc++\byte_buffer.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\grpc++\channel_arguments.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\grpc++\channel_interface.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\grpc++\client_context.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\grpc++\completion_queue.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\grpc++\config.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\grpc++\create_channel.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\grpc++\credentials.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\grpc++\generic_stub.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\grpc++\impl\call.h">
+ <Filter>include\grpc++\impl</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\grpc++\impl\client_unary_call.h">
+ <Filter>include\grpc++\impl</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\grpc++\impl\internal_stub.h">
+ <Filter>include\grpc++\impl</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\grpc++\impl\rpc_method.h">
+ <Filter>include\grpc++\impl</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\grpc++\impl\rpc_service_method.h">
+ <Filter>include\grpc++\impl</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\grpc++\impl\service_type.h">
+ <Filter>include\grpc++\impl</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\grpc++\server.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\grpc++\server_builder.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\grpc++\server_context.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\grpc++\server_credentials.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\grpc++\slice.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\grpc++\status.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\grpc++\status_code_enum.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\grpc++\stream.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\grpc++\thread_pool_interface.h">
+ <Filter>include\grpc++</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\src\cpp\client\channel.h">
+ <Filter>src\cpp\client</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\cpp\proto\proto_utils.h">
+ <Filter>src\cpp\proto</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\cpp\server\thread_pool.h">
+ <Filter>src\cpp\server</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\cpp\util\time.h">
+ <Filter>src\cpp\util</Filter>
+ </ClInclude>
+ </ItemGroup>
+
+ <ItemGroup>
+ <Filter Include="include">
+ <UniqueIdentifier>{82445414-24cd-8198-1fe1-4267c3f3df00}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="include\grpc++">
+ <UniqueIdentifier>{784a0281-f547-aeb0-9f55-b26b7de9c769}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="include\grpc++\impl">
+ <UniqueIdentifier>{0da8cd95-314f-da1b-5ce7-7791a5be1f1a}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src">
+ <UniqueIdentifier>{328ff211-2886-406e-56f9-18ba1686f363}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\cpp">
+ <UniqueIdentifier>{2420a905-e4f1-a5aa-a364-6a112878a39e}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\cpp\client">
+ <UniqueIdentifier>{7febf32a-d7a6-76fa-9e17-f189f591c062}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\cpp\common">
+ <UniqueIdentifier>{2336e396-7e0b-8bf9-3b09-adc6ad1f0e5b}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\cpp\proto">
+ <UniqueIdentifier>{c22e8b9b-d2eb-a2e8-0cb8-3f7e3c902a7b}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\cpp\server">
+ <UniqueIdentifier>{321b0980-74ad-e8ca-f23b-deffa5d6bb8f}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\cpp\util">
+ <UniqueIdentifier>{f842537a-2bf1-1ec3-b495-7d62c64a1c06}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+</Project>
+
diff --git a/vsprojects/vs2010/grpc.sln b/vsprojects/vs2010/grpc.sln
new file mode 100644
index 0000000..8d1f877
--- /dev/null
+++ b/vsprojects/vs2010/grpc.sln
@@ -0,0 +1,97 @@
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual C++ Express 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gpr", "gpr.vcxproj", "{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gpr_test_util", "gpr_test_util.vcxproj", "{EAB0A629-17A9-44DB-B5FF-E91A721FE037}"
+ ProjectSection(ProjectDependencies) = postProject
+ {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc", "grpc.vcxproj", "{29D16885-7228-4C31-81ED-5F9187C7F2A9}"
+ ProjectSection(ProjectDependencies) = postProject
+ {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_test_util", "grpc_test_util.vcxproj", "{17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}"
+ ProjectSection(ProjectDependencies) = postProject
+ {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}
+ {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037}
+ {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_unsecure", "grpc_unsecure.vcxproj", "{46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}"
+ ProjectSection(ProjectDependencies) = postProject
+ {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc++", "grpc++.vcxproj", "{C187A093-A0FE-489D-A40A-6E33DE0F9FEB}"
+ ProjectSection(ProjectDependencies) = postProject
+ {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}
+ {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_csharp_ext", "grpc_csharp_ext.vcxproj", "{D64C6D63-4458-4A88-AB38-35678384A7E4}"
+ ProjectSection(ProjectDependencies) = postProject
+ {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}
+ {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_csharp_ext_shared", "grpc_csharp_ext_shared.vcxproj", "{C26D04A8-37C6-44C7-B458-906C9FCE928C}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "third_party\zlibvc.vcxproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Debug|Win32.ActiveCfg = Debug|Win32
+ {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Debug|Win32.Build.0 = Debug|Win32
+ {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Release|Win32.ActiveCfg = Release|Win32
+ {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Release|Win32.Build.0 = Release|Win32
+ {EAB0A629-17A9-44DB-B5FF-E91A721FE037}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EAB0A629-17A9-44DB-B5FF-E91A721FE037}.Debug|Win32.Build.0 = Debug|Win32
+ {EAB0A629-17A9-44DB-B5FF-E91A721FE037}.Release|Win32.ActiveCfg = Release|Win32
+ {EAB0A629-17A9-44DB-B5FF-E91A721FE037}.Release|Win32.Build.0 = Release|Win32
+ {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Debug|Win32.ActiveCfg = Debug|Win32
+ {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Debug|Win32.Build.0 = Debug|Win32
+ {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Release|Win32.ActiveCfg = Release|Win32
+ {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Release|Win32.Build.0 = Release|Win32
+ {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Debug|Win32.ActiveCfg = Debug|Win32
+ {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Debug|Win32.Build.0 = Debug|Win32
+ {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Release|Win32.ActiveCfg = Release|Win32
+ {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Release|Win32.Build.0 = Release|Win32
+ {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}.Debug|Win32.ActiveCfg = Debug|Win32
+ {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}.Debug|Win32.Build.0 = Debug|Win32
+ {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}.Release|Win32.ActiveCfg = Release|Win32
+ {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}.Release|Win32.Build.0 = Release|Win32
+ {C187A093-A0FE-489D-A40A-6E33DE0F9FEB}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C187A093-A0FE-489D-A40A-6E33DE0F9FEB}.Debug|Win32.Build.0 = Debug|Win32
+ {C187A093-A0FE-489D-A40A-6E33DE0F9FEB}.Release|Win32.ActiveCfg = Release|Win32
+ {C187A093-A0FE-489D-A40A-6E33DE0F9FEB}.Release|Win32.Build.0 = Release|Win32
+ {D64C6D63-4458-4A88-AB38-35678384A7E4}.Debug|Win32.ActiveCfg = Debug|Win32
+ {D64C6D63-4458-4A88-AB38-35678384A7E4}.Debug|Win32.Build.0 = Debug|Win32
+ {D64C6D63-4458-4A88-AB38-35678384A7E4}.Release|Win32.ActiveCfg = Release|Win32
+ {D64C6D63-4458-4A88-AB38-35678384A7E4}.Release|Win32.Build.0 = Release|Win32
+ {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.ActiveCfg = Debug|Win32
+ {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.Build.0 = Debug|Win32
+ {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32
+ {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32
+ {3D304D6B-AAF8-428B-AC7D-A698DDDE93C0}.Debug|Win32.ActiveCfg = Debug|Win32
+ {3D304D6B-AAF8-428B-AC7D-A698DDDE93C0}.Debug|Win32.Build.0 = Debug|Win32
+ {3D304D6B-AAF8-428B-AC7D-A698DDDE93C0}.Release|Win32.ActiveCfg = Release|Win32
+ {3D304D6B-AAF8-428B-AC7D-A698DDDE93C0}.Release|Win32.Build.0 = Release|Win32
+ {F2EE8FDB-F1E0-43A0-A297-6F255BB52AAA}.Debug|Win32.ActiveCfg = Debug|Win32
+ {F2EE8FDB-F1E0-43A0-A297-6F255BB52AAA}.Debug|Win32.Build.0 = Debug|Win32
+ {F2EE8FDB-F1E0-43A0-A297-6F255BB52AAA}.Release|Win32.ActiveCfg = Release|Win32
+ {F2EE8FDB-F1E0-43A0-A297-6F255BB52AAA}.Release|Win32.Build.0 = Release|Win32
+ {C26D04A8-37C6-44C7-B458-906C9FCE928C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C26D04A8-37C6-44C7-B458-906C9FCE928C}.Debug|Win32.Build.0 = Debug|Win32
+ {C26D04A8-37C6-44C7-B458-906C9FCE928C}.Release|Win32.ActiveCfg = Release|Win32
+ {C26D04A8-37C6-44C7-B458-906C9FCE928C}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/vsprojects/vs2013/grpc_shared.vcxproj b/vsprojects/vs2010/grpc.vcxproj
similarity index 96%
rename from vsprojects/vs2013/grpc_shared.vcxproj
rename to vsprojects/vs2010/grpc.vcxproj
index b673cc7..203ca34 100644
--- a/vsprojects/vs2013/grpc_shared.vcxproj
+++ b/vsprojects/vs2010/grpc.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -11,20 +11,18 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
- <ProjectGuid>{F2EE8FDB-F1E0-43A0-A297-6F255BB52AAA}</ProjectGuid>
+ <ProjectGuid>{29D16885-7228-4C31-81ED-5F9187C7F2A9}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v120</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<IntDir>$(Configuration)\$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
- <PlatformToolset>v120</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<IntDir>$(Configuration)\$(ProjectName)\</IntDir>
@@ -35,14 +33,10 @@
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="global.props" />
- <Import Project="ssl.props" />
- <Import Project="winsock.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="global.props" />
- <Import Project="ssl.props" />
- <Import Project="winsock.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
@@ -433,12 +427,8 @@
<ProjectReference Include="gpr.vcxproj">
<Project>{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}</Project>
</ProjectReference>
- <ProjectReference Include="third_party\zlibvc.vcxproj">
- <Project>{8fd826f8-3739-44e6-8cc8-997122e53b8d}</Project>
- </ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
-
diff --git a/vsprojects/vs2013/grpc_shared.vcxproj.filters b/vsprojects/vs2010/grpc.vcxproj.filters
similarity index 100%
rename from vsprojects/vs2013/grpc_shared.vcxproj.filters
rename to vsprojects/vs2010/grpc.vcxproj.filters
diff --git a/vsprojects/vs2010/grpc_csharp_ext.vcxproj b/vsprojects/vs2010/grpc_csharp_ext.vcxproj
new file mode 100644
index 0000000..a507a9b
--- /dev/null
+++ b/vsprojects/vs2010/grpc_csharp_ext.vcxproj
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{D64C6D63-4458-4A88-AB38-35678384A7E4}</ProjectGuid>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ <IntDir>$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ <IntDir>$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="global.props" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="global.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <TargetName>grpc_csharp_ext</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <TargetName>grpc_csharp_ext</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <SDLCheck>true</SDLCheck>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <SDLCheck>true</SDLCheck>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\src\csharp\ext\grpc_csharp_ext.c">
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="gpr.vcxproj">
+ <Project>{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}</Project>
+ </ProjectReference>
+ <ProjectReference Include="grpc.vcxproj">
+ <Project>{29D16885-7228-4C31-81ED-5F9187C7F2A9}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
+
diff --git a/vsprojects/vs2010/grpc_csharp_ext_shared.vcxproj b/vsprojects/vs2010/grpc_csharp_ext_shared.vcxproj
new file mode 100644
index 0000000..b17f927
--- /dev/null
+++ b/vsprojects/vs2010/grpc_csharp_ext_shared.vcxproj
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{C26D04A8-37C6-44C7-B458-906C9FCE928C}</ProjectGuid>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ <IntDir>$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ <IntDir>$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="global.props" />
+ <Import Project="winsock.props" />
+ <Import Project="ssl.props" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="global.props" />
+ <Import Project="winsock.props" />
+ <Import Project="ssl.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <TargetName>grpc_csharp_ext</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <TargetName>grpc_csharp_ext</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <SDLCheck>true</SDLCheck>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <SDLCheck>true</SDLCheck>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\src\csharp\ext\grpc_csharp_ext.c">
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="gpr.vcxproj">
+ <Project>{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}</Project>
+ </ProjectReference>
+ <ProjectReference Include="grpc.vcxproj">
+ <Project>{29D16885-7228-4C31-81ED-5F9187C7F2A9}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
+
diff --git a/vsprojects/vs2010/grpc_test_util.vcxproj b/vsprojects/vs2010/grpc_test_util.vcxproj
new file mode 100644
index 0000000..967543f
--- /dev/null
+++ b/vsprojects/vs2010/grpc_test_util.vcxproj
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}</ProjectGuid>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ <IntDir>$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ <IntDir>$(Configuration)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="global.props" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="global.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <TargetName>grpc_test_util</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <TargetName>grpc_test_util</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <SDLCheck>true</SDLCheck>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <SDLCheck>true</SDLCheck>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\test\core\end2end\cq_verifier.c">
+ </ClCompile>
+ <ClCompile Include="..\..\test\core\end2end\data\server1_cert.c">
+ </ClCompile>
+ <ClCompile Include="..\..\test\core\end2end\data\server1_key.c">
+ </ClCompile>
+ <ClCompile Include="..\..\test\core\end2end\data\test_root_cert.c">
+ </ClCompile>
+ <ClCompile Include="..\..\test\core\iomgr\endpoint_tests.c">
+ </ClCompile>
+ <ClCompile Include="..\..\test\core\statistics\census_log_tests.c">
+ </ClCompile>
+ <ClCompile Include="..\..\test\core\transport\transport_end2end_tests.c">
+ </ClCompile>
+ <ClCompile Include="..\..\test\core\util\grpc_profiler.c">
+ </ClCompile>
+ <ClCompile Include="..\..\test\core\util\parse_hexstring.c">
+ </ClCompile>
+ <ClCompile Include="..\..\test\core\util\port_posix.c">
+ </ClCompile>
+ <ClCompile Include="..\..\test\core\util\slice_splitter.c">
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="gpr.vcxproj">
+ <Project>{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}</Project>
+ </ProjectReference>
+ <ProjectReference Include="gpr_test_util.vcxproj">
+ <Project>{EAB0A629-17A9-44DB-B5FF-E91A721FE037}</Project>
+ </ProjectReference>
+ <ProjectReference Include="grpc.vcxproj">
+ <Project>{29D16885-7228-4C31-81ED-5F9187C7F2A9}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
diff --git a/vsprojects/vs2013/grpc_shared.vcxproj b/vsprojects/vs2010/grpc_unsecure.vcxproj
similarity index 82%
copy from vsprojects/vs2013/grpc_shared.vcxproj
copy to vsprojects/vs2010/grpc_unsecure.vcxproj
index b673cc7..1558d72 100644
--- a/vsprojects/vs2013/grpc_shared.vcxproj
+++ b/vsprojects/vs2010/grpc_unsecure.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -11,20 +11,18 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
- <ProjectGuid>{F2EE8FDB-F1E0-43A0-A297-6F255BB52AAA}</ProjectGuid>
+ <ProjectGuid>{46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v120</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<IntDir>$(Configuration)\$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
- <PlatformToolset>v120</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<IntDir>$(Configuration)\$(ProjectName)\</IntDir>
@@ -35,21 +33,17 @@
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="global.props" />
- <Import Project="ssl.props" />
- <Import Project="winsock.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="global.props" />
- <Import Project="ssl.props" />
- <Import Project="winsock.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <TargetName>grpc</TargetName>
+ <TargetName>grpc_unsecure</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <TargetName>grpc</TargetName>
+ <TargetName>grpc_unsecure</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
@@ -82,7 +76,6 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
- <ClInclude Include="..\..\include\grpc\grpc_security.h" />
<ClInclude Include="..\..\include\grpc\byte_buffer.h" />
<ClInclude Include="..\..\include\grpc\byte_buffer_reader.h" />
<ClInclude Include="..\..\include\grpc\grpc.h" />
@@ -90,21 +83,6 @@
<ClInclude Include="..\..\include\grpc\status.h" />
</ItemGroup>
<ItemGroup>
- <ClInclude Include="..\..\src\core\httpcli\format_request.h" />
- <ClInclude Include="..\..\src\core\httpcli\httpcli.h" />
- <ClInclude Include="..\..\src\core\httpcli\httpcli_security_context.h" />
- <ClInclude Include="..\..\src\core\httpcli\parser.h" />
- <ClInclude Include="..\..\src\core\security\auth.h" />
- <ClInclude Include="..\..\src\core\security\base64.h" />
- <ClInclude Include="..\..\src\core\security\credentials.h" />
- <ClInclude Include="..\..\src\core\security\json_token.h" />
- <ClInclude Include="..\..\src\core\security\secure_endpoint.h" />
- <ClInclude Include="..\..\src\core\security\secure_transport_setup.h" />
- <ClInclude Include="..\..\src\core\security\security_context.h" />
- <ClInclude Include="..\..\src\core\tsi\fake_transport_security.h" />
- <ClInclude Include="..\..\src\core\tsi\ssl_transport_security.h" />
- <ClInclude Include="..\..\src\core\tsi\transport_security.h" />
- <ClInclude Include="..\..\src\core\tsi\transport_security_interface.h" />
<ClInclude Include="..\..\src\core\channel\census_filter.h" />
<ClInclude Include="..\..\src\core\channel\channel_args.h" />
<ClInclude Include="..\..\src\core\channel\channel_stack.h" />
@@ -194,47 +172,7 @@
<ClInclude Include="..\..\src\core\transport\transport_impl.h" />
</ItemGroup>
<ItemGroup>
- <ClCompile Include="..\..\src\core\httpcli\format_request.c">
- </ClCompile>
- <ClCompile Include="..\..\src\core\httpcli\httpcli.c">
- </ClCompile>
- <ClCompile Include="..\..\src\core\httpcli\httpcli_security_context.c">
- </ClCompile>
- <ClCompile Include="..\..\src\core\httpcli\parser.c">
- </ClCompile>
- <ClCompile Include="..\..\src\core\security\auth.c">
- </ClCompile>
- <ClCompile Include="..\..\src\core\security\base64.c">
- </ClCompile>
- <ClCompile Include="..\..\src\core\security\credentials.c">
- </ClCompile>
- <ClCompile Include="..\..\src\core\security\credentials_posix.c">
- </ClCompile>
- <ClCompile Include="..\..\src\core\security\credentials_win32.c">
- </ClCompile>
- <ClCompile Include="..\..\src\core\security\factories.c">
- </ClCompile>
- <ClCompile Include="..\..\src\core\security\google_default_credentials.c">
- </ClCompile>
- <ClCompile Include="..\..\src\core\security\json_token.c">
- </ClCompile>
- <ClCompile Include="..\..\src\core\security\secure_endpoint.c">
- </ClCompile>
- <ClCompile Include="..\..\src\core\security\secure_transport_setup.c">
- </ClCompile>
- <ClCompile Include="..\..\src\core\security\security_context.c">
- </ClCompile>
- <ClCompile Include="..\..\src\core\security\server_secure_chttp2.c">
- </ClCompile>
- <ClCompile Include="..\..\src\core\surface\init_secure.c">
- </ClCompile>
- <ClCompile Include="..\..\src\core\surface\secure_channel_create.c">
- </ClCompile>
- <ClCompile Include="..\..\src\core\tsi\fake_transport_security.c">
- </ClCompile>
- <ClCompile Include="..\..\src\core\tsi\ssl_transport_security.c">
- </ClCompile>
- <ClCompile Include="..\..\src\core\tsi\transport_security.c">
+ <ClCompile Include="..\..\src\core\surface\init_unsecure.c">
</ClCompile>
<ClCompile Include="..\..\src\core\channel\call_op_string.c">
</ClCompile>
@@ -433,12 +371,8 @@
<ProjectReference Include="gpr.vcxproj">
<Project>{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}</Project>
</ProjectReference>
- <ProjectReference Include="third_party\zlibvc.vcxproj">
- <Project>{8fd826f8-3739-44e6-8cc8-997122e53b8d}</Project>
- </ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
-
diff --git a/vsprojects/vs2010/grpc_unsecure.vcxproj.filters b/vsprojects/vs2010/grpc_unsecure.vcxproj.filters
new file mode 100644
index 0000000..4b758d6
--- /dev/null
+++ b/vsprojects/vs2010/grpc_unsecure.vcxproj.filters
@@ -0,0 +1,619 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <ClCompile Include="..\..\src\core\surface\init_unsecure.c">
+ <Filter>src\core\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\channel\call_op_string.c">
+ <Filter>src\core\channel</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\channel\census_filter.c">
+ <Filter>src\core\channel</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\channel\channel_args.c">
+ <Filter>src\core\channel</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\channel\channel_stack.c">
+ <Filter>src\core\channel</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\channel\child_channel.c">
+ <Filter>src\core\channel</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\channel\client_channel.c">
+ <Filter>src\core\channel</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\channel\client_setup.c">
+ <Filter>src\core\channel</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\channel\connected_channel.c">
+ <Filter>src\core\channel</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\channel\http_client_filter.c">
+ <Filter>src\core\channel</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\channel\http_filter.c">
+ <Filter>src\core\channel</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\channel\http_server_filter.c">
+ <Filter>src\core\channel</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\channel\metadata_buffer.c">
+ <Filter>src\core\channel</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\channel\noop_filter.c">
+ <Filter>src\core\channel</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\compression\algorithm.c">
+ <Filter>src\core\compression</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\compression\message_compress.c">
+ <Filter>src\core\compression</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\debug\trace.c">
+ <Filter>src\core\debug</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\iomgr\alarm.c">
+ <Filter>src\core\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\iomgr\alarm_heap.c">
+ <Filter>src\core\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\iomgr\endpoint.c">
+ <Filter>src\core\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\iomgr\endpoint_pair_posix.c">
+ <Filter>src\core\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\iomgr\fd_posix.c">
+ <Filter>src\core\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\iomgr\iocp_windows.c">
+ <Filter>src\core\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\iomgr\iomgr.c">
+ <Filter>src\core\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\iomgr\iomgr_posix.c">
+ <Filter>src\core\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\iomgr\iomgr_windows.c">
+ <Filter>src\core\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\iomgr\pollset_kick.c">
+ <Filter>src\core\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\iomgr\pollset_multipoller_with_epoll.c">
+ <Filter>src\core\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\iomgr\pollset_multipoller_with_poll_posix.c">
+ <Filter>src\core\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\iomgr\pollset_posix.c">
+ <Filter>src\core\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\iomgr\pollset_windows.c">
+ <Filter>src\core\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\iomgr\resolve_address_posix.c">
+ <Filter>src\core\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\iomgr\resolve_address_windows.c">
+ <Filter>src\core\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\iomgr\sockaddr_utils.c">
+ <Filter>src\core\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\iomgr\socket_utils_common_posix.c">
+ <Filter>src\core\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\iomgr\socket_utils_linux.c">
+ <Filter>src\core\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\iomgr\socket_utils_posix.c">
+ <Filter>src\core\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\iomgr\socket_windows.c">
+ <Filter>src\core\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\iomgr\tcp_client_posix.c">
+ <Filter>src\core\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\iomgr\tcp_client_windows.c">
+ <Filter>src\core\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\iomgr\tcp_posix.c">
+ <Filter>src\core\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\iomgr\tcp_server_posix.c">
+ <Filter>src\core\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\iomgr\tcp_server_windows.c">
+ <Filter>src\core\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\iomgr\tcp_windows.c">
+ <Filter>src\core\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\iomgr\time_averaged_stats.c">
+ <Filter>src\core\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\iomgr\wakeup_fd_eventfd.c">
+ <Filter>src\core\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\iomgr\wakeup_fd_nospecial.c">
+ <Filter>src\core\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\iomgr\wakeup_fd_pipe.c">
+ <Filter>src\core\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\iomgr\wakeup_fd_posix.c">
+ <Filter>src\core\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\json\json.c">
+ <Filter>src\core\json</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\json\json_reader.c">
+ <Filter>src\core\json</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\json\json_string.c">
+ <Filter>src\core\json</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\json\json_writer.c">
+ <Filter>src\core\json</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\statistics\census_init.c">
+ <Filter>src\core\statistics</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\statistics\census_log.c">
+ <Filter>src\core\statistics</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\statistics\census_rpc_stats.c">
+ <Filter>src\core\statistics</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\statistics\census_tracing.c">
+ <Filter>src\core\statistics</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\statistics\hash_table.c">
+ <Filter>src\core\statistics</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\statistics\window_stats.c">
+ <Filter>src\core\statistics</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\surface\byte_buffer.c">
+ <Filter>src\core\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\surface\byte_buffer_queue.c">
+ <Filter>src\core\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\surface\byte_buffer_reader.c">
+ <Filter>src\core\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\surface\call.c">
+ <Filter>src\core\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\surface\call_details.c">
+ <Filter>src\core\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\surface\call_log_batch.c">
+ <Filter>src\core\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\surface\channel.c">
+ <Filter>src\core\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\surface\channel_create.c">
+ <Filter>src\core\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\surface\client.c">
+ <Filter>src\core\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\surface\completion_queue.c">
+ <Filter>src\core\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\surface\event_string.c">
+ <Filter>src\core\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\surface\init.c">
+ <Filter>src\core\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\surface\lame_client.c">
+ <Filter>src\core\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\surface\metadata_array.c">
+ <Filter>src\core\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\surface\server.c">
+ <Filter>src\core\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\surface\server_chttp2.c">
+ <Filter>src\core\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\surface\server_create.c">
+ <Filter>src\core\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\surface\surface_trace.c">
+ <Filter>src\core\surface</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\transport\chttp2\alpn.c">
+ <Filter>src\core\transport\chttp2</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\transport\chttp2\bin_encoder.c">
+ <Filter>src\core\transport\chttp2</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\transport\chttp2\frame_data.c">
+ <Filter>src\core\transport\chttp2</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\transport\chttp2\frame_goaway.c">
+ <Filter>src\core\transport\chttp2</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\transport\chttp2\frame_ping.c">
+ <Filter>src\core\transport\chttp2</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\transport\chttp2\frame_rst_stream.c">
+ <Filter>src\core\transport\chttp2</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\transport\chttp2\frame_settings.c">
+ <Filter>src\core\transport\chttp2</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\transport\chttp2\frame_window_update.c">
+ <Filter>src\core\transport\chttp2</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\transport\chttp2\hpack_parser.c">
+ <Filter>src\core\transport\chttp2</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\transport\chttp2\hpack_table.c">
+ <Filter>src\core\transport\chttp2</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\transport\chttp2\huffsyms.c">
+ <Filter>src\core\transport\chttp2</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\transport\chttp2\status_conversion.c">
+ <Filter>src\core\transport\chttp2</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\transport\chttp2\stream_encoder.c">
+ <Filter>src\core\transport\chttp2</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\transport\chttp2\stream_map.c">
+ <Filter>src\core\transport\chttp2</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\transport\chttp2\timeout_encoding.c">
+ <Filter>src\core\transport\chttp2</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\transport\chttp2\varint.c">
+ <Filter>src\core\transport\chttp2</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\transport\chttp2_transport.c">
+ <Filter>src\core\transport</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\transport\metadata.c">
+ <Filter>src\core\transport</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\transport\stream_op.c">
+ <Filter>src\core\transport</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\transport\transport.c">
+ <Filter>src\core\transport</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\include\grpc\byte_buffer.h">
+ <Filter>include\grpc</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\grpc\byte_buffer_reader.h">
+ <Filter>include\grpc</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\grpc\grpc.h">
+ <Filter>include\grpc</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\grpc\grpc_http.h">
+ <Filter>include\grpc</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\include\grpc\status.h">
+ <Filter>include\grpc</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\src\core\channel\census_filter.h">
+ <Filter>src\core\channel</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\channel\channel_args.h">
+ <Filter>src\core\channel</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\channel\channel_stack.h">
+ <Filter>src\core\channel</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\channel\child_channel.h">
+ <Filter>src\core\channel</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\channel\client_channel.h">
+ <Filter>src\core\channel</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\channel\client_setup.h">
+ <Filter>src\core\channel</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\channel\connected_channel.h">
+ <Filter>src\core\channel</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\channel\http_client_filter.h">
+ <Filter>src\core\channel</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\channel\http_filter.h">
+ <Filter>src\core\channel</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\channel\http_server_filter.h">
+ <Filter>src\core\channel</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\channel\metadata_buffer.h">
+ <Filter>src\core\channel</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\channel\noop_filter.h">
+ <Filter>src\core\channel</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\compression\algorithm.h">
+ <Filter>src\core\compression</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\compression\message_compress.h">
+ <Filter>src\core\compression</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\debug\trace.h">
+ <Filter>src\core\debug</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\iomgr\alarm.h">
+ <Filter>src\core\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\iomgr\alarm_heap.h">
+ <Filter>src\core\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\iomgr\alarm_internal.h">
+ <Filter>src\core\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\iomgr\endpoint.h">
+ <Filter>src\core\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\iomgr\endpoint_pair.h">
+ <Filter>src\core\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\iomgr\fd_posix.h">
+ <Filter>src\core\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\iomgr\iocp_windows.h">
+ <Filter>src\core\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\iomgr\iomgr.h">
+ <Filter>src\core\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\iomgr\iomgr_internal.h">
+ <Filter>src\core\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\iomgr\iomgr_posix.h">
+ <Filter>src\core\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\iomgr\pollset.h">
+ <Filter>src\core\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\iomgr\pollset_kick.h">
+ <Filter>src\core\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\iomgr\pollset_kick_posix.h">
+ <Filter>src\core\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\iomgr\pollset_kick_windows.h">
+ <Filter>src\core\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\iomgr\pollset_posix.h">
+ <Filter>src\core\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\iomgr\pollset_windows.h">
+ <Filter>src\core\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\iomgr\resolve_address.h">
+ <Filter>src\core\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\iomgr\sockaddr.h">
+ <Filter>src\core\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\iomgr\sockaddr_posix.h">
+ <Filter>src\core\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\iomgr\sockaddr_utils.h">
+ <Filter>src\core\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\iomgr\sockaddr_win32.h">
+ <Filter>src\core\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\iomgr\socket_utils_posix.h">
+ <Filter>src\core\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\iomgr\socket_windows.h">
+ <Filter>src\core\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\iomgr\tcp_client.h">
+ <Filter>src\core\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\iomgr\tcp_posix.h">
+ <Filter>src\core\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\iomgr\tcp_server.h">
+ <Filter>src\core\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\iomgr\tcp_windows.h">
+ <Filter>src\core\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\iomgr\time_averaged_stats.h">
+ <Filter>src\core\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\iomgr\wakeup_fd_pipe.h">
+ <Filter>src\core\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\iomgr\wakeup_fd_posix.h">
+ <Filter>src\core\iomgr</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\json\json.h">
+ <Filter>src\core\json</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\json\json_common.h">
+ <Filter>src\core\json</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\json\json_reader.h">
+ <Filter>src\core\json</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\json\json_writer.h">
+ <Filter>src\core\json</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\statistics\census_interface.h">
+ <Filter>src\core\statistics</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\statistics\census_log.h">
+ <Filter>src\core\statistics</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\statistics\census_rpc_stats.h">
+ <Filter>src\core\statistics</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\statistics\census_tracing.h">
+ <Filter>src\core\statistics</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\statistics\hash_table.h">
+ <Filter>src\core\statistics</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\statistics\window_stats.h">
+ <Filter>src\core\statistics</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\surface\byte_buffer_queue.h">
+ <Filter>src\core\surface</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\surface\call.h">
+ <Filter>src\core\surface</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\surface\channel.h">
+ <Filter>src\core\surface</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\surface\client.h">
+ <Filter>src\core\surface</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\surface\completion_queue.h">
+ <Filter>src\core\surface</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\surface\event_string.h">
+ <Filter>src\core\surface</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\surface\init.h">
+ <Filter>src\core\surface</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\surface\server.h">
+ <Filter>src\core\surface</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\surface\surface_trace.h">
+ <Filter>src\core\surface</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\transport\chttp2\alpn.h">
+ <Filter>src\core\transport\chttp2</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\transport\chttp2\bin_encoder.h">
+ <Filter>src\core\transport\chttp2</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\transport\chttp2\frame.h">
+ <Filter>src\core\transport\chttp2</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\transport\chttp2\frame_data.h">
+ <Filter>src\core\transport\chttp2</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\transport\chttp2\frame_goaway.h">
+ <Filter>src\core\transport\chttp2</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\transport\chttp2\frame_ping.h">
+ <Filter>src\core\transport\chttp2</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\transport\chttp2\frame_rst_stream.h">
+ <Filter>src\core\transport\chttp2</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\transport\chttp2\frame_settings.h">
+ <Filter>src\core\transport\chttp2</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\transport\chttp2\frame_window_update.h">
+ <Filter>src\core\transport\chttp2</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\transport\chttp2\hpack_parser.h">
+ <Filter>src\core\transport\chttp2</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\transport\chttp2\hpack_table.h">
+ <Filter>src\core\transport\chttp2</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\transport\chttp2\http2_errors.h">
+ <Filter>src\core\transport\chttp2</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\transport\chttp2\huffsyms.h">
+ <Filter>src\core\transport\chttp2</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\transport\chttp2\status_conversion.h">
+ <Filter>src\core\transport\chttp2</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\transport\chttp2\stream_encoder.h">
+ <Filter>src\core\transport\chttp2</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\transport\chttp2\stream_map.h">
+ <Filter>src\core\transport\chttp2</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\transport\chttp2\timeout_encoding.h">
+ <Filter>src\core\transport\chttp2</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\transport\chttp2\varint.h">
+ <Filter>src\core\transport\chttp2</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\transport\chttp2_transport.h">
+ <Filter>src\core\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\transport\metadata.h">
+ <Filter>src\core\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\transport\stream_op.h">
+ <Filter>src\core\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\transport\transport.h">
+ <Filter>src\core\transport</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\transport\transport_impl.h">
+ <Filter>src\core\transport</Filter>
+ </ClInclude>
+ </ItemGroup>
+
+ <ItemGroup>
+ <Filter Include="include">
+ <UniqueIdentifier>{10076c7e-7c8e-8005-0c81-64454af2cbc8}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="include\grpc">
+ <UniqueIdentifier>{77b9717b-b8d8-dd5f-14bb-a3e96809a70a}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src">
+ <UniqueIdentifier>{aaf326a1-c884-46ea-875a-cbbd9983e539}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core">
+ <UniqueIdentifier>{88491077-386b-2039-d14c-0c40136b5f7a}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\channel">
+ <UniqueIdentifier>{cc102c4b-66ff-cf4c-2288-d76327e1a183}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\compression">
+ <UniqueIdentifier>{2e3aca1d-223d-10a1-b282-7f9fc68ee6f5}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\debug">
+ <UniqueIdentifier>{6d8d5774-7291-554d-fafa-583463cd3fd9}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\iomgr">
+ <UniqueIdentifier>{a9df8b24-ecea-ff6d-8999-d8fa54cd70bf}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\json">
+ <UniqueIdentifier>{443ffc61-1bea-2477-6e54-1ddf8c139264}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\statistics">
+ <UniqueIdentifier>{e084164c-a069-00e3-db35-4e0b1cd6f0b7}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\surface">
+ <UniqueIdentifier>{6cd0127e-c24b-d43c-38f5-198db8d4322a}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\transport">
+ <UniqueIdentifier>{6687ff98-e36e-c0b1-2756-1bc79edec406}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="src\core\transport\chttp2">
+ <UniqueIdentifier>{5fcd6206-f774-9ae6-4b85-305d6a723843}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+</Project>
+
diff --git a/vsprojects/vs2010/ssl.props b/vsprojects/vs2010/ssl.props
new file mode 100644
index 0000000..283bd17
--- /dev/null
+++ b/vsprojects/vs2010/ssl.props
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets" />
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup />
+ <ItemDefinitionGroup>
+ <Link>
+ <AdditionalLibraryDirectories>..\..\third_party\openssl\out32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>ssleay32.lib;libeay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup />
+</Project>
\ No newline at end of file
diff --git a/vsprojects/vs2010/third_party/zlibvc.vcxproj b/vsprojects/vs2010/third_party/zlibvc.vcxproj
new file mode 100644
index 0000000..749e3fc
--- /dev/null
+++ b/vsprojects/vs2010/third_party/zlibvc.vcxproj
@@ -0,0 +1,188 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{8FD826F8-3739-44E6-8CC8-997122E53B8D}</ProjectGuid>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">zlibwapi</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">zlibwapi</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\third_party\zlib;..\..\..\third_party\zlib\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalOptions>/MACHINE:I386 /SAFESEH:NO %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>..\..\..\third_party\zlib\contrib\masmx86\match686.obj;..\..\..\third_party\zlib\contrib\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+ </Link>
+ <PreBuildEvent>
+ <Command>cd ..\..\..\third_party\zlib\contrib\masmx86
+ bld_ml32.bat</Command>
+ </PreBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\third_party\zlib;..\..\..\third_party\zlib\contrib\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerOutput>All</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>..\..\..\third_party\zlib\contrib\masmx86\match686.obj;..\..\..\third_party\zlib\contrib\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+ </Link>
+ <PreBuildEvent>
+ <Command>cd ..\..\..\third_party\zlib\contrib\masmx86
+ bld_ml32.bat</Command>
+ </PreBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\third_party\zlib\adler32.c" />
+ <ClCompile Include="..\..\..\third_party\zlib\compress.c" />
+ <ClCompile Include="..\..\..\third_party\zlib\crc32.c" />
+ <ClCompile Include="..\..\..\third_party\zlib\deflate.c" />
+ <ClCompile Include="..\..\..\third_party\zlib\gzclose.c" />
+ <ClCompile Include="..\..\..\third_party\zlib\gzlib.c" />
+ <ClCompile Include="..\..\..\third_party\zlib\gzread.c" />
+ <ClCompile Include="..\..\..\third_party\zlib\gzwrite.c" />
+ <ClCompile Include="..\..\..\third_party\zlib\infback.c" />
+ <ClCompile Include="..\..\..\third_party\zlib\inffast.c" />
+ <ClCompile Include="..\..\..\third_party\zlib\inflate.c" />
+ <ClCompile Include="..\..\..\third_party\zlib\inftrees.c" />
+ <ClCompile Include="..\..\..\third_party\zlib\contrib\minizip\ioapi.c" />
+ <ClCompile Include="..\..\..\third_party\zlib\contrib\minizip\iowin32.c" />
+ <ClCompile Include="..\..\..\third_party\zlib\trees.c" />
+ <ClCompile Include="..\..\..\third_party\zlib\uncompr.c" />
+ <ClCompile Include="..\..\..\third_party\zlib\contrib\minizip\unzip.c">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="..\..\..\third_party\zlib\contrib\minizip\zip.c">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="..\..\..\third_party\zlib\zutil.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\third_party\zlib\deflate.h" />
+ <ClInclude Include="..\..\..\third_party\zlib\infblock.h" />
+ <ClInclude Include="..\..\..\third_party\zlib\infcodes.h" />
+ <ClInclude Include="..\..\..\third_party\zlib\inffast.h" />
+ <ClInclude Include="..\..\..\third_party\zlib\inftrees.h" />
+ <ClInclude Include="..\..\..\third_party\zlib\infutil.h" />
+ <ClInclude Include="..\..\..\third_party\zlib\zconf.h" />
+ <ClInclude Include="..\..\..\third_party\zlib\zlib.h" />
+ <ClInclude Include="..\..\..\third_party\zlib\zutil.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
diff --git a/vsprojects/vs2010/winsock.props b/vsprojects/vs2010/winsock.props
new file mode 100644
index 0000000..1e84104
--- /dev/null
+++ b/vsprojects/vs2010/winsock.props
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets" />
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup />
+ <ItemDefinitionGroup>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup />
+</Project>
\ No newline at end of file
diff --git a/vsprojects/vs2013/gpr.vcxproj b/vsprojects/vs2013/gpr.vcxproj
index 4b44cc6..e0fa68e 100644
--- a/vsprojects/vs2013/gpr.vcxproj
+++ b/vsprojects/vs2013/gpr.vcxproj
@@ -168,6 +168,8 @@
</ClCompile>
<ClCompile Include="..\..\src\core\support\sync_win32.c">
</ClCompile>
+ <ClCompile Include="..\..\src\core\support\thd.c">
+ </ClCompile>
<ClCompile Include="..\..\src\core\support\thd_posix.c">
</ClCompile>
<ClCompile Include="..\..\src\core\support\thd_win32.c">
diff --git a/vsprojects/vs2013/gpr.vcxproj.filters b/vsprojects/vs2013/gpr.vcxproj.filters
index dffaf1e..1f87944 100644
--- a/vsprojects/vs2013/gpr.vcxproj.filters
+++ b/vsprojects/vs2013/gpr.vcxproj.filters
@@ -88,6 +88,9 @@
<ClCompile Include="..\..\src\core\support\sync_win32.c">
<Filter>src\core\support</Filter>
</ClCompile>
+ <ClCompile Include="..\..\src\core\support\thd.c">
+ <Filter>src\core\support</Filter>
+ </ClCompile>
<ClCompile Include="..\..\src\core\support\thd_posix.c">
<Filter>src\core\support</Filter>
</ClCompile>
diff --git a/vsprojects/vs2013/gpr_test_util.vcxproj b/vsprojects/vs2013/gpr_test_util.vcxproj
index 04caa7e..e0608b3 100644
--- a/vsprojects/vs2013/gpr_test_util.vcxproj
+++ b/vsprojects/vs2013/gpr_test_util.vcxproj
@@ -78,6 +78,9 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClInclude Include="..\..\test\core\util\test_config.h" />
+ </ItemGroup>
+ <ItemGroup>
<ClCompile Include="..\..\test\core\util\test_config.c">
</ClCompile>
</ItemGroup>
diff --git a/vsprojects/vs2013/grpc.sln b/vsprojects/vs2013/grpc.sln
index a3915b3..dfefddf 100644
--- a/vsprojects/vs2013/grpc.sln
+++ b/vsprojects/vs2013/grpc.sln
@@ -18,6 +18,7 @@
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_test_util", "grpc_test_util.vcxproj", "{17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}"
ProjectSection(ProjectDependencies) = postProject
{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}
+ {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037}
{29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9}
EndProjectSection
EndProject
@@ -38,10 +39,6 @@
{29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gpr_shared", "gpr_shared.vcxproj", "{3D304D6B-AAF8-428B-AC7D-A698DDDE93C0}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_shared", "grpc_shared.vcxproj", "{F2EE8FDB-F1E0-43A0-A297-6F255BB52AAA}"
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_csharp_ext_shared", "grpc_csharp_ext_shared.vcxproj", "{C26D04A8-37C6-44C7-B458-906C9FCE928C}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "third_party\zlibvc.vcxproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}"
diff --git a/vsprojects/vs2013/grpc_test_util.vcxproj b/vsprojects/vs2013/grpc_test_util.vcxproj
index 7269671..4756f53 100644
--- a/vsprojects/vs2013/grpc_test_util.vcxproj
+++ b/vsprojects/vs2013/grpc_test_util.vcxproj
@@ -105,6 +105,9 @@
<ProjectReference Include="gpr.vcxproj">
<Project>{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}</Project>
</ProjectReference>
+ <ProjectReference Include="gpr_test_util.vcxproj">
+ <Project>{EAB0A629-17A9-44DB-B5FF-E91A721FE037}</Project>
+ </ProjectReference>
<ProjectReference Include="grpc.vcxproj">
<Project>{29D16885-7228-4C31-81ED-5F9187C7F2A9}</Project>
</ProjectReference>