![]() |
同步阻塞发布消息,分离socket的创建和销毁,用于需要同步频繁发布消息的场景
#include "MsgTopic.hpp"
Public 成员函数 | |
| ErrCodeE | Create (int32_t timeoutMs=3000) |
| 创建发布连接 更多... | |
| void | Destroy () |
| 销毁发布连接 更多... | |
| ErrCodeE | Publish (uint32_t topic, const char *data, int32_t size, int32_t timeoutMs=3000) |
| 发送同步阻塞消息,比较耗时耗资源,尽量使用MsgTopicPublisherAsync异步请求 更多... | |
| ErrCodeE Emx::MsgTopicPublisherSync2::Create | ( | int32_t | timeoutMs = 3000 | ) |
被这些函数引用 Emx::MediaAdecStreamSync2::Create().
| void Emx::MsgTopicPublisherSync2::Destroy | ( | ) |
被这些函数引用 Emx::MediaAdecStreamSync2::Destroy().
| ErrCodeE Emx::MsgTopicPublisherSync2::Publish | ( | uint32_t | topic, |
| const char * | data, | ||
| int32_t | size, | ||
| int32_t | timeoutMs = 3000 |
||
| ) |
| topic | [in] 消息的topic |
| data | [in] topic携带的数据 |
| size | [in] topic携带数据的大小 |
| timeoutMs | [in] 超时时间,默认1s |