10#include <framework/logging/LogConnectionBase.h>
11#include <boost/asio.hpp>
LogConnectionBase()
The LogConnectionBase default constructor.
~LogConnectionUDP() override
Close the socket on destruction.
boost::asio::ip::udp::endpoint m_remoteEndpoint
the remote endpoint we send to
boost::asio::ip::udp::socket m_socket
the socket to the UDP server
bool sendMessage(const LogMessage &message) final
Send the log message as JSON to the UDP server.
bool isConnected() final
there is no way to check if a UDP connection is fine, so we just return True always
LogConnectionUDP(const std::string &hostname, unsigned short port)
Create a new UDP log connection with the hostname (as name or IP) and the port to connect to.
boost::asio::io_service m_ioservice
asio service for handling the requests
Abstract base class for different kinds of events.