Re: [webrtc-pc] (How) does SCTP handle CPU-bound congestion on JavaScript thread? (#2086)

The spec is not explicit about when the receive buffer is emptied, but there is no syncing with the JavaScript thread unless we make that explicit, so I do believe this is more than an implementation problem. Could the spec say something like this instead?

> When an RTCDataChannel message has been received via the underlying data transport with type type and data rawData, the user agent MUST queue a task to run the following steps (note: at this point, the receive buffer of the underlying data channel has not been decreased for rawData):
> - In parallel...
>   - Decrement the receive buffer of the underlying data transport for the size of rawData.
> - [Convert data to the appropriate JS object and fire "onmessage" (same steps as before).]

-- 
GitHub Notification of comment by henbos
Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/2086#issuecomment-457726283 using your GitHub account

Received on Friday, 25 January 2019 21:00:12 UTC