aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/transport/transport.h
diff options
context:
space:
mode:
authorGravatar Mark D. Roth <roth@google.com>2016-09-12 11:54:25 -0700
committerGravatar Mark D. Roth <roth@google.com>2016-09-12 11:54:25 -0700
commit242dc4be0e58a974f5f5852f498b0d55e0771887 (patch)
tree2f5e9b8be2ca79330556ff98dfc97ff155997b30 /src/core/lib/transport/transport.h
parent58f52b789185d696d98be3c8ef4571499c8101dd (diff)
parentec5c93cabfbf535be2528df55ca8bb4500e6bc9b (diff)
Merge remote-tracking branch 'upstream/master' into deadline_filter
Diffstat (limited to 'src/core/lib/transport/transport.h')
-rw-r--r--src/core/lib/transport/transport.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/core/lib/transport/transport.h b/src/core/lib/transport/transport.h
index 26ed6cb839..8dc393fd61 100644
--- a/src/core/lib/transport/transport.h
+++ b/src/core/lib/transport/transport.h
@@ -100,6 +100,11 @@ void grpc_transport_move_one_way_stats(grpc_transport_one_way_stats *from,
void grpc_transport_move_stats(grpc_transport_stream_stats *from,
grpc_transport_stream_stats *to);
+typedef struct {
+ grpc_closure closure;
+ void *args[2];
+} grpc_transport_private_op_data;
+
/* Transport stream op: a set of operations to perform on a transport
against a single stream */
typedef struct grpc_transport_stream_op {
@@ -149,6 +154,12 @@ typedef struct grpc_transport_stream_op {
/* Indexes correspond to grpc_context_index enum values */
grpc_call_context_element *context;
+
+ /***************************************************************************
+ * remaining fields are initialized and used at the discretion of the
+ * transport implementation */
+
+ grpc_transport_private_op_data transport_private;
} grpc_transport_stream_op;
/** Transport op: a set of operations to perform on a transport as a whole */
@@ -182,6 +193,12 @@ typedef struct grpc_transport_op {
grpc_pollset_set *bind_pollset_set;
/** send a ping, call this back if not NULL */
grpc_closure *send_ping;
+
+ /***************************************************************************
+ * remaining fields are initialized and used at the discretion of the
+ * transport implementation */
+
+ grpc_transport_private_op_data transport_private;
} grpc_transport_op;
/* Returns the amount of memory required to store a grpc_stream for this
@@ -273,6 +290,10 @@ void grpc_transport_destroy(grpc_exec_ctx *exec_ctx, grpc_transport *transport);
char *grpc_transport_get_peer(grpc_exec_ctx *exec_ctx,
grpc_transport *transport);
+/* Allocate a grpc_transport_op, and preconfigure the on_consumed closure to
+ \a on_consumed and then delete the returned transport op */
+grpc_transport_op *grpc_make_transport_op(grpc_closure *on_consumed);
+
#ifdef __cplusplus
}
#endif