summaryrefslogtreecommitdiff
path: root/controller/RabbitMQ.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'controller/RabbitMQ.hpp')
-rw-r--r--controller/RabbitMQ.hpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/controller/RabbitMQ.hpp b/controller/RabbitMQ.hpp
index d341681b..6bac68da 100644
--- a/controller/RabbitMQ.hpp
+++ b/controller/RabbitMQ.hpp
@@ -23,16 +23,17 @@
* directly against ZeroTier software without disclosing the source code
* of your own application.
*/
+
#ifndef ZT_CONTROLLER_RABBITMQ_HPP
#define ZT_CONTROLLER_RABBITMQ_HPP
namespace ZeroTier
{
struct MQConfig {
- const char *host;
- int port;
- const char *username;
- const char *password;
+ const char *host;
+ int port;
+ const char *username;
+ const char *password;
};
}
@@ -49,26 +50,25 @@ namespace ZeroTier
class RabbitMQ {
public:
- RabbitMQ(MQConfig *cfg, const char *queueName);
- ~RabbitMQ();
+ RabbitMQ(MQConfig *cfg, const char *queueName);
+ ~RabbitMQ();
- void init();
+ void init();
- std::string consume();
+ std::string consume();
private:
- MQConfig *_mqc;
- const char *_qName;
+ MQConfig *_mqc;
+ const char *_qName;
- amqp_socket_t *_socket;
- amqp_connection_state_t _conn;
- amqp_queue_declare_ok_t *_q;
- int _status;
+ amqp_socket_t *_socket;
+ amqp_connection_state_t _conn;
+ amqp_queue_declare_ok_t *_q;
+ int _status;
- int _channel;
+ int _channel;
Mutex _chan_m;
-
};
}