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

Function main

lib_acl_cpp/samples/ssl/https_client/main.cpp:21–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19}
20
21int main(int argc, char* argv[])
22{
23 int ch, cocurrent = 1, count = 10, length = 1024;
24 bool keep_alive = false, use_ssl = false, accept_gzip = false;
25 bool show_body = false;
26 acl::string server_addr("127.0.0.1:1443");
27 acl::string domain, libpath;
28
29 acl::acl_cpp_init();
30 acl::log::stdout_open(true);
31
32 while ((ch = getopt(argc, argv, "hf:s:c:n:kSH:ZB")) > 0) {
33 switch (ch) {
34 case 'h':
35 usage(argv[0]);
36 return 0;
37 case 'f':
38 libpath = optarg;
39 break;
40 case 'c':
41 cocurrent = atoi(optarg);
42 break;
43 case 'n':
44 count = atoi(optarg);
45 break;
46 case 'k':
47 keep_alive = true;
48 break;
49 case 's':
50 server_addr = optarg;
51 break;
52 case 'S':
53 use_ssl = true;
54 break;
55 case 'H':
56 domain = optarg;
57 break;
58 case 'Z':
59 accept_gzip = true;
60 break;
61 case 'B':
62 show_body = true;
63 break;
64 default:
65 break;
66 }
67 }
68
69 (void) keep_alive;
70
71 acl::sslbase_conf* ssl_conf = NULL;
72 if (libpath.find("mbedtls")) {
73 const std::vector<acl::string>& libs = libpath.split2(";");
74 if (libs.size() != 3) {
75 printf("invalid libpath=%s\r\n", libpath.c_str());
76 return 1;
77 }
78

Callers

nothing calls this directly

Calls 15

acl_cpp_initFunction · 0.85
accept_gzipMethod · 0.80
set_show_bodyMethod · 0.80
beginMethod · 0.80
thread_idMethod · 0.80
usageFunction · 0.70
getoptFunction · 0.50
gettimeofdayFunction · 0.50
stamp_subFunction · 0.50
findMethod · 0.45
sizeMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…