#pragma once #include "WHISPER/whisper.hpp" #include #include #define ZMQ_BUILD_DRAFT_API 1 #include #include namespace WHISPER { class InternalUDPService : public whispercomm { private: std::string address_; std::uint16_t port_; std::uint16_t ownReceivingPort_; zmq::context_t ctx; zmq::socket_t sender; std::shared_ptr receiver; std::uint16_t checkPort(std::uint16_t port); void derivedConnect() override; void derivedDisconnect() override; void derivedPublish(std::string msg,std::string topic) override; void derivedReceive() override; void derivedSubscribe(std::string topic) override; void derivedUnsubscribe(std::string topic) override; public: InternalUDPService(std::uint32_t id, SourceType owndevicetype,std::uint16_t port, std::string address); }; }