MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / send

Method send

deps/cpp-statsd-client/include/cpp-statsd-client/UDPSender.hpp:228–239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

226}
227
228inline void UDPSender::send(const std::string& message) noexcept {
229 m_errorMessage.clear();
230
231 // If batching is on, accumulate messages in the queue
232 if (m_batchsize > 0) {
233 queueMessage(message);
234 return;
235 }
236
237 // Or send it right now
238 sendToDaemon(message);
239}
240
241inline void UDPSender::queueMessage(const std::string& message) noexcept {
242 // We aquire a lock but only if we actually need to (i.e. there is a thread also accessing the queue)

Callers 2

handle_writeMethod · 0.45
flush_db_syncFunction · 0.45

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected