Confirmed users
214
edits
| Line 174: | Line 174: | ||
The sequence for CreateOffer is shown in the link above. | The sequence for CreateOffer is shown in the link above. | ||
As described above, most of the heavy lifting for the API happens off the DOM thread. Thus, when the | As described above, most of the heavy lifting for the API happens off the DOM thread. Thus, when the JS invokes CreateOffer(), this turns into a Dispatch to the PeerConnection thread which (after some activity of its own) invokes SIPCC's FEATURE_CREATE_OFFER via a SIPCC IPC message to CCAPP_Task, which transitively (through some other threads) creates the appropriate transport flows (mtransport) and constructs the SDP. Eventually, it constructs the SDP offer and then Dispatches it to the PeerConnection thread, which Dispatches the result to the DOM thread which eventually calls the JS CreateOffer callback. [Question: is this actually not Dispatch but some fancier call.] | ||
In the meantime, the ICE gathering process has been running on the STS thread. As each candidate is gathered, the STS thread does an IPC call to some SIPCC thread (perhaps CCAPP_Task; TODO) to return the ICE candidate. These candidates are then Dispatched to the PC thread and then eventually to the DOM thread where the ICE candidate events fire. | |||
=== Thread diagram for transport subsystem === | === Thread diagram for transport subsystem === | ||
http://www.websequencediagrams.com/?lz=dGl0bGUgVHJhbnNwb3J0IFRocmVhZHMKcGFydGljaXBhbnQgUEMgYXMgUEMACA1TVFMgYXMgU1RTAB8NIk1lZGlhIFN0cmVhbSIgYXMgTQAMFUluABcGSU4AKxRPdXQANgZPVVQKUEMgLT4gUEM6IEFzc2VtYmxlIHQAgScJc3RhY2sAGAtTdGFydCBJQ0UAMAdTVFM6IENyZWF0ZSBzb2NrZXRzClNUUwBKCExvY2FsIElDRSBjYW5kaWRhdGVzL0RUTFMgZnAANgxSZW1vdGUAJAVDAAwdAHYKAFsLADIFb21wbGV0ZQByDABkBQAJEACBLQVPblMAgSgFUmVhZHkoKQCBKwhNSU46IE0AgXUJOjpQYQAgBmNlaXZlZCgpCk1JTgAgCVZpZU5ldHdvcms6OgAbCFJUUAAuBgAdD1NvdXJjZQCDOAUAgzYGOjpBcHBlbmRUb1RyYWNrKCkKbm90ZSByaWdodCBvZgCBBAcAg2gFcGxheXMKTQCBHAZ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