acl/lib_acl_cpp/include/acl_cpp/http/http_utils.hpp
zsxxsz 4a219509b9 acl.3.0.14 release
some new features, and some bug fixed
2013-12-07 20:31:59 +08:00

34 lines
826 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#pragma once
#include "acl_cpp/acl_cpp_define.hpp"
namespace acl {
class ACL_CPP_API http_utils
{
public:
http_utils() {}
~http_utils() {}
/**
* 从完整的 url 中获得 WEB 服务器地址格式domain:port
* @param url {const char*} HTTP url非空
* @param addr {char*} 存储结果存储格式domain:port
* @param size {size_t} out 缓冲区大小
* @return {bool} 是否成功获得
*/
static bool get_addr(const char* url, char* addr, size_t size);
/**
* 从完整的 url 中获得 WEB 服务器 IP 地址及端口号
* @param url {const char*} HTTP url非空
* @param domain {char*} 存储域名
* @param size {size_t} domain 内存大小
* @param port {unsigned short*} 存储端口号大小
* @return {bool} 是否成功获得
*/
static bool get_addr(const char* url, char* domain, size_t size,
unsigned short* port);
};
} // namespace acl