MCPcopy Create free account
hub / github.com/acl-dev/acl / main

Function main

lib_acl_cpp/samples/aio/aio_client_ssl/main.cpp:315–426  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

313}
314
315int main(int argc, char* argv[])
316{
317 bool use_kernel = false;
318 int ch;
319 IO_CTX ctx;
320 acl::string libssl_path;
321
322 memset(&ctx, 0, sizeof(ctx));
323 ctx.connect_timeout = 5;
324 ctx.nopen_limit = 10;
325 ctx.id_begin = 1;
326 ctx.nwrite_limit = 10;
327 ctx.debug = false;
328 snprintf(ctx.addr, sizeof(ctx.addr), "127.0.0.1:9001");
329
330 while ((ch = getopt(argc, argv, "hc:n:kl:dt:S:")) > 0) {
331 switch (ch) {
332 case 'c':
333 ctx.nopen_limit = atoi(optarg);
334 if (ctx.nopen_limit <= 0) {
335 ctx.nopen_limit = 10;
336 }
337 break;
338 case 'n':
339 ctx.nwrite_limit = atoi(optarg);
340 if (ctx.nwrite_limit <= 0) {
341 ctx.nwrite_limit = 10;
342 }
343 break;
344 case 'h':
345 usage(argv[0]);
346 return 0;
347 case 'k':
348 use_kernel = true;
349 break;
350 case 'l':
351 snprintf(ctx.addr, sizeof(ctx.addr), "%s", optarg);
352 break;
353 case 'd':
354 ctx.debug = true;
355 break;
356 case 't':
357 ctx.connect_timeout = atoi(optarg);
358 break;
359 case 'S':
360 libssl_path = optarg;
361 break;
362 default:
363 break;
364 }
365 }
366
367 acl::meter_time(__FUNCTION__, __LINE__, "-----BEGIN-----");
368 acl::acl_cpp_init();
369 acl::log::stdout_open(true);
370
371 __ssl_conf = NULL;
372

Callers

nothing calls this directly

Calls 10

meter_timeFunction · 0.85
acl_cpp_initFunction · 0.85
usageFunction · 0.70
connect_serverFunction · 0.70
getoptFunction · 0.50
emptyMethod · 0.45
findMethod · 0.45
sizeMethod · 0.45
c_strMethod · 0.45
checkMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…