JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
fix and display colors, bold and underline
[watch-my-terminal.git] / server.coffee
index 3ff1529..1d0422b 100644 (file)
@@ -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