diff --git a/src/com/ZmqContext.cpp b/src/com/ZmqContext.cpp new file mode 100644 index 0000000..9ef01ce --- /dev/null +++ b/src/com/ZmqContext.cpp @@ -0,0 +1,20 @@ +/* + * Author: + * Sven Czarnian + * Brief: + * Implements the zmq context manager + * Copyright: + * 2021 Sven Czarnian + * License: + * GNU General Public License v3 (GPLv3) + */ + +#include "ZmqContext.h" + +using namespace aman; + +static zmq::context_t __context(2); + +zmq::context_t& ZmqContext::context() { + return __context; +} diff --git a/src/com/ZmqContext.h b/src/com/ZmqContext.h new file mode 100644 index 0000000..b3d4b98 --- /dev/null +++ b/src/com/ZmqContext.h @@ -0,0 +1,25 @@ +/* + * @brief Defines the context manager + * @file src/com/ZmqContext.h + * @author Sven Czarnian + * @copyright Copyright 2021 Sven Czarnian + * @license This project is published under the GNU General Public License v3 (GPLv3) + */ + +#pragma once + +#include + +namespace aman { + /** + * @brief Handles the ZMQ context information + */ + class ZmqContext { + public: + /** + * @brief Returns the system wide context + * @return The ZMQ context + */ + static zmq::context_t& context(); + }; +}