DataChannels of called peer problem

38 views
Skip to first unread message

Roberto Rositani

unread,
Oct 1, 2015, 7:12:53 AM10/1/15
to EasyRTC

Hi to all,

I have a problem with sending messages between peer through the function sendDataP2P (like a chat).

Once the call between 2 peers is established, it seems that the peer receiving the call hasn't ready the data channel (to receive message). In fact, if the peer caller sends a message, he  receives the following error message:

'Attempt to use data channel to the "id of the peer called" before it's ready to send' and the message is not send.

Instead, if the peer called sends a message to the peer calling, everything works correctly.

Hope to solve this problem early
Thanks for your attention.


Roberto R.

PS: Is the web site easyrtc.com down?

Eric Davies

unread,
Oct 1, 2015, 11:11:31 AM10/1/15
to EasyRTC
Yep, looks like easyrtc.com is down. I've notified our system's guy.

When you open up  a peer connection, it isn't available immediately. There is a period that can be seconds long while the two peers are sending ice candidates to each other, trying to find a path through the internet to each other. That is why we supply a callback that tells you "hey, that data channel you opened is ready now!" Check out the code in the data channel messaging demo.

Roberto Rositani

unread,
Oct 1, 2015, 12:04:16 PM10/1/15
to EasyRTC
I have solved. The problem was in the method server onEasyrtcMsg because i have overrided but I didn't call easyrtc.events.emitDefault("easyrtcMsg", connectionObj, msg, socketCallback, next); 
Reply all
Reply to author
Forward
0 new messages