zoukankan      html  css  js  c++  java
  • posix quic write read

    QuicWrite

    (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;
    }
  • 相关阅读:
    凸优化-凸函数
    hadoop平台-Hbase安装
    非常实用的python字符串处理方法
    中心极限定理
    线性回归-误差项分析
    nginx为什么性能这么优越?
    Redis为什么单线程还那么快?线程安全吗?
    nginx负载均衡配置
    Dubbo的超时重试机制
    java类加载过程
  • 原文地址:https://www.cnblogs.com/dream397/p/14655076.html
Copyright © 2011-2022 走看看