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

Method init

flow/Net2Packet.cpp:23–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21#include "flow/Net2Packet.h"
22
23void PacketWriter::init(PacketBuffer* buf, ReliablePacket* reliable) {
24 this->buffer = buf;
25 this->reliable = reliable;
26 this->length = 0;
27 length -= buffer->bytes_written;
28 if (reliable) {
29 reliable->buffer = buffer;
30 buffer->addref();
31 reliable->begin = buffer->bytes_written;
32 }
33}
34
35PacketBuffer* PacketWriter::finish() {
36 length += buffer->bytes_written;

Callers

nothing calls this directly

Calls 1

addrefMethod · 0.45

Tested by

no test coverage detected