MCPcopy Create free account
hub / github.com/FoundationDB/fdb-document-layer / copyInto

Method copyInto

src/BufferedConnection.actor.cpp:150–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148}
149
150void BufferedConnectionData::copyInto(uint8_t* buf, int count) {
151 uint8_t* ptr = buf;
152 int offset = buffer_begin_offset;
153
154 auto it = buffer.begin();
155
156 int remaining = count;
157
158 while (remaining) {
159 int to_copy = std::min(BCBlock::DATA_SIZE - offset, remaining);
160 memcpy(ptr, (*it)->data + offset, to_copy);
161 ++it;
162 offset = 0;
163 ptr += to_copy;
164 remaining -= to_copy;
165 }
166}
167
168StringRef BufferedConnection::peekExact(int count) {
169 ASSERT(count <= self->total_bytes.get());

Callers 2

peekExactMethod · 0.80
Future<Void> doReadFunction · 0.80

Calls 1

beginMethod · 0.80

Tested by

no test coverage detected