NIM PC Cross Platform SDK
nim_cpp_pass_through_proxy.h
Go to the documentation of this file.
1
7#ifndef _NIM_SDK_CPP_PASS_THROUGH_PROXY_H_
8#define _NIM_SDK_CPP_PASS_THROUGH_PROXY_H_
9
10#include <functional>
11#include <map>
12#include <string>
14#include "nim_define_include.h"
16#include "public_defines.h"
21namespace nim {
22
24class NIM_SDK_CPPWRAPPER_DLL_API PassThroughProxy {
25public:
26 typedef std::function<void(int res_code, const std::string& header, const std::string& body, const std::string& json_extension)>
27 SendHttpRequestCallback;
28 typedef std::function<void(const std::string& from_accid, const std::string& body, uint64_t timestamp)> ReceivedHttpMsgCb;
29
30public:
36 static void RegReceivedHttpMsgCb(const ReceivedHttpMsgCb& cb, const std::string& json_extension);
37
54 static void SendHttpRequest(const std::string& host,
55 const std::string& path,
56 NIMSendHttpRequestMethods method,
57 const std::string& headers,
58 const std::string& body,
59 const std::string& json_extension,
60 const SendHttpRequestCallback& callback);
61};
62
63} // namespace nim
64
65#endif //_NIM_SDK_CPP_PASS_THROUGH_PROXY_H_
Definition: nim_cpp_pass_through_proxy.h:24
namespace nim
NIM 公共数据类型定义总的包含文件
透传服务代理相关的常量函数等定义头文件
定义导出宏
NIM SDK 及 NIM ChatRoom SDK 公用头文件