![]() |
同步阻塞RPC请求
#include "MsgRpc.hpp"
静态 Public 成员函数 | |
| static ErrCodeE | Request (uint32_t dstClientId, uint32_t module, uint32_t method, int32_t chn, const char *req=nullptr, int32_t size=0, std::string *resp=nullptr, int32_t timeoutMs=10000) |
| 发起同步阻塞RPC请求,比较耗时耗资源,尽量使用MsgRpcReqAsync异步请求 更多... | |
|
static |
| dstClientId | [in] 响应端的ClientID,由响应端定义 |
| module | [in] 目标模块,由响应端定义 |
| method | [in] 目标方法,由响应端定义 |
| chn | [in] 目标通道 |
| req | [in] 请求携带的数据,默认不携带数据 |
| size | [in] 请求携带数据大小,默认携带数据为0 |
| resp | [out] 响应返回的数据,默认不需要返回数据 |
| timeoutMs | [in] 请求超时时间,默认5s |