O'Reilly logo

Learning WebRTC by Dan Ristic

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required