Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
WHATWG streams for data channel messages #44
Copied from: w3c/webrtc-pc#1732
Posted by Lennart Grahl (lgrahl) on January 11, 2018:
There is a long standing issue with large data channel messages in the existing API of RTCDataChannel. If I want to send a single message containing 1 GiB of data (for example a large file), I have to have this gigantic message in memory at the time of sending. If I receive a 1 GiB message, this message is slowly being reassembled until it's in memory and then handed out to the application. That creates backpressure and the like.
My idea is to resolve this by extending the
Edit: What should happen when a string is being received will need to be discussed.
In the meeting, I think there was a slight confusion about what streaming API I meant. Basically, I propose two streaming APIs that use WHATWG streams:
Note: WebsocketStreams API has been proposed: https://docs.google.com/document/d/1La1ehXw76HP6n1uUeks-WJGFgAnpX2tCjKts7QFJ57Y/
@lgrahl Are there any requirements that need to be added beyond what is already covered here?
Yeah, that should do.