Re: From HTTP channels, transactions connections to TCP sockets - how does this all come together?

Patrick McManus <[email protected]> Sat, 08 Sep 2012 20:31:03 -0400
Newsgroups gmane.comp.mozilla.devel.netlib
Message-ID <[email protected]>
On 9/8/2012 3:40 PM, Boris Zbarsky wrote:
> On 9/8/12 3:17 AM, [email protected] wrote:
>> What's the relationship between [HTTP] channels, transactions and 
>> connections?
>
> My understanding, which may not be correct.
>
> An HTTP connection corresponds to an actual TCP connection.
>
> An HTTP transaction corresponds to an HTTP request/response pair. 
> Multiple transactions can happen on the same connection, either one 
> after another with keep-alive.  I'm not sure how this all works with 
> pipelining, since an nsHttpPipeline implements both the connection and 
> transaction APIs....
>
> An http channel is the representation of one HTTP transaction as 
> exposed to the rest of Gecko.
>

that's all right. I would add that an http channel is a little bit more 
than a protocol based http transaction. While the http transaction is 
literally a request and response on the wire, the channel might deal 
with a larger set of circumstances, such as a cache hit or it might be a 
transaction plus the work of recording the data in the cache or handling 
the redirect notifications, or authorization prompts, etc..



> -Boris
> _______________________________________________
> dev-tech-network mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-tech-network