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

891 Commits

Author SHA1 Message Date
Linus Mårtensson
5e4e8ec429 build: add android support
Resolves minor discrepancies between android and standard POSIX systems.
In addition, some configure parameters were added, and a helper-script
for android configuration. Ideally, this script should be merged into
the standard configure script.

To build for android, source the android-configure script with an NDK
path:

    source ./android-configure ~/android-ndk-r8d

This will create an android standalone toolchain and export the
necessary environment parameters.

After that, build as normal:

    make -j8

After the build, you should now have android-compatible NodeJS binaries.
2013-06-17 17:21:56 +02:00
Fedor Indutny
212e9cd8c9 tls: session API returns 2013-06-17 14:00:26 +02:00
isaacs
0a4260c8c0 doc: Correct TLS deprecation notices 2013-06-16 18:56:00 -07:00
Fedor Indutny
af80e7bc6e tls: introduce TLSSocket based on tls_wrap binding
Split `tls.js` into `_tls_legacy.js`, containing legacy
`createSecurePair` API, and `_tls_wrap.js` containing new code based on
`tls_wrap` binding.

Remove tests that are no longer useful/valid.
2013-06-16 09:30:15 +02:00
isaacs
2900f0778a Merge remote-tracking branch 'ry/v0.10'
Conflicts:
	ChangeLog
	src/node_version.h
2013-05-31 11:52:57 -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
28659aba37 Merge remote-tracking branch 'origin/v0.10'
Conflicts:
	deps/uv/ChangeLog
	deps/uv/src/unix/stream.c
	deps/uv/src/version.c
	lib/tls.js
2013-05-29 23:12:11 +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
ba048e72b0 Merge remote-tracking branch 'ry/v0.10'
Conflicts:
	AUTHORS
	ChangeLog
	configure
	deps/uv/ChangeLog
	deps/uv/src/unix/darwin.c
	deps/uv/src/unix/stream.c
	deps/uv/src/version.c
	deps/v8/src/isolate.cc
	deps/v8/src/version.cc
	lib/http.js
	src/node_version.h
2013-05-27 14:46:52 -07: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
isaacs
896b2aa707 util: Add debuglog, deprecate console lookalikes 2013-05-21 16:39:50 -07:00
isaacs
0fefcc1690 Merge remote-tracking branch ry/v0.10 into master
Conflicts:
	AUTHORS
	ChangeLog
	src/node_crypto.cc
	src/node_version.h
2013-05-20 14:43:14 -07:00
Ben Noordhuis
d820b64412 tls: add localAddress and localPort properties
Add localAddress and localPort properties to tls.CleartextStream.
Like remoteAddress and localPort, delegate to the backing net.Socket
object.

Refs #5502.
2013-05-20 15:18:50 +02:00
isaacs
61c9f78c63 Merge remote-tracking branch 'ry/v0.10' into master
Conflicts:
	AUTHORS
	ChangeLog
	deps/uv/ChangeLog
	deps/uv/config-unix.mk
	deps/uv/src/unix/stream.c
	deps/uv/src/version.c
	deps/uv/uv.gyp
	src/node.cc
	src/node_buffer.cc
	src/node_crypto.cc
	src/node_version.h
	src/stream_wrap.cc
	src/stream_wrap.h
2013-05-17 14:04:54 -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
Ben Noordhuis
7124387b34 http: don't escape request path, reject bad chars
Commit 38149bb changes http.get() and http.request() to escape unsafe
characters. However, that creates an incompatibility with v0.10 that
is difficult to work around: if you escape the path manually, then in
v0.11 it gets escaped twice. Change lib/http.js so it no longer tries
to fix up bad request paths, simply reject them with an exception.

The actual check is rather basic right now. The full check for illegal
characters is difficult to implement efficiently because it requires a
few characters of lookahead. That's why it currently only checks for
spaces because those are guaranteed to create an invalid request.

Fixes #5474.
2013-05-15 22:53:29 +02:00
Ben Noordhuis
b3d1e504f4 net: emit dns 'lookup' event before connect
net.connect() and net.createConnection() now emit a 'lookup' event
after resolving the hostname but before connecting.

Fixes #5418.
2013-05-15 22:53:29 +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
Timothy J Fontaine
8886c6bf62 dns: add getServers and setServers
getServers returns an array of ips that are currently being used for
resolution

setServers takes an array of ips that are to be used for resolution,
this will throw if there's invalid input but preserve the original
configuration
2013-05-14 14:15:24 -07: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
Ben Noordhuis
e72cd415ad cluster: use round-robin load balancing
Empirical evidence suggests that OS-level load balancing (that is,
having multiple processes listen on a socket and have the operating
system wake up one when a connection comes in) produces skewed load
distributions on Linux, Solaris and possibly other operating systems.

The observed behavior is that a fraction of the listening processes
receive the majority of the connections. From the perspective of the
operating system, that somewhat makes sense: a task switch is expensive,
to be avoided whenever possible. That's why the operating system likes
to give preferential treatment to a few processes, because it reduces
the number of switches.

However, that rather subverts the purpose of the cluster module, which
is to distribute the load as evenly as possible. That's why this commit
adds (and defaults to) round-robin support, meaning that the master
process accepts connections and distributes them to the workers in a
round-robin fashion, effectively bypassing the operating system.

Round-robin is currently disabled on Windows due to how IOCP is wired
up. It works and you can select it manually but it probably results in
a heavy performance hit.

Fixes #4435.
2013-05-13 21:31:18 +02:00
Bert Belder
bdc5881169 Merge branch 'v0.10'
Conflicts:
	tools/test.py
2013-05-13 11:13:39 -07:00
Robert Kowalski
dc92ff8585 doc: document stream.Writable 'error' event
Fixes #5255.
2013-05-08 18:15:50 -07:00
Ben Kelly
8a407f58b9 os: Include netmask in os.networkInterfaces()
re #3765 and #5432
fixes #4743
2013-05-08 17:04:29 -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
f8d81222e8 event: make setMaxListeners() return this
setMaxListeners was the only EventEmitter method that returned
undefined, so could not be chained.
2013-05-03 01:15:22 +02:00
Ben Noordhuis
43951d7cfb Merge remote-tracking branch 'origin/v0.10' 2013-05-03 01:13:44 +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
ab518e8831 https: implement https.Server#setTimeout()
Like commit d258fb0 ("http: More useful setTimeout API on server") but
this time for the https module.

Fixes #5361.
2013-04-30 13:10:56 +02:00
Andrew Paprocki
c081809344 vm: add support for timeout argument
Add a watchdog class which executes a timer in a separate event loop in
a separate thread that will terminate v8 execution if it expires.

Add timeout argument to functions in vm module which use the watchdog
if a non-zero timeout is specified.
2013-04-29 23:38:19 +02:00
Ben Noordhuis
af1ed99ce2 Merge remote-tracking branch 'origin/v0.10'
Conflicts:
	AUTHORS
	ChangeLog
	deps/uv/ChangeLog
	deps/uv/src/version.c
	lib/http.js
	src/node_crypto.cc
	src/node_os.cc
	src/node_version.h
	test/simple/helper-debugger-repl.js
2013-04-29 14:08:51 +02: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
isaacs
9cfc92979b doc: stream writev cleanups 2013-04-27 23:41:16 -07:00
Fedor Indutny
21ed8df696 streams: introduce .cork/.uncork/._writev 2013-04-27 15:59:13 +04:00
Miroslav Bajtoš
5db936d2ae 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.
2013-04-27 12:51:22 +02:00
Ben Noordhuis
cf0fa96db8 events: add EventEmitter.defaultMaxListeners
Class property that controls the maximum number of listeners for all
instances of EventEmitter.

Fixes #3014.

Conflicts:
	lib/events.js
2013-04-19 16:21:37 -07:00
Ryan Doenges
9026675061 path: add path.isAbsolute(path)
An absolute path will always open the same location regardless of your
current working directory. For posix, this just means path.charAt(0) ===
'/', but on Windows it's a little more complicated.

Fixes joyent/node#5299.
2013-04-19 10:15:22 -07:00
Sean Silva
63466e5cae doc: document value of this inside listeners
Fixes #5326.
2013-04-19 11:58:18 +02:00
Ben Noordhuis
8e190bf6a1 Merge remote-tracking branch 'origin/v0.10'
Conflicts:
	src/node_os.cc
2013-04-18 12:14:30 +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