|
|
@ -58,8 +58,8 @@ void grpc_chttp2_server_handshaker_factory_create_handshakers( |
|
|
|
grpc_chttp2_server_handshaker_factory *handshaker_factory, |
|
|
|
grpc_chttp2_server_handshaker_factory *handshaker_factory, |
|
|
|
grpc_handshake_manager *handshake_mgr) { |
|
|
|
grpc_handshake_manager *handshake_mgr) { |
|
|
|
if (handshaker_factory != NULL) { |
|
|
|
if (handshaker_factory != NULL) { |
|
|
|
handshaker_factory->vtable->create_handshakers( |
|
|
|
handshaker_factory->vtable->create_handshakers(exec_ctx, handshaker_factory, |
|
|
|
exec_ctx, handshaker_factory, handshake_mgr); |
|
|
|
handshake_mgr); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -71,7 +71,6 @@ void grpc_chttp2_server_handshaker_factory_destroy( |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct pending_handshake_manager_node { |
|
|
|
typedef struct pending_handshake_manager_node { |
|
|
|
grpc_handshake_manager *handshake_mgr; |
|
|
|
grpc_handshake_manager *handshake_mgr; |
|
|
|
struct pending_handshake_manager_node *next; |
|
|
|
struct pending_handshake_manager_node *next; |
|
|
@ -196,9 +195,9 @@ static void on_accept(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *tcp, |
|
|
|
// args instead of hard-coding it.
|
|
|
|
// args instead of hard-coding it.
|
|
|
|
const gpr_timespec deadline = gpr_time_add( |
|
|
|
const gpr_timespec deadline = gpr_time_add( |
|
|
|
gpr_now(GPR_CLOCK_MONOTONIC), gpr_time_from_seconds(120, GPR_TIMESPAN)); |
|
|
|
gpr_now(GPR_CLOCK_MONOTONIC), gpr_time_from_seconds(120, GPR_TIMESPAN)); |
|
|
|
grpc_handshake_manager_do_handshake( |
|
|
|
grpc_handshake_manager_do_handshake(exec_ctx, connection_state->handshake_mgr, |
|
|
|
exec_ctx, connection_state->handshake_mgr, tcp, state->args, deadline, |
|
|
|
tcp, state->args, deadline, acceptor, |
|
|
|
acceptor, on_handshake_done, connection_state); |
|
|
|
on_handshake_done, connection_state); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* Server callback: start listening on our ports */ |
|
|
|
/* Server callback: start listening on our ports */ |
|
|
@ -275,9 +274,8 @@ grpc_error *grpc_chttp2_server_add_port( |
|
|
|
memset(state, 0, sizeof(*state)); |
|
|
|
memset(state, 0, sizeof(*state)); |
|
|
|
grpc_closure_init(&state->tcp_server_shutdown_complete, |
|
|
|
grpc_closure_init(&state->tcp_server_shutdown_complete, |
|
|
|
tcp_server_shutdown_complete, state); |
|
|
|
tcp_server_shutdown_complete, state); |
|
|
|
err = |
|
|
|
err = grpc_tcp_server_create(exec_ctx, &state->tcp_server_shutdown_complete, |
|
|
|
grpc_tcp_server_create(exec_ctx, &state->tcp_server_shutdown_complete, |
|
|
|
args, &tcp_server); |
|
|
|
args, &tcp_server); |
|
|
|
|
|
|
|
if (err != GRPC_ERROR_NONE) { |
|
|
|
if (err != GRPC_ERROR_NONE) { |
|
|
|
goto error; |
|
|
|
goto error; |
|
|
|
} |
|
|
|
} |
|
|
|