Reader interface

1
2
3
4
5
event: 'data'
event: 'eof'
method: pause()
method: resume()

Writer interface

1
2
3
4
5
6
method: write()
method: close()
event: 'drain' (if write() cannot send all the data, 
                it will be queued and the 'drain' 
                event fired once it completes)

Uses

1
2
3
4
5
6
7
8
stdin - reader
stdout, stderr - writer
tcp, unix socket - reader and writer
childProcess.stdin - writer
childProcess.stdout - reader
pipe()[0] - reader
pipe()[1] - writer