TCP发送队列深度 [英] TCP send queue depth

查看:85
本文介绍了TCP发送队列深度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何发现已将多少字节发送到TCP套接字但尚未放入网络?

How do I discover how many bytes have been sent to a TCP socket but have not yet been put on the wire?

在这里查看图表:

我想知道类别2、3和4的总数或3和4的总数.这是在C(++)中以及在Windows和Linux上.理想情况下,我可以使用一个ioctl,但似乎没有.

I would like to know the total of Categories 2, 3, and 4 or the total of 3 and 4. This is in C(++) and on both Windows and Linux. Ideally there is a ioctl that I could use, but there doesn't seem to be any.

推荐答案

在Linux下,请参见tcp(7)的手册页.

Under Linux, see the man page for tcp(7).

似乎可以通过ioctl(sock,SIOCINQ ...

It appears that you can get the number of untransmitted bytes by ioctl(sock,SIOCINQ ...

TCP_INFO getsockopt()调用所返回的结构成员可能还会提供其他统计信息.

Other stats might be available from members of the structure given back by the TCP_INFO getsockopt() call.

这篇关于TCP发送队列深度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆