| 44 | } |
| 45 | |
| 46 | int main(int argc, char* argv[]) |
| 47 | { |
| 48 | int ch, ns_timeout = 5, conn_timeout = 5, rw_timeout = 5, cocurrent = 1; |
| 49 | acl::string addr("pvwu8bubc.bkt.clouddn.com:80"); |
| 50 | acl::string host("pvwu8bubc.bkt.clouddn.com"), url("/20160528212429_c2HAm.jpeg"); |
| 51 | std::vector<acl::string> name_servers; |
| 52 | bool debug = false, keep_alive = false; |
| 53 | acl::string event("kernel"); |
| 54 | acl::aio_handle_type event_type; |
| 55 | |
| 56 | while ((ch = getopt(argc, argv, "he:Kc:s:N:U:H:t:i:DT:")) > 0) { |
| 57 | switch (ch) { |
| 58 | case 'h': |
| 59 | usage(argv[0]); |
| 60 | return (0); |
| 61 | case 'e': |
| 62 | event = optarg; |
| 63 | break; |
| 64 | case 'K': |
| 65 | keep_alive = true; |
| 66 | break; |
| 67 | case 'c': |
| 68 | cocurrent = atoi(optarg); |
| 69 | break; |
| 70 | case 's': |
| 71 | addr = optarg; |
| 72 | break; |
| 73 | case 'N': |
| 74 | add_name_servers(name_servers, optarg); |
| 75 | break; |
| 76 | case 'U': |
| 77 | url = optarg; |
| 78 | break; |
| 79 | case 'H': |
| 80 | host = optarg; |
| 81 | break; |
| 82 | case 't': |
| 83 | conn_timeout = atoi(optarg); |
| 84 | break; |
| 85 | case 'i': |
| 86 | rw_timeout = atoi(optarg); |
| 87 | break; |
| 88 | case 'D': |
| 89 | debug = true; |
| 90 | break; |
| 91 | case 'T': |
| 92 | ns_timeout = atoi(optarg); |
| 93 | break; |
| 94 | default: |
| 95 | break; |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | if (name_servers.empty()) { |
| 100 | name_servers.push_back("8.8.8.8:53"); |
| 101 | } |
| 102 | |
| 103 | acl::acl_cpp_init(); |
nothing calls this directly
no test coverage detected
searching dependent graphs…