Confirmed users
195
edits
No edit summary |
No edit summary |
||
| Line 9: | Line 9: | ||
[For the first of those, if you go through the stuff in nsHttpConnectionMgr until you get to the call to nsHttpConnection::Activate. This calls CreateTransport, whcih calls into the socket transport service, etc. You'd need to trace into that to find the NSPR code that actually does the socket-opening, which is probably different on different OSes. For the second, nsHttpConnectionMgr::AddTransaction (called when setting up the transaction) calls PostEvent, which dispatches the event to call OnMsgNewTransaction to the socket thread. So there are basically two threads in play here, as I understand: the UI thread, where the asyncOpen happens, and the socket thread, where the socket access happens. I think there is also a thread pool that comes into play later (from the stream transport service), but I'm not sure how that fits into the setup, to be honest. --[[User:Bzbarsky|Bzbarsky]] 09:00, 9 July 2008 (PDT)] | [For the first of those, if you go through the stuff in nsHttpConnectionMgr until you get to the call to nsHttpConnection::Activate. This calls CreateTransport, whcih calls into the socket transport service, etc. You'd need to trace into that to find the NSPR code that actually does the socket-opening, which is probably different on different OSes. For the second, nsHttpConnectionMgr::AddTransaction (called when setting up the transaction) calls PostEvent, which dispatches the event to call OnMsgNewTransaction to the socket thread. So there are basically two threads in play here, as I understand: the UI thread, where the asyncOpen happens, and the socket thread, where the socket access happens. I think there is also a thread pool that comes into play later (from the stream transport service), but I'm not sure how that fits into the setup, to be honest. --[[User:Bzbarsky|Bzbarsky]] 09:00, 9 July 2008 (PDT)] | ||
[HTTP doesn't use the stream transport service. Also, shouldn't gHttpHandler be the connection manager instead, in the diagram? The diagram also sort of skips the more interesting parts of the HTTP code (i.e. the parts that actually write the data into the pipe) --[[User:Biesi|Biesi]] 10:47, 9 July 2008 (PDT)] | |||
There are a few, which I will put up once I have answers to these. | There are a few, which I will put up once I have answers to these. | ||