summaryrefslogtreecommitdiff
path: root/doc/api
Commit message (Collapse)AuthorAgeFilesLines
* fs: add access() and accessSync()cjihrig2014-12-151-0/+33
| | | | | | | | | | | fs.exists() and fs.existsSync() do not follow the typical error first callback convention. access() and accessSync() are added as alternatives in this commit. Fixes: https://github.com/joyent/node/pull/8714 PR-URL: https://github.com/iojs/io.js/pull/114 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Domenic Denicola <domenic@domenicdenicola.com>
* doc: change write() after end() streams exampleAlejandro Oviedo2014-12-141-5/+4
| | | | | | | | | | | | Currently there's an example using http.ServerResponse stream, which has a known bug and will not throw an error while writing after end(). Changed to a writable stream from fs which behaves as expected. Fixes https://github.com/joyent/node/issues/8814. PR-URL: https://github.com/iojs/io.js/pull/155 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Brendan Ashworth <squirrelslikeacorns@gmail.com>
* lib: reintroduce v8 moduleBen Noordhuis2014-12-143-0/+45
| | | | | | | | | | | | | | | I introduced this module over a year ago in a pull request as the v8 module but it was quickly subsumed by the tracing module. The tracing module was recently removed again and that is why this commit introduces the v8 module again, including the new features it picked up commits d23ac0e and f8076c4. PR-URL: https://github.com/iojs/io.js/pull/131 Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com> Reviewed-By: Christian Tellnes <christian@tellnes.no> Reviewed-By: Thorsten Lorenz <thlorenz@gmx.de> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
* domain: add soft deprecation noticeChris Dickinson2014-12-121-0/+7
| | | | | | | | | | | | Per the TC meeting on 2014-12-10, domains will be "soft deprecated" until a suitable replacement API is available; at which time they will be fully deprecated. Full deprecation will include references to replacement API and the application of util.deprecate to the domain api. PR-URL: https://github.com/iojs/io.js/pull/141 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* domain: forward args to .run(fn)micnic2014-12-121-2/+3
| | | | | | | | | | | Adds the feature to define arguments for the function called in domain.run(), this is supposed to be useful when a function is called from another context and some values from the current context are needed as arguments, it's similar to the callback from setTimeout or setInterval. PR-URL: https://github.com/iojs/io.js/pull/15 Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* src: remove the tracing module entirelyBert Belder2014-12-092-67/+0
| | | | | PR-URL: https://github.com/iojs/io.js/pull/124 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* doc: mention callback for http res/req write & endJackson Tian2014-12-091-8/+11
| | | | | Add documentation for the callback parameter of http.ClientRequest's and http.ServerResponse's write and end methods.
* src: remove Async ListenerTrevor Norris2014-12-091-223/+1
| | | | | | | | | | | | Async Listener was the name of the user-facing JS API, and is being completely removed. Instead low level hooks directly into the mechanism that AL used will be introduced in a future commit. PR-URL: https://github.com/joyent/node/pull/8110 Signed-off-by: Trevor Norris <trev.norris@gmail.com> Reviewed-by: Fedor Indutny <fedor@indutny.com> Reviewed-by: Alexis Campailla <alexis@janeasystems.com> Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
* doc: set logical umask in process.umask exampleCarlos Campderrós2014-12-091-1/+1
| | | | | | | | 0644 seems to be the desired mode for new files (as it is a very weird umask), and to achieve that the correct umask would be 0022. PR-URL: https://github.com/joyent/node/pull/8039 Reviewed-by: Trevor Norris <trev.norris@gmail.com>
* doc: fixes grammar in timers/tlsBrendan Ashworth2014-12-072-4/+4
| | | | | | | | | | | | | This commit fixes a few grammar issues located within the doc files for timers and tls. They primarily include incorrect use of a / an and a single insertion of a comma. same as [this PR](https://github.com/joyent/node/pull/8581) Reviewed-By: Fedor Indutny <fedor@indutny.com> PR-URL: https://github.com/iojs/io.js/pull/76
* events: implement EventEmitter#getMaxListeners()Christian Tellnes2014-12-051-0/+14
| | | | | | | Fixes https://github.com/joyent/node/issues/8237. PR-URL: https://github.com/iojs/io.js/pull/82 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* url: support `path` for url.formatYazhong Liu2014-12-021-4/+5
| | | | | | | | | this adds support for a "path" field that overrides "query", "search", and "pathname" if given. Fixes: https://github.com/joyent/node/issues/8722 PR-URL: https://github.com/joyent/node/pull/8755 Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
* Merge remote-tracking branch 'joyent/v0.12' into v0.12Ben Noordhuis2014-11-225-8/+64
|\ | | | | | | | | | | | | | | | | Conflicts: Makefile deps/v8/src/base/platform/platform.h PR-URL: https://github.com/node-forward/node/pull/65 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
| * path: added parse() and format() functionsRory Bradford2014-11-201-0/+42
| | | | | | | | | | | | | | | | | | | | | | The parse() function splits a path and returns an object with the different elements. The format() function is the reverse of this and adds an objects corresponding path elements to make up a string. Fixes #6976. Fixes: https://github.com/joyent/node/issues/6976 PR-URL: https://github.com/joyent/node/pull/8750 Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
| * path: allow calling platform specific methodsTimothy J Fontaine2014-11-201-0/+10
| | | | | | | | | | | | | | | | | | Add path.posix and path.win32 which have the specific methods like resolve and normalize so you can specifically normalize or resolve based on the target platform. PR-URL: https://github.com/joyent/node/pull/5661 Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
| * doc: correct broken link in net.markdownSteve Sharp2014-11-201-1/+1
| | | | | | | | | | | | | | | | Fixes broken link to Readable Stream documentation. Fixes: https://github.com/joyent/node/issues/8464 PR-URL: https://github.com/joyent/node/pull/8756 Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
| * doc: clarify return value of http.createServerMK Safi2014-11-191-1/+1
| | | | | | | | | | | | PR-URL: https://github.com/joyent/node/pull/6054 Reviewed-by: Isaac Z. Schlueter <i@izs.me> Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
| * doc: fix typos in http.markdownArtur Cistov2014-11-171-4/+4
| | | | | | | | | | PR-URL: https://github.com/joyent/node/pull/4784 Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
| * doc: note ability to require files within packagessudodoki2014-11-091-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | Adding note to api/modules.markdown about ability to load arbitrary path from modules from node_module path by adding reference to path after module name in call to require() PR-URL: https://github.com/joyent/node/pull/7794 Reviewed-by: Trevor Norris <trev.norris@gmail.com> Reviewed-by: Fedor Indutny <fedor@indutny.com> Reviewed-by: Timothy J Fontaine <tjfontaine@gmail.com>
| * doc: remove tls.createSecurePair deprecationChris Dickinson2014-11-071-2/+0
| | | | | | | | | | | | | | | | pending tls.TLSSocket growing the ability to work with streams, createSecurePair will remain. PR-URL: https://github.com/joyent/node/pull/8695 Reviewed-by: Fedor Indutny <fedor@indutny.com>
* | lib: add setFlagsFromString() to tracing moduleBen Noordhuis2014-11-201-0/+15
|/ | | | | | | | Expose v8::V8::SetFlagsFromString() on tracing.v8 in lib/tracing.js. PR-URL: https://github.com/node-forward/node/pull/62 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-by: Trevor Norris <trev.norris@gmail.com>
* net: add pauseOnConnect option to createServer()cjihrig2014-10-271-1/+8
| | | | | | | | | | | | | | | Currently when a server receives a new connection the underlying socket handle begins reading data immediately. This causes problems when sockets are passed between processes, as data can be read by the first process and thus never read by the second process. This commit allows sockets that are constructed with a handle to be paused initially. PR-URL: https://github.com/joyent/node/pull/8576 Fixes: https://github.com/joyent/node/issues/7905 Fixes: https://github.com/joyent/node/issues/7784 Reviewed-by: Trevor Norris <trev.norris@gmail.com>
* docs: fix smalloc.dispose() exampleVladimir Kurchatkin2014-10-271-1/+7
| | | | | | | | Also couple of additions about dispose and limitations of smalloc'ed objects. Fixes: https://github.com/joyent/node/pull/8625 Reviewed-by: Trevor Norris <trev.norris@gmail.com>
* doc: correct createSecureContextWang Xinyong2014-10-092-3/+1
| | | | | | | | Remove incorrect stablity indication of tls.createSecureContext, and format stablity indication of crypto.createCredentials. Fixes: e50749 "doc: document `tls.createSecureContext`" Reviewed-by: Trevor Norris <trev.norris@gmail.com>
* doc: fix wording and punctuation in modulesStiliyan Lazarov2014-10-081-4/+4
| | | | | [trev.norris@gmail.com: break lines at 80 characters] Signed-off-by: Trevor Norris <trev.norris@gmail.com>
* buffer, doc: misc. fix and cleanupTrevor Norris2014-10-081-0/+6
| | | | | | | | | | * Add official documentation that a Buffer instance is a viable argument when instantiating a new Buffer. * Properly set the poolOffset when a buffer needs to be truncated. * Add comments clarifying specific peculiar coding choices. * Remove a level of unnecessary indentation. Signed-off-by: Trevor Norris <trev.norris@gmail.com>
* doc: add missing semicolonsSteve Mao2014-10-071-9/+9
| | | | | PR-URL: https://github.com/joyent/node/pull/8498 Reviewed-by: Trevor Norris <trev.norris@gmail.com>
* streams: set default encoding for writable streamsJohnny Ray2014-10-071-0/+8
| | | | | | | | Add API Writable#setDefaultEncoding(). PR-URL: https://github.com/joyent/node/pull/8483 Fixes: https://github.com/joyent/node/issues/7159 Reviewed-by: Trevor Norris <trev.norris@gmail.com>
* doc: improve readLine.pause()Victor Widell2014-10-061-0/+2
| | | | | | | | | | | The docs for readLine.pause are misleading. I seriously spent hours on this. If it isn't a bug, at least it should be well documented. Someone else stumbled on this too: http://stackoverflow.com/questions/21341050/pausing-readline-in-node-js Reviewed-by: Trevor Norris <trev.norris@gmail.com> Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
* doc: Update net.markdownSteve Sharp2014-10-061-0/+1
| | | | | | | | Associates link to dns.lookup() with proper URL. Fixes: https://github.com/joyent/node/issues/8018 Reviewed-by: Trevor Norris <trev.norris@gmail.com> Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
* buffer: add generic functions for (u)int opsYazhong Liu2014-10-031-0/+42
| | | | | | | | | | | | | | | Add generic functions for (U)Int read/write operations on Buffers. These support up to and including 48 bit reads and writes. Include documentation and tests. Additional work done by Trevor Norris to include 40 and 48 bit write support. Because bitwise operations cannot be used on values greater than 32 bits, the operations have been replaced with mathematical calculations. Regardless, they are still faster than floating point operations. Reviewed-by: Trevor Norris <trev.norris@gmail.com>
* readline: should not require an output stream.Julien Gilli2014-10-011-3/+10
| | | | | | | | | Passing null as the output stream to readline.Interface()'s constructor is now supported. Any output written by readline is just discarded. It makes it easier to use readline just as a line parser. Fixes: https://github.com/joyent/node/issues/4408 Reviewed-by: Trevor Norris <trev.norris@gmail.com>
* url: make query() consistentGabriel Wicke2014-10-011-3/+4
| | | | | | | | | | | Match the behavior of the slow path by setting url.query to an empty object when the url contains no query, but query parsing is requested. Also add a test for this case, and update the documents to clearly reflect this behavior. Fixes: https://github.com/joyent/node/issues/8332 Reviewed-by: Trevor Norris <trev.norris@gmail.com>
* doc: note stdout and stderr special behaviors.Julien Fontanet2014-10-011-2/+4
| | | | | Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
* doc: fix optional parameter parsingTrevor Norris2014-09-2919-77/+93
| | | | | | | | The parameter parser specifically looked for the old bracket syntax. This generated a lot of warnings when building the docs. Those warnings have been fixed by changing the parsing logic. Signed-off-by: Trevor Norris <trev.norris@gmail.com>
* doc: fix brackets for optional parametersTrevor Norris2014-09-2524-183/+183
| | | | | | | | | | | | | Documentation incorrectly used bracket notation for optional parameters. This caused inconsistencies in usage because of examples like the following: fs.write(fd, data[, position[, encoding]], callback) This simply fixes all uses of bracket notation in documentation. Signed-off-by: Trevor Norris <trev.norris@gmail.com> Reviewed-by: Fedor Indutny <fedor@indutny.com>
* doc: corrected typo in vm docsAndrew Teich2014-09-191-1/+1
| | | | Reviewed-by: Trevor Norris <trev.norris@gmail.com>
* doc: console example improvementGuilherme de Souza2014-09-171-0/+3
| | | | | Reviewed-by: Trevor Norris <trev.norris@gmail.com> Reviewed-by: Fedor Indutny <fedor@indutny.com>
* doc: http.request() improved code exampleGuilherme de Souza2014-09-171-3/+10
| | | | | Reviewed-by: Trevor Norris <trev.norris@gmail.com> Reviewed-by: Fedor Indutny <fedor@indutny.com>
* Merge remote-tracking branch 'upstream/v0.10' into v0.12Timothy J Fontaine2014-09-162-7/+30
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: ChangeLog deps/v8/src/hydrogen.cc lib/http.js lib/querystring.js src/node_crypto.cc src/node_version.h test/simple/test-querystring.js
| * doc: document `process.env` betterMaciej Małecki2014-09-161-0/+23
| | | | | | | | | | | | Fixes #6424. Reviewed-By: Fedor Indutny <fedor@indutny.com>
| * doc: fix modules require.resolve documentationMathias Schreck2014-09-151-7/+7
| | | | | | | | | | | | | | | | | | | | | | The behavior of the `node_modules` lookup algorithm was changed in #1177, but the documentation was not updated completely to describe the new behavior. The pseudocode of the lookup algorithm did not metion that `index.json` is tried to be loaded if you require a folder. Reviewed-By: Fedor Indutny <fedor@indutny.com>
* | lib, src: add vm.runInDebugContext()Ben Noordhuis2014-09-161-0/+14
| | | | | | | | | | | | | | | | | | | | | | Compiles and executes source code in V8's debugger context. Provides a programmatic way to get access to the debug object by executing: var Debug = vm.runInDebugContext('Debug'); Fixes #7886. Reviewed-by: Trevor Norris <trev.norris@gmail.com>
* | tls: `checkServerIdentity` optionTrevor Livingston2014-09-091-0/+4
| | | | | | | | | | | | | | Allow overriding `checkServerIdentity` function, when connecting to a TLS server. Reviewed-By: Fedor Indutny <fedor@indutny.com>
* | net,dgram: workers can listen on exclusive portscjihrig2014-09-032-0/+54
| | | | | | | | | | | | | | | | | | Allow cluster workers to listen on exclusive ports for TCP and UDP, instead of forcing all calls to go through the cluster master. Fixes: #3856 Reviewed-by: Trevor Norris <trev.norris@gmail.com> Reviewed-by: Fedor Indutny <fedor@indutny.com>
* | tls: support multiple keys/certsFedor Indutny2014-09-031-4/+4
| | | | | | | | Required to serve website with both ECDSA/RSA certificates.
* | cluster: centralize removal from workers list.Julien Gilli2014-09-021-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, cluster workers can be removed from the workers list in three different places: - In the exit event handler for the worker process. - In the disconnect event handler of the worker process. - In the disconnect event handler of the cluster master. However, handles for a given worker are cleaned up only in one of these places: in the cluster master's disconnect event handler. Because these events happen asynchronously, it is possible that the workers list is empty before we even clean up one handle. This makes the assert that makes sure that no handle is left when the workers list is empty fail. This commit removes the worker from the cluster.workers list only when the worker is dead _and_ disconnected, at which point we're sure that its associated handles are cleaned up. Fixes #8191 and #8192. Reviewed-By: Fedor Indutny <fedor@indutny.com>
* | tls: add DHE-RSA-AES128-SHA256 to the def ciphersShigeki Ohtsu2014-08-291-8/+10
| | | | | | | | | | | | `!EDH` is also removed from the list in the discussion of #8272 Reviewed-By: Fedor Indutny <fedor@indutny.com>
* | tls, crypto: add DHE supportShigeki Ohtsu2014-08-291-0/+4
| | | | | | | | | | | | | | | | In case of an invalid DH parameter file, it is sliently discarded. To use auto DH parameter in a server and DHE key length check in a client, we need to wait for the next release of OpenSSL-1.0.2. Reviewed-By: Fedor Indutny <fedor@indutny.com>
* | crypto: introduce ECDHFedor Indutny2014-08-291-0/+79
| |