Breaking down a file into chunks

Now that we have a file, we need to get it ready to send to the other user. The easiest approach to this problem is to take the entire file and call our send method with the data. This will take the entire file and give it to the data channel to process as one large message:

Breaking down a file into chunks

Once this happens, the data channel will take the message and try to send all the data through the connection between the clients. Let us say that the user is trying to share their entire music collection, which comes to a size of 50 GB. The data channel will tell the SCTP protocol that it has one message that starts at 0 bytes and ends at our ...

Get Learning WebRTC now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.