isaacs
3751c0fe40
streams2: Still emit error if there was a write() cb
12 years ago
isaacs
19ecc3a4a6
test updates for streams2
12 years ago
isaacs
0977638ffb
test: Fix many tests for http streams2 refactor
12 years ago
isaacs
1d369317ea
http: Refactor for streams2
Because of some of the peculiarities of http, this has a bit of special
magic to handle cases where the IncomingMessage would wait forever in a
paused state.
In the server, if you do not begin consuming the request body by the
time the response emits 'finish', then it will be flushed out.
In the client, if you do not add a 'response' handler onto the request,
then the response stream will be flushed out.
12 years ago
isaacs
81e356279d
child_process: Remove stream.pause/resume calls
Unnecessary in streams2
12 years ago
isaacs
b4df1e62de
test updates
12 years ago
isaacs
bb56dcc450
tty/stdin: Refactor for streams2
12 years ago
isaacs
695abba5ac
test: Fix many tests for streams2 net refactor
12 years ago
isaacs
8a3befa0c6
net: Refactor to use streams2
This is a combination of 6 commits.
* XXX net fixup lcase stream
* net: Refactor to use streams2
Use 'socket.resume()' in many tests to trigger old-mode behavior.
* net: Call destroy() if shutdown() is not provided
This is important for TTY wrap streams
* net: Call .end() in socket.destroySoon if necessary
This makes the http 1.0 keepAlive test pass, also.
* net wtf-ish stuff kinda busted
* net fixup
12 years ago
isaacs
7742257feb
benchmark: Add once() function to net-pipe benchmark fixture
12 years ago
isaacs
854171dc6f
streams2: Remove extraneous bufferSize setting
12 years ago
isaacs
20a88feb8f
docs: streams2
12 years ago
isaacs
04541cf7bc
streams2: Emit pause/resume events
12 years ago
isaacs
8fe7b0c910
streams2: Support a Readable hwm of 0
Necessary for proper stdin functioning
12 years ago
isaacs
5760244cc6
streams2: Writable only emit 'finish' once
12 years ago
isaacs
8f428f3b0d
streams2: Call read(0) on resume()
Otherwise (especially with stdin) you sometimes end up in cases
where the high water mark is zero, and the current buffer is at 0,
and it doesn't need a readable event, so it never calls _read().
12 years ago
isaacs
fc7d8d59f7
lint
12 years ago
isaacs
f8bb031bdc
test: Sync writables may emit finish before callbacks
12 years ago
isaacs
dbcacc5afe
streams2: NextTick the emit('readable') in resume()
Otherwise resume() will cause data to be emitted before it can be handled.
12 years ago
isaacs
99021b7a4f
streams2: pause() should be immediate
12 years ago
isaacs
42981e2aad
streams2: Switch to old-mode immediately, not nextTick
This fixes the CONNECT/Upgrade HTTP functionality, which was not getting
sliced properly, because readable wasn't emitted on this tick.
Conflicts:
test/simple/test-http-connect.js
12 years ago
isaacs
83704f1279
streams2: Set readable=false on end
12 years ago
isaacs
4a32d53155
doc: Crypto streaming interface
12 years ago
isaacs
e0c600e00e
test: Tests for streaming crypto interfaces
12 years ago
isaacs
dd3ebb8cf6
crypto: Streaming interface for Sign and Verify
12 years ago
isaacs
e336134658
crypto: Streaming interface for cipher/decipher/iv
12 years ago
isaacs
175f78c6ba
crypto: Streaming api for Hmac
12 years ago
isaacs
90de2ddb77
crypto: Streaming interface for Hash
12 years ago
isaacs
3d3a0b3046
test: Writable stream end() method doesn't take a callback
12 years ago
isaacs
70461c39be
test: simple/test-file-write-stream needs to use 0 lowWaterMark
12 years ago
isaacs
79fd9620f5
test: Fix test-repl-autolibs inspect call
12 years ago
isaacs
0e01d6398f
zlib: streams2
12 years ago
isaacs
44b308b1f7
fs: streams2
12 years ago
isaacs
d58f2654bc
streams2: Unpipe on dest.emit('close')
12 years ago
isaacs
49ea653363
streams2: Remove pipe if the dest emits error
12 years ago
isaacs
ac5a185edf
streams2: Handle pipeChunkSize properly
12 years ago
isaacs
53fa66d9f7
streams2: Set 'readable' flag on Readable streams
12 years ago
isaacs
4b4ff2dff1
streams2: Refactor out .once() usage from Readable.pipe()
12 years ago
isaacs
38e2b0053a
streams2: Get rid of .once() usage in Readable.pipe
Significant performance impact
12 years ago
isaacs
b15e19a232
streams2: Remove function.bind() usage
It's too slow, unfortunately.
12 years ago
isaacs
2ff499c022
streams2: Do multipipe without always using forEach
The Array.forEach call is too expensive.
12 years ago
isaacs
c2f62d496a
test: Update stream2 transform for corrected behavior
12 years ago
isaacs
0118584433
streams2: Writable organization, add 'finishing' flag
12 years ago
isaacs
286c54439a
streams2: Only emit 'readable' when needed
12 years ago
isaacs
62dd04027b
streams2: Set Readable lwm to 0 by default
12 years ago
isaacs
f20fd22abd
streams2: Add high water mark for Readable
Also, organize the numeric settings a bit on the ReadableState class
12 years ago
isaacs
63ac07b32b
streams2: Export Readable/Writable State classes
12 years ago
isaacs
5856823223
streams2: Fix duplex no-half-open logic
12 years ago
isaacs
286aa04910
streams2: Abstract out onread function
12 years ago
isaacs
f624ccb475
streams2: Use StringDecoder.end
12 years ago