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

Function main

lib_acl_cpp/samples/http_client2/http_client2.cpp:74–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74int main(int argc, char* argv[])
75{
76 (void) argc; (void) argv;
77 acl::acl_cpp_init(); // �����ȳ�ʼ��
78
79 //const char* url = "http://www.sina.com.cn/";
80 //const char* host = "www.sina.com.cn";
81 //const char* addr = "www.sina.com.cn:80";
82
83 get_url("http://www.sina.com.cn/?name=value&nam2=value2", "www.sina.com.cn",
84 "www.sina.com.cn:80", "sina.txt");
85 get_url("http://www.hexun.com/", "www.hexun.com",
86 "www.hexun.com:80", "hexun.txt");
87 get_url("/", "www.hexun.com", "www.hexun.com:80", "hexun.txt");
88 get_url("http://www.baidu.com", "www.baidu.com",
89 "www.baidu.com:80", "baidu.txt");
90
91 acl::http_header header(400);
92 acl::string buf;
93 header.set_content_length(1000);
94 header.set_keep_alive(true);
95 header.add_entry("name", "value");
96 header.build_response(buf);
97 printf("[%s]\r\n", buf.c_str());
98
99 printf("enter any key to exist\r\n");
100 getchar();
101
102 return 0;
103}

Callers

nothing calls this directly

Calls 5

acl_cpp_initFunction · 0.85
set_keep_aliveMethod · 0.80
build_responseMethod · 0.80
get_urlFunction · 0.70
c_strMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…