Generate and transfer data

# WebRTC samples Generate and transfer data

This page generates and sends the specified amount of data via WebRTC datachannels.

To accomplish this in an interoperable way, the data is split into chunks which are then transferred via the datachannel. The datachannel is reliable and ordered by default which is well-suited to filetransfers.

Send and receive progress is monitored using HTML5 progress elements.

MB (warning: very large values will potentially cause memory problems)
Ordered mode
Send progress:
Receive progress:

View the console to see logging.

The `RTCPeerConnection` objects `localConnection` and `remoteConnection` are in global scope, so you can inspect them in the console as well.

For more information about RTCDataChannel, see Getting Started With WebRTC.

View source on GitHub