X-Git-Url: https://jasonwoof.com/gitweb/?p=watch-my-terminal.git;a=blobdiff_plain;f=server.coffee;h=1d0422b71a6e47fb2e4063eff70506cfe89e5e6f;hp=3ff15290c9e0755305fd74d5808f1638400dadfc;hb=394a14939b00dbbb2a30c8a87ac3333a41c74ef2;hpb=1700d1f6d76490cd696f9072bf28d595a4e484c5 diff --git a/server.coffee b/server.coffee index 3ff1529..1d0422b 100644 --- a/server.coffee +++ b/server.coffee @@ -36,11 +36,14 @@ io.sockets.on 'connection', (socket) -> sockets.splice i, 1 return + socket.emit 'init', width: term.width, height: term.height, x: term.x, y: term.y, a: term.a, text: term.text, attributes: term.attributes + process.stdin.resume() process.stdin.setEncoding 'utf8' process.stdin.on 'data', (data) -> term.update data + # FIXME send data, and have client parse it for s in sockets s.emit 'init', width: term.width, height: term.height, x: term.x, y: term.y, a: term.a, text: term.text, attributes: term.attributes