Mercurial > hg > rlgwebd
diff rlgwebd.js @ 101:e59d68082664
RLG-Web: Complete the WebSocket watcher.
Watching via WebSockets now takes into account terminal size, player
name, etc.
author | John "Elwin" Edwards <elwin@sdf.org> |
---|---|
date | Fri, 13 Jul 2012 08:39:39 -0700 |
parents | 3dbfdaf62623 |
children | f34a286c51bd |
line wrap: on
line diff
--- a/rlgwebd.js Thu Jul 12 22:16:15 2012 -0700 +++ b/rlgwebd.js Fri Jul 13 08:39:39 2012 -0700 @@ -390,6 +390,10 @@ session.removeListener('exit', exitH); tslog("A WebSocket watcher has left game %d", session.sessid); }); + conn.sendUTF(JSON.stringify({ + "t": "w", "w": session.w, "h": session.h, + "p": session.pname, "g": session.game.uname + })); conn.sendUTF(JSON.stringify({"t": "d", "d": session.framebuf.toString("hex", 0, session.frameoff)})); }