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

Function main

lib_acl_cpp/samples/aio/http_client/main.cpp:46–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46int 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();

Callers

nothing calls this directly

Calls 15

add_name_serversFunction · 0.85
acl_cpp_initFunction · 0.85
set_delay_secMethod · 0.80
set_delay_usecMethod · 0.80
beginMethod · 0.80
set_dnsMethod · 0.80
set_keep_aliveMethod · 0.80
usageFunction · 0.70
getoptFunction · 0.50
emptyMethod · 0.45
push_backMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…