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

Method PassNetworkPacket

Src/Core/DeviceBridge.cpp:48–57  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

46
47////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
48void FSecure::C3::Core::DeviceBridge::PassNetworkPacket(ByteView packet)
49{
50 if (m_IsNegotiationChannel && !m_IsSlave) // negotiation channel does not support chunking. Just pass packet and leave.
51 return GetRelay()->OnPacketReceived(packet, shared_from_this());
52
53 m_QoS.PushReceivedChunk(packet);
54 auto nextPacket = m_QoS.GetNextPacket();
55 if (!nextPacket.empty())
56 GetRelay()->OnPacketReceived(nextPacket, shared_from_this());
57}
58
59////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
60void FSecure::C3::Core::DeviceBridge::OnPassNetworkPacket(ByteView packet)

Callers 1

OnReceiveMethod · 0.45

Calls 4

OnPacketReceivedMethod · 0.80
PushReceivedChunkMethod · 0.80
GetNextPacketMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected