|
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 |
|
|
static void | RegReceivedHttpMsgCb (const ReceivedHttpMsgCb &cb, const std::string &json_extension) |
|
static void | 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) |
|
◆ RegReceivedHttpMsgCb()
void nim::PassThroughProxy::RegReceivedHttpMsgCb |
( |
const ReceivedHttpMsgCb & |
cb, |
|
|
const std::string & |
json_extension |
|
) |
| |
|
static |
注册接受到 HTTP 透传消息的回调函数
- Parameters
-
[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 请求
- Parameters
-
[in] | host | 要发送的 HTTP 请求 Host 地址 |
[in] | path | URL 中除了 Host 的 Path |
[in] | method | 要发送的 HTTP 请求方式 |
[in] | header | 要发送的 HTTP 请求 Header 内容 |
[in] | body | 要发送的 HTTP 请求 Body 内容 |
[in] | callback | 发送请求后的数据回调函数 |
- Returns
- void 无返回值
The documentation for this class was generated from the following files:
- C:/Jks/NeIM-win32-ia32/exports/wrapper/nim_cpp_wrapper/api/nim_cpp_pass_through_proxy.h
- C:/Jks/NeIM-win32-ia32/exports/wrapper/nim_cpp_wrapper/api/nim_cpp_pass_through_proxy.cpp