I just want to share light weight data between mesh of rtc peers. But not able to figure out programmatically how I can create a mesh network and create multiple dataChannels.
You need to create a new peerconnection on each user for each new user that you get. Then you will have to create data channels for each peer connection.
EX. peers A B C
ps. EACH of these CONNECTIONS have a data channel.
Alternative: A->B->C->A you connect them in a chain, which is computationally better, but it is harder to manage messages and destinations