- sendChannel = cpc.createDataChannel("sendChannel");
- sendChannel.onopen = () => {
- console.log('client data channel on line')
- sendChannel.onmessage = (message) => {
- console.log(message.data)
- }
- sendChannel.send('Hi from the Client')
- };
- /* Start polling for ice candidate */
+ dataChannel = cpc.createDataChannel("sendChannel");
+ dataChannel.onmessage = (msg) => {
+ console.log(msg.data)
+ }
+ dataChannel.onopen = () => {
+ dataChannel.send(`Hi from the Client`)
+ }