ZBLOG

Life of a URLRequest This document gives an overview of the browser's lower-layers for networking. Networking in the browser ranges from high level Javascript APIs like fetch(), all the way down to writing encrypted bytes on a socket. This docum...

Overall, the life of a URLRequest involves multiple layers and components in the browser’s networking stack, from high-level Javascript APIs to lower-level socket connections. The top-level network stack object is the URLRequestContext, which creates URLRequest objects used by direct consumers of the network stack. The HttpNetworkSession is another major network stack object that owns the HttpStreamFactory, socket pools, and HTTP/2 and QUIC session pools.

A URLRequest informs the consumer of important events for a request using two main interfaces: the URLRequest::Delegate interface and the NetworkDelegate interface. The network service, which wraps //net/ objects, provides cross-process network APIs and their implementations for the rest of Chrome. It uses the Mojo IPC layer, with proxy objects in the consumer process that implement the corresponding Mojo interfaces in the network service.

The life of a simple URLRequest involves requesting data from another process, creating a network::URLLoader in the network service, checking the cache and creating a network transaction object if necessary, creating an HttpStream to fetch the data, sending the request and reading the response headers and body, and finally destroying the URLRequest and closing all related Mojo pipes.

本站部分文章来源于网络,版权归原作者所有,如有侵权请联系站长删除。
转载请注明出处:https://sdn.0voice.com/?id=257

分享:
扫描分享到社交APP
上一篇
下一篇
发表列表
游客 游客
此处应有掌声~
评论列表

还没有评论,快来说点什么吧~

联系我们

在线咨询: 点击这里给我发消息

微信号:3007537140

上班时间: 10:30-22:30

关注我们
x

注册

已经有帐号?