MCPcopy Create free account
hub / github.com/Icinga/icinga2 / Read

Method Read

lib/base/fifo.cpp:61–75  ·  view source on GitHub ↗

* Implements IOQueue::Read. */

Source from the content-addressed store, hash-verified

59 * Implements IOQueue::Read.
60 */
61size_t FIFO::Read(void *buffer, size_t count)
62{
63 if (count > m_DataSize)
64 count = m_DataSize;
65
66 if (buffer)
67 std::memcpy(buffer, m_Buffer + m_Offset, count);
68
69 m_DataSize -= count;
70 m_Offset += count;
71
72 Optimize();
73
74 return count;
75}
76
77/**
78 * Implements IOQueue::Write.

Callers 3

CommandPipeThreadMethod · 0.45
FillFromStreamMethod · 0.45
BOOST_AUTO_TEST_CASEFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected