sorribas/tcp-spy — pull request #6 by mafintosh (2014-10-02 04:58:45+00:00)
Title: use pretty-stream and multi-stdout

output is now way more epic

try the following example

``` js
// server.js
var net = require('net')

var server = net.createServer(function(sock) {
sock.pipe(sock)
})

server.listen(5000)
```

first boot up tcp spy

```
tcp-spy 4000 5000
```

then the echo server

```
node server.js
```

then run

```
node -e 'process.stdin.setRawMode(true); process.stdin.pipe(require("net").connect(4000)).pipe(process.stdout)'
```

notice how multiline updates work now!