RLG-Web: Complete the WebSocket watcher.
Watching via WebSockets now takes into account terminal size, player name, etc.
This commit is contained in:
parent
aee00a29d5
commit
f4c4f5e0f1
2 changed files with 13 additions and 2 deletions
|
|
@ -390,6 +390,10 @@ function wsWatcher(conn, session) {
|
|||
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)}));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue