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

Function WritePacketHeader

library/cpp/netliba/v12/udp_socket.cpp:129–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127 }
128
129 static void WritePacketHeader(char* packet, const size_t packetSize, const sockaddr_in6& toAddress) {
130 WriteVersion(packet);
131 WritePacketDataSize(packet, (ui16)(packetSize - UDP_LOW_LEVEL_HEADER_SIZE));
132 *(ui64*)packet = CalcCrc(packet + UDP_CRC_SIZE, packetSize - UDP_CRC_SIZE, toAddress);
133 }
134
135 //TODO: refactoring CreateSendMsgHdr!
136 //for a while do not use TSockAddrPair here - CreateSendMsgHdr will cast const sockaddr_in6& toAddr to void* !!!

Callers 2

SendToMethod · 0.85
AddPacketToQueueMethod · 0.85

Calls 3

WriteVersionFunction · 0.85
WritePacketDataSizeFunction · 0.85
CalcCrcFunction · 0.85

Tested by

no test coverage detected