I made an HTTP proxy using the httplib and BaseHTTPServer, Now I want to know if there is way that I can calculate the RTT to each server. I don't want to use ping method because I want to calculate the RTT for each object's server passing through my proxy. Can I edit the above library to achieve my target or is there something like this already ?
您应该使用Requests库进行连接,然后可以使用Reponse.elapsed确定从发送第一个字节到完成接收和解析标头花了多长时间。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.