MCPcopy Create free account
hub / github.com/ReversecLabs/C3 / PushNextChunk

Method PushNextChunk

Src/Core/QualityOfService.cpp:60–67  ·  view source on GitHub ↗

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

58
59////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
60void FSecure::C3::QualityOfService::Packet::PushNextChunk(uint32_t chunkId, uint32_t expectedSize, ByteVector chunk)
61{
62 if (auto it = m_Chunks.find(chunkId); it != m_Chunks.end())
63 throw std::runtime_error{ OBF("QoS error. Received chunk of packet was already set") };
64
65 m_Size += static_cast<uint32_t>(chunk.size());
66 m_Chunks.emplace(chunkId, std::move(chunk));
67}
68
69////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
70FSecure::ByteVector FSecure::C3::QualityOfService::Packet::Read()

Callers 1

PushReceivedChunkMethod · 0.80

Calls 3

findMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected