Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
watch-my-terminal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix and display colors, bold and underline
[watch-my-terminal.git]
/
server.coffee
diff --git
a/server.coffee
b/server.coffee
index
3ff1529
..
1d0422b
100644
(file)
--- a/
server.coffee
+++ b/
server.coffee
@@
-36,11
+36,14
@@
io.sockets.on 'connection', (socket) ->
sockets.splice i, 1
return
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
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
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