Go to the documentation of this file.
30 #define MAX_CONNECTION_AGE_MS 500
31 #define MAX_CONNECTION_AGE_GRACE_MS 1000
32 #define MAX_CONNECTION_IDLE_MS 9999
34 #define MAX_CONNECTION_AGE_JITTER_MULTIPLIER 1.1
35 #define CALL_DEADLINE_S 30
40 #define CQ_MAX_CONNECTION_AGE_WAIT_TIME_S 1
43 #define CQ_MAX_CONNECTION_AGE_GRACE_WAIT_TIME_S 2
45 #define IMMEDIATE_SHUTDOWN_GRACE_TIME_MS 3000
47 static void*
tag(
intptr_t t) {
return reinterpret_cast<void*
>(t); }
58 if (!
f->server)
return;
64 if (!
f->client)
return;
93 config.init_client(&
f,
nullptr);
94 config.init_server(&
f, &server_args);
235 config.init_client(&
f,
nullptr);
236 config.init_server(&
f, &server_args);
#define CQ_MAX_CONNECTION_AGE_WAIT_TIME_S
GPRAPI void grpc_slice_unref(grpc_slice s)
GRPCAPI void grpc_call_details_destroy(grpc_call_details *details)
GRPCAPI void grpc_call_details_init(grpc_call_details *details)
grpc_metadata_array * trailing_metadata
gpr_timespec grpc_timeout_seconds_to_deadline(int64_t time_s)
grpc_status_code * status
@ GRPC_STATUS_UNAVAILABLE
#define MAX_CONNECTION_IDLE_MS
union grpc_arg::grpc_arg_value value
return memset(p, 0, total)
struct grpc_op::grpc_op_data::grpc_op_send_initial_metadata send_initial_metadata
#define GRPC_ARG_MAX_CONNECTION_AGE_MS
void max_connection_age(grpc_end2end_test_config config)
static void test_max_age_gracefully_close(grpc_end2end_test_config config)
static void end_test(grpc_end2end_test_fixture *f)
union grpc_op::grpc_op_data data
GRPCAPI void grpc_metadata_array_destroy(grpc_metadata_array *array)
GRPCAPI grpc_call_error grpc_server_request_call(grpc_server *server, grpc_call **call, grpc_call_details *details, grpc_metadata_array *request_metadata, grpc_completion_queue *cq_bound_to_call, grpc_completion_queue *cq_for_notification, void *tag_new)
static grpc_metadata_array trailing_metadata_recv
static void drain_cq(grpc_completion_queue *cq)
#define MAX_CONNECTION_AGE_GRACE_MS
@ GRPC_OP_RECV_INITIAL_METADATA
@ GRPC_OP_SEND_STATUS_FROM_SERVER
GPRAPI int gpr_time_cmp(gpr_timespec a, gpr_timespec b)
GRPCAPI void grpc_call_unref(grpc_call *call)
#define MAX_CONNECTION_AGE_JITTER_MULTIPLIER
gpr_timespec grpc_timeout_milliseconds_to_deadline(int64_t time_ms)
void cq_verifier_destroy(cq_verifier *v)
struct grpc_call grpc_call
#define IMMEDIATE_SHUTDOWN_GRACE_TIME_MS
GPRAPI grpc_slice grpc_slice_from_static_string(const char *source)
cq_verifier * cq_verifier_create(grpc_completion_queue *cq)
static grpc_metadata_array request_metadata_recv
GRPCAPI void grpc_server_destroy(grpc_server *server)
#define CQ_EXPECT_COMPLETION(v, tag, success)
GPRAPI gpr_timespec gpr_now(gpr_clock_type clock)
#define GRPC_ARG_MAX_CONNECTION_AGE_GRACE_MS
static void * tag(intptr_t t)
grpc_slice * status_details
static grpc_slice details
GRPCAPI grpc_call * grpc_channel_create_call(grpc_channel *channel, grpc_call *parent_call, uint32_t propagation_mask, grpc_completion_queue *completion_queue, grpc_slice method, const grpc_slice *host, gpr_timespec deadline, void *reserved)
struct grpc_op::grpc_op_data::grpc_op_recv_close_on_server recv_close_on_server
#define GPR_ARRAY_SIZE(array)
#define GRPC_PROPAGATE_DEFAULTS
struct grpc_op::grpc_op_data::grpc_op_send_status_from_server send_status_from_server
#define CQ_MAX_CONNECTION_AGE_GRACE_WAIT_TIME_S
static void test_max_age_forcibly_close(grpc_end2end_test_config config)
static void shutdown_server(grpc_end2end_test_fixture *f)
GRPCAPI void grpc_completion_queue_destroy(grpc_completion_queue *cq)
@ GRPC_OP_SEND_INITIAL_METADATA
static void shutdown_client(grpc_end2end_test_fixture *f)
struct grpc_op::grpc_op_data::grpc_op_recv_status_on_client recv_status_on_client
size_t trailing_metadata_count
GRPCAPI void grpc_server_shutdown_and_notify(grpc_server *server, grpc_completion_queue *cq, void *tag)
GRPCAPI grpc_event grpc_completion_queue_next(grpc_completion_queue *cq, gpr_timespec deadline, void *reserved)
void cq_verify(cq_verifier *v, int timeout_sec)
GRPCAPI void grpc_completion_queue_shutdown(grpc_completion_queue *cq)
GRPCAPI void grpc_channel_destroy(grpc_channel *channel)
@ GRPC_OP_RECV_CLOSE_ON_SERVER
@ GRPC_STATUS_UNIMPLEMENTED
struct grpc_op::grpc_op_data::grpc_op_recv_initial_metadata recv_initial_metadata
grpc_slice * status_details
#define MAX_CONNECTION_AGE_MS
grpc_completion_type type
@ GRPC_OP_RECV_STATUS_ON_CLIENT
void cq_verify_empty_timeout(cq_verifier *v, int timeout_sec)
GPRAPI int grpc_slice_str_cmp(grpc_slice a, const char *b)
static grpc_metadata_array initial_metadata_recv
#define GRPC_ARG_MAX_CONNECTION_IDLE_MS
GRPCAPI grpc_call_error grpc_call_start_batch(grpc_call *call, const grpc_op *ops, size_t nops, void *tag, void *reserved)
static grpc_completion_queue * cq
@ GRPC_OP_SEND_CLOSE_FROM_CLIENT
static grpc_call_details call_details
GRPCAPI void grpc_metadata_array_init(grpc_metadata_array *array)
void max_connection_age_pre_init(void)
grpc
Author(s):
autogenerated on Fri May 16 2025 02:59:23