1
0
mirror of https://github.com/facebookincubator/mvfst.git synced 2025-07-29 03:41:11 +03:00

Use iovec instead of IOBuf in QuicAsyncUDPSocket::write and QuicAsyncUDPSocket::writeGSO

Summary: See title

Reviewed By: mjoras

Differential Revision: D61048705

fbshipit-source-id: 60dc63cc67f63be6f0ac6cbe0e766172a8c79d7c
This commit is contained in:
Aman Sharma
2024-10-02 15:13:23 -07:00
committed by Facebook GitHub Bot
parent 924183d2d3
commit 2369ecb69b
27 changed files with 626 additions and 454 deletions

View File

@ -1319,7 +1319,9 @@ void writeCloseCommon(
// best effort writing to the socket, ignore any errors.
Buf packetBufPtr = packetBuf.clone();
auto ret = sock.write(connection.peerAddress, packetBufPtr);
iovec vec[kNumIovecBufferChains];
size_t iovec_len = fillIovec(packetBufPtr, vec);
auto ret = sock.write(connection.peerAddress, vec, iovec_len);
connection.lossState.totalBytesSent += packetSize;
if (ret < 0) {
VLOG(4) << "Error writing connection close " << folly::errnoStr(errno)