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

Method Serialize

library/cpp/neh/tcp.cpp:396–412  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

394 }
395
396 inline void Serialize(TParts& parts) {
397 TMemoryOutput out(Buf, sizeof(Buf));
398
399 ::Save(&out, (ui32)MsgLen());
400 ::Save(&out, Guid);
401 ::Save(&out, (ui32) Loc.Service.size());
402
403 if (Loc.Service.size() > out.Avail()) {
404 parts.Push(TStringBuf(Buf, out.Buf()));
405 parts.Push(Loc.Service);
406 } else {
407 out.Write(Loc.Service.data(), Loc.Service.size());
408 parts.Push(TStringBuf(Buf, out.Buf()));
409 }
410
411 parts.Push(Msg.Data);
412 }
413
414 inline size_t Length() const noexcept {
415 return sizeof(ui32) + MsgLen();

Callers 2

DoSendCycleMethod · 0.45
DoSendCycleMethod · 0.45

Calls 7

SaveFunction · 0.50
sizeMethod · 0.45
AvailMethod · 0.45
PushMethod · 0.45
BufMethod · 0.45
WriteMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected