Go to the documentation of this file.
62 static void*
tag(
intptr_t t) {
return reinterpret_cast<void*
>(t); }
172 int main(
int argc,
char** argv) {
178 int shutdown_started = 0;
179 int shutdown_finished = 0;
182 const char*
addr =
nullptr;
190 fake_argv[0] = argv[0];
194 srand(
static_cast<unsigned>(clock()));
202 if (
addr ==
nullptr) {
204 addr = addr_buf.c_str();
233 while (!shutdown_finished) {
241 shutdown_cq,
tag(1000),
247 shutdown_started = 1;
257 switch (
reinterpret_cast<intptr_t>(s)) {
259 if (
call !=
nullptr) {
261 "/Reflector/reflectStream")) {
315 shutdown_finished = 1;
@ FLING_SERVER_BATCH_OPS_FOR_UNARY
struct grpc_byte_buffer * send_message
GRPCAPI void grpc_call_details_destroy(grpc_call_details *details)
GRPCAPI void grpc_call_details_init(grpc_call_details *details)
gpr_timespec grpc_timeout_seconds_to_deadline(int64_t time_s)
GRPCAPI grpc_completion_queue * grpc_completion_queue_create_for_pluck(void *reserved)
static grpc_metadata_array initial_metadata_send
struct grpc_op::grpc_op_data::grpc_op_send_initial_metadata send_initial_metadata
@ FLING_SERVER_READ_FOR_UNARY
@ FLING_SERVER_WRITE_FOR_STREAMING
static void request_call(void)
void gpr_cmdline_destroy(gpr_cmdline *cl)
GRPCAPI grpc_server * grpc_server_create(const grpc_channel_args *args, void *reserved)
GRPCAPI void grpc_server_register_completion_queue(grpc_server *server, grpc_completion_queue *cq, void *reserved)
const char test_server1_cert[]
void gpr_cmdline_add_flag(gpr_cmdline *cl, const char *name, const char *help, int *value)
struct grpc_op::grpc_op_data::grpc_op_recv_message recv_message
void grpc_test_init(int *argc, char **argv)
void grpc_profiler_start(const char *filename)
union grpc_op::grpc_op_data data
GRPCAPI grpc_server_credentials * grpc_insecure_server_credentials_create()
struct grpc_byte_buffer ** recv_message
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)
void gpr_timers_set_log_filename(const char *)
static grpc_op unary_ops[6]
@ GRPC_OP_SEND_STATUS_FROM_SERVER
GRPCAPI grpc_server_credentials * grpc_ssl_server_credentials_create(const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pairs, size_t num_key_cert_pairs, int force_client_auth, void *reserved)
static grpc_byte_buffer * payload_buffer
GRPCAPI void grpc_server_credentials_release(grpc_server_credentials *creds)
static void signal(notification *n)
GRPCAPI int grpc_server_add_http2_port(grpc_server *server, const char *addr, grpc_server_credentials *creds)
GRPCAPI void grpc_call_unref(grpc_call *call)
GPRAPI void gpr_log(const char *file, int line, gpr_log_severity severity, const char *format,...) GPR_PRINT_FORMAT_CHECK(4
void gpr_cmdline_add_string(gpr_cmdline *cl, const char *name, const char *help, const char **value)
struct grpc_call grpc_call
std::string JoinHostPort(absl::string_view host, int port)
static grpc_completion_queue * cq
struct grpc_server grpc_server
static grpc_op status_op[2]
static grpc_metadata_array request_metadata_recv
GRPCAPI void grpc_server_destroy(grpc_server *server)
@ FLING_SERVER_SEND_STATUS_FOR_STREAMING
static void sigint_handler(int)
int grpc_pick_unused_port_or_die(void)
GPRAPI gpr_timespec gpr_now(gpr_clock_type clock)
static grpc_byte_buffer * terminal_buffer
struct grpc_op::grpc_op_data::grpc_op_recv_close_on_server recv_close_on_server
GRPCAPI grpc_event grpc_completion_queue_pluck(grpc_completion_queue *cq, void *tag, gpr_timespec deadline, void *reserved)
static void start_read_op(int t)
struct grpc_op::grpc_op_data::grpc_op_send_status_from_server send_status_from_server
GPRAPI gpr_timespec gpr_time_add(gpr_timespec a, gpr_timespec b)
GRPCAPI void grpc_completion_queue_destroy(grpc_completion_queue *cq)
@ GRPC_OP_SEND_INITIAL_METADATA
struct grpc_op::grpc_op_data::grpc_op_send_message send_message
static void * tag(intptr_t t)
static grpc_server * server
static void handle_unary_method(void)
GPRAPI gpr_timespec gpr_time_from_micros(int64_t us, gpr_clock_type clock_type)
size_t trailing_metadata_count
GRPCAPI void grpc_server_shutdown_and_notify(grpc_server *server, grpc_completion_queue *cq, void *tag)
GRPCAPI void grpc_byte_buffer_destroy(grpc_byte_buffer *bb)
GRPCAPI grpc_event grpc_completion_queue_next(grpc_completion_queue *cq, gpr_timespec deadline, void *reserved)
void grpc_profiler_stop(void)
GRPCAPI void grpc_completion_queue_shutdown(grpc_completion_queue *cq)
gpr_cmdline * gpr_cmdline_create(const char *description)
@ GRPC_OP_RECV_CLOSE_ON_SERVER
static void start_send_status(void)
static grpc_op metadata_send_op
static void start_write_op(void)
@ FLING_SERVER_SEND_INIT_METADATA_FOR_STREAMING
int main(int argc, char **argv)
GRPCAPI grpc_completion_queue * grpc_completion_queue_create_for_next(void *reserved)
grpc_slice * status_details
grpc_completion_type type
GRPCAPI void grpc_init(void)
GRPCAPI void grpc_server_start(grpc_server *server)
GPRAPI int grpc_slice_str_cmp(grpc_slice a, const char *b)
const char test_server1_key[]
@ FLING_SERVER_READ_FOR_STREAMING
GRPCAPI grpc_call_error grpc_call_start_batch(grpc_call *call, const grpc_op *ops, size_t nops, void *tag, void *reserved)
static void send_initial_metadata(void)
GRPCAPI void grpc_shutdown(void)
static grpc_call_details call_details
GRPCAPI void grpc_metadata_array_init(grpc_metadata_array *array)
int gpr_cmdline_parse(gpr_cmdline *cl, int argc, char **argv)
@ FLING_SERVER_NEW_REQUEST
grpc
Author(s):
autogenerated on Fri May 16 2025 03:00:10