以太网接口波特率C/C ++/Qt [英] Ethernet Interface baud rate C/C++/Qt

查看:166
本文介绍了以太网接口波特率C/C ++/Qt的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好.
我有一个Google无法回答的问题:我需要随时测量通过互联网连接传输的当前数据速率.该方法必须(如果可能)在Windows,Linux和MacOSX下运行,并且必须使用C/C ++编写(最终在Qt的帮助下).

Hi everyone.
I got a question that google cannot answer: I need to measure at any time the current rate of data flowing through an internet connection. The method must (if possible) run under Windows, Linux & MacOSX and must be written in C/C++ (eventually with the help of Qt).
Anyone got an idea?

推荐答案

没有波特率".

如果您都可以访问它们,则可以轻松地测量两点之间的平均实际吞吐量:创建两个套接字并使用UDP发送大字节数组,对过程进行计时.您要测量的是一个哲学"问题:它以许多复杂的方式取决于许多不同的因素.结果在不同的时间等可能会非常不同.无论如何,它不太可能检索您的连接的技术规格.

至少您会了解到,在实际情况下,通常需要多少时间传递给定数量的数据.

—SA
There is no "baud rate".

You can easily measure an average actual throughput between two points if they are both accessible to you: create two sockets and send a big array of bytes using UDP, time the process. What are you measuring is a "philosophical" question: it depends on many different factors in some convoluted ways. The results can be very different at different time, etc. Anyway, it will not likely retrieve technical spec of your connections.

At least you will get an idea how much time you typically need to pass given amount of data in real situation.

—SA


这篇关于以太网接口波特率C/C ++/Qt的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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