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

Method RecvContinuationPacket

library/cpp/netliba/v12/udp_socket.cpp:572–596  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

570 }
571
572 TUdpRecvPacket* TUdpSocket::RecvContinuationPacket(TSockAddrPair* addr) {
573 if (!!RecvContUdpPacket) {
574 RecvContUdpPacket->DataStart += RecvContUdpPacket->DataSize;
575
576 const int bytesLeft = RecvContUdpPacketSize - RecvContUdpPacket->DataStart;
577 if (bytesLeft > 0) {
578 const char* payload = RecvContUdpPacket->Data.get() + RecvContUdpPacket->DataStart;
579
580 if (CheckPacketIntegrity(payload, (size_t)bytesLeft, RecvContAddress)) {
581 RecvContUdpPacket->DataSize = UDP_LOW_LEVEL_HEADER_SIZE + ReadPacketDataSize(payload);
582 *addr = RecvContAddress;
583 return TUdpHostRecvBufAlloc::Clone(RecvContUdpPacket.Get());
584 }
585
586 fprintf(stderr, "NETLIBA::TUdpSocket: continuation packet integrity check failed, ignoring tail!\n");
587 // packet integrity check failed
588 // ignore all continuation packets because we can't probably say where are their starts.
589 }
590
591 RecvContUdpPacket.Destroy();
592 Zero(RecvContAddress);
593 RecvContUdpPacketSize = 0;
594 }
595 return nullptr;
596 }
597
598 TUdpRecvPacket* TUdpSocket::Recv(TSockAddrPair* addr) {
599 TAutoPtr<TUdpRecvPacket> result = nullptr;

Callers

nothing calls this directly

Calls 6

ReadPacketDataSizeFunction · 0.85
ZeroFunction · 0.85
CloneFunction · 0.50
getMethod · 0.45
GetMethod · 0.45
DestroyMethod · 0.45

Tested by

no test coverage detected