This repository has been archived by the owner. It is now read-only.
Browse files

doc: Correct stream.write fd mention

No streams actually work this way.
  • Loading branch information...
isaacs committed Oct 1, 2012
1 parent 3b7312d commit b90c1502e5320f300e23724d774f634274c82daa
Showing with 1 addition and 7 deletions.
  1. +1 −7 doc/api/stream.markdown
@@ -146,20 +146,14 @@ Emitted when the stream is passed to a readable stream's pipe method.
A boolean that is `true` by default, but turns `false` after an
`'error'` occurred or `end()` / `destroy()` was called.
### stream.write(string, [encoding], [fd])
### stream.write(string, [encoding])
Writes `string` with the given `encoding` to the stream. Returns `true`
if the string has been flushed to the kernel buffer. Returns `false` to
indicate that the kernel buffer is full, and the data will be sent out
in the future. The `'drain'` event will indicate when the kernel buffer
is empty again. The `encoding` defaults to `'utf8'`.
If the optional `fd` parameter is specified, it is interpreted as an
integral file descriptor to be sent over the stream. This is only
supported for UNIX streams, and is silently ignored otherwise. When
writing a file descriptor in this manner, closing the descriptor before
the stream drains risks sending an invalid (closed) FD.
### stream.write(buffer)
Same as the above except with a raw buffer.

0 comments on commit b90c150

Please sign in to comment.