Skip to content

Instantly share code, notes, and snippets.

@raycmorgan
Created January 28, 2010 17:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save raycmorgan/288942 to your computer and use it in GitHub Desktop.
Save raycmorgan/288942 to your computer and use it in GitHub Desktop.
## Reader interface
event: 'data'
event: 'eof'
method: pause()
method: resume()
## Writer interface
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
stdin - reader
stdout, stderr - writer
tcp, unix socket - reader and writer
childProcess.stdin - writer
childProcess.stdout - reader
pipe()[0] - reader
pipe()[1] - writer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment