cte.pvp.like
0.0.1 • Public • Published cte.pvp
It's a usecase about ...
server example
const http = require("http");
const express = require("express");
const app = express();
const sv = http.createServer(app);
require("cte.pvp.like")(sv).listen(process.env.PORT, process.env.IP);
Creat a public folder and make in a index.html
You use it tags
<script src="https://cdn.jsdelivr.net/npm/cte@1.1.12/cte.js"></script>
<script src="https://cdn.jsdelivr.net/npm/dsand@0.7.7/dsand.js"></script>
<script src="https://cdn.jsdelivr.net/npm/dsand@0.7.7/pvp.js"></script>
<script>
_($.role).put({
pvpCE (channel) {
$(channel).class("hear").on("message");
},
hear (e) {
alert(e.data);
}
});
PvP()()();
</script>
and access the two clients;
Usage on BrowserSide PvP function
PvP({
blockedUserList: [],
gameRating: 1000,
friendOnry: true
})(
"https://test.io/"
)(
{
url: "stun:l.google..."
},
{
url: "turn:...",
credential: "...",
username: ""
}
)
$.pvp.send("hello");
Versions
Current Tags
- VersionDownloads (Last 7 Days)
- 0.0.1
1
Version History
Package Sidebar
Install
Weekly Downloads