#include <nim_cpp_pass_through_proxy.h>
|
| typedef std::function< void(int res_code, const std::string &header, const std::string &body, const std::string &json_extension) | SendHttpRequestCallback) |
| |
| typedef std::function< void(const std::string &from_accid, const std::string &body, uint64_t timestamp) | ReceivedHttpMsgCb) |
| |
◆ ReceivedHttpMsgCb
| typedef std::function<void(const std::string& from_accid, const std::string& body, uint64_t timestamp) nim::PassThroughProxy::ReceivedHttpMsgCb) |
◆ SendHttpRequestCallback
| typedef std::function<void(int res_code, const std::string& header, const std::string& body, const std::string& json_extension) nim::PassThroughProxy::SendHttpRequestCallback) |
◆ RegReceivedHttpMsgCb()
| void nim::PassThroughProxy::RegReceivedHttpMsgCb |
( |
const ReceivedHttpMsgCb & | cb, |
|
|
const std::string & | json_extension ) |
|
static |
注册接受到 HTTP 透传消息的回调函数
- 参数
-
| [in] | cb | 要注册的回调函数 |
| [in] | json_extension | 拓展字段,暂时无用 |
◆ SendHttpRequest()
| static void nim::PassThroughProxy::SendHttpRequest |
( |
const std::string & | host, |
|
|
const std::string & | path, |
|
|
NIMSendHttpRequestMethods | method, |
|
|
const std::string & | headers, |
|
|
const std::string & | body, |
|
|
const std::string & | json_extension, |
|
|
const SendHttpRequestCallback & | callback ) |
|
static |
发送一个透传 HTTP 请求
- 参数
-
| [in] | host | 要发送的 HTTP 请求 Host 地址 |
| [in] | path | URL 中除了 Host 的 Path |
| [in] | method | 要发送的 HTTP 请求方式 |
| [in] | header | 要发送的 HTTP 请求 Header 内容 |
| [in] | body | 要发送的 HTTP 请求 Body 内容 |
| [in] | callback | 发送请求后的数据回调函数 |
- 返回
- void 无返回值
该类的文档由以下文件生成: