| 313 | } |
| 314 | |
| 315 | int 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 |
nothing calls this directly
no test coverage detected
searching dependent graphs…