not really known
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

32 lines
648 B

<!DOCTYPE html>
<html>
<head>
<title>Hello world</title>
</head>
<script src = "../../socket.io/socket.io.js"></script>
<script>
var socket = io();
socket.emit('register', 'jeff');
socket.on('sendRooms', function(data)
{
console.log("got rooms");
console.log(data);
//document.write(data);
data.rooms.forEach(function(r)
{
document.write(r.name)
document.write("<br />");
});
var tt = new Object();
tt.roomName = "den";
tt.password = "pp";
socket.emit('joinRoom', tt);
});
</script>
<body>Hello world</body>
</html>