0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
Commit Graph

751 Commits

Author SHA1 Message Date
Tim
d5a5901346 doc: Fix syntax in cluster example code 2013-01-21 19:17:01 -08:00
Yi EungJun
33d22428fb doc: Add NODE_DEBUG env to the first example.
The first example in cluster.markdown requires NODE_DEBUG env to show
debug message.

And also fix the message because it was a little bit different with
the actual message.
2013-01-18 13:18:37 -08:00
isaacs
ee2fd79e43 doc: Remove mention of child.send 'track' option
Will be removed very soon.  No point making it public.
2013-01-18 11:04:10 -08:00
Fedor Indutny
4488a69fac child_process: do not keep list of sent sockets
Keeping list of all sockets that were sent to child process causes memory
leak and thus unacceptable (see #4587). However `server.close()` should
still work properly.

This commit introduces two options:

* child.send(socket, { track: true }) - will send socket and track its status.
  You should use it when you want to receive `close` event on sent sockets.
* child.send(socket) - will send socket without tracking it status. This
  performs much better, because of smaller number of RTT between master and
  child.

With both of these options `server.close()` will wait for all sent
sockets to get closed.
2013-01-18 03:13:41 +04:00
Fedor Indutny
44cd121c63 Revert "child_process: do not keep list of sent sockets"
This reverts commit db5ee0b3de.
2013-01-18 03:13:10 +04:00
Fedor Indutny
db5ee0b3de child_process: do not keep list of sent sockets
Keeping list of all sockets that were sent to child process causes memory
leak and thus unacceptable (see #4587). However `server.close()` should
still work properly.

This commit introduces two options:

* child.send(socket, { track: true }) - will send socket and track its status.
  You should use it when you want `server.connections` to be a reliable
  number, and receive `close` event on sent sockets.
* child.send(socket) - will send socket without tracking it status. This
  performs much better, because of smaller number of RTT between master and
  child.

With both of these options `server.close()` will wait for all sent
sockets to get closed.
2013-01-17 13:46:31 -08:00
Ryunosuke SATO
562d3f11f3 doc: modify documentation style about 'Stability: 5'
'Stability: 5' is described as 'Locked' not as 'API Locked'
in other documents.

For example:
- `/doc/api/assert.markdown`
- `/doc/api/util.markdown`

This word was injected in 192192a.
2013-01-17 13:51:21 +01:00
isaacs
97db62b4d9 Merge remote-tracking branch 'ry/v0.8' into master
Conflicts:
	AUTHORS
	ChangeLog
	Makefile
	src/node_version.h
2013-01-11 10:18:07 -08:00
isaacs
a993f740f0 stream: Add readable.push(chunk) method 2013-01-10 13:49:53 -08:00
Tim Bradshaw
e6acfed9cc doc: os.cpus() returns times in milliseconds 2013-01-08 05:38:36 +01:00
Bradley Meck
70ad9bbcbd child_process: make fork() execPath configurable
Allows for arbitrary path to executable spawned using `fork`. This
fixes some issues around running multiple versions of node with workers
and allows arbitrary IPC with compatible executables.

Fixes #3248.
2013-01-06 22:55:30 +01:00
James Hight
3f76419a04 net: add localAddress and localPort to Socket 2013-01-05 17:05:13 +01:00
Johannes Ewald
872cb0d7fa doc: improve example of process.hrtime()
The example clarifies now that diff[0] * 1000000000 + diff[1] equals
the result in nanoseconds.
2013-01-04 23:06:40 +01:00
isaacs
ec8ebaf300 domain: use camelCase instead of snake_case
While it's true that error objects have a history of getting snake_case
properties attached by the host system, it's a point of confusion to
Node users that comes up a lot.  It's still 'experimental', so best to
change this sooner rather than later.
2012-12-29 10:37:31 -08:00
Luke Arduini
192192a09e Colorize API stabilitity index headers in docs
Noted in @shtylman's #3898, API stability notes are easy to overlook
in the html documentation. This can be especially troublesome if the API
is deprecated. This commit gives visual feedback by adding in a class
to the html docs when they're generated. The API headers with
corresponding colors are also listed in the 'About this Documentation'
page for easy reference.
2012-12-27 18:38:56 -08:00
Andreas Madsen
ce30683012 doc: document the finish event
Since the stream implementer is not expected to overwrite
.end() the finish event is necessary in order to know when
no more data can be written
2012-12-26 14:56:02 -08:00
isaacs
982981442d doc: Nudge formatting to make json generator happy
Starting a line with `**bold**` text makes it think that it's a link,
and get confused.

This should really be fixed properly in the doc generator, but for now,
it's not a major issue.  It's probably just a matter of updating marked.
2012-12-21 11:32:29 -08:00
Farid Neshat
dcaebec208 fs: add autoClose=true option to fs.createReadStream 2012-12-20 11:25:39 +01:00
isaacs
20a88feb8f docs: streams2 2012-12-14 10:52:29 -08:00
isaacs
4a32d53155 doc: Crypto streaming interface 2012-12-14 10:52:27 -08:00
isaacs
77ed12fe7a Merge remote-tracking branch 'ry/v0.8' into master
Conflicts:
	AUTHORS
	ChangeLog
	deps/uv/test/test-spawn.c
	deps/uv/uv.gyp
	src/cares_wrap.cc
	src/node.cc
	src/node_version.h
	test/simple/test-buffer.js
	tools/gyp/pylib/gyp/common.py
	tools/install.py
2012-12-13 16:57:58 -08:00
Ben Noordhuis
c79fd0e167 doc: remove broken require.extensions example
Fixes #4384.
2012-12-06 21:58:36 +01:00
Ben Noordhuis
5b65638124 tls, https: add tls handshake timeout
Don't allow connections to stall indefinitely if the SSL/TLS handshake does
not complete.

Adds a new tls.Server and https.Server configuration option, handshakeTimeout.

Fixes #4355.
2012-12-06 17:39:24 +01:00
Ben Noordhuis
3ece130ea2 process: add getgroups(), setgroups(), initgroups()
DRY the getuid(), getgid(), etc. functions while we're at it.
2012-12-06 17:14:58 +01:00
Ben Noordhuis
a80434736b fs: fix 'object is not a function' callback errors
Use a default callback if the user omitted one. Avoids errors like the one
below:

  fs.js:777
      if (err) return callback(err);
                      ^
  TypeError: object is not a function
          at fs.appendFile (fs.js:777:21)
          at Object.oncomplete (fs.js:297:15)

This commit fixes the behavior of fs.lchmod(), fs.lchown() and fs.readFile()
when the callback is omitted. Before, they silently swallowed errors.

Fixes #4352.
2012-12-04 08:05:55 +01:00
Ryunosuke SATO
83161455bd doc: Fix missing link target to 'https.request()' 2012-11-27 18:11:40 -08:00
Trevor Norris
bb867c0fa6 doc: Add lines about additonal uses of Buffer
That Buffers can be used with Typed Array Views and DataViews. Included
are a couple simple examples.

Closes #4257.
2012-11-22 09:30:18 -08:00
Tim Kuijsten
6f9ed28fac doc: fix typo in setPrivateKey function signature 2012-11-20 18:02:56 +01:00
Stephen Gallagher
38809e3985 build: allow linking against system libuv 2012-11-16 23:34:13 +01:00
Nathan Rajlich
5e4e87ade5 os: add os.endianness() function 2012-11-08 12:31:45 -08:00
Stephen Gallagher
73ff653a8d build: allow linking against system c-ares 2012-11-06 00:18:35 +01:00
Stephen Gallagher
bfd78b69fc build: allow linking against system http_parser 2012-11-06 00:18:35 +01:00
Francois Marier
44dd2c392a doc: remove duplicate set of options 2012-10-30 01:20:17 +01:00
Francois Marier
326bce91d6 doc: reflect hostname v. host preference in examples
The documentation for http.request and https.request states that
`hostname` is preferred over `host` so the code examples should
use that option name.
2012-10-29 20:34:03 +01:00
Ben Noordhuis
9b61f570d8 Merge remote-tracking branch 'origin/v0.8'
Conflicts:
	configure
	deps/v8/build/common.gypi
2012-10-25 16:08:58 +02:00
Olivier Lalonde
626db18635 doc: child_process: document uid and gid spawn() options 2012-10-24 01:24:00 +02:00
isaacs
f3621359f4 doc: OpenSSL is bundled now. 2012-10-23 10:48:51 -07:00
isaacs
76b0bdf720 crypto: Add crypto.DEFAULT_ENCODING (defaults to 'buffer')
This is a flag to make it easier for users to upgrade through the
breaking crypto change, and easier for us to switch it back if it's a
problem.

Explicitly set default encoding to 'buffer' in other tests, in case it
ever changes back.
2012-10-23 10:48:51 -07:00
isaacs
bfb9d5bbe6 crypto: Binding only accepts buffers 2012-10-23 10:48:50 -07:00
isaacs
9901b69c8e crypto: Move encoding logic to JS, default=buffer
crypto: Hash and Hmac default to buffers

crypto: Move Cipher encoding logic to JS

crypto: Move Cipheriv encoding logic to JS

crypto: Move Decipher encoding logic to JS

crypto: Move Decipheriv into JS, default to buffers

crypto: Move Sign class to JS

crypto: Better encoding handling in Hash.update

crypto: Move Verify class to JS

crypto: Move DiffieHellman to JS, default to buffers

crypto: Move DiffieHellmanGroup to JS, default to buffers

Also, create a test for this feature
2012-10-23 10:22:42 -07:00
Ben Noordhuis
d0227b0308 Merge remote-tracking branch 'origin/v0.8'
Conflicts:
	deps/openssl/openssl.gyp
2012-10-21 23:06:48 +02:00
isaacs
627f0d27e8 doc: Typo. s/arguemnt/argument/ 2012-10-16 10:59:23 -07:00
Jan Lehnardt
a7b5938715 docs: fix copy and paste error 2012-10-14 14:47:02 +02:00
Nathan Rajlich
4b238b4c2a Merge remote-tracking branch 'origin/v0.8'
Conflicts:
	AUTHORS
	ChangeLog
	deps/uv/test/runner-win.c
	doc/api/process.markdown
	lib/repl.js
	src/node_crypto.cc
	src/node_version.h
2012-10-13 16:16:56 -07:00
Ben Noordhuis
4a23add90f doc: rectify http.ClientResponse close/end events
* The 'close' event doesn't emit an error object.

* It's possible for a 'close' event to come after an 'end' event, contrary to
  what the documentation said.

Fixes #4116.
2012-10-13 15:17:51 +02:00
Ben Noordhuis
14a6c4efb8 crypto: add crypto.getHashes() 2012-10-13 02:55:14 +02:00
Ben Noordhuis
f53441ab1f crypto: add crypto.getCiphers()
Returns a list of, unsurprisingly, the available ciphers.
2012-10-13 01:49:57 +02:00
isaacs
061f2075cf string_decoder: Add 'end' method, do base64 properly 2012-10-11 16:46:18 -07:00
isaacs
99b2368a6c doc: Reduce crypto stability to 2-Unstable 2012-10-11 08:32:46 -07:00
Nathan Rajlich
4eb5399bb2 util: add a "customInspect" option to util.inspect()
For disabling calling the custom `inspect()` function when defined on an object
that is being inspected.
2012-10-10 14:40:36 -07:00