Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!doctype html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>Test</title>
- </head>
- <body></body>
- <script src="librairie/peerjs.js"></script>
- <script >
- var peer = new Peer();
- var conn = peer.connect('addsdfdsfgdfqgdfshsdffhsfghsdfhdfgsfddhtrhzhrtgjsd');
- conn.on('open', function(){
- conn.send('hi!');
- });
- peer.on('connection', function(conn) {
- console.log("Connection");
- conn.on('data', function(data){
- console.log("Data: ");
- console.log(data);
- });
- });
- </script>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement