doc: stream: clarify meaning of 'drain' some more
Courtesy of Lee Coltrane (@coltrane).
This commit is contained in:
parent
f624be4093
commit
b0d04ffbd8
@ -123,6 +123,10 @@ A `Writable Stream` has the following methods, members, and events.
|
|||||||
Emitted when the stream's write queue empties and it's safe to write without
|
Emitted when the stream's write queue empties and it's safe to write without
|
||||||
buffering again. Listen for it when `stream.write()` returns `false`.
|
buffering again. Listen for it when `stream.write()` returns `false`.
|
||||||
|
|
||||||
|
The `'drain'` event can happen at *any* time, regardless of whether or not
|
||||||
|
`stream.write()` has previously returned `false`. To avoid receiving unwanted
|
||||||
|
`'drain'` events, listen using `stream.once()`.
|
||||||
|
|
||||||
### Event: 'error'
|
### Event: 'error'
|
||||||
|
|
||||||
`function (exception) { }`
|
`function (exception) { }`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user