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

Method nextBuffer

flow/Net2Packet.cpp:58–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58void PacketWriter::nextBuffer(size_t size) {
59 auto last_buffer_bytes_written = buffer->bytes_written;
60 length += last_buffer_bytes_written;
61
62 buffer->next = PacketBuffer::create(size);
63 buffer = buffer->nextPacketBuffer();
64
65 if (reliable) {
66 reliable->end = last_buffer_bytes_written;
67 reliable->cont = new ReliablePacket;
68 reliable = reliable->cont;
69 reliable->buffer = buffer;
70 buffer->addref();
71 reliable->begin = 0;
72 }
73}
74
75// Adds exactly bytes of unwritten length to the buffer, possibly across packet buffer boundaries,
76// and initializes buf to point to the packet buffer(s) that contain the unwritten space

Callers

nothing calls this directly

Calls 2

nextPacketBufferMethod · 0.80
addrefMethod · 0.45

Tested by

no test coverage detected