Merge branch 'master' of github.com:google/grpc into httpcli_test

Conflicts:
	Makefile
pull/660/head
Nicolas "Pixel" Noble 10 years ago
commit d8fb2af491
  1. 120
      Makefile
  2. 41
      build.json
  3. 9
      examples/pubsub/pubsub.proto
  4. 7
      include/grpc/grpc_security.h
  5. 2
      src/compiler/python_plugin.cc
  6. 5
      src/compiler/ruby_generator_map-inl.h
  7. 14
      src/core/channel/channel_stack.h
  8. 110
      src/core/debug/trace.c
  9. 30
      src/core/debug/trace.h
  10. 12
      src/core/httpcli/httpcli.c
  11. 87
      src/core/iomgr/fd_posix.c
  12. 14
      src/core/iomgr/fd_posix.h
  13. 7
      src/core/iomgr/tcp_client_posix.c
  14. 54
      src/core/iomgr/tcp_posix.c
  15. 7
      src/core/iomgr/tcp_server_posix.c
  16. 11277
      src/core/security/google_root_certs.c
  17. 35
      src/core/security/secure_endpoint.c
  18. 16
      src/core/security/security_context.c
  19. 2
      src/core/security/security_context.h
  20. 40
      src/core/security/ssl_roots.h
  21. 9
      src/core/surface/call.c
  22. 4
      src/core/surface/init.c
  23. 13
      src/core/surface/surface_trace.h
  24. 2
      src/core/transport/chttp2/frame_data.c
  25. 2
      src/core/transport/chttp2_transport.c
  26. 2
      src/core/tsi/ssl_transport_security.c
  27. 1
      src/csharp/EXPERIMENTAL-ONLY
  28. 0
      src/csharp/Grpc.Core.Tests/.gitignore
  29. 0
      src/csharp/Grpc.Core.Tests/ClientServerTest.cs
  30. 8
      src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.csproj
  31. 0
      src/csharp/Grpc.Core.Tests/GrpcEnvironmentTest.cs
  32. 4
      src/csharp/Grpc.Core.Tests/Properties/AssemblyInfo.cs
  33. 0
      src/csharp/Grpc.Core.Tests/ServerTest.cs
  34. 0
      src/csharp/Grpc.Core.Tests/TestResult.xml
  35. 0
      src/csharp/Grpc.Core.Tests/TimespecTest.cs
  36. 0
      src/csharp/Grpc.Core.Tests/packages.config
  37. 0
      src/csharp/Grpc.Core/.gitignore
  38. 0
      src/csharp/Grpc.Core/Call.cs
  39. 0
      src/csharp/Grpc.Core/Calls.cs
  40. 0
      src/csharp/Grpc.Core/Channel.cs
  41. 0
      src/csharp/Grpc.Core/ClientStreamingAsyncResult.cs
  42. 4
      src/csharp/Grpc.Core/Grpc.Core.csproj
  43. 23
      src/csharp/Grpc.Core/Grpc.Core.nuspec
  44. 0
      src/csharp/Grpc.Core/GrpcEnvironment.cs
  45. 0
      src/csharp/Grpc.Core/Internal/AsyncCall.cs
  46. 0
      src/csharp/Grpc.Core/Internal/BatchContextSafeHandleNotOwned.cs
  47. 0
      src/csharp/Grpc.Core/Internal/CallSafeHandle.cs
  48. 0
      src/csharp/Grpc.Core/Internal/ChannelSafeHandle.cs
  49. 0
      src/csharp/Grpc.Core/Internal/ClientStreamingInputObserver.cs
  50. 0
      src/csharp/Grpc.Core/Internal/CompletionQueueSafeHandle.cs
  51. 0
      src/csharp/Grpc.Core/Internal/Enums.cs
  52. 0
      src/csharp/Grpc.Core/Internal/GrpcThreadPool.cs
  53. 0
      src/csharp/Grpc.Core/Internal/SafeHandleZeroIsInvalid.cs
  54. 0
      src/csharp/Grpc.Core/Internal/ServerSafeHandle.cs
  55. 0
      src/csharp/Grpc.Core/Internal/ServerStreamingOutputObserver.cs
  56. 0
      src/csharp/Grpc.Core/Internal/Timespec.cs
  57. 0
      src/csharp/Grpc.Core/Marshaller.cs
  58. 0
      src/csharp/Grpc.Core/Method.cs
  59. 6
      src/csharp/Grpc.Core/Properties/AssemblyInfo.cs
  60. 0
      src/csharp/Grpc.Core/RpcException.cs
  61. 0
      src/csharp/Grpc.Core/Server.cs
  62. 0
      src/csharp/Grpc.Core/ServerCallHandler.cs
  63. 0
      src/csharp/Grpc.Core/ServerCalls.cs
  64. 0
      src/csharp/Grpc.Core/ServerServiceDefinition.cs
  65. 0
      src/csharp/Grpc.Core/Status.cs
  66. 0
      src/csharp/Grpc.Core/StatusCode.cs
  67. 0
      src/csharp/Grpc.Core/Utils/RecordingObserver.cs
  68. 0
      src/csharp/Grpc.Core/Utils/RecordingQueue.cs
  69. 0
      src/csharp/Grpc.Examples.MathClient/.gitignore
  70. 18
      src/csharp/Grpc.Examples.MathClient/Grpc.Examples.MathClient.csproj
  71. 0
      src/csharp/Grpc.Examples.MathClient/MathClient.cs
  72. 4
      src/csharp/Grpc.Examples.MathClient/Properties/AssemblyInfo.cs
  73. 0
      src/csharp/Grpc.Examples.Tests/.gitignore
  74. 25
      src/csharp/Grpc.Examples.Tests/Grpc.Examples.Tests.csproj
  75. 0
      src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs
  76. 4
      src/csharp/Grpc.Examples.Tests/Properties/AssemblyInfo.cs
  77. 0
      src/csharp/Grpc.Examples.Tests/packages.config
  78. 0
      src/csharp/Grpc.Examples/.gitignore
  79. 21
      src/csharp/Grpc.Examples/Grpc.Examples.csproj
  80. 0
      src/csharp/Grpc.Examples/Math.cs
  81. 0
      src/csharp/Grpc.Examples/MathExamples.cs
  82. 0
      src/csharp/Grpc.Examples/MathGrpc.cs
  83. 0
      src/csharp/Grpc.Examples/MathServiceImpl.cs
  84. 4
      src/csharp/Grpc.Examples/Properties/AssemblyInfo.cs
  85. 0
      src/csharp/Grpc.Examples/packages.config
  86. 0
      src/csharp/Grpc.Examples/proto/math.proto
  87. 0
      src/csharp/Grpc.IntegrationTesting/.gitignore
  88. 2
      src/csharp/Grpc.IntegrationTesting/Client.cs
  89. 0
      src/csharp/Grpc.IntegrationTesting/Empty.cs
  90. 25
      src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.csproj
  91. 0
      src/csharp/Grpc.IntegrationTesting/Messages.cs
  92. 4
      src/csharp/Grpc.IntegrationTesting/Properties/AssemblyInfo.cs
  93. 1
      src/csharp/Grpc.IntegrationTesting/TestServiceGrpc.cs
  94. 0
      src/csharp/Grpc.IntegrationTesting/packages.config
  95. 0
      src/csharp/Grpc.IntegrationTesting/proto/empty.proto
  96. 0
      src/csharp/Grpc.IntegrationTesting/proto/messages.proto
  97. 0
      src/csharp/Grpc.IntegrationTesting/proto/test.proto
  98. 23
      src/csharp/Grpc.nuspec
  99. 14
      src/csharp/Grpc.sln
  100. 14
      src/csharp/README.md
  101. Some files were not shown because too many files have changed in this diff Show More

File diff suppressed because one or more lines are too long

@ -32,10 +32,7 @@
"src/core/channel/noop_filter.h",
"src/core/compression/algorithm.h",
"src/core/compression/message_compress.h",
"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/debug/trace.h",
"src/core/iomgr/alarm.h",
"src/core/iomgr/alarm_heap.h",
"src/core/iomgr/alarm_internal.h",
@ -124,10 +121,7 @@
"src/core/channel/noop_filter.c",
"src/core/compression/algorithm.c",
"src/core/compression/message_compress.c",
"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/debug/trace.c",
"src/core/iomgr/alarm.c",
"src/core/iomgr/alarm_heap.c",
"src/core/iomgr/endpoint.c",
@ -182,8 +176,6 @@
"src/core/surface/init.c",
"src/core/surface/lame_client.c",
"src/core/surface/metadata_array.c",
"src/core/surface/secure_channel_create.c",
"src/core/surface/secure_server_create.c",
"src/core/surface/server.c",
"src/core/surface/server_chttp2.c",
"src/core/surface/server_create.c",
@ -304,10 +296,13 @@
"include/grpc/grpc_security.h"
],
"headers": [
"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/google_root_certs.h",
"src/core/security/json_token.h",
"src/core/security/secure_transport_setup.h",
"src/core/security/security_context.h",
@ -317,16 +312,21 @@
"src/core/tsi/transport_security_interface.h"
],
"src": [
"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/factories.c",
"src/core/security/google_root_certs.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/secure_channel_create.c",
"src/core/surface/secure_server_create.c",
"src/core/tsi/fake_transport_security.c",
"src/core/tsi/ssl_transport_security.c",
"src/core/tsi/transport_security.c"
@ -347,7 +347,6 @@
"language": "c",
"src": [
"test/core/end2end/cq_verifier.c",
"test/core/end2end/data/prod_roots_certs.c",
"test/core/end2end/data/server1_cert.c",
"test/core/end2end/data/server1_key.c",
"test/core/end2end/data/test_root_cert.c",
@ -434,6 +433,7 @@
"src/cpp/util/time.cc"
],
"deps": [
"gpr",
"grpc"
],
"secure": true,
@ -1256,6 +1256,20 @@
"gpr"
]
},
{
"name": "interop_test",
"build": "test",
"language": "c",
"src": [
"test/cpp/interop/interop_test.c"
],
"deps": [
"grpc_test_util",
"grpc",
"gpr_test_util",
"gpr"
]
},
{
"name": "json_rewrite",
"build": "test",
@ -1272,7 +1286,6 @@
{
"name": "json_rewrite_test",
"build": "test",
"run": false,
"language": "c",
"src": [
"test/core/json/json_rewrite_test.c"

@ -157,9 +157,7 @@ package tech.pubsub;
//
// Consuming messages via push:
//
// TODO(eschapira): Add HTTP push example.
//
// The port 'machinename:8888' must be bound to a stubby server that implements
// The port 'machinename:8888' must be bound to a server that implements
// the PushEndpointService with the following method:
//
// int HandlePubsubEvent(PubsubEvent event) {
@ -252,8 +250,6 @@ service PublisherService {
// Adds a message to the topic. Returns NOT_FOUND if the topic does not
// exist.
// (-- For different error code values returned via Stubby, see
// util/task/codes.proto. --)
rpc Publish(PublishRequest) returns (proto2.Empty) {
}
@ -292,7 +288,6 @@ message PubsubMessage {
// Optional list of labels for this message. Keys in this collection must
// be unique.
//(-- TODO(eschapira): Define how key namespace may be scoped to the topic.--)
repeated tech.label.Label label = 2;
// ID of this message assigned by the server at publication time. Guaranteed
@ -467,7 +462,7 @@ message Subscription {
// If <code>query</code> is non-empty, only messages on the subscriber's
// topic whose labels match the query will be returned. Otherwise all
// messages on the topic will be returned.
// (-- The query syntax is described in tech/label/proto/label_query.proto --)
// (-- The query syntax is described in label_query.proto --)
optional string query = 3;
// The subscriber may specify requirements for truncating unacknowledged

@ -73,11 +73,8 @@ typedef struct {
/* Creates an SSL credentials object.
- pem_roots_cert is the NULL-terminated string containing the PEM encoding
of the server root certificates. If this parameter is NULL, the
implementation will first try to dereference the file pointed by the
GRPC_DEFAULT_SSL_ROOTS_FILE_PATH environment variable, and if that fails,
will try to dereference the GRPC_SSL_ROOTS_WELL_KNOWN_PATH defined in
ssl_roots.h (which value is patched during the grpc Install process).
of the server root certificates. If this parameter is NULL, the default
roots will be used.
- pem_key_cert_pair is a pointer on the object containing client's private
key and certificate chain. This parameter can be NULL if the client does
not have such a key/cert pair. */

@ -63,7 +63,7 @@ class PythonGrpcGenerator : public CodeGenerator {
// Get output file name.
string file_name;
static const int proto_suffix_length = 6; // length of ".proto"
if (file->name().size() > proto_suffix_length &&
if (file->name().size() > static_cast<size_t>(proto_suffix_length) &&
file->name().find_last_of(".proto") == file->name().size() - 1) {
file_name = file->name().substr(
0, file->name().size() - proto_suffix_length) + "_pb2.py";

@ -34,6 +34,7 @@
#ifndef NET_GRPC_COMPILER_RUBY_GENERATOR_MAP_INL_H_
#define NET_GRPC_COMPILER_RUBY_GENERATOR_MAP_INL_H_
#include <iostream>
#include <initializer_list>
#include <map>
#include <ostream> // NOLINT
@ -51,8 +52,8 @@ namespace grpc_ruby_generator {
inline std::map<std::string, std::string> ListToDict(
const initializer_list<std::string> &values) {
if (values.size() % 2 != 0) {
// MOE: insert std::cerr << "Not every 'key' has a value in `values`."
// << std::endl;
std::cerr << "Not every 'key' has a value in `values`."
<< std::endl;
}
std::map<std::string, std::string> value_map;
auto value_iter = values.begin();

@ -45,10 +45,9 @@
#include <grpc/grpc.h>
#include <grpc/support/log.h>
#include "src/core/debug/trace.h"
#include "src/core/transport/transport.h"
/* #define GRPC_CHANNEL_STACK_TRACE 1 */
typedef struct grpc_channel_element grpc_channel_element;
typedef struct grpc_call_element grpc_call_element;
@ -246,9 +245,7 @@ typedef struct {
/* A call stack tracks a set of related filters for one call, and guarantees
they live within a single malloc() allocation */
typedef struct {
size_t count;
} grpc_call_stack;
typedef struct { size_t count; } grpc_call_stack;
/* Get a channel element given a channel stack and its index */
grpc_channel_element *grpc_channel_stack_element(grpc_channel_stack *stack,
@ -301,12 +298,7 @@ void grpc_call_element_recv_metadata(grpc_call_element *cur_elem,
void grpc_call_element_send_cancel(grpc_call_element *cur_elem);
void grpc_call_element_send_finish(grpc_call_element *cur_elem);
#ifdef GRPC_CHANNEL_STACK_TRACE
#define GRPC_CALL_LOG_OP(sev, elem, op) grpc_call_log_op(sev, elem, op)
#else
#define GRPC_CALL_LOG_OP(sev, elem, op) \
do { \
} while (0)
#endif
if (grpc_trace_bits & GRPC_TRACE_CHANNEL) grpc_call_log_op(sev, elem, op)
#endif /* __GRPC_INTERNAL_CHANNEL_CHANNEL_STACK_H__ */

@ -0,0 +1,110 @@
/*
*
* 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 "src/core/debug/trace.h"
#include <string.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include "src/core/support/env.h"
#if GRPC_ENABLE_TRACING
gpr_uint32 grpc_trace_bits;
static void add(const char *beg, const char *end, char ***ss, size_t *ns) {
size_t n = *ns;
size_t np = n + 1;
char *s = gpr_malloc(end - beg + 1);
memcpy(s, beg, end - beg);
s[end-beg] = 0;
*ss = gpr_realloc(*ss, sizeof(char**) * np);
(*ss)[n] = s;
*ns = np;
}
static void split(const char *s, char ***ss, size_t *ns) {
const char *c = strchr(s, ',');
if (c == NULL) {
add(s, s + strlen(s), ss, ns);
} else {
add(s, c, ss, ns);
split(c+1, ss, ns);
}
}
static void parse(const char *s) {
char **strings = NULL;
size_t nstrings = 0;
size_t i;
split(s, &strings, &nstrings);
grpc_trace_bits = 0;
for (i = 0; i < nstrings; i++) {
const char *s = strings[i];
if (0 == strcmp(s, "surface")) {
grpc_trace_bits |= GRPC_TRACE_SURFACE;
} else if (0 == strcmp(s, "channel")) {
grpc_trace_bits |= GRPC_TRACE_CHANNEL;
} else if (0 == strcmp(s, "tcp")) {
grpc_trace_bits |= GRPC_TRACE_TCP;
} else if (0 == strcmp(s, "secure_endpoint")) {
grpc_trace_bits |= GRPC_TRACE_SECURE_ENDPOINT;
} else if (0 == strcmp(s, "all")) {
grpc_trace_bits = -1;
} else {
gpr_log(GPR_ERROR, "Unknown trace var: '%s'", s);
}
}
for (i = 0; i < nstrings; i++) {
gpr_free(strings[i]);
}
gpr_free(strings);
}
void grpc_init_trace_bits() {
char *e = gpr_getenv("GRPC_TRACE");
if (e == NULL) {
grpc_trace_bits = 0;
} else {
parse(e);
gpr_free(e);
}
}
#else
void grpc_init_trace_bits() {
}
#endif

@ -31,10 +31,30 @@
*
*/
#ifndef __GRPC_INTERNAL_SECURITY_GOOGLE_ROOT_CERTS_H__
#define __GRPC_INTERNAL_SECURITY_GOOGLE_ROOT_CERTS_H__
#ifndef GRPC_CORE_DEBUG_TRACE_H
#define GRPC_CORE_DEBUG_TRACE_H
extern unsigned char grpc_google_root_certs[];
extern unsigned int grpc_google_root_certs_size;
#include <grpc/support/port_platform.h>
/* set to zero to remove all debug trace code */
#ifndef GRPC_ENABLE_TRACING
# define GRPC_ENABLE_TRACING 1
#endif
typedef enum {
GRPC_TRACE_SURFACE = 1 << 0,
GRPC_TRACE_CHANNEL = 1 << 1,
GRPC_TRACE_TCP = 1 << 2,
GRPC_TRACE_SECURE_ENDPOINT = 1 << 3
} grpc_trace_bit_value;
#if GRPC_ENABLE_TRACING
extern gpr_uint32 grpc_trace_bits;
#else
# define grpc_trace_bits 0
#endif
void grpc_init_trace_bits();
#endif
#endif /* __GRPC_INTERNAL_SECURITY_GOOGLE_ROOT_CERTS_H__ */

@ -43,7 +43,6 @@
#include "src/core/httpcli/httpcli_security_context.h"
#include "src/core/httpcli/parser.h"
#include "src/core/security/security_context.h"
#include "src/core/security/google_root_certs.h"
#include "src/core/security/secure_transport_setup.h"
#include "src/core/support/string.h"
#include <grpc/support/alloc.h>
@ -182,9 +181,16 @@ static void on_connected(void *arg, grpc_endpoint *tcp) {
req->ep = tcp;
if (req->use_ssl) {
grpc_channel_security_context *ctx = NULL;
const unsigned char *pem_root_certs = NULL;
size_t pem_root_certs_size = grpc_get_default_ssl_roots(&pem_root_certs);
if (pem_root_certs == NULL || pem_root_certs_size == 0) {
gpr_log(GPR_ERROR, "Could not get default pem root certs.");
finish(req, 0);
return;
}
GPR_ASSERT(grpc_httpcli_ssl_channel_security_context_create(
grpc_google_root_certs, grpc_google_root_certs_size,
req->host, &ctx) == GRPC_SECURITY_OK);
pem_root_certs, pem_root_certs_size, req->host, &ctx) ==
GRPC_SECURITY_OK);
grpc_setup_secure_transport(&ctx->base, tcp, on_secure_transport_setup_done,
req);
grpc_security_context_unref(&ctx->base);

@ -45,7 +45,10 @@
#include <grpc/support/log.h>
#include <grpc/support/useful.h>
enum descriptor_state { NOT_READY, READY, WAITING };
enum descriptor_state {
NOT_READY = 0,
READY = 1
}; /* or a pointer to a closure to call */
/* We need to keep a freelist not because of any concerns of malloc performance
* but instead so that implementations with multiple threads in (for example)
@ -88,8 +91,8 @@ static grpc_fd *alloc_fd(int fd) {
gpr_mu_init(&r->watcher_mu);
}
gpr_atm_rel_store(&r->refst, 1);
gpr_atm_rel_store(&r->readst.state, NOT_READY);
gpr_atm_rel_store(&r->writest.state, NOT_READY);
gpr_atm_rel_store(&r->readst, NOT_READY);
gpr_atm_rel_store(&r->writest, NOT_READY);
gpr_atm_rel_store(&r->shutdown, 0);
r->fd = fd;
r->watcher_root.next = r->watcher_root.prev = &r->watcher_root;
@ -166,11 +169,6 @@ void grpc_fd_ref(grpc_fd *fd) { ref_by(fd, 2); }
void grpc_fd_unref(grpc_fd *fd) { unref_by(fd, 2); }
typedef struct {
grpc_iomgr_cb_func cb;
void *arg;
} callback;
static void make_callback(grpc_iomgr_cb_func cb, void *arg, int success,
int allow_synchronous_callback) {
if (allow_synchronous_callback) {
@ -180,18 +178,18 @@ static void make_callback(grpc_iomgr_cb_func cb, void *arg, int success,
}
}
static void make_callbacks(callback *callbacks, size_t n, int success,
static void make_callbacks(grpc_iomgr_closure *callbacks, size_t n, int success,
int allow_synchronous_callback) {
size_t i;
for (i = 0; i < n; i++) {
make_callback(callbacks[i].cb, callbacks[i].arg, success,
make_callback(callbacks[i].cb, callbacks[i].cb_arg, success,
allow_synchronous_callback);
}
}
static void notify_on(grpc_fd *fd, grpc_fd_state *st, grpc_iomgr_cb_func cb,
void *arg, int allow_synchronous_callback) {
switch ((enum descriptor_state)gpr_atm_acq_load(&st->state)) {
static void notify_on(grpc_fd *fd, gpr_atm *st, grpc_iomgr_closure *closure,
int allow_synchronous_callback) {
switch (gpr_atm_acq_load(st)) {
case NOT_READY:
/* There is no race if the descriptor is already ready, so we skip
the interlocked op in that case. As long as the app doesn't
@ -199,9 +197,7 @@ static void notify_on(grpc_fd *fd, grpc_fd_state *st, grpc_iomgr_cb_func cb,
oldval should never be anything other than READY or NOT_READY. We
don't
check for user error on the fast path. */
st->cb = cb;
st->cb_arg = arg;
if (gpr_atm_rel_cas(&st->state, NOT_READY, WAITING)) {
if (gpr_atm_rel_cas(st, NOT_READY, (gpr_intptr)closure)) {
/* swap was successful -- the closure will run after the next
set_ready call. NOTE: we don't have an ABA problem here,
since we should never have concurrent calls to the same
@ -212,12 +208,13 @@ static void notify_on(grpc_fd *fd, grpc_fd_state *st, grpc_iomgr_cb_func cb,
/* swap was unsuccessful due to an intervening set_ready call.
Fall through to the READY code below */
case READY:
assert(gpr_atm_acq_load(&st->state) == READY);
gpr_atm_rel_store(&st->state, NOT_READY);
make_callback(cb, arg, !gpr_atm_acq_load(&fd->shutdown),
assert(gpr_atm_acq_load(st) == READY);
gpr_atm_rel_store(st, NOT_READY);
make_callback(closure->cb, closure->cb_arg,
!gpr_atm_acq_load(&fd->shutdown),
allow_synchronous_callback);
return;
case WAITING:
default: /* WAITING */
/* upcallptr was set to a different closure. This is an error! */
gpr_log(GPR_ERROR,
"User called a notify_on function with a previous callback still "
@ -228,38 +225,38 @@ static void notify_on(grpc_fd *fd, grpc_fd_state *st, grpc_iomgr_cb_func cb,
abort();
}
static void set_ready_locked(grpc_fd_state *st, callback *callbacks,
static void set_ready_locked(gpr_atm *st, grpc_iomgr_closure *callbacks,
size_t *ncallbacks) {
callback *c;
gpr_intptr state = gpr_atm_acq_load(st);
switch ((enum descriptor_state)gpr_atm_acq_load(&st->state)) {
switch (state) {
case READY:
/* duplicate ready, ignore */
return;
case NOT_READY:
if (gpr_atm_rel_cas(&st->state, NOT_READY, READY)) {
if (gpr_atm_rel_cas(st, NOT_READY, READY)) {
/* swap was successful -- the closure will run after the next
notify_on call. */
return;
}
/* swap was unsuccessful due to an intervening set_ready call.
Fall through to the WAITING code below */
case WAITING:
assert(gpr_atm_acq_load(&st->state) == WAITING);
c = &callbacks[(*ncallbacks)++];
c->cb = st->cb;
c->arg = st->cb_arg;
gpr_atm_rel_store(&st->state, NOT_READY);
return;
case READY:
/* duplicate ready, ignore */
/* swap was unsuccessful due to an intervening set_ready call.
Fall through to the WAITING code below */
state = gpr_atm_acq_load(st);
default: /* waiting */
assert(gpr_atm_acq_load(st) != READY &&
gpr_atm_acq_load(st) != NOT_READY);
callbacks[(*ncallbacks)++] = *(grpc_iomgr_closure *)state;
gpr_atm_rel_store(st, NOT_READY);
return;
}
}
static void set_ready(grpc_fd *fd, grpc_fd_state *st,
static void set_ready(grpc_fd *fd, gpr_atm *st,
int allow_synchronous_callback) {
/* only one set_ready can be active at once (but there may be a racing
notify_on) */
int success;
callback cb;
grpc_iomgr_closure cb;
size_t ncb = 0;
gpr_mu_lock(&fd->set_state_mu);
set_ready_locked(st, &cb, &ncb);
@ -269,7 +266,7 @@ static void set_ready(grpc_fd *fd, grpc_fd_state *st,
}
void grpc_fd_shutdown(grpc_fd *fd) {
callback cb[2];
grpc_iomgr_closure cb[2];
size_t ncb = 0;
gpr_mu_lock(&fd->set_state_mu);
GPR_ASSERT(!gpr_atm_acq_load(&fd->shutdown));
@ -280,14 +277,12 @@ void grpc_fd_shutdown(grpc_fd *fd) {
make_callbacks(cb, ncb, 0, 0);
}
void grpc_fd_notify_on_read(grpc_fd *fd, grpc_iomgr_cb_func read_cb,
void *read_cb_arg) {
notify_on(fd, &fd->readst, read_cb, read_cb_arg, 0);
void grpc_fd_notify_on_read(grpc_fd *fd, grpc_iomgr_closure *closure) {
notify_on(fd, &fd->readst, closure, 0);
}
void grpc_fd_notify_on_write(grpc_fd *fd, grpc_iomgr_cb_func write_cb,
void *write_cb_arg) {
notify_on(fd, &fd->writest, write_cb, write_cb_arg, 0);
void grpc_fd_notify_on_write(grpc_fd *fd, grpc_iomgr_closure *closure) {
notify_on(fd, &fd->writest, closure, 0);
}
gpr_uint32 grpc_fd_begin_poll(grpc_fd *fd, grpc_pollset *pollset,
@ -305,8 +300,8 @@ gpr_uint32 grpc_fd_begin_poll(grpc_fd *fd, grpc_pollset *pollset,
watcher->fd = fd;
gpr_mu_unlock(&fd->watcher_mu);
return (gpr_atm_acq_load(&fd->readst.state) != READY ? read_mask : 0) |
(gpr_atm_acq_load(&fd->writest.state) != READY ? write_mask : 0);
return (gpr_atm_acq_load(&fd->readst) != READY ? read_mask : 0) |
(gpr_atm_acq_load(&fd->writest) != READY ? write_mask : 0);
}
void grpc_fd_end_poll(grpc_fd_watcher *watcher) {

@ -43,9 +43,7 @@
typedef struct {
grpc_iomgr_cb_func cb;
void *cb_arg;
int success;
gpr_atm state;
} grpc_fd_state;
} grpc_iomgr_closure;
typedef struct grpc_fd grpc_fd;
@ -71,8 +69,8 @@ struct grpc_fd {
gpr_mu watcher_mu;
grpc_fd_watcher watcher_root;
grpc_fd_state readst;
grpc_fd_state writest;
gpr_atm readst;
gpr_atm writest;
grpc_iomgr_cb_func on_done;
void *on_done_user_data;
@ -126,12 +124,10 @@ void grpc_fd_shutdown(grpc_fd *fd);
underlying platform. This means that users must drain fd in read_cb before
calling notify_on_read again. Users are also expected to handle spurious
events, i.e read_cb is called while nothing can be readable from fd */
void grpc_fd_notify_on_read(grpc_fd *fd, grpc_iomgr_cb_func read_cb,
void *read_cb_arg);
void grpc_fd_notify_on_read(grpc_fd *fd, grpc_iomgr_closure *closure);
/* Exactly the same semantics as above, except based on writable events. */
void grpc_fd_notify_on_write(grpc_fd *fd, grpc_iomgr_cb_func write_cb,
void *write_cb_arg);
void grpc_fd_notify_on_write(grpc_fd *fd, grpc_iomgr_closure *closure);
/* Notification from the poller to an fd that it has become readable or
writable.

@ -60,6 +60,7 @@ typedef struct {
gpr_timespec deadline;
grpc_alarm alarm;
int refs;
grpc_iomgr_closure write_closure;
} async_connect;
static int prepare_socket(const struct sockaddr *addr, int fd) {
@ -136,7 +137,7 @@ static void on_writable(void *acp, int success) {
opened too many network connections. The "easy" fix:
don't do that! */
gpr_log(GPR_ERROR, "kernel out of buffers");
grpc_fd_notify_on_write(ac->fd, on_writable, ac);
grpc_fd_notify_on_write(ac->fd, &ac->write_closure);
return;
} else {
switch (so_error) {
@ -229,9 +230,11 @@ void grpc_tcp_client_connect(void (*cb)(void *arg, grpc_endpoint *ep),
ac->fd = grpc_fd_create(fd);
gpr_mu_init(&ac->mu);
ac->refs = 2;
ac->write_closure.cb = on_writable;
ac->write_closure.cb_arg = ac;
grpc_alarm_init(&ac->alarm, deadline, on_alarm, ac, gpr_now());
grpc_fd_notify_on_write(ac->fd, on_writable, ac);
grpc_fd_notify_on_write(ac->fd, &ac->write_closure);
}
#endif

@ -45,6 +45,7 @@
#include <unistd.h>
#include "src/core/support/string.h"
#include "src/core/debug/trace.h"
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/slice.h>
@ -263,6 +264,9 @@ typedef struct {
void *write_user_data;
grpc_tcp_slice_state write_state;
grpc_iomgr_closure read_closure;
grpc_iomgr_closure write_closure;
} grpc_tcp;
static void grpc_tcp_handle_read(void *arg /* grpc_tcp */, int success);
@ -290,17 +294,17 @@ static void call_read_cb(grpc_tcp *tcp, gpr_slice *slices, size_t nslices,
grpc_endpoint_cb_status status) {
grpc_endpoint_read_cb cb = tcp->read_cb;
#ifdef GRPC_TRACE_TCP
size_t i;
gpr_log(GPR_DEBUG, "read: status=%d", status);
for (i = 0; i < nslices; i++) {
char *dump =
gpr_hexdump((char *)GPR_SLICE_START_PTR(slices[i]),
GPR_SLICE_LENGTH(slices[i]), GPR_HEXDUMP_PLAINTEXT);
gpr_log(GPR_DEBUG, "READ: %s", dump);
gpr_free(dump);
if (grpc_trace_bits & GRPC_TRACE_TCP) {
size_t i;
gpr_log(GPR_DEBUG, "read: status=%d", status);
for (i = 0; i < nslices; i++) {
char *dump =
gpr_hexdump((char *)GPR_SLICE_START_PTR(slices[i]),
GPR_SLICE_LENGTH(slices[i]), GPR_HEXDUMP_PLAINTEXT);
gpr_log(GPR_DEBUG, "READ: %s", dump);
gpr_free(dump);
}
}
#endif
tcp->read_cb = NULL;
cb(tcp->read_user_data, slices, nslices, status);
@ -370,7 +374,7 @@ static void grpc_tcp_handle_read(void *arg /* grpc_tcp */, int success) {
} else {
/* Spurious read event, consume it here */
slice_state_destroy(&read_state);
grpc_fd_notify_on_read(tcp->em_fd, grpc_tcp_handle_read, tcp);
grpc_fd_notify_on_read(tcp->em_fd, &tcp->read_closure);
}
} else {
/* TODO(klempner): Log interesting errors */
@ -405,7 +409,7 @@ static void grpc_tcp_notify_on_read(grpc_endpoint *ep, grpc_endpoint_read_cb cb,
tcp->read_cb = cb;
tcp->read_user_data = user_data;
gpr_ref(&tcp->refcount);
grpc_fd_notify_on_read(tcp->em_fd, grpc_tcp_handle_read, tcp);
grpc_fd_notify_on_read(tcp->em_fd, &tcp->read_closure);
}
#define MAX_WRITE_IOVEC 16
@ -468,7 +472,7 @@ static void grpc_tcp_handle_write(void *arg /* grpc_tcp */, int success) {
write_status = grpc_tcp_flush(tcp);
if (write_status == GRPC_ENDPOINT_WRITE_PENDING) {
grpc_fd_notify_on_write(tcp->em_fd, grpc_tcp_handle_write, tcp);
grpc_fd_notify_on_write(tcp->em_fd, &tcp->write_closure);
} else {
slice_state_destroy(&tcp->write_state);
if (write_status == GRPC_ENDPOINT_WRITE_DONE) {
@ -491,17 +495,17 @@ static grpc_endpoint_write_status grpc_tcp_write(grpc_endpoint *ep,
grpc_tcp *tcp = (grpc_tcp *)ep;
grpc_endpoint_write_status status;
#ifdef GRPC_TRACE_TCP
size_t i;
if (grpc_trace_bits & GRPC_TRACE_TCP) {
size_t i;
for (i = 0; i < nslices; i++) {
char *data =
gpr_hexdump((char *)GPR_SLICE_START_PTR(slices[i]),
GPR_SLICE_LENGTH(slices[i]), GPR_HEXDUMP_PLAINTEXT);
gpr_log(GPR_DEBUG, "WRITE %p: %s", tcp, data);
gpr_free(data);
for (i = 0; i < nslices; i++) {
char *data =
gpr_hexdump((char *)GPR_SLICE_START_PTR(slices[i]),
GPR_SLICE_LENGTH(slices[i]), GPR_HEXDUMP_PLAINTEXT);
gpr_log(GPR_DEBUG, "WRITE %p: %s", tcp, data);
gpr_free(data);
}
}
#endif
GPR_ASSERT(tcp->write_cb == NULL);
slice_state_init(&tcp->write_state, slices, nslices, nslices);
@ -513,7 +517,7 @@ static grpc_endpoint_write_status grpc_tcp_write(grpc_endpoint *ep,
gpr_ref(&tcp->refcount);
tcp->write_cb = cb;
tcp->write_user_data = user_data;
grpc_fd_notify_on_write(tcp->em_fd, grpc_tcp_handle_write, tcp);
grpc_fd_notify_on_write(tcp->em_fd, &tcp->write_closure);
}
return status;
@ -541,6 +545,10 @@ grpc_endpoint *grpc_tcp_create(grpc_fd *em_fd, size_t slice_size) {
/* paired with unref in grpc_tcp_destroy */
gpr_ref_init(&tcp->refcount, 1);
tcp->em_fd = em_fd;
tcp->read_closure.cb = grpc_tcp_handle_read;
tcp->read_closure.cb_arg = tcp;
tcp->write_closure.cb = grpc_tcp_handle_write;
tcp->write_closure.cb_arg = tcp;
return &tcp->base;
}

@ -82,6 +82,7 @@ typedef struct {
struct sockaddr_un un;
} addr;
int addr_len;
grpc_iomgr_closure read_closure;
} server_port;
static void unlink_if_unix_domain_socket(const struct sockaddr_un *un) {
@ -244,7 +245,7 @@ static void on_read(void *arg, int success) {
case EINTR:
continue;
case EAGAIN:
grpc_fd_notify_on_read(sp->emfd, on_read, sp);
grpc_fd_notify_on_read(sp->emfd, &sp->read_closure);
return;
default:
gpr_log(GPR_ERROR, "Failed accept4: %s", strerror(errno));
@ -393,7 +394,9 @@ void grpc_tcp_server_start(grpc_tcp_server *s, grpc_pollset **pollsets,
for (j = 0; j < pollset_count; j++) {
grpc_pollset_add_fd(pollsets[j], s->ports[i].emfd);
}
grpc_fd_notify_on_read(s->ports[i].emfd, on_read, &s->ports[i]);
s->ports[i].read_closure.cb = on_read;
s->ports[i].read_closure.cb_arg = &s->ports[i];
grpc_fd_notify_on_read(s->ports[i].emfd, &s->ports[i].read_closure);
s->active_ports++;
}
gpr_mu_unlock(&s->mu);

File diff suppressed because it is too large Load Diff

@ -39,6 +39,7 @@
#include <grpc/support/slice.h>
#include <grpc/support/sync.h>
#include "src/core/tsi/transport_security_interface.h"
#include "src/core/debug/trace.h"
#define STAGING_BUFFER_SIZE 8192
@ -95,16 +96,16 @@ static void flush_read_staging_buffer(secure_endpoint *ep, gpr_uint8 **cur,
static void call_read_cb(secure_endpoint *ep, gpr_slice *slices, size_t nslices,
grpc_endpoint_cb_status error) {
#ifdef GRPC_TRACE_SECURE_TRANSPORT
size_t i;
for (i = 0; i < nslices; i++) {
char *data =
gpr_hexdump((char *)GPR_SLICE_START_PTR(slices[i]),
GPR_SLICE_LENGTH(slices[i]), GPR_HEXDUMP_PLAINTEXT);
gpr_log(GPR_DEBUG, "READ %p: %s", ep, data);
gpr_free(data);
if (grpc_trace_bits & GRPC_TRACE_SECURE_ENDPOINT) {
size_t i;
for (i = 0; i < nslices; i++) {
char *data =
gpr_hexdump((char *)GPR_SLICE_START_PTR(slices[i]),
GPR_SLICE_LENGTH(slices[i]), GPR_HEXDUMP_PLAINTEXT);
gpr_log(GPR_DEBUG, "READ %p: %s", ep, data);
gpr_free(data);
}
}
#endif
ep->read_cb(ep->read_user_data, slices, nslices, error);
secure_endpoint_unref(ep);
}
@ -230,15 +231,15 @@ static grpc_endpoint_write_status endpoint_write(grpc_endpoint *secure_ep,
grpc_endpoint_write_status status;
GPR_ASSERT(ep->output_buffer.count == 0);
#ifdef GRPC_TRACE_SECURE_TRANSPORT
for (i = 0; i < nslices; i++) {
char *data =
gpr_hexdump((char *)GPR_SLICE_START_PTR(slices[i]),
GPR_SLICE_LENGTH(slices[i]), GPR_HEXDUMP_PLAINTEXT);
gpr_log(GPR_DEBUG, "WRITE %p: %s", ep, data);
gpr_free(data);
if (grpc_trace_bits & GRPC_TRACE_SECURE_ENDPOINT) {
for (i = 0; i < nslices; i++) {
char *data =
gpr_hexdump((char *)GPR_SLICE_START_PTR(slices[i]),
GPR_SLICE_LENGTH(slices[i]), GPR_HEXDUMP_PLAINTEXT);
gpr_log(GPR_DEBUG, "WRITE %p: %s", ep, data);
gpr_free(data);
}
}
#endif
for (i = 0; i < nslices; i++) {
gpr_slice plain = slices[i];

@ -39,7 +39,6 @@
#include "src/core/channel/http_client_filter.h"
#include "src/core/security/credentials.h"
#include "src/core/security/secure_endpoint.h"
#include "src/core/security/ssl_roots.h"
#include "src/core/support/env.h"
#include "src/core/support/file.h"
#include "src/core/support/string.h"
@ -61,6 +60,12 @@
"AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:AES128-" \
"SHA256:AES256-SHA256"
#ifndef INSTALL_PREFIX
static const char *installed_roots_path = "/etc/grpc/roots.pem";
#else
static const char *installed_roots_path = INSTALL_PREFIX "/etc/grpc/roots.pem";
#endif
/* -- Common methods. -- */
grpc_security_status grpc_security_context_create_handshaker(
@ -404,14 +409,11 @@ static void init_default_pem_root_certs(void) {
} else {
default_pem_root_certs = gpr_load_file(default_root_certs_path, NULL);
gpr_free(default_root_certs_path);
if (GPR_SLICE_IS_EMPTY(default_pem_root_certs)) {
default_pem_root_certs =
gpr_load_file(GRPC_SSL_ROOTS_WELL_KNOWN_PATH, NULL);
}
}
(void) installed_roots_path;
}
static size_t get_default_pem_roots(const unsigned char **pem_root_certs) {
size_t grpc_get_default_ssl_roots(const unsigned char **pem_root_certs) {
/* TODO(jboeuf@google.com): Maybe revisit the approach which consists in
loading all the roots once for the lifetime of the process. */
static gpr_once once = GPR_ONCE_INIT;
@ -465,7 +467,7 @@ grpc_security_status grpc_ssl_channel_security_context_create(
c->overridden_target_name = gpr_strdup(overridden_target_name);
}
if (config->pem_root_certs == NULL) {
pem_root_certs_size = get_default_pem_roots(&pem_root_certs);
pem_root_certs_size = grpc_get_default_ssl_roots(&pem_root_certs);
if (pem_root_certs == NULL || pem_root_certs_size == 0) {
gpr_log(GPR_ERROR, "Could not get default pem root certs.");
goto error;

@ -171,6 +171,8 @@ grpc_security_status grpc_ssl_server_security_context_create(
/* Secure client channel creation. */
size_t grpc_get_default_ssl_roots(const unsigned char **pem_root_certs);
grpc_channel *grpc_ssl_channel_create(grpc_credentials *ssl_creds,
grpc_credentials *request_metadata_creds,
const char *target,

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

@ -360,8 +360,7 @@ static void unlock(grpc_call *call) {
int num_completed_requests = call->num_completed_requests;
int need_more_data =
call->need_more_data &&
!call->sending &&
call->write_state >= WRITE_STATE_STARTED;
(call->write_state >= WRITE_STATE_STARTED || !call->is_client);
int i;
if (need_more_data) {
@ -536,14 +535,16 @@ static void finish_finish_step(void *pc, grpc_op_error error) {
}
static void finish_start_step(void *pc, grpc_op_error error) {
finish_send_op(pc, GRPC_IOREQ_SEND_INITIAL_METADATA, WRITE_STATE_STARTED, error);
finish_send_op(pc, GRPC_IOREQ_SEND_INITIAL_METADATA, WRITE_STATE_STARTED,
error);
}
static send_action choose_send_action(grpc_call *call) {
switch (call->write_state) {
case WRITE_STATE_INITIAL:
if (is_op_live(call, GRPC_IOREQ_SEND_INITIAL_METADATA)) {
if (is_op_live(call, GRPC_IOREQ_SEND_MESSAGE) || is_op_live(call, GRPC_IOREQ_SEND_CLOSE)) {
if (is_op_live(call, GRPC_IOREQ_SEND_MESSAGE) ||
is_op_live(call, GRPC_IOREQ_SEND_CLOSE)) {
return SEND_BUFFERED_INITIAL_METADATA;
} else {
return SEND_INITIAL_METADATA;

@ -32,8 +32,9 @@
*/
#include <grpc/grpc.h>
#include "src/core/statistics/census_interface.h"
#include "src/core/iomgr/iomgr.h"
#include "src/core/debug/trace.h"
#include "src/core/statistics/census_interface.h"
static gpr_once g_init = GPR_ONCE_INIT;
static gpr_mu g_init_mu;
@ -49,6 +50,7 @@ void grpc_init(void) {
gpr_mu_lock(&g_init_mu);
if (++g_initializations == 1) {
grpc_init_trace_bits();
grpc_iomgr_init();
census_init();
}

@ -34,21 +34,14 @@
#ifndef __GRPC_INTERNAL_SURFACE_SURFACE_TRACE_H__
#define __GRPC_INTERNAL_SURFACE_SURFACE_TRACE_H__
#include "src/core/debug/trace.h"
#include <grpc/support/log.h>
/* #define GRPC_ENABLE_SURFACE_TRACE 1 */
#ifdef GRPC_ENABLE_SURFACE_TRACE
#define GRPC_SURFACE_TRACE_RETURNED_EVENT(cq, event) \
do { \
if (grpc_trace_bits & GRPC_TRACE_SURFACE) { \
char *_ev = grpc_event_string(event); \
gpr_log(GPR_INFO, "RETURN_EVENT[%p]: %s", cq, _ev); \
gpr_free(_ev); \
} while (0)
#else
#define GRPC_SURFACE_TRACE_RETURNED_EVENT(cq, event) \
do { \
} while (0)
#endif
}
#endif /* __GRPC_INTERNAL_SURFACE_SURFACE_TRACE_H__ */

@ -135,7 +135,7 @@ grpc_chttp2_parse_error grpc_chttp2_data_parser_parse(
case GRPC_CHTTP2_DATA_FRAME:
if (cur == end) {
return GRPC_CHTTP2_PARSE_OK;
} else if (end - cur == p->frame_size) {
} else if ((gpr_uint32)(end - cur) == p->frame_size) {
state->need_flush_reads = 1;
grpc_sopb_add_slice(&p->incoming_sopb,
gpr_slice_sub(slice, cur - beg, end - beg));

@ -1631,7 +1631,7 @@ static int process_read(transport *t, gpr_slice slice) {
/* fallthrough */
case DTS_FRAME:
GPR_ASSERT(cur < end);
if (end - cur == t->incoming_frame_size) {
if ((gpr_uint32)(end - cur) == t->incoming_frame_size) {
if (!parse_frame_slice(
t, gpr_slice_sub_no_ref(slice, cur - beg, end - beg), 1)) {
return 0;

@ -1084,7 +1084,7 @@ static int server_handshaker_factory_alpn_callback(
tsi_ssl_server_handshaker_factory* factory =
(tsi_ssl_server_handshaker_factory*)arg;
const unsigned char* client_current = in;
while ((client_current - in) < inlen) {
while ((unsigned int)(client_current - in) < inlen) {
unsigned char client_current_len = *(client_current++);
const unsigned char* server_current = factory->alpn_protocol_list;
while ((server_current >= factory->alpn_protocol_list) &&

@ -0,0 +1 @@
gRPC C# is work-in-progress and is not intended to be used. See README.

@ -7,8 +7,8 @@
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{86EC5CB4-4EA2-40A2-8057-86542A0353BB}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>GrpcCoreTests</RootNamespace>
<AssemblyName>GrpcCoreTests</AssemblyName>
<RootNamespace>Grpc.Core.Tests</RootNamespace>
<AssemblyName>Grpc.Core.Tests</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@ -44,9 +44,9 @@
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<ProjectReference Include="..\GrpcCore\GrpcCore.csproj">
<ProjectReference Include="..\Grpc.Core\Grpc.Core.csproj">
<Project>{CCC4440E-49F7-4790-B0AF-FEABB0837AE7}</Project>
<Name>GrpcCore</Name>
<Name>Grpc.Core</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>

@ -3,7 +3,7 @@ using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle("InteropClient")]
[assembly: AssemblyTitle("Grpc.Core.Tests")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
@ -14,7 +14,7 @@ using System.Runtime.CompilerServices;
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
[assembly: AssemblyVersion("0.9.*")]
[assembly: AssemblyVersion("0.1.*")]
// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
//[assembly: AssemblyDelaySign(false)]

@ -7,8 +7,8 @@
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{CCC4440E-49F7-4790-B0AF-FEABB0837AE7}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>GrpcCore</RootNamespace>
<AssemblyName>GrpcCore</AssemblyName>
<RootNamespace>Grpc.Core</RootNamespace>
<AssemblyName>Grpc.Core</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<package >
<metadata>
<id>Grpc.Core</id>
<title>gRPC Core</title>
<summary>Core C# implementation of gRPC - an RPC library and framework</summary>
<description>Core C# implementation of gRPC - an RPC library and framework. See project site for more info.
This is an experimental release, not ready to use.
</description>
<version>0.1.0</version>
<authors>Google Inc.</authors>
<owners>jtattermusch</owners>
<licenseUrl>https://github.com/grpc/grpc/blob/master/LICENSE</licenseUrl>
<projectUrl>https://github.com/grpc/grpc</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<releaseNotes>The first experimental release. Not ready to use.</releaseNotes>
<copyright>Copyright 2015, Google Inc.</copyright>
<tags>gRPC RPC Protocol HTTP/2</tags>
</metadata>
<files>
<file src="bin/Release/Grpc.Core.dll" target="lib/net45" />
</files>
</package>

@ -3,7 +3,7 @@ using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle ("GrpcCore")]
[assembly: AssemblyTitle ("Grpc.Core")]
[assembly: AssemblyDescription ("")]
[assembly: AssemblyConfiguration ("")]
[assembly: AssemblyCompany ("")]
@ -14,11 +14,11 @@ using System.Runtime.CompilerServices;
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
[assembly: AssemblyVersion ("0.9.*")]
[assembly: AssemblyVersion ("0.1.*")]
// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
//[assembly: AssemblyDelaySign(false)]
//[assembly: AssemblyKeyFile("")]
[assembly: InternalsVisibleTo("GrpcCoreTests")]
[assembly: InternalsVisibleTo("Grpc.Core.Tests")]

@ -7,8 +7,8 @@
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{61ECB8EE-0C96-4F8E-B187-8E4D227417C0}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>GrpcDemo</RootNamespace>
<AssemblyName>GrpcDemo</AssemblyName>
<RootNamespace>math</RootNamespace>
<AssemblyName>MathClient</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
@ -40,13 +40,13 @@
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<ProjectReference Include="..\GrpcApi\GrpcApi.csproj">
<Project>{7DC1433E-3225-42C7-B7EA-546D56E27A4B}</Project>
<Name>GrpcApi</Name>
</ProjectReference>
<ProjectReference Include="..\GrpcCore\GrpcCore.csproj">
<ProjectReference Include="..\Grpc.Core\Grpc.Core.csproj">
<Project>{CCC4440E-49F7-4790-B0AF-FEABB0837AE7}</Project>
<Name>GrpcCore</Name>
<Name>Grpc.Core</Name>
</ProjectReference>
<ProjectReference Include="..\Grpc.Examples\Grpc.Examples.csproj">
<Project>{7DC1433E-3225-42C7-B7EA-546D56E27A4B}</Project>
<Name>Grpc.Examples</Name>
</ProjectReference>
</ItemGroup>
</Project>
</Project>

@ -3,7 +3,7 @@ using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle ("MathClient")]
[assembly: AssemblyTitle ("Grpc.Examples.MathClient")]
[assembly: AssemblyDescription ("")]
[assembly: AssemblyConfiguration ("")]
[assembly: AssemblyCompany ("")]
@ -14,7 +14,7 @@ using System.Runtime.CompilerServices;
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
[assembly: AssemblyVersion ("0.9.*")]
[assembly: AssemblyVersion ("0.1.*")]
// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
//[assembly: AssemblyDelaySign(false)]

@ -7,8 +7,8 @@
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{143B1C29-C442-4BE0-BF3F-A8F92288AC9F}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>GrpcApiTests</RootNamespace>
<AssemblyName>GrpcApiTests</AssemblyName>
<RootNamespace>Grpc.Examples.Tests</RootNamespace>
<AssemblyName>Grpc.Examples.Tests</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@ -30,14 +30,13 @@
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<ItemGroup>
<Reference Include="Google.ProtocolBuffers, Version=2.4.1.521, Culture=neutral, PublicKeyToken=55f7125234beb589, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Google.ProtocolBuffers.2.4.1.521\lib\net40\Google.ProtocolBuffers.dll</HintPath>
</Reference>
<Reference Include="nunit.framework">
<HintPath>..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="Google.ProtocolBuffers">
<HintPath>..\packages\Google.ProtocolBuffers.2.4.1.521\lib\net40\Google.ProtocolBuffers.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
@ -45,13 +44,13 @@
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<ProjectReference Include="..\GrpcApi\GrpcApi.csproj">
<Project>{7DC1433E-3225-42C7-B7EA-546D56E27A4B}</Project>
<Name>GrpcApi</Name>
</ProjectReference>
<ProjectReference Include="..\GrpcCore\GrpcCore.csproj">
<ProjectReference Include="..\Grpc.Core\Grpc.Core.csproj">
<Project>{CCC4440E-49F7-4790-B0AF-FEABB0837AE7}</Project>
<Name>GrpcCore</Name>
<Name>Grpc.Core</Name>
</ProjectReference>
<ProjectReference Include="..\Grpc.Examples\Grpc.Examples.csproj">
<Project>{7DC1433E-3225-42C7-B7EA-546D56E27A4B}</Project>
<Name>Grpc.Examples</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
@ -60,4 +59,4 @@
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
</Project>
</Project>

@ -3,7 +3,7 @@ using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle("GrpcCoreTests")]
[assembly: AssemblyTitle("Grpc.Examples.Tests")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
@ -14,7 +14,7 @@ using System.Runtime.CompilerServices;
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
[assembly: AssemblyVersion("0.9.*")]
[assembly: AssemblyVersion("0.1.*")]
// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
//[assembly: AssemblyDelaySign(false)]

@ -7,8 +7,8 @@
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{7DC1433E-3225-42C7-B7EA-546D56E27A4B}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>GrpcApi</RootNamespace>
<AssemblyName>GrpcApi</AssemblyName>
<RootNamespace>Grpc.Examples</RootNamespace>
<AssemblyName>Grpc.Examples</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@ -30,10 +30,6 @@
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<ItemGroup>
<Reference Include="Google.ProtocolBuffers, Version=2.4.1.521, Culture=neutral, PublicKeyToken=55f7125234beb589, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Google.ProtocolBuffers.2.4.1.521\lib\net40\Google.ProtocolBuffers.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Reactive.Core">
<HintPath>..\packages\Rx-Core.2.2.5\lib\net45\System.Reactive.Core.dll</HintPath>
@ -48,29 +44,26 @@
<Reference Include="System.Reactive.PlatformServices">
<HintPath>..\packages\Rx-PlatformServices.2.2.5\lib\net45\System.Reactive.PlatformServices.dll</HintPath>
</Reference>
<Reference Include="Google.ProtocolBuffers">
<HintPath>..\packages\Google.ProtocolBuffers.2.4.1.521\lib\net40\Google.ProtocolBuffers.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Math.cs" />
<Compile Include="MathGrpc.cs" />
<Compile Include="MathServiceImpl.cs" />
<Compile Include="Empty.cs" />
<Compile Include="Messages.cs" />
<Compile Include="TestServiceGrpc.cs" />
<Compile Include="MathExamples.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<ProjectReference Include="..\GrpcCore\GrpcCore.csproj">
<ProjectReference Include="..\Grpc.Core\Grpc.Core.csproj">
<Project>{CCC4440E-49F7-4790-B0AF-FEABB0837AE7}</Project>
<Name>GrpcCore</Name>
<Name>Grpc.Core</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="proto\math.proto" />
<None Include="proto\empty.proto" />
<None Include="proto\messages.proto" />
<None Include="proto\test.proto" />
</ItemGroup>
</Project>

@ -3,7 +3,7 @@ using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle ("GrpcApi")]
[assembly: AssemblyTitle ("Grpc.Examples")]
[assembly: AssemblyDescription ("")]
[assembly: AssemblyConfiguration ("")]
[assembly: AssemblyCompany ("")]
@ -14,7 +14,7 @@ using System.Runtime.CompilerServices;
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
[assembly: AssemblyVersion ("0.9.*")]
[assembly: AssemblyVersion ("0.1.*")]
// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
//[assembly: AssemblyDelaySign(false)]

@ -40,7 +40,7 @@ using Grpc.Core.Utils;
using NUnit.Framework;
using grpc.testing;
namespace Grpc.Interop
namespace Grpc.IntegrationTesting
{
class Client
{

@ -7,9 +7,9 @@
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{C61154BA-DD4A-4838-8420-0162A28925E0}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>InteropClient</RootNamespace>
<AssemblyName>InteropClient</AssemblyName>
<StartupObject>Grpc.Interop.Client</StartupObject>
<RootNamespace>Grpc.IntegrationTesting</RootNamespace>
<AssemblyName>Grpc.IntegrationTesting</AssemblyName>
<StartupObject>Grpc.IntegrationTesting.Client</StartupObject>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
@ -44,19 +44,24 @@
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Client.cs" />
<Compile Include="TestServiceGrpc.cs" />
<Compile Include="Empty.cs" />
<Compile Include="Messages.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<ProjectReference Include="..\GrpcCore\GrpcCore.csproj">
<ProjectReference Include="..\Grpc.Core\Grpc.Core.csproj">
<Project>{CCC4440E-49F7-4790-B0AF-FEABB0837AE7}</Project>
<Name>GrpcCore</Name>
</ProjectReference>
<ProjectReference Include="..\GrpcApi\GrpcApi.csproj">
<Project>{7DC1433E-3225-42C7-B7EA-546D56E27A4B}</Project>
<Name>GrpcApi</Name>
<Name>Grpc.Core</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="proto\test.proto" />
<None Include="proto\empty.proto" />
<None Include="proto\messages.proto" />
</ItemGroup>
<ItemGroup>
<Folder Include="proto\" />
</ItemGroup>
</Project>
</Project>

@ -3,7 +3,7 @@ using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle("GrpcApiTests")]
[assembly: AssemblyTitle("Grpc.IntegrationTesting")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
@ -14,7 +14,7 @@ using System.Runtime.CompilerServices;
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
[assembly: AssemblyVersion("0.9.*")]
[assembly: AssemblyVersion("0.1.*")]
// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
//[assembly: AssemblyDelaySign(false)]

@ -33,7 +33,6 @@
using System;
using System.Collections.Generic;
using System.Reactive.Linq;
using System.Threading;
using System.Threading.Tasks;
using Grpc.Core;

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<package >
<metadata>
<id>Grpc</id>
<title>gRPC</title>
<summary>C# implementation of gRPC - an RPC library and framework</summary>
<description>C# implementation of gRPC - an RPC library and framework. See project site for more info.
This is an experimental release, not ready to use.
</description>
<version>0.1.0</version>
<authors>Google Inc.</authors>
<owners>jtattermusch</owners>
<licenseUrl>https://github.com/grpc/grpc/blob/master/LICENSE</licenseUrl>
<projectUrl>https://github.com/grpc/grpc</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<releaseNotes>The first experimental release. Not ready to use.</releaseNotes>
<copyright>Copyright 2015, Google Inc.</copyright>
<tags>gRPC RPC Protocol HTTP/2</tags>
<dependencies>
<dependency id="Grpc.Core" version="0.1.0" />
</dependencies>
</metadata>
</package>

@ -1,17 +1,17 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GrpcApi", "GrpcApi\GrpcApi.csproj", "{7DC1433E-3225-42C7-B7EA-546D56E27A4B}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Grpc.Examples", "Grpc.Examples\Grpc.Examples.csproj", "{7DC1433E-3225-42C7-B7EA-546D56E27A4B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GrpcCore", "GrpcCore\GrpcCore.csproj", "{CCC4440E-49F7-4790-B0AF-FEABB0837AE7}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Grpc.Core", "Grpc.Core\Grpc.Core.csproj", "{CCC4440E-49F7-4790-B0AF-FEABB0837AE7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GrpcCoreTests", "GrpcCoreTests\GrpcCoreTests.csproj", "{86EC5CB4-4EA2-40A2-8057-86542A0353BB}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Grpc.Core.Tests", "Grpc.Core.Tests\Grpc.Core.Tests.csproj", "{86EC5CB4-4EA2-40A2-8057-86542A0353BB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GrpcApiTests", "GrpcApiTests\GrpcApiTests.csproj", "{143B1C29-C442-4BE0-BF3F-A8F92288AC9F}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Grpc.Examples.Tests", "Grpc.Examples.Tests\Grpc.Examples.Tests.csproj", "{143B1C29-C442-4BE0-BF3F-A8F92288AC9F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MathClient", "MathClient\MathClient.csproj", "{61ECB8EE-0C96-4F8E-B187-8E4D227417C0}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Grpc.Examples.MathClient", "Grpc.Examples.MathClient\Grpc.Examples.MathClient.csproj", "{61ECB8EE-0C96-4F8E-B187-8E4D227417C0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "InteropClient", "InteropClient\InteropClient.csproj", "{C61154BA-DD4A-4838-8420-0162A28925E0}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Grpc.IntegrationTesting", "Grpc.IntegrationTesting\Grpc.IntegrationTesting.csproj", "{C61154BA-DD4A-4838-8420-0162A28925E0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -45,6 +45,6 @@ Global
{CCC4440E-49F7-4790-B0AF-FEABB0837AE7}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = InteropClient\InteropClient.csproj
StartupItem = Grpc.Examples\Grpc.Examples.csproj
EndGlobalSection
EndGlobal

@ -59,7 +59,7 @@ mono ~/Downloads/NuGet.exe restore Grpc.sln
one will make them pass.
```
nunit-console GrpcCoreTests.dll
nunit-console Grpc.Core.Tests.dll
```
CONTENTS
@ -67,11 +67,11 @@ CONTENTS
- ext:
The extension library that wraps C API to be more digestible by C#.
- GrpcApi:
API examples for math.proto and testservice.proto
- GrpcCore:
- Grpc.Core:
The main gRPC C# library.
- InteropClient:
Client for interop testing.
- MathClient:
- Grpc.Examples:
API examples for math.proto
- Grpc.Examples.MathClient:
An example client that sends some requests to math server.
- Grpc.IntegrationTesting:
Client for cross-language gRPC implementation testing (interop testing).

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

Loading…
Cancel
Save