webRTC PvP connection on Datachannel with losand
npm install cte.pvp~~~bash
npm i cte.pvp
~~~
~~~bash
node server.js
~~~
and access the two clients;
javascript
PvP({
// 1st Negotiation info
blockedUserList: [],
gameRating: 1000,
friendOnry: true
})(
// 2nd Custom Origin
"https://test.io/"
)(
// 3rd STUN Address or TURNServer Authentication info Object
{
url: "stun:l.google..."
},
{
url: "turn:...",
credential: "...",
username: ""
}
)// $.pvp get's WebRTC DataChannel Object
$.pvp.send("hello");
``