|
ngl_server 1.0
基于 Actor 模型的 C++ 服务器框架
|
基于libcurl的HTTP客户端封装,支持GET/POST请求和SMTP邮件发送。 More...
#include "actor/protocol/nprotocol.h"#include "tools/tools/tools_thread.h"#include "tools/tools/tools_nwork.h"#include "tools/log/nlog.h"#include <curl/curl.h>#include <functional>#include <vector>#include <memory>#include <string>#include <array>#include <list>Classes | |
| struct | ngl::tools::http_parm |
| HTTP请求参数结构体。 More... | |
| struct | ngl::tools::mail_param |
| 邮件发送参数结构体。 More... | |
| class | ngl::tools::curl |
| HTTP客户端管理类(单例)。 More... | |
Namespaces | |
| namespace | ngl::tools |
| 工具函数命名空间。 | |
Enumerations | |
| enum | ngl::tools::ENUM_MODE { ENUM_MODE_NULL , ngl::tools::ENUM_MODE_HTTP , ngl::tools::ENUM_MODE_HTTPS } |
| HTTP协议模式枚举。 More... | |
| enum | ngl::tools::ENUM_TYPE { ENUM_TYPE_NULL , ngl::tools::ENUM_TYPE_POST , ngl::tools::ENUM_TYPE_GET } |
| HTTP请求方法枚举。 More... | |
Functions | |
| void | ngl::tools::test_manage_curl () |
| 测试HTTP请求功能 | |
| void | ngl::tools::test_mail (const char *atitle, const char *acontent, const std::vector< std::pair< std::string, std::string > > &amailvec) |
| 测试邮件发送功能 | |
基于libcurl的HTTP客户端封装,支持GET/POST请求和SMTP邮件发送。
提供异步HTTP请求和邮件发送功能,通过后台工作队列执行阻塞的libcurl操作, 避免阻塞主线程。支持HTTP/HTTPS、自定义请求头、Cookie、超时配置等。