MCPcopy Create free account
hub / github.com/apple/foundationdb / read

Method read

fdbrpc/SimExternalConnection.actor.cpp:89–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87}
88
89int SimExternalConnection::read(uint8_t* begin, uint8_t* end) {
90 auto toRead = std::min<int>(end - begin, readBuffer.size());
91 std::copy(readBuffer.begin(), readBuffer.begin() + toRead, begin);
92 readBuffer.erase(readBuffer.begin(), readBuffer.begin() + toRead);
93 return toRead;
94}
95
96int SimExternalConnection::write(SendBuffer const* buffer, int limit) {
97 boost::system::error_code err;

Callers

nothing calls this directly

Calls 4

copyFunction · 0.85
sizeMethod · 0.45
beginMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected