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

Method TestOverlapped

Src/ChannelLinter/ChannelLinter.cpp:211–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209
210
211 bool ChannelLinter::TestOverlapped(MockDeviceBridge& channel, MockDeviceBridge& complementary, ByteView data)
212 {
213 auto sender = channel.GetChunkSender(data);
214 auto receiver = complementary.GetChunkReceiver();
215
216 for (auto noProgressCounter = 0; noProgressCounter < 10; ++noProgressCounter)
217 {
218 if (!sender.IsDone() && sender.Send())
219 noProgressCounter = 0;
220
221 if (receiver.Receive())
222 noProgressCounter = 0;
223
224 if (auto && packets = receiver.GetPackets(); !packets.empty())
225 return ByteView{ packets[0] } == data;
226 }
227
228 return false;
229 }
230
231 bool ChannelLinter::TestSequential(MockDeviceBridge& channel, MockDeviceBridge& complementary, ByteView data)
232 {

Callers

nothing calls this directly

Calls 6

GetChunkSenderMethod · 0.80
GetChunkReceiverMethod · 0.80
IsDoneMethod · 0.80
SendMethod · 0.45
ReceiveMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected