Commit Graph

861 Commits (9456cf8fe2b42ccfb2a9561cd50430e623bdc6d2)

Author SHA1 Message Date
Duan Yao 9456cf8fe2 doc: Add callback parameter to dgram socket.bind()
Also, describe more details of bind().
2013-08-19 16:33:38 -07:00
ChrisWren 2385fbbc3a doc: fixed syntax error in stream.Transform 2013-08-19 16:10:05 -07:00
Edward Hutchins 31a27ca72d Added documentation for process.execArgv 2013-08-19 15:53:09 -07:00
Eivind Uggedal 732f8b9641 doc: add missing word in Transform stream intro 2013-08-19 15:45:35 -07:00
Forrest L Norvell 231092d236 doc: document domain.enter() and domain.exit()
Adds the documentation requested in #5017.
2013-08-05 13:11:38 +02:00
Sam Roberts 6a7be99703 doc: fs.open, fix flag/mode confusion, etc.
Flags and modes aren't the same, symlinks are followed in all of the
path but the last component, docs should say something about what the
mode argument is for and when its used, fs.openSync should point to the
function that contains the docs for its args, as fs.writeSync does.
2013-08-05 12:26:09 +02:00
Wyatt Preul 6359e017ac docs: Warning about consuming response 2013-07-30 15:06:20 -07:00
Ben Noordhuis 4881a6a9a3 doc: clarify fs.read() offset argument 2013-07-28 00:05:10 +02:00
Ben Noordhuis 0de5b831e2 doc: document tls.Server 'secureProtocol' option 2013-07-25 23:21:54 +02:00
Ben Noordhuis e0c4fba0ac doc: events: clarify 'newListener' emitter state
Ditto for the 'removeListener' event.
2013-07-18 20:49:24 +02:00
isaacs db5776cf8b doc: Streams API Doc Rewrite
The Streams API doc is now broken up into 3 sections:

1. API for Consumers
2. API for Implementors
3. Details and Extras

This addresses one of the biggest points of confusion for new users who
start to consume streams, and get the impression that they have to do
lots of extra work and implement classes and such, just to get some data
out of a file.
2013-07-16 10:49:54 -07:00
Nathan Rajlich ed5324687e doc: fix bad markdown parsing in list 2013-07-08 11:25:40 -07:00
Tim Oxley 2d6d46172e doc: remove obsolete spawn() stdio options 2013-07-05 11:56:24 +02:00
Ben Noordhuis 9290385057 doc: vm: update github issues link 2013-06-28 12:31:37 +02:00
Ben Noordhuis c1bf89df2e doc: tls: ECDH ciphers are not supported 2013-06-27 01:37:39 +02:00
Ben Noordhuis 3fac4157fe doc: fs: synchronize watchFile/unwatchFile warning
One said "if available", the other "if possible". Now they both say
"if possible."
2013-06-24 11:18:24 +02:00
Sam Roberts 5fc8efb87d doc: call console module 'console' not 'stdio'
The console module has always been called 'stdio' in the
table-of-contents, but nowhere else, since its name is
'console'. This makes it difficult to find.

This is a back-port of commit 226a20d from the master branch.
2013-06-18 22:50:19 +02:00
isaacs e8500274e0 Revert "http: remove bodyHead from 'upgrade' events"
This reverts commit a40133d10c.

Unfortunately, this breaks socket.io.  Even though it's not strictly an
API change, it is too subtle and in too brittle an area of node, to be
done in a stable branch.

Conflicts:
	doc/api/http.markdown
2013-06-12 17:45:30 -07:00
Kiyoshi Nomo 36e90da6df doc: remove `bufferSize` option
`bufferSize` option has been removed in b0f6789.
2013-05-30 15:10:03 +02:00
Ben Noordhuis 9826b15493 doc: sending dgram handles only works on unix 2013-05-29 16:35:01 +02:00
Daniel G. Taylor 675e85813f https: Add `secureProtocol` docs
Add `secureProtocol` parameter docs to the https.request method.
2013-05-28 21:43:37 +02:00
Daniel G. Taylor 30cb9fec91 tls: Add `secureProtocol` docs
Add `secureProtocol` parameter docs to the tls.connect method.
2013-05-28 21:40:52 +02:00
isaacs 179aa0a8f2 doc: Minor fixup in http doc re bodyHead 2013-05-24 15:06:12 -07:00
Nathan Zadoks a40133d10c http: remove bodyHead from 'upgrade' events
Streams2 makes this unnecessary.
An empty buffer is provided for compatibility.
2013-05-24 14:34:32 -07:00
Brandon Frohs 49300a4fa6 doc: Fix link to open issues on GitHub. 2013-05-17 13:56:24 -07:00
Ryuichi Okumura 4cd643ee2d doc: fix missing Class in header 2013-05-16 16:56:56 +02:00
Ryuichi Okumura b06c82fd88 doc: fix the link to Stream document 2013-05-16 16:56:41 +02:00
Ryan Graham 1deeab29f2 doc: improve exports/module.exports consistency
While they reference the same object, they are only interchangeable
for updates, not assignment.
2013-05-15 21:06:32 +02:00
Ryan Graham 93391ae9cb doc: clarify exports and module.exports
When exporting a single function you must use `module.exports` instead
of the `exports` convenience reference.
2013-05-15 21:05:57 +02:00
isaacs bdb78b9945 stream: don't create unnecessary buffers in Readable
If there is an encoding, and we do 'stream.push(chunk, enc)', and the
encoding argument matches the stated encoding, then we're converting from
a string, to a buffer, and then back to a string.  Of course, this is a
completely pointless bit of work, so it's best to avoid it when we know
that we can do so safely.
2013-05-14 11:36:04 -07:00
Robert Kowalski dc92ff8585 doc: document stream.Writable 'error' event
Fixes #5255.
2013-05-08 18:15:50 -07:00
Kevin Locke 1c2b03dea5 doc: update options for exec and execFile
The stdio and customFds options are never used by exec or execFile,
remove them from the documentation for these functions.
2013-05-03 16:01:33 +02:00
Sam Roberts 41cbdc5e64 doc: document return values of EventEmitter methods 2013-05-03 01:10:01 +02:00
Miroslav Bajtoš a32a243d5f debugger: breakpoints in scripts not loaded yet
When developer calls setBreakpoint with an unknown script name,
we convert the script name into regular expression matching all
paths ending with given name (name can be a relative path too).

To create such breakpoint in V8, we use type `scriptRegEx`
instead of `scriptId` for `setbreakpoint` request.

To restore such breakpoint, we save the original script name
send by the user. We use this original name to set (restore)
breakpoint in the new child process.

This is a back-port of commit 5db936d from the master branch.
2013-05-02 08:52:58 +02:00
isaacs dda7b40204 doc: Fix require.extensions documentation
1. The stability index must come first, or it messes up the markdown
2. require.extensions is an Object, not an Array.

Close #5387
2013-04-30 07:40:43 -07:00
Ben Noordhuis 626d7abdb4 doc: cluster: s/server.destroy/server.close/
Fixes #5379.
2013-04-29 12:06:36 +02:00
isaacs 7bd8a5a2a6 doc: Deprecate require.extensions 2013-04-28 22:10:40 -07:00
Sean Silva 63466e5cae doc: document value of `this` inside listeners
Fixes #5326.
2013-04-19 11:58:18 +02:00
Kelly Gerber 36503b523d docs: update path.join() example for v0.10
The current example shows the behavior of v0.8. In v0.10 arguments
to path.join() must be strings; otherwise, an exception is thrown.
2013-04-17 00:04:17 +02:00
Ryan Graham b02b93b2a2 doc: note a gotcha with http.Server sockets 2013-04-16 23:44:00 +02:00
isaacs b0de1e4a41 stream: Fix unshift() race conditions
Fix #5272

The consumption of a readable stream is a dance with 3 partners.

1. The specific stream Author (A)
2. The Stream Base class (B), and
3. The Consumer of the stream (C)

When B calls the _read() method that A implements, it sets a 'reading'
flag, so that parallel calls to _read() can be avoided.  When A calls
stream.push(), B knows that it's safe to start calling _read() again.

If the consumer C is some kind of parser that wants in some cases to
pass the source stream off to some other party, but not before "putting
back" some bit of previously consumed data (as in the case of Node's
websocket http upgrade implementation).  So, stream.unshift() will
generally *never* be called by A, but *only* called by C.

Prior to this patch, stream.unshift() *also* unset the state.reading
flag, meaning that C could indicate the end of a read, and B would
dutifully fire off another _read() call to A.  This is inappropriate.
In the case of fs streams, and other variably-laggy streams that don't
tolerate overlapped _read() calls, this causes big problems.

Also, calling stream.shift() after the 'end' event did not raise any
kind of error, but would cause very strange behavior indeed.  Calling it
after the EOF chunk was seen, but before the 'end' event was fired would
also cause weird behavior, and could lead to data being lost, since it
would not emit another 'readable' event.

This change makes it so that:

1. stream.unshift() does *not* set state.reading = false
2. stream.unshift() is allowed up until the 'end' event.
3. unshifting onto a EOF-encountered and zero-length (but not yet
end-emitted) stream will defer the 'end' event until the new data is
consumed.
4. pushing onto a EOF-encountered stream is now an error.

So, if you read(), you have that single tick to safely unshift() data
back into the stream, even if the null chunk was pushed, and the length
was 0.
2013-04-11 16:12:48 -07:00
Rod Vagg ccabd4a6fa process: expose NODE_MODULE_VERSION in process.versions 2013-04-08 16:48:18 +02:00
Ben Noordhuis e8c01739cd doc: document linux pwrite() bug
On Linux, positional writes don't work when the file is opened in
append mode. The kernel ignores the position argument and always
appends the data to the end of the file.

To quote the man page:

  POSIX requires that opening a file with the O_APPEND flag should have
  no affect on the location at which pwrite() writes data.  However, on
  Linux, if a file is opened with O_APPEND, pwrite() appends data to the
  end of the file, regardless of the value of offset.
2013-04-08 00:43:30 +02:00
isaacs aeef9518c6 doc: Correct caveats for http Readables 2013-04-05 11:07:53 -07:00
Michael Hart 440dcae987 Ensure BAD domain example actually uses domain 2013-04-01 10:09:27 -07:00
isaacs 5ae26f3750 doc: Add 'don't ignore errors' section to domain
Also, an example program of using cluster and domain to handle errors
safely, with zero downtime, using process isolation.
2013-03-28 09:53:59 -07:00
Benjamin Ruston 024a8b0cb4 doc: debugger, dns, http: fix grammar 2013-03-28 16:50:37 +01:00
Benjamin Ruston 372911ffc7 doc: addon: fix grammar 2013-03-27 12:37:54 +01:00
Ben Noordhuis a80a132b38 doc: child_process: document 'error' event
Fixes #5130.
2013-03-26 16:34:43 +01:00
Ben Noordhuis 0e08e147c7 doc: fix formatting in tty.markdown
Fixes #5135.
2013-03-26 16:09:51 +01:00