Zemke / react-native-peerjs

PeerJS for React Native
55 stars 36 forks source link

Error while sending message when i am the creator of the connection. #11

Closed akshaya-rao-s closed 4 years ago

akshaya-rao-s commented 4 years ago

When I create a connection and the other peer joins, the owned data connection throws error sons send() Screen Shot 2020-05-26 at 7 37 01 PM-1 peerInitiator.on('connection', async dataConnection => { dataConnection.on('open', () => { dataConnection.on('data', this.handleData); dataConnection.send({ name: this.userName ? this.userName : 'Anonymous User' }); }); });

Zemke commented 4 years ago

Please refer to PeerJS for this error as this repo uses their implementation only with a few changes detailed here to make it work without a Browser.

You'll be well-advised to reproduce it in a Browser for them.