MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / bytesEqual

Function bytesEqual

Tests/Libraries/Http/HttpWebSocketLifecycleTest.cpp:138–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136};
137
138static bool bytesEqual(SC::Span<const char> lhs, SC::StringSpan rhs)
139{
140 if (lhs.sizeInBytes() != rhs.sizeInBytes())
141 {
142 return false;
143 }
144 return ::memcmp(lhs.data(), rhs.bytesWithoutTerminator(), lhs.sizeInBytes()) == 0;
145}
146
147static bool resultMessageEquals(SC::Result result, SC::StringSpan expected)
148{

Callers 5

messageAssemblerMethod · 0.85
automaticPongMethod · 0.85
closeEchoMethod · 0.85
sendDataHelperMethod · 0.85
connectionPumpMethod · 0.85

Calls 2

sizeInBytesMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected