MCPcopy Create free account
hub / github.com/catboost/catboost / Serialize

Method Serialize

library/cpp/netliba/v12/udp_host_protocol.h:173–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

171 }
172
173 size_t Serialize(char** buf) const {
174 size_t writen = 0;
175 writen += Write(buf, PacketFlags);
176 if (PacketFlags & PO_NETLIBA_COLOR_IS_CUSTOM) {
177 writen += Write(buf, Color.GetRef());
178 }
179 if (PacketFlags & PO_ACK_TOS_IS_CUSTOM) {
180 writen += Write(buf, AckTOS.GetRef());
181 }
182 if (PacketFlags & PO_TRANSFER_ID_IS_LONG) {
183 writen += Write(buf, HigherTransferId);
184 }
185
186 return writen;
187 }
188
189 TPacketOptions& SetInflateCongestion(bool enabled) {
190 SetFlag(&PacketFlags, PO_INFLATE_CONGESTION, enabled);

Callers 2

SerializeMethod · 0.45

Calls 2

WriteFunction · 0.70
GetRefMethod · 0.45

Tested by

no test coverage detected