This sample is an admittedly contrived example of how to use an RTCDataChannel to exchange data between two objects on the same page. See the corresponding article for details on how it works.
RTCDataChannel
Messages received: