0

再会!我正在用 c++ 和 winpcap 开发一个应用程序,它将列出浏览器中访问的所有 URL 及其相应的响应时间。目前,我现在可以通过捕获和分析数据包来跟踪或监视所有访问的 url。有什么方法可以测量加载网页的响应时间,从请求到服务器的响应?..有什么简单的方法吗?

谢谢..

4

1 回答 1

0

You will have to keep track of the individual TCP connections between the browser and the server - that's just keeping track of the source/destination IP and port numbes in the packets you capture.

Then you'll have to parse the HTTP in the captured packets and correlate HTTP requests with its response and take the time difference(which you'll get from the timestamps from pcap).

This is non-trivial in the cases the HTTP request/responses spans several packets, and certainly non-trivial if you also want to account for lost packets and retransmission.

于 2010-02-20T11:22:00.057 回答