Browse Source

poll is now explicit

master
Joshua Moerman 12 years ago
parent
commit
289b111105
  1. 13
      index.html

13
index.html

@ -92,7 +92,7 @@
}
function onOpen(evt) {
doSend();
updateUser();
}
function onMessage(evt) {
@ -104,7 +104,7 @@
updateLines(lines);
setTimeout(function(){
doSend();
poll();
}, speed);
}
@ -188,7 +188,7 @@
}
}
function doSend(message) {
function updateUser() {
var myself = {
name: myName,
size: {width: window.innerWidth, height: window.innerHeight}
@ -200,6 +200,13 @@
websocket.send(JSON.stringify(packet));
}
function poll(){
var packet = {
command: 'poll'
};
websocket.send(JSON.stringify(packet));
}
function changeKind() {
line_kind = line_kind + 1;
line_kind = line_kind % 2;