We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
流量的获取是用的NSURLResponse的 expectedContentLength,但这应该只是在网络正常情况下,请求完全走通后的一个数据,并不能代表实际真实产生的流量吧,请问这个需要怎么获取网络不好,请求走到一半就断了的情况?
The text was updated successfully, but these errors were encountered:
@coderyi 大神求助啊
Sorry, something went wrong.
暂时没有时间细看,你如果需要的话,可以看看这个实现满足你吗?https://github.com/1043426357/NetworkFlow-iOS
按照 https://github.com/kasketis/netfox 总的流量应该是 totalRequestSize totalResponseSize 之和, (Data out + Data in ) , 但如果http开启了压缩比如gzip:Content-Encoding:gzip,这样真真传输的流量大小应该小于客户端收到的,因为session的 dataTask:completionHandler 中拿到的data已经是解压之后的数据了(待确认,没找到相关文档说明具体解压是在网络的哪一层做的),如果这样统计出来的流量大小就是偏大了。不知楼主有何看法?
No branches or pull requests
流量的获取是用的NSURLResponse的 expectedContentLength,但这应该只是在网络正常情况下,请求完全走通后的一个数据,并不能代表实际真实产生的流量吧,请问这个需要怎么获取网络不好,请求走到一半就断了的情况?
The text was updated successfully, but these errors were encountered: