aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/channel
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/lib/channel')
-rw-r--r--src/core/lib/channel/handshaker.cc13
-rw-r--r--src/core/lib/channel/handshaker.h17
2 files changed, 15 insertions, 15 deletions
diff --git a/src/core/lib/channel/handshaker.cc b/src/core/lib/channel/handshaker.cc
index 1f2426bc6c..dcb149c03e 100644
--- a/src/core/lib/channel/handshaker.cc
+++ b/src/core/lib/channel/handshaker.cc
@@ -219,18 +219,17 @@ static void on_timeout(void* arg, grpc_error* error) {
grpc_handshake_manager_unref(mgr);
}
-void grpc_handshake_manager_do_handshake(grpc_handshake_manager* mgr,
- grpc_endpoint* endpoint,
- const grpc_channel_args* channel_args,
- grpc_millis deadline,
- grpc_tcp_server_acceptor* acceptor,
- grpc_iomgr_cb_func on_handshake_done,
- void* user_data) {
+void grpc_handshake_manager_do_handshake(
+ grpc_handshake_manager* mgr, grpc_pollset_set* interested_parties,
+ grpc_endpoint* endpoint, const grpc_channel_args* channel_args,
+ grpc_millis deadline, grpc_tcp_server_acceptor* acceptor,
+ grpc_iomgr_cb_func on_handshake_done, void* user_data) {
gpr_mu_lock(&mgr->mu);
GPR_ASSERT(mgr->index == 0);
GPR_ASSERT(!mgr->shutdown);
// Construct handshaker args. These will be passed through all
// handshakers and eventually be freed by the on_handshake_done callback.
+ mgr->args.interested_parties = interested_parties;
mgr->args.endpoint = endpoint;
mgr->args.args = grpc_channel_args_copy(channel_args);
mgr->args.user_data = user_data;
diff --git a/src/core/lib/channel/handshaker.h b/src/core/lib/channel/handshaker.h
index 50038e6983..68e5463123 100644
--- a/src/core/lib/channel/handshaker.h
+++ b/src/core/lib/channel/handshaker.h
@@ -54,6 +54,7 @@ typedef struct grpc_handshaker grpc_handshaker;
/// For the on_handshake_done callback, all members are input arguments,
/// which the callback takes ownership of.
typedef struct {
+ grpc_pollset_set* interested_parties;
grpc_endpoint* endpoint;
grpc_channel_args* args;
grpc_slice_buffer* read_buffer;
@@ -125,24 +126,24 @@ void grpc_handshake_manager_shutdown(grpc_handshake_manager* mgr,
grpc_error* why);
/// Invokes handshakers in the order they were added.
+/// \a interested_parties may be non-nullptr to provide a pollset_set that
+/// may be used during handshaking. Ownership is not taken.
/// Takes ownership of \a endpoint, and then passes that ownership to
/// the \a on_handshake_done callback.
/// Does NOT take ownership of \a channel_args. Instead, makes a copy before
/// invoking the first handshaker.
-/// \a acceptor will be NULL for client-side handshakers.
+/// \a acceptor will be nullptr for client-side handshakers.
///
/// When done, invokes \a on_handshake_done with a grpc_handshaker_args
/// object as its argument. If the callback is invoked with error !=
/// GRPC_ERROR_NONE, then handshaking failed and the handshaker has done
/// the necessary clean-up. Otherwise, the callback takes ownership of
/// the arguments.
-void grpc_handshake_manager_do_handshake(grpc_handshake_manager* mgr,
- grpc_endpoint* endpoint,
- const grpc_channel_args* channel_args,
- grpc_millis deadline,
- grpc_tcp_server_acceptor* acceptor,
- grpc_iomgr_cb_func on_handshake_done,
- void* user_data);
+void grpc_handshake_manager_do_handshake(
+ grpc_handshake_manager* mgr, grpc_pollset_set* interested_parties,
+ grpc_endpoint* endpoint, const grpc_channel_args* channel_args,
+ grpc_millis deadline, grpc_tcp_server_acceptor* acceptor,
+ grpc_iomgr_cb_func on_handshake_done, void* user_data);
/// Add \a mgr to the server side list of all pending handshake managers, the
/// list starts with \a *head.