aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--BUILD12
-rw-r--r--Makefile4
-rw-r--r--build.json4
-rw-r--r--gRPC.podspec6
-rw-r--r--src/core/channel/client_channel.c2
-rw-r--r--src/core/client_config/lb_policies/pick_first.c2
-rw-r--r--src/core/client_config/subchannel.c2
-rw-r--r--src/core/transport/chttp2/internal.h6
-rw-r--r--src/core/transport/chttp2_transport.c55
-rw-r--r--src/core/transport/connectivity_state.c (renamed from src/core/channel/connectivity_state.c)45
-rw-r--r--src/core/transport/connectivity_state.h (renamed from src/core/channel/connectivity_state.h)23
-rw-r--r--tools/doxygen/Doxyfile.core.internal4
-rw-r--r--tools/run_tests/sources_and_headers.json12
-rw-r--r--vsprojects/grpc/grpc.vcxproj6
-rw-r--r--vsprojects/grpc/grpc.vcxproj.filters12
-rw-r--r--vsprojects/grpc_unsecure/grpc_unsecure.vcxproj6
-rw-r--r--vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters12
17 files changed, 105 insertions, 108 deletions
diff --git a/BUILD b/BUILD
index a21004c4ed..a02295a677 100644
--- a/BUILD
+++ b/BUILD
@@ -152,7 +152,6 @@ cc_library(
"src/core/channel/channel_stack.h",
"src/core/channel/client_channel.h",
"src/core/channel/connected_channel.h",
- "src/core/channel/connectivity_state.h",
"src/core/channel/context.h",
"src/core/channel/http_client_filter.h",
"src/core/channel/http_server_filter.h",
@@ -237,6 +236,7 @@ cc_library(
"src/core/transport/chttp2/timeout_encoding.h",
"src/core/transport/chttp2/varint.h",
"src/core/transport/chttp2_transport.h",
+ "src/core/transport/connectivity_state.h",
"src/core/transport/metadata.h",
"src/core/transport/stream_op.h",
"src/core/transport/transport.h",
@@ -270,7 +270,6 @@ cc_library(
"src/core/channel/channel_stack.c",
"src/core/channel/client_channel.c",
"src/core/channel/connected_channel.c",
- "src/core/channel/connectivity_state.c",
"src/core/channel/http_client_filter.c",
"src/core/channel/http_server_filter.c",
"src/core/channel/noop_filter.c",
@@ -368,6 +367,7 @@ cc_library(
"src/core/transport/chttp2/varint.c",
"src/core/transport/chttp2/writing.c",
"src/core/transport/chttp2_transport.c",
+ "src/core/transport/connectivity_state.c",
"src/core/transport/metadata.c",
"src/core/transport/stream_op.c",
"src/core/transport/transport.c",
@@ -404,7 +404,6 @@ cc_library(
"src/core/channel/channel_stack.h",
"src/core/channel/client_channel.h",
"src/core/channel/connected_channel.h",
- "src/core/channel/connectivity_state.h",
"src/core/channel/context.h",
"src/core/channel/http_client_filter.h",
"src/core/channel/http_server_filter.h",
@@ -489,6 +488,7 @@ cc_library(
"src/core/transport/chttp2/timeout_encoding.h",
"src/core/transport/chttp2/varint.h",
"src/core/transport/chttp2_transport.h",
+ "src/core/transport/connectivity_state.h",
"src/core/transport/metadata.h",
"src/core/transport/stream_op.h",
"src/core/transport/transport.h",
@@ -500,7 +500,6 @@ cc_library(
"src/core/channel/channel_stack.c",
"src/core/channel/client_channel.c",
"src/core/channel/connected_channel.c",
- "src/core/channel/connectivity_state.c",
"src/core/channel/http_client_filter.c",
"src/core/channel/http_server_filter.c",
"src/core/channel/noop_filter.c",
@@ -598,6 +597,7 @@ cc_library(
"src/core/transport/chttp2/varint.c",
"src/core/transport/chttp2/writing.c",
"src/core/transport/chttp2_transport.c",
+ "src/core/transport/connectivity_state.c",
"src/core/transport/metadata.c",
"src/core/transport/stream_op.c",
"src/core/transport/transport.c",
@@ -940,7 +940,6 @@ objc_library(
"src/core/channel/channel_stack.c",
"src/core/channel/client_channel.c",
"src/core/channel/connected_channel.c",
- "src/core/channel/connectivity_state.c",
"src/core/channel/http_client_filter.c",
"src/core/channel/http_server_filter.c",
"src/core/channel/noop_filter.c",
@@ -1038,6 +1037,7 @@ objc_library(
"src/core/transport/chttp2/varint.c",
"src/core/transport/chttp2/writing.c",
"src/core/transport/chttp2_transport.c",
+ "src/core/transport/connectivity_state.c",
"src/core/transport/metadata.c",
"src/core/transport/stream_op.c",
"src/core/transport/transport.c",
@@ -1058,7 +1058,6 @@ objc_library(
"src/core/channel/channel_stack.h",
"src/core/channel/client_channel.h",
"src/core/channel/connected_channel.h",
- "src/core/channel/connectivity_state.h",
"src/core/channel/context.h",
"src/core/channel/http_client_filter.h",
"src/core/channel/http_server_filter.h",
@@ -1143,6 +1142,7 @@ objc_library(
"src/core/transport/chttp2/timeout_encoding.h",
"src/core/transport/chttp2/varint.h",
"src/core/transport/chttp2_transport.h",
+ "src/core/transport/connectivity_state.h",
"src/core/transport/metadata.h",
"src/core/transport/stream_op.h",
"src/core/transport/transport.h",
diff --git a/Makefile b/Makefile
index 87c36da6a3..1038158524 100644
--- a/Makefile
+++ b/Makefile
@@ -3024,7 +3024,6 @@ LIBGRPC_SRC = \
src/core/channel/channel_stack.c \
src/core/channel/client_channel.c \
src/core/channel/connected_channel.c \
- src/core/channel/connectivity_state.c \
src/core/channel/http_client_filter.c \
src/core/channel/http_server_filter.c \
src/core/channel/noop_filter.c \
@@ -3122,6 +3121,7 @@ LIBGRPC_SRC = \
src/core/transport/chttp2/varint.c \
src/core/transport/chttp2/writing.c \
src/core/transport/chttp2_transport.c \
+ src/core/transport/connectivity_state.c \
src/core/transport/metadata.c \
src/core/transport/stream_op.c \
src/core/transport/transport.c \
@@ -3284,7 +3284,6 @@ LIBGRPC_UNSECURE_SRC = \
src/core/channel/channel_stack.c \
src/core/channel/client_channel.c \
src/core/channel/connected_channel.c \
- src/core/channel/connectivity_state.c \
src/core/channel/http_client_filter.c \
src/core/channel/http_server_filter.c \
src/core/channel/noop_filter.c \
@@ -3382,6 +3381,7 @@ LIBGRPC_UNSECURE_SRC = \
src/core/transport/chttp2/varint.c \
src/core/transport/chttp2/writing.c \
src/core/transport/chttp2_transport.c \
+ src/core/transport/connectivity_state.c \
src/core/transport/metadata.c \
src/core/transport/stream_op.c \
src/core/transport/transport.c \
diff --git a/build.json b/build.json
index 541d5a3dfc..c77b7340ba 100644
--- a/build.json
+++ b/build.json
@@ -113,7 +113,6 @@
"src/core/channel/channel_stack.h",
"src/core/channel/client_channel.h",
"src/core/channel/connected_channel.h",
- "src/core/channel/connectivity_state.h",
"src/core/channel/context.h",
"src/core/channel/http_client_filter.h",
"src/core/channel/http_server_filter.h",
@@ -198,6 +197,7 @@
"src/core/transport/chttp2/timeout_encoding.h",
"src/core/transport/chttp2/varint.h",
"src/core/transport/chttp2_transport.h",
+ "src/core/transport/connectivity_state.h",
"src/core/transport/metadata.h",
"src/core/transport/stream_op.h",
"src/core/transport/transport.h",
@@ -209,7 +209,6 @@
"src/core/channel/channel_stack.c",
"src/core/channel/client_channel.c",
"src/core/channel/connected_channel.c",
- "src/core/channel/connectivity_state.c",
"src/core/channel/http_client_filter.c",
"src/core/channel/http_server_filter.c",
"src/core/channel/noop_filter.c",
@@ -307,6 +306,7 @@
"src/core/transport/chttp2/varint.c",
"src/core/transport/chttp2/writing.c",
"src/core/transport/chttp2_transport.c",
+ "src/core/transport/connectivity_state.c",
"src/core/transport/metadata.c",
"src/core/transport/stream_op.c",
"src/core/transport/transport.c",
diff --git a/gRPC.podspec b/gRPC.podspec
index ed82732bd8..a292056d56 100644
--- a/gRPC.podspec
+++ b/gRPC.podspec
@@ -154,7 +154,6 @@ Pod::Spec.new do |s|
'src/core/channel/channel_stack.h',
'src/core/channel/client_channel.h',
'src/core/channel/connected_channel.h',
- 'src/core/channel/connectivity_state.h',
'src/core/channel/context.h',
'src/core/channel/http_client_filter.h',
'src/core/channel/http_server_filter.h',
@@ -239,6 +238,7 @@ Pod::Spec.new do |s|
'src/core/transport/chttp2/timeout_encoding.h',
'src/core/transport/chttp2/varint.h',
'src/core/transport/chttp2_transport.h',
+ 'src/core/transport/connectivity_state.h',
'src/core/transport/metadata.h',
'src/core/transport/stream_op.h',
'src/core/transport/transport.h',
@@ -279,7 +279,6 @@ Pod::Spec.new do |s|
'src/core/channel/channel_stack.c',
'src/core/channel/client_channel.c',
'src/core/channel/connected_channel.c',
- 'src/core/channel/connectivity_state.c',
'src/core/channel/http_client_filter.c',
'src/core/channel/http_server_filter.c',
'src/core/channel/noop_filter.c',
@@ -377,6 +376,7 @@ Pod::Spec.new do |s|
'src/core/transport/chttp2/varint.c',
'src/core/transport/chttp2/writing.c',
'src/core/transport/chttp2_transport.c',
+ 'src/core/transport/connectivity_state.c',
'src/core/transport/metadata.c',
'src/core/transport/stream_op.c',
'src/core/transport/transport.c',
@@ -412,7 +412,6 @@ Pod::Spec.new do |s|
'src/core/channel/channel_stack.h',
'src/core/channel/client_channel.h',
'src/core/channel/connected_channel.h',
- 'src/core/channel/connectivity_state.h',
'src/core/channel/context.h',
'src/core/channel/http_client_filter.h',
'src/core/channel/http_server_filter.h',
@@ -497,6 +496,7 @@ Pod::Spec.new do |s|
'src/core/transport/chttp2/timeout_encoding.h',
'src/core/transport/chttp2/varint.h',
'src/core/transport/chttp2_transport.h',
+ 'src/core/transport/connectivity_state.h',
'src/core/transport/metadata.h',
'src/core/transport/stream_op.h',
'src/core/transport/transport.h',
diff --git a/src/core/channel/client_channel.c b/src/core/channel/client_channel.c
index b33ef7842f..e2f8debdfa 100644
--- a/src/core/channel/client_channel.c
+++ b/src/core/channel/client_channel.c
@@ -38,10 +38,10 @@
#include "src/core/channel/channel_args.h"
#include "src/core/channel/connected_channel.h"
-#include "src/core/channel/connectivity_state.h"
#include "src/core/iomgr/iomgr.h"
#include "src/core/iomgr/pollset_set.h"
#include "src/core/support/string.h"
+#include "src/core/transport/connectivity_state.h"
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
diff --git a/src/core/client_config/lb_policies/pick_first.c b/src/core/client_config/lb_policies/pick_first.c
index 9d6c264e37..cdc7e75140 100644
--- a/src/core/client_config/lb_policies/pick_first.c
+++ b/src/core/client_config/lb_policies/pick_first.c
@@ -36,7 +36,7 @@
#include <string.h>
#include <grpc/support/alloc.h>
-#include "src/core/channel/connectivity_state.h"
+#include "src/core/transport/connectivity_state.h"
typedef struct pending_pick {
struct pending_pick *next;
diff --git a/src/core/client_config/subchannel.c b/src/core/client_config/subchannel.c
index b4da9cda3f..2f5843b2a4 100644
--- a/src/core/client_config/subchannel.c
+++ b/src/core/client_config/subchannel.c
@@ -39,7 +39,7 @@
#include "src/core/channel/channel_args.h"
#include "src/core/channel/connected_channel.h"
-#include "src/core/channel/connectivity_state.h"
+#include "src/core/transport/connectivity_state.h"
typedef struct {
/* all fields protected by subchannel->mu */
diff --git a/src/core/transport/chttp2/internal.h b/src/core/transport/chttp2/internal.h
index 93235aef55..7e2e75f97d 100644
--- a/src/core/transport/chttp2/internal.h
+++ b/src/core/transport/chttp2/internal.h
@@ -34,7 +34,6 @@
#ifndef GRPC_INTERNAL_CORE_CHTTP2_INTERNAL_H
#define GRPC_INTERNAL_CORE_CHTTP2_INTERNAL_H
-#include "src/core/transport/transport_impl.h"
#include "src/core/iomgr/endpoint.h"
#include "src/core/transport/chttp2/frame.h"
#include "src/core/transport/chttp2/frame_data.h"
@@ -47,6 +46,8 @@
#include "src/core/transport/chttp2/incoming_metadata.h"
#include "src/core/transport/chttp2/stream_encoder.h"
#include "src/core/transport/chttp2/stream_map.h"
+#include "src/core/transport/connectivity_state.h"
+#include "src/core/transport/transport_impl.h"
typedef struct grpc_chttp2_transport grpc_chttp2_transport;
typedef struct grpc_chttp2_stream grpc_chttp2_stream;
@@ -335,8 +336,7 @@ struct grpc_chttp2_transport {
void *accept_stream_user_data;
/** connectivity tracking */
- grpc_iomgr_closure *on_connectivity_changed;
- grpc_connectivity_state *connectivity;
+ grpc_connectivity_state_tracker state_tracker;
} channel_callback;
};
diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c
index 11dd60bbb9..8f909dff37 100644
--- a/src/core/transport/chttp2_transport.c
+++ b/src/core/transport/chttp2_transport.c
@@ -37,18 +37,19 @@
#include <stdio.h>
#include <string.h>
+#include <grpc/support/alloc.h>
+#include <grpc/support/log.h>
+#include <grpc/support/slice_buffer.h>
+#include <grpc/support/string_util.h>
+#include <grpc/support/useful.h>
+
#include "src/core/profiling/timers.h"
#include "src/core/support/string.h"
#include "src/core/transport/chttp2/http2_errors.h"
+#include "src/core/transport/chttp2/internal.h"
#include "src/core/transport/chttp2/status_conversion.h"
#include "src/core/transport/chttp2/timeout_encoding.h"
-#include "src/core/transport/chttp2/internal.h"
#include "src/core/transport/transport_impl.h"
-#include <grpc/support/alloc.h>
-#include <grpc/support/log.h>
-#include <grpc/support/slice_buffer.h>
-#include <grpc/support/string_util.h>
-#include <grpc/support/useful.h>
/* #define REFCOUNTING_DEBUG */
@@ -81,7 +82,6 @@ static const grpc_transport_vtable vtable;
static void lock(grpc_chttp2_transport *t);
static void unlock(grpc_chttp2_transport *t);
-static void unlock_check_channel_callbacks(grpc_chttp2_transport *t);
static void unlock_check_read_write_state(grpc_chttp2_transport *t);
/* forward declarations of various callbacks that we'll build closures around */
@@ -149,6 +149,7 @@ static void destruct_transport(grpc_chttp2_transport *t) {
grpc_chttp2_stream_map_destroy(&t->parsing_stream_map);
grpc_chttp2_stream_map_destroy(&t->new_stream_map);
+ grpc_connectivity_state_destroy(&t->channel_callback.state_tracker);
gpr_mu_unlock(&t->mu);
gpr_mu_destroy(&t->mu);
@@ -229,6 +230,8 @@ static void init_transport(grpc_chttp2_transport *t,
t->parsing.deframe_state =
is_client ? GRPC_DTS_FH_0 : GRPC_DTS_CLIENT_PREFIX_0;
t->writing.is_client = is_client;
+ grpc_connectivity_state_init(&t->channel_callback.state_tracker,
+ GRPC_CHANNEL_READY);
gpr_slice_buffer_init(&t->global.qbuf);
@@ -325,6 +328,8 @@ static void destroy_transport(grpc_transport *gt) {
static void close_transport_locked(grpc_chttp2_transport *t) {
if (!t->closed) {
t->closed = 1;
+ grpc_connectivity_state_set(&t->channel_callback.state_tracker,
+ GRPC_CHANNEL_FATAL_FAILURE);
if (t->ep) {
grpc_endpoint_shutdown(t->ep);
}
@@ -445,8 +450,6 @@ static void unlock(grpc_chttp2_transport *t) {
REF_TRANSPORT(t, "writing");
grpc_chttp2_schedule_closure(&t->global, &t->writing_action, 1);
}
- /* unlock_check_parser(t); */
- unlock_check_channel_callbacks(t);
run_closures = t->global.pending_closures;
t->global.pending_closures = NULL;
@@ -520,6 +523,9 @@ void grpc_chttp2_add_incoming_goaway(
gpr_free(msg);
gpr_slice_unref(goaway_text);
transport_global->seen_goaway = 1;
+ grpc_connectivity_state_set(
+ &TRANSPORT_FROM_GLOBAL(transport_global)->channel_callback.state_tracker,
+ GRPC_CHANNEL_FATAL_FAILURE);
}
static void maybe_start_some_streams(
@@ -544,9 +550,9 @@ static void maybe_start_some_streams(
transport_global->next_stream_id += 2;
if (transport_global->next_stream_id >= MAX_CLIENT_STREAM_ID) {
- grpc_chttp2_add_incoming_goaway(
- transport_global, GRPC_CHTTP2_NO_ERROR,
- gpr_slice_from_copied_string("Exceeded sequence number limit"));
+ grpc_connectivity_state_set(&TRANSPORT_FROM_GLOBAL(transport_global)
+ ->channel_callback.state_tracker,
+ GRPC_CHANNEL_TRANSIENT_FAILURE);
}
stream_global->outgoing_window =
@@ -669,10 +675,9 @@ static void perform_transport_op(grpc_transport *gt, grpc_transport_op *op) {
}
if (op->on_connectivity_state_change) {
- GPR_ASSERT(t->channel_callback.on_connectivity_changed == NULL);
- t->channel_callback.on_connectivity_changed =
- op->on_connectivity_state_change;
- t->channel_callback.connectivity = op->connectivity_state;
+ grpc_connectivity_state_notify_on_state_change(
+ &t->channel_callback.state_tracker, op->connectivity_state,
+ op->on_connectivity_state_change);
}
if (op->send_goaway) {
@@ -928,24 +933,6 @@ static void reading_action(void *pt, int iomgr_success_ignored) {
* CALLBACK LOOP
*/
-static void unlock_check_channel_callbacks(grpc_chttp2_transport *t) {
- if (t->channel_callback.on_connectivity_changed != NULL) {
- grpc_connectivity_state current;
- if (t->closed || t->global.seen_goaway) {
- current = GRPC_CHANNEL_FATAL_FAILURE;
- } else {
- current = GRPC_CHANNEL_READY;
- }
- if (current != *t->channel_callback.connectivity) {
- *t->channel_callback.connectivity = current;
- grpc_chttp2_schedule_closure(
- &t->global, t->channel_callback.on_connectivity_changed, 1);
- t->channel_callback.on_connectivity_changed = NULL;
- t->channel_callback.connectivity = NULL;
- }
- }
-}
-
void grpc_chttp2_schedule_closure(
grpc_chttp2_transport_global *transport_global, grpc_iomgr_closure *closure,
int success) {
diff --git a/src/core/channel/connectivity_state.c b/src/core/transport/connectivity_state.c
index 0ee268ee59..5cbd67ef3c 100644
--- a/src/core/channel/connectivity_state.c
+++ b/src/core/transport/connectivity_state.c
@@ -31,52 +31,57 @@
*
*/
-#include "src/core/channel/connectivity_state.h"
+#include "src/core/transport/connectivity_state.h"
#include <grpc/support/alloc.h>
-void grpc_connectivity_state_init(grpc_connectivity_state_tracker *tracker, grpc_connectivity_state init_state) {
- tracker->current_state = init_state;
- tracker->watchers = NULL;
+void grpc_connectivity_state_init(grpc_connectivity_state_tracker *tracker,
+ grpc_connectivity_state init_state) {
+ tracker->current_state = init_state;
+ tracker->watchers = NULL;
}
void grpc_connectivity_state_destroy(grpc_connectivity_state_tracker *tracker) {
grpc_connectivity_state_watcher *w;
while ((w = tracker->watchers)) {
- tracker->watchers = w->next;
+ tracker->watchers = w->next;
- if (GRPC_CHANNEL_FATAL_FAILURE != *w->current) {
- *w->current = GRPC_CHANNEL_FATAL_FAILURE;
- grpc_iomgr_add_callback(w->notify);
- } else {
- grpc_iomgr_add_delayed_callback(w->notify, 0);
- }
- gpr_free(w);
+ if (GRPC_CHANNEL_FATAL_FAILURE != *w->current) {
+ *w->current = GRPC_CHANNEL_FATAL_FAILURE;
+ grpc_iomgr_add_callback(w->notify);
+ } else {
+ grpc_iomgr_add_delayed_callback(w->notify, 0);
+ }
+ gpr_free(w);
}
}
-grpc_connectivity_state grpc_connectivity_state_check(grpc_connectivity_state_tracker *tracker) {
- return tracker->current_state;
+grpc_connectivity_state grpc_connectivity_state_check(
+ grpc_connectivity_state_tracker *tracker) {
+ return tracker->current_state;
}
-int grpc_connectivity_state_notify_on_state_change(grpc_connectivity_state_tracker *tracker, grpc_connectivity_state *current, grpc_iomgr_closure *notify) {
+int grpc_connectivity_state_notify_on_state_change(
+ grpc_connectivity_state_tracker *tracker, grpc_connectivity_state *current,
+ grpc_iomgr_closure *notify) {
if (tracker->current_state != *current) {
*current = tracker->current_state;
grpc_iomgr_add_callback(notify);
} else {
- grpc_connectivity_state_watcher *w = gpr_malloc(sizeof(*w));
- w->current = current;
- w->notify = notify;
+ grpc_connectivity_state_watcher *w = gpr_malloc(sizeof(*w));
+ w->current = current;
+ w->notify = notify;
w->next = tracker->watchers;
tracker->watchers = w;
}
return tracker->current_state == GRPC_CHANNEL_IDLE;
}
-void grpc_connectivity_state_set(grpc_connectivity_state_tracker *tracker, grpc_connectivity_state state) {
+void grpc_connectivity_state_set(grpc_connectivity_state_tracker *tracker,
+ grpc_connectivity_state state) {
grpc_connectivity_state_watcher *new = NULL;
grpc_connectivity_state_watcher *w;
if (tracker->current_state == state) {
- return;
+ return;
}
tracker->current_state = state;
while ((w = tracker->watchers)) {
diff --git a/src/core/channel/connectivity_state.h b/src/core/transport/connectivity_state.h
index ebc1acc559..9a8c57525f 100644
--- a/src/core/channel/connectivity_state.h
+++ b/src/core/transport/connectivity_state.h
@@ -31,14 +31,14 @@
*
*/
-#ifndef GRPC_INTERNAL_CORE_CHANNEL_CONNECTIVITY_STATE_H
-#define GRPC_INTERNAL_CORE_CHANNEL_CONNECTIVITY_STATE_H
+#ifndef GRPC_INTERNAL_CORE_TRANSPORT_CONNECTIVITY_STATE_H
+#define GRPC_INTERNAL_CORE_TRANSPORT_CONNECTIVITY_STATE_H
#include <grpc/grpc.h>
#include "src/core/iomgr/iomgr.h"
typedef struct grpc_connectivity_state_watcher {
- /** we keep watchers in a linked list */
+ /** we keep watchers in a linked list */
struct grpc_connectivity_state_watcher *next;
/** closure to notify on change */
grpc_iomgr_closure *notify;
@@ -47,20 +47,25 @@ typedef struct grpc_connectivity_state_watcher {
} grpc_connectivity_state_watcher;
typedef struct {
- /** current connectivity state */
+ /** current connectivity state */
grpc_connectivity_state current_state;
/** all our watchers */
grpc_connectivity_state_watcher *watchers;
} grpc_connectivity_state_tracker;
-void grpc_connectivity_state_init(grpc_connectivity_state_tracker *tracker, grpc_connectivity_state init_state);
+void grpc_connectivity_state_init(grpc_connectivity_state_tracker *tracker,
+ grpc_connectivity_state init_state);
void grpc_connectivity_state_destroy(grpc_connectivity_state_tracker *tracker);
-void grpc_connectivity_state_set(grpc_connectivity_state_tracker *tracker, grpc_connectivity_state state);
+void grpc_connectivity_state_set(grpc_connectivity_state_tracker *tracker,
+ grpc_connectivity_state state);
-grpc_connectivity_state grpc_connectivity_state_check(grpc_connectivity_state_tracker *tracker);
+grpc_connectivity_state grpc_connectivity_state_check(
+ grpc_connectivity_state_tracker *tracker);
/** Return 1 if the channel should start connecting, 0 otherwise */
-int grpc_connectivity_state_notify_on_state_change(grpc_connectivity_state_tracker *tracker, grpc_connectivity_state *current, grpc_iomgr_closure *notify);
+int grpc_connectivity_state_notify_on_state_change(
+ grpc_connectivity_state_tracker *tracker, grpc_connectivity_state *current,
+ grpc_iomgr_closure *notify);
-#endif /* GRPC_INTERNAL_CORE_CHANNEL_CONNECTIVITY_STATE_H */
+#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CONNECTIVITY_STATE_H */
diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal
index 0da1f388c5..e2701eca3a 100644
--- a/tools/doxygen/Doxyfile.core.internal
+++ b/tools/doxygen/Doxyfile.core.internal
@@ -789,7 +789,6 @@ src/core/channel/channel_args.h \
src/core/channel/channel_stack.h \
src/core/channel/client_channel.h \
src/core/channel/connected_channel.h \
-src/core/channel/connectivity_state.h \
src/core/channel/context.h \
src/core/channel/http_client_filter.h \
src/core/channel/http_server_filter.h \
@@ -874,6 +873,7 @@ 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/connectivity_state.h \
src/core/transport/metadata.h \
src/core/transport/stream_op.h \
src/core/transport/transport.h \
@@ -907,7 +907,6 @@ src/core/channel/channel_args.c \
src/core/channel/channel_stack.c \
src/core/channel/client_channel.c \
src/core/channel/connected_channel.c \
-src/core/channel/connectivity_state.c \
src/core/channel/http_client_filter.c \
src/core/channel/http_server_filter.c \
src/core/channel/noop_filter.c \
@@ -1005,6 +1004,7 @@ src/core/transport/chttp2/timeout_encoding.c \
src/core/transport/chttp2/varint.c \
src/core/transport/chttp2/writing.c \
src/core/transport/chttp2_transport.c \
+src/core/transport/connectivity_state.c \
src/core/transport/metadata.c \
src/core/transport/stream_op.c \
src/core/transport/transport.c \
diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json
index 9bb9a4a397..3a858277fa 100644
--- a/tools/run_tests/sources_and_headers.json
+++ b/tools/run_tests/sources_and_headers.json
@@ -8680,7 +8680,6 @@
"src/core/channel/channel_stack.h",
"src/core/channel/client_channel.h",
"src/core/channel/connected_channel.h",
- "src/core/channel/connectivity_state.h",
"src/core/channel/context.h",
"src/core/channel/http_client_filter.h",
"src/core/channel/http_server_filter.h",
@@ -8777,6 +8776,7 @@
"src/core/transport/chttp2/timeout_encoding.h",
"src/core/transport/chttp2/varint.h",
"src/core/transport/chttp2_transport.h",
+ "src/core/transport/connectivity_state.h",
"src/core/transport/metadata.h",
"src/core/transport/stream_op.h",
"src/core/transport/transport.h",
@@ -8810,8 +8810,6 @@
"src/core/channel/client_channel.h",
"src/core/channel/connected_channel.c",
"src/core/channel/connected_channel.h",
- "src/core/channel/connectivity_state.c",
- "src/core/channel/connectivity_state.h",
"src/core/channel/context.h",
"src/core/channel/http_client_filter.c",
"src/core/channel/http_client_filter.h",
@@ -9025,6 +9023,8 @@
"src/core/transport/chttp2/writing.c",
"src/core/transport/chttp2_transport.c",
"src/core/transport/chttp2_transport.h",
+ "src/core/transport/connectivity_state.c",
+ "src/core/transport/connectivity_state.h",
"src/core/transport/metadata.c",
"src/core/transport/metadata.h",
"src/core/transport/stream_op.c",
@@ -9129,7 +9129,6 @@
"src/core/channel/channel_stack.h",
"src/core/channel/client_channel.h",
"src/core/channel/connected_channel.h",
- "src/core/channel/connectivity_state.h",
"src/core/channel/context.h",
"src/core/channel/http_client_filter.h",
"src/core/channel/http_server_filter.h",
@@ -9214,6 +9213,7 @@
"src/core/transport/chttp2/timeout_encoding.h",
"src/core/transport/chttp2/varint.h",
"src/core/transport/chttp2_transport.h",
+ "src/core/transport/connectivity_state.h",
"src/core/transport/metadata.h",
"src/core/transport/stream_op.h",
"src/core/transport/transport.h",
@@ -9242,8 +9242,6 @@
"src/core/channel/client_channel.h",
"src/core/channel/connected_channel.c",
"src/core/channel/connected_channel.h",
- "src/core/channel/connectivity_state.c",
- "src/core/channel/connectivity_state.h",
"src/core/channel/context.h",
"src/core/channel/http_client_filter.c",
"src/core/channel/http_client_filter.h",
@@ -9426,6 +9424,8 @@
"src/core/transport/chttp2/writing.c",
"src/core/transport/chttp2_transport.c",
"src/core/transport/chttp2_transport.h",
+ "src/core/transport/connectivity_state.c",
+ "src/core/transport/connectivity_state.h",
"src/core/transport/metadata.c",
"src/core/transport/metadata.h",
"src/core/transport/stream_op.c",
diff --git a/vsprojects/grpc/grpc.vcxproj b/vsprojects/grpc/grpc.vcxproj
index 25ba0936a1..14ddf95f81 100644
--- a/vsprojects/grpc/grpc.vcxproj
+++ b/vsprojects/grpc/grpc.vcxproj
@@ -178,7 +178,6 @@
<ClInclude Include="..\..\src\core\channel\channel_stack.h" />
<ClInclude Include="..\..\src\core\channel\client_channel.h" />
<ClInclude Include="..\..\src\core\channel\connected_channel.h" />
- <ClInclude Include="..\..\src\core\channel\connectivity_state.h" />
<ClInclude Include="..\..\src\core\channel\context.h" />
<ClInclude Include="..\..\src\core\channel\http_client_filter.h" />
<ClInclude Include="..\..\src\core\channel\http_server_filter.h" />
@@ -263,6 +262,7 @@
<ClInclude Include="..\..\src\core\transport\chttp2\timeout_encoding.h" />
<ClInclude Include="..\..\src\core\transport\chttp2\varint.h" />
<ClInclude Include="..\..\src\core\transport\chttp2_transport.h" />
+ <ClInclude Include="..\..\src\core\transport\connectivity_state.h" />
<ClInclude Include="..\..\src\core\transport\metadata.h" />
<ClInclude Include="..\..\src\core\transport\stream_op.h" />
<ClInclude Include="..\..\src\core\transport\transport.h" />
@@ -326,8 +326,6 @@
</ClCompile>
<ClCompile Include="..\..\src\core\channel\connected_channel.c">
</ClCompile>
- <ClCompile Include="..\..\src\core\channel\connectivity_state.c">
- </ClCompile>
<ClCompile Include="..\..\src\core\channel\http_client_filter.c">
</ClCompile>
<ClCompile Include="..\..\src\core\channel\http_server_filter.c">
@@ -522,6 +520,8 @@
</ClCompile>
<ClCompile Include="..\..\src\core\transport\chttp2_transport.c">
</ClCompile>
+ <ClCompile Include="..\..\src\core\transport\connectivity_state.c">
+ </ClCompile>
<ClCompile Include="..\..\src\core\transport\metadata.c">
</ClCompile>
<ClCompile Include="..\..\src\core\transport\stream_op.c">
diff --git a/vsprojects/grpc/grpc.vcxproj.filters b/vsprojects/grpc/grpc.vcxproj.filters
index 6148abe66e..591fe1bb03 100644
--- a/vsprojects/grpc/grpc.vcxproj.filters
+++ b/vsprojects/grpc/grpc.vcxproj.filters
@@ -85,9 +85,6 @@
<ClCompile Include="..\..\src\core\channel\connected_channel.c">
<Filter>src\core\channel</Filter>
</ClCompile>
- <ClCompile Include="..\..\src\core\channel\connectivity_state.c">
- <Filter>src\core\channel</Filter>
- </ClCompile>
<ClCompile Include="..\..\src\core\channel\http_client_filter.c">
<Filter>src\core\channel</Filter>
</ClCompile>
@@ -379,6 +376,9 @@
<ClCompile Include="..\..\src\core\transport\chttp2_transport.c">
<Filter>src\core\transport</Filter>
</ClCompile>
+ <ClCompile Include="..\..\src\core\transport\connectivity_state.c">
+ <Filter>src\core\transport</Filter>
+ </ClCompile>
<ClCompile Include="..\..\src\core\transport\metadata.c">
<Filter>src\core\transport</Filter>
</ClCompile>
@@ -488,9 +488,6 @@
<ClInclude Include="..\..\src\core\channel\connected_channel.h">
<Filter>src\core\channel</Filter>
</ClInclude>
- <ClInclude Include="..\..\src\core\channel\connectivity_state.h">
- <Filter>src\core\channel</Filter>
- </ClInclude>
<ClInclude Include="..\..\src\core\channel\context.h">
<Filter>src\core\channel</Filter>
</ClInclude>
@@ -743,6 +740,9 @@
<ClInclude Include="..\..\src\core\transport\chttp2_transport.h">
<Filter>src\core\transport</Filter>
</ClInclude>
+ <ClInclude Include="..\..\src\core\transport\connectivity_state.h">
+ <Filter>src\core\transport</Filter>
+ </ClInclude>
<ClInclude Include="..\..\src\core\transport\metadata.h">
<Filter>src\core\transport</Filter>
</ClInclude>
diff --git a/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj
index a7f06f0c9d..4ead6f8d98 100644
--- a/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj
+++ b/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj
@@ -160,7 +160,6 @@
<ClInclude Include="..\..\src\core\channel\channel_stack.h" />
<ClInclude Include="..\..\src\core\channel\client_channel.h" />
<ClInclude Include="..\..\src\core\channel\connected_channel.h" />
- <ClInclude Include="..\..\src\core\channel\connectivity_state.h" />
<ClInclude Include="..\..\src\core\channel\context.h" />
<ClInclude Include="..\..\src\core\channel\http_client_filter.h" />
<ClInclude Include="..\..\src\core\channel\http_server_filter.h" />
@@ -245,6 +244,7 @@
<ClInclude Include="..\..\src\core\transport\chttp2\timeout_encoding.h" />
<ClInclude Include="..\..\src\core\transport\chttp2\varint.h" />
<ClInclude Include="..\..\src\core\transport\chttp2_transport.h" />
+ <ClInclude Include="..\..\src\core\transport\connectivity_state.h" />
<ClInclude Include="..\..\src\core\transport\metadata.h" />
<ClInclude Include="..\..\src\core\transport\stream_op.h" />
<ClInclude Include="..\..\src\core\transport\transport.h" />
@@ -264,8 +264,6 @@
</ClCompile>
<ClCompile Include="..\..\src\core\channel\connected_channel.c">
</ClCompile>
- <ClCompile Include="..\..\src\core\channel\connectivity_state.c">
- </ClCompile>
<ClCompile Include="..\..\src\core\channel\http_client_filter.c">
</ClCompile>
<ClCompile Include="..\..\src\core\channel\http_server_filter.c">
@@ -460,6 +458,8 @@
</ClCompile>
<ClCompile Include="..\..\src\core\transport\chttp2_transport.c">
</ClCompile>
+ <ClCompile Include="..\..\src\core\transport\connectivity_state.c">
+ </ClCompile>
<ClCompile Include="..\..\src\core\transport\metadata.c">
</ClCompile>
<ClCompile Include="..\..\src\core\transport\stream_op.c">
diff --git a/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters
index cfb1d24c58..45ca1f7c33 100644
--- a/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters
+++ b/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters
@@ -19,9 +19,6 @@
<ClCompile Include="..\..\src\core\channel\connected_channel.c">
<Filter>src\core\channel</Filter>
</ClCompile>
- <ClCompile Include="..\..\src\core\channel\connectivity_state.c">
- <Filter>src\core\channel</Filter>
- </ClCompile>
<ClCompile Include="..\..\src\core\channel\http_client_filter.c">
<Filter>src\core\channel</Filter>
</ClCompile>
@@ -313,6 +310,9 @@
<ClCompile Include="..\..\src\core\transport\chttp2_transport.c">
<Filter>src\core\transport</Filter>
</ClCompile>
+ <ClCompile Include="..\..\src\core\transport\connectivity_state.c">
+ <Filter>src\core\transport</Filter>
+ </ClCompile>
<ClCompile Include="..\..\src\core\transport\metadata.c">
<Filter>src\core\transport</Filter>
</ClCompile>
@@ -371,9 +371,6 @@
<ClInclude Include="..\..\src\core\channel\connected_channel.h">
<Filter>src\core\channel</Filter>
</ClInclude>
- <ClInclude Include="..\..\src\core\channel\connectivity_state.h">
- <Filter>src\core\channel</Filter>
- </ClInclude>
<ClInclude Include="..\..\src\core\channel\context.h">
<Filter>src\core\channel</Filter>
</ClInclude>
@@ -626,6 +623,9 @@
<ClInclude Include="..\..\src\core\transport\chttp2_transport.h">
<Filter>src\core\transport</Filter>
</ClInclude>
+ <ClInclude Include="..\..\src\core\transport\connectivity_state.h">
+ <Filter>src\core\transport</Filter>
+ </ClInclude>
<ClInclude Include="..\..\src\core\transport\metadata.h">
<Filter>src\core\transport</Filter>
</ClInclude>