FIX: fixed some issues with subscribung and unsubscribing from topics
This commit is contained in:
@@ -39,8 +39,6 @@ namespace WHISPER
|
||||
std::uint32_t ownID_;
|
||||
/// device Type
|
||||
SourceType ownDeviceType_;
|
||||
/// all topics this service subscribed
|
||||
std::vector<std::string> subscribedTopics;
|
||||
|
||||
/// show if the service is connected or not
|
||||
std::atomic<bool> connected;
|
||||
@@ -56,7 +54,8 @@ namespace WHISPER
|
||||
|
||||
std::shared_ptr<threadSafeQueue<WHISPER::Message>> receiveQueue = nullptr;
|
||||
|
||||
|
||||
std::atomic<bool> Connected = false;
|
||||
|
||||
|
||||
void receive();
|
||||
|
||||
@@ -75,13 +74,17 @@ namespace WHISPER
|
||||
|
||||
protected:
|
||||
|
||||
/// all topics this service subscribed
|
||||
std::vector<std::string> subscribedTopics;
|
||||
|
||||
|
||||
void addMsgToReceiverQueue(WHISPER::Message);
|
||||
void setGateway(bool);
|
||||
bool isGateway();
|
||||
|
||||
|
||||
void setConnected(bool val);
|
||||
bool isConnected();
|
||||
|
||||
|
||||
virtual void derivedConnect() = 0;
|
||||
virtual void derivedDisconnect() = 0;
|
||||
|
||||
Reference in New Issue
Block a user