isaacs
20a3c5d09c
streams2: Do not allow hwm < lwm
There was previously an assert() in there, but this part of the code is
so high-volume that the added cost made a measurable dent in http_simple.
Just checking inline is fine, though, and prevents a lot of potential
hazards.
12 years ago
isaacs
f9caf7020c
streams: Speed up by doing less work in the state ctors
12 years ago
isaacs
9f4c0988c3
streams2: Process write buffer in a loop, not recursively
This fixes pummel/test-net-write-callbacks
12 years ago
isaacs
f63af64eb8
test-pummel: Add call validation in net-write-callbacks
12 years ago
isaacs
82c7c84e25
net: Handle sync writable streams synchronously
This fixes the case where stderr doesn't flush before the process exits.
12 years ago
isaacs
3751c0fe40
streams2: Still emit error if there was a write() cb
12 years ago
isaacs
5760244cc6
streams2: Writable only emit 'finish' once
12 years ago
isaacs
b15e19a232
streams2: Remove function.bind() usage
It's too slow, unfortunately.
12 years ago
isaacs
0118584433
streams2: Writable organization, add 'finishing' flag
12 years ago
isaacs
63ac07b32b
streams2: Export Readable/Writable State classes
12 years ago
isaacs
e82d06bef9
streams2: Fix regression from Duplex ctor assignment
12 years ago
isaacs
71e2b61388
streams2: Support write(chunk,[encoding],[callback])
12 years ago
isaacs
0678480b57
streams2: Allow Writables to opt out of pre-buffer-izing
12 years ago
isaacs
545f512619
streams2: ctor guards on Stream classes
12 years ago
isaacs
06e321d0f9
streams2: Correct drain/return logic
It was testing the length *before* adding the current chunk, which
is the opposite of correct.
Also, the return value was flipped.
12 years ago
isaacs
02f017d24f
streams2: Allow 0 as a lowWaterMark value
12 years ago
isaacs
639fbe28d1
streams2: Convert strings to buffers before passing to _write()
12 years ago
isaacs
420e07c577
streams2: The new stream base classes
12 years ago