(gdb) bt #0 posix_quic::QuicStreamEntry::Writev (this=this@entry=0x84cee0, iov=iov@entry=0xffffffff8fe8, iov_count=iov_count@entry=1, fin=fin@entry=false) at /root/posix_quic/src/stream_entry.cpp:19 #1 0x0000000000412bf4 in posix_quic::QuicWritev (stream=stream@entry=2, iov=0xffffffff8fe8, iov@entry=0xffffffff8ff8, iov_count=iov_count@entry=1, fin=fin@entry=false) at /root/posix_quic/src/quic_socket.cpp:236 #2 0x0000000000412f58 in posix_quic::QuicWrite (stream=stream@entry=2, data=data@entry=0xffff00000001, length=length@entry=11, fin=fin@entry=false) at /root/posix_quic/src/quic_socket.cpp:246 #3 0x0000000000402124 in doLoop (ep=3355185, ep@entry=3) at /root/posix_quic/test/client/src/client.cpp:65 #4 0x00000000004009cc in main () at /root/posix_quic/test/client/src/client.cpp:149 (gdb)
ssize_t QuicStreamEntry::Writev(const struct iovec* iov, size_t iov_count, bool fin) { if (Error()) { DebugPrint(dbg_write, "stream = %d, Has error = %d", Fd(), Error()); errno = Error(); return -1; } auto stream = GetQuartcStream(); if (!stream) { DebugPrint(dbg_write, "stream = %d, GetQuartcStream returns nullptr", Fd()); errno = EBADF; return -1; } QuicConsumedData resData = stream->WritevData(iov, iov_count, fin); if (resData.bytes_consumed == 0) { errno = EAGAIN; return -1; } errno = 0; return resData.bytes_consumed; }
原文:https://www.cnblogs.com/dream397/p/14655076.html