User:Brahmana/Netwerk Docs/Connection Transaction Organization: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 18: Line 18:
** nsHttpTransaction  -- This is used when pipelining is not allowed.
** nsHttpTransaction  -- This is used when pipelining is not allowed.
** nsPipeline  -- This is used when pipelining is allowed and is being done.
** nsPipeline  -- This is used when pipelining is allowed and is being done.
[you mean nsHttpPipeline where you write nsPipeline, right? --[[User:Biesi|Biesi]] 18:36, 4 August 2008 (UTC)]


Now I do not know whether these implementations have something extra apart from helper methods. That is a question for necko folks.
Now I do not know whether these implementations have something extra apart from helper methods. That is a question for necko folks.
Line 23: Line 25:
Q1. Do the concrete implementations have a lot more things than what is present in the abstract classes? If so what sort of stuff? (Examples at a high-level)
Q1. Do the concrete implementations have a lot more things than what is present in the abstract classes? If so what sort of stuff? (Examples at a high-level)


[Sorry, I don't really understand the question. Other than the helper methods they also have the implementation of the interfaces. I'm not sure what kind of answer you are looking for...
The transaction class is what actually sends the data to the server, parses the headers, etc. It sits between the channel and the socket.
Does that answer your question? --[[User:Biesi|Biesi]] 18:36, 4 August 2008 (UTC)]


There is no 1-to-1 mapping between a transaction and a connection.
There is no 1-to-1 mapping between a transaction and a connection.


Q2. What all things are logically represented by a transaction (a nsHttpTransaction or a nsHttpPipeline object)?
Q2. What all things are logically represented by a transaction (a nsHttpTransaction or a nsHttpPipeline object)?
[A transaction (txn) is a single HTTP request. An HTTP channel usually has one txn, but can have more than one in the case of authentication retries or none in case of cache reads. It can not have more than one at a time though. --[[User:Biesi|Biesi]] 18:36, 4 August 2008 (UTC)]


Q3. In [http://mxr.mozilla.org/mozilla-central/source/netwerk/protocol/http/src/nsHttpConnectionMgr.cpp#705, this part of code] we take away references to the actual connection from both the transaction and the wrapper object connection handle. But later in [http://mxr.mozilla.org/mozilla-central/source/netwerk/protocol/http/src/nsHttpConnectionMgr.cpp#570, DispatchTranscation] we populate the two objects with the same connection. What is the reason for this? Is this to take care of the situation where in initially pipelining was not done and now it needs to be done? What is rationale behind this code?
Q3. In [http://mxr.mozilla.org/mozilla-central/source/netwerk/protocol/http/src/nsHttpConnectionMgr.cpp#705, this part of code] we take away references to the actual connection from both the transaction and the wrapper object connection handle. But later in [http://mxr.mozilla.org/mozilla-central/source/netwerk/protocol/http/src/nsHttpConnectionMgr.cpp#570, DispatchTranscation] we populate the two objects with the same connection. What is the reason for this? Is this to take care of the situation where in initially pipelining was not done and now it needs to be done? What is rationale behind this code?
[Which lines are you talking about in DispatchTransaction? I don't see where we populate two objects with the same connection. --[[User:Biesi|Biesi]] 18:36, 4 August 2008 (UTC)]
Confirmed users
195

edits