- Mar 03, 2013
-
-
isaacs authored
The previous commit did not handle the case when the event type is 'error', since that is checked before reading the handler.
-
isaacs authored
-
Ben Noordhuis authored
Conflicts: doc/api/http.markdown test/simple/test-crypto.js
-
Ben Noordhuis authored
Don't use hard-coded port numbers, use common.PORT instead. Should fix the occasional Jenkins failure; the builds run in parallel.
-
isaacs authored
-
isaacs authored
The stock writable stream "write after end" message is overly vague, if you have clearly not called end() yourself yet. When we receive a FIN from the other side, and call destroySoon() as a result, then generate an EPIPE error (which is what would happen if you did actually write to the socket), with a message explaining what actually happened.
-
Raymond Feng authored
The `heat` tool that gathers NPM source files wasn't getting called. Closes #4896
-
Timothy J Fontaine authored
This is a back-port of commit 17a81261 from the master branch.
-
- Mar 02, 2013
-
-
Ben Noordhuis authored
The file has a long name that's apparently impossible to remove with `git clean` on Windows.
-
Trevor Norris authored
Also cleanup unnecessary use of "self" since it will always be called using .apply() from emit.
-
Trevor Norris authored
Cleanup check logic. Place vars at top. Remove PROCESS.
-
Trevor Norris authored
Check both passed args to addListener. Place var at beginning.
-
Trevor Norris authored
By making sure the _events is always an object there is one less check that needs to be performed by emit. Use undefined instead of null. typeof checks are a lot faster than isArray. There are a few places where the this._events check cannot be removed because it is possible for the user to call those methods after using utils.extend to create their own EventEmitter, but before it has actually been instantiated.
-
Trevor Norris authored
Remove unecessary splice for single listener events. Add type check for "type" argument.
-
Trevor Norris authored
Make sure the argument passed is a string. Also use typeof === function check instead of isArray().
-
Trevor Norris authored
Unnecessary checks were being performed on if the event existed before being removed. _events starts out as null, so reset to null when emptied. Checking typeof is a lot cheaper than isArray().
-
Trevor Norris authored
setMaxListeners will now make sure a positive number is passed. Also throwing more definitive Error types.
-
Trevor Norris authored
Small addition to ensure that exports.usingDomains is always a bool.
-
Trevor Norris authored
Ability to return just the length of listeners for a given type, using EventEmitter.listenerCount(emitter, event). This will be a lot cheaper than creating a copy of the listeners array just to check its length.
-
Ben Noordhuis authored
Remove the assert() that triggered when Cipher#final() or Decipher#final() was called twice. Fixes #4886.
-
Ben Noordhuis authored
-
Lars-Magnus Skog authored
-
isaacs authored
-
Gil Pedersen authored
-
Evan Oxfeld authored
Slice the portion of the buffer to unshift back into the read queue
-
Scott Blomquist authored
We were using a global temp file while setting the NODE_VERSION environment variable. This resulted in simultaneous builds swapping version numbers on occasion. This patch removes the use of a temp file for this.
-
isaacs authored
-
isaacs authored
-
isaacs authored
-
isaacs authored
-
isaacs authored
* V8: downgrade 3.14.5 * openssl: update to 1.0.1e * darwin: Make process.title work properly (Ben Noordhuis) * fs: Support mode/flag options to read/append/writeFile (isaacs) * stream: _read() no longer takes a callback (isaacs) * stream: Add stream.unshift(chunk) (isaacs) * stream: remove lowWaterMark feature (isaacs) * net: omit superfluous 'connect' event (Ben Noordhuis) * build, windows: disable SEH (Ben Noordhuis) * core: remove errno global (Ben Noordhuis) * core: Remove the nextTick for running the main file (isaacs) * core: Mark exit() calls with status codes (isaacs) * core: Fix debug signal handler race condition lock (isaacs) * crypto: clear error stack (Ben Noordhuis) * test: optionally set common.PORT via env variable (Timothy J Fontaine) * path: Throw TypeError on non-string args to path.resolve/join (isaacs, Arianit Uka) * crypto: fix uninitialized memory access in openssl (Ben Noordhuis)
-
isaacs authored
-
isaacs authored
Fix #4841
-
isaacs authored
This prevents fixture litter when these tests fail.
-
- Mar 01, 2013
-
-
Ben Noordhuis authored
Register the 'close' event listener with .once(), not .on(). It doesn't matter in the grand scheme of things because the listener doesn't keep references to any heavy-weight objects but using .once() for a oneshot listener is something of a best practice.
-
Timothy J Fontaine authored
-
isaacs authored
The first example uses Readable, and shows the use of readable.unshift(). The second uses the Transform class, showing that it's much simpler in this case.
-
isaacs authored
This makes it so that `stream.push(chunk)` is the only way to signal the end of reading, removing the confusing disparity between the callback-style _read method, and the fact that most real-world streams do not have a 1:1 corollation between the "please give me data" event, and the actual arrival of a chunk of data. It is still possible, of course, to implement a `CallbackReadable` on top of this. Simply provide a method like this as the callback: function readCallback(er, chunk) { if (er) stream.emit('error', er); else stream.push(chunk); } However, *only* fs streams actually would behave in this way, so it makes not a lot of sense to make TCP, TLS, HTTP, and all the rest have to bend into this uncomfortable paradigm. -
isaacs authored
-
isaacs authored
A primary motivation of this is to make the onread function more inline-friendly, but also to make it more easy to explore not having onread at all, in favor of always using push() to signal the end of reading.
-