Hi,
I'm having a problem setting up a simple p2p datachannel over a peer connection. However, it only seems to be happening when a webapp that uses plain JS WebRTC is the 'local' (CreateOffer) end of the connection, and an equivalent native c++ desktop app that uses libwebrtc.a is the 'remote' (CreateAnswer) end. With webapp->webapp everything works but this could be because there's some bigger delays behind the scene (see below). I can't get native->native connecting at all as yet, perhaps that's a STUN/TURN issue?
Anyway, the problem is that when the remote end (ie: the native app) receives it's 'view' of the datachannel via the PeerConnectionObserver::OnDataChannel callback, it can't be used straight away as the first message(s) sent always seem to go missing. I've checked that the data channel is open and DataChannel::Send returns true, so IMO it *should* be working?
I can fix it by inserting a slight delay before using the datachannel, but I'd rather find out what's really going on.
One minor thing I've noticed is that JS WebRTC generates an 'onopen' event for datachannels received via 'ondatachannel' events (even though it's already open when you receive it), but libwebrtc.a doesn't so maybe there's something else that needs to be done before it is usable?
Bye!
Mark