filesaver
|
#include <UDPSender.h>
Public Member Functions | |
Constructor and destructor | |
UDPSender (std::string host, const uint16_t port, const std::optional< uint64_t > batchsize=std::nullopt) noexcept | |
Constructor. More... | |
~UDPSender () | |
Destructor. More... | |
Methods | |
void | setConfig (const std::string &host, const uint16_t port) noexcept |
Sets a configuration { host, port }. More... | |
void | send (const std::string &message) noexcept |
Send a message. More... | |
std::optional< std::string > | errorMessage () const noexcept |
Returns the error message as an optional string. More... | |
UDP sender
A simple UDP sender handling batching. Its configuration can be changed at runtime for more flexibility.
Definition at line 47 of file UDPSender.h.
|
noexcept |
Constructor.
Definition at line 28 of file UDPSender.cpp.
filesaver::statsd::UDPSender::~UDPSender | ( | ) |
Destructor.
Definition at line 65 of file UDPSender.cpp.
|
noexcept |
Returns the error message as an optional string.
Definition at line 115 of file UDPSender.cpp.
|
noexcept |
Send a message.
Definition at line 94 of file UDPSender.cpp.
|
noexcept |
Sets a configuration { host, port }.
Definition at line 80 of file UDPSender.cpp.