| 72 | } |
| 73 | |
| 74 | int 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 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…