X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=server.coffee;h=1d0422b71a6e47fb2e4063eff70506cfe89e5e6f;hb=b7343be7e3013be9c5e5a794886337268408f581;hp=3ff15290c9e0755305fd74d5808f1638400dadfc;hpb=1700d1f6d76490cd696f9072bf28d595a4e484c5;p=watch-my-terminal.git 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