 |
Belle II Software
release-05-02-19
|
12 #include <framework/logging/LogConnectionBase.h>
13 #include <boost/asio.hpp>
23 class LogConnectionUDP final:
public LogConnectionBase {
37 boost::asio::ip::udp::socket
m_socket;
bool isConnected() final
there is no way to check if a UDP connection is fine, so we just return True always
bool sendMessage(const LogMessage &message) final
Send the log message as JSON to the UDP server.
boost::asio::io_service m_ioservice
asio service for handling the requests
~LogConnectionUDP() override
Close the socket on destruction.
boost::asio::ip::udp::endpoint m_remoteEndpoint
the remote endpoint we send to
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.
Abstract base class for different kinds of events.
boost::asio::ip::udp::socket m_socket
the socket to the UDP server