开发者

Current udp packets queue length

I have rather simple UDP server written on c. Sometimes i need to know current length of all udp packets(bytes) queued in socket. As i understand, getsockopt doesn't get such information.

Linux and FreeBSD solutions are both 开发者_如何学运维welcome, thanks!


ioctl(FIONREAD, ...) should be roughly what you are looking for,

http://www.daemon-systems.org/man/ioctl.2.html


From outside of the server (command line), you can do

netstat -uln

which will show you the length of all listening udp sockets.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜