NIM SDK API  9.0.0
Public Types | Static Public Member Functions | List of all members
nim::PassThroughProxy Class Reference

Public Types

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 Public Member Functions

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)
 

Member Function Documentation

◆ 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]pathURL 中除了 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 file: