| 20 | } |
| 21 | |
| 22 | int main(int argc, char* argv[]) |
| 23 | { |
| 24 | int ch, cocurrent = 1, count = 10; |
| 25 | bool use_ssl = false; |
| 26 | acl::string server_addr("127.0.0.1:1443"), host; |
| 27 | acl::string libpath; |
| 28 | acl::string url("/"); |
| 29 | |
| 30 | acl::acl_cpp_init(); |
| 31 | acl::log::stdout_open(true); |
| 32 | |
| 33 | while ((ch = getopt(argc, argv, "hf:s:c:n:SH:U:D")) > 0) { |
| 34 | switch (ch) { |
| 35 | case 'h': |
| 36 | usage(argv[0]); |
| 37 | return 0; |
| 38 | case 'f': |
| 39 | libpath = optarg; |
| 40 | break; |
| 41 | case 'c': |
| 42 | cocurrent = atoi(optarg); |
| 43 | break; |
| 44 | case 'n': |
| 45 | count = atoi(optarg); |
| 46 | break; |
| 47 | case 's': |
| 48 | server_addr = optarg; |
| 49 | break; |
| 50 | case 'S': |
| 51 | use_ssl = true; |
| 52 | break; |
| 53 | case 'H': |
| 54 | host = optarg; |
| 55 | break; |
| 56 | case 'U': |
| 57 | url = optarg; |
| 58 | break; |
| 59 | case 'D': |
| 60 | __debug = true; |
| 61 | break; |
| 62 | default: |
| 63 | break; |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | acl::sslbase_conf* ssl_conf = NULL; |
| 68 | if (libpath.find("mbedtls")) { |
| 69 | acl::mbedtls_conf::set_libpath(libpath.c_str()); |
| 70 | ssl_conf = new acl::mbedtls_conf(false); |
| 71 | if (!acl::mbedtls_conf::load()) { |
| 72 | printf("load %s error\r\n", libpath.c_str()); |
| 73 | return 1; |
| 74 | } |
| 75 | } else if (libpath.find("polarssl")) { |
| 76 | acl::polarssl_conf::set_libpath(libpath); |
| 77 | ssl_conf = new acl::polarssl_conf; |
| 78 | if (!acl::polarssl_conf::load()) { |
| 79 | printf("load %s error\r\n", libpath.c_str()); |
nothing calls this directly
no test coverage detected
searching dependent graphs…