1 user packet or many packets if small packet optimization is enabled
| 316 | |
| 317 | // 1 user packet or many packets if small packet optimization is enabled |
| 318 | static void AddPacketsFromUdpPacket(const TMsgHdr& hdr, TVector<std::pair<char*, size_t>>* packets) { |
| 319 | // iterating through small packets |
| 320 | for (size_t s = 0; s != (size_t)hdr.msg_iovlen; ++s) { |
| 321 | packets->push_back(std::make_pair((char*)hdr.msg_iov[s].iov_base + UDP_LOW_LEVEL_HEADER_SIZE, |
| 322 | hdr.msg_iov[s].iov_len - UDP_LOW_LEVEL_HEADER_SIZE)); |
| 323 | } |
| 324 | } |
| 325 | |
| 326 | void TUdpSocket::GetPacketsInQueue(TVector<std::pair<char*, size_t>>* packets) const { |
| 327 | for (size_t p = 0; p != GetNumUdpPacketsInQueue(); ++p) { |
no test coverage detected