Go to the documentation of this file.
35 #define CA_CERT_PATH "src/core/tsi/test_creds/ca.pem"
36 #define SERVER_CERT_PATH "src/core/tsi/test_creds/server1.pem"
37 #define SERVER_KEY_PATH "src/core/tsi/test_creds/server1.key"
47 #define NUM_CONNECTIONS 100
65 bool share_subchannel) {
67 std::vector<grpc_arg>
args;
71 if (creds !=
nullptr) {
74 const_cast<char*
>(
"foo.test.google.fr")));
77 if (creds !=
nullptr) {
117 connect_deadline,
cq,
nullptr);
166 const char* server_cert =
168 const char* server_key =
172 nullptr, &pem_key_cert_pair, 1, 0,
nullptr);
179 int main(
int argc,
char** argv) {
GPRAPI void grpc_slice_unref(grpc_slice s)
gpr_timespec grpc_timeout_seconds_to_deadline(int64_t time_s)
grpc_error_handle grpc_load_file(const char *filename, int add_null_terminator, grpc_slice *output)
void server_thread(void *vargs)
GRPCAPI grpc_connectivity_state grpc_channel_check_connectivity_state(grpc_channel *channel, int try_to_connect)
static void insecure_test_add_port(grpc_server *server, const char *addr)
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)
GPRAPI gpr_timespec gpr_inf_future(gpr_clock_type type)
grpc_channel_credentials * creds
#define GRPC_ARG_USE_LOCAL_SUBCHANNEL_POOL
#define GRPC_LOG_IF_ERROR(what, error)
grpc_arg grpc_channel_arg_string_create(char *name, char *value)
static void secure_test_add_port(grpc_server *server, const char *addr)
static void run_test(const test_fixture *fixture, bool share_subchannel)
GRPCAPI grpc_channel_credentials * grpc_ssl_credentials_create(const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pair, const verify_peer_options *verify_options, void *reserved)
GRPCAPI grpc_server_credentials * grpc_insecure_server_credentials_create()
std::unique_ptr< Server > server
wrapped_grpc_channel * channel
static void server_thread_func(void *args)
GRPCAPI int grpc_channel_num_external_connectivity_watchers(grpc_channel *channel)
#define GRPC_SSL_TARGET_NAME_OVERRIDE_ARG
static const test_fixture secure_test
static const char fixture[]
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)
GRPCAPI void grpc_server_credentials_release(grpc_server_credentials *creds)
GRPCAPI int grpc_server_add_http2_port(grpc_server *server, const char *addr, grpc_server_credentials *creds)
static const test_fixture insecure_test
GPRAPI void gpr_log(const char *file, int line, gpr_log_severity severity, const char *format,...) GPR_PRINT_FORMAT_CHECK(4
std::string JoinHostPort(absl::string_view host, int port)
GRPCAPI grpc_channel_credentials * grpc_insecure_credentials_create()
#define GRPC_SLICE_START_PTR(slice)
struct grpc_server grpc_server
GRPCAPI void grpc_server_destroy(grpc_server *server)
int grpc_pick_unused_port_or_die(void)
grpc_completion_queue * cq
static grpc_channel * create_test_channel(const char *addr, grpc_channel_credentials *creds, bool share_subchannel)
GRPCAPI void grpc_channel_credentials_release(grpc_channel_credentials *creds)
struct test_fixture test_fixture
GRPCAPI grpc_channel * grpc_channel_create(const char *target, grpc_channel_credentials *creds, const grpc_channel_args *args)
grpc_arg grpc_channel_arg_integer_create(char *name, int value)
int main(int argc, char **argv)
GRPCAPI void grpc_completion_queue_destroy(grpc_completion_queue *cq)
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)
GRPCAPI void grpc_completion_queue_shutdown(grpc_completion_queue *cq)
GRPCAPI void grpc_channel_destroy(grpc_channel *channel)
struct grpc_channel grpc_channel
GRPCAPI void grpc_channel_watch_connectivity_state(grpc_channel *channel, grpc_connectivity_state last_observed_state, gpr_timespec deadline, grpc_completion_queue *cq, void *tag)
const char test_root_cert[]
GRPCAPI grpc_completion_queue * grpc_completion_queue_create_for_next(void *reserved)
grpc_completion_type type
GRPCAPI void grpc_init(void)
GRPCAPI void grpc_server_start(grpc_server *server)
void(* add_server_port)(grpc_server *server, const char *addr)
GRPCAPI void grpc_shutdown(void)
static grpc_completion_queue * cq
static struct rpc_state state
grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:01:16