src/pubsub.h
@@ -50,9 +50,11 @@ Socket(shm, 64) {} SocketSubscribe() : SocketSubscribe(BHomeShm()) {} ~SocketSubscribe() { Stop(); } typedef std::function<void(const std::string &topic, const std::string &data)> TopicDataCB; bool StartRecv(const TopicDataCB &tdcb, int nworker = 2); bool Stop() { return Socket::Stop(); } bool Subscribe(const std::vector<std::string> &topics, const int timeout_ms); bool RecvSub(std::string &topic, std::string &data, const int timeout_ms); };