LCOV - code coverage report
Current view: top level - mq/src - ZeroMQSocket.hpp (source / functions) Coverage Total Hit
Test: coverage.info Lines: 100.0 % 2 2
Test Date: 2025-06-11 17:47:30 Functions: 66.7 % 3 2
Branches: - 0 0

             Branch data     Line data    Source code
       1                 :             : #ifndef ZERO_MQ_SOCKET_HPP
       2                 :             : #define ZERO_MQ_SOCKET_HPP
       3                 :             : 
       4                 :             : #include "IMQSocket.hpp"
       5                 :             : #include "zmq.hpp"
       6                 :             : 
       7                 :             : namespace MQ {
       8                 :             : class ZeroMQSocket : public IMQSocket {
       9                 :             :    private:
      10                 :             :     zmq::socket_t m_socket;
      11                 :             : 
      12                 :             :    public:
      13                 :           5 :     ZeroMQSocket(zmq::context_t& context, zmq::socket_type type) : m_socket(context, type) {}
      14                 :           5 :     ~ZeroMQSocket() override = default;
      15                 :             :     ZeroMQSocket(ZeroMQSocket&&) = default;
      16                 :             : 
      17                 :             :     auto connect(const std::string& endpoint) -> bool override;
      18                 :             :     auto subscribe(const std::string& topic) -> bool override;
      19                 :             :     auto bind(const std::string& endpoint) -> bool override;
      20                 :             :     auto send(const std::vector<uint8_t>& data) -> bool override;
      21                 :             :     auto receive() -> std::optional<std::vector<uint8_t>> override;
      22                 :             :     void close() override;
      23                 :             : };
      24                 :             : }  // namespace MQ
      25                 :             : 
      26                 :             : #endif
        

Generated by: LCOV version 2.0-1