Igor Zinkovsky
c7771bc2ec
set readable/writable for pipes
13 years ago
koichik
0f0af55a0a
net: fix large file downloads failing
Fixes #2678 .
13 years ago
Stefan Rusu
4671e54495
net: destroy socket on DNS error
The socket was never destroyed on DNS errors. This broke some clients, including
lib/https.js.
13 years ago
Igor Zinkovsky
db3c4efd1d
support for sharing streams accross isolates
13 years ago
Ben Noordhuis
e806ad39d0
net, tls, http: remove socket.ondrain
Replace the ondrain hack with a regular 'drain' listener. Speeds up the
bytes/1024 http benchmark by about 1.2%.
13 years ago
Ben Noordhuis
f0c1376e07
net: make .write() throw on bad input
Passing a non-buffer or non-string argument to Socket.prototype.write triggered
an assert:
Assertion failed: (Buffer::HasInstance(args[0])), function Write,
file ../src/stream_wrap.cc, line 289.
Fixes #2532 .
13 years ago
koichik
70033bd960
net: make connect() accept options
This makes API even with tls.connect().
Refs #1983 .
See also:
http://groups.google.com/group/nodejs-dev/msg/3b6dbcc4a9a82d99
Fixes #2487 .
13 years ago
Andreas Madsen
5f08c3cfa1
cluster improvements: Worker class and isolate internal messages
Fixes #2388
13 years ago
Ben Noordhuis
c24276f008
net: defer net.Server 'close' event to next tick
13 years ago
koichik
a848a3efbf
net: fix Socket.pause null reference when called on a closed Stream
Fixes #1980 .
13 years ago
Ju-yeong Park
5976d58796
net: raise exception when the socket is closed
13 years ago
James Hartig
348d8cd04a
timers: remove _idleTimeout from item in .unenroll()
Stops .active() from reactivating the timer.
Fixes #2114 .
13 years ago
Ben Noordhuis
8295c80618
net: check status code in afterWrite
Fixes memory leak and spin on writing to dead fds. This was tested in
production.
13 years ago
isaacs
580e67015c
Apply #2257 fix for Pipe streams as well as TTYs
13 years ago
isaacs
cf20b6bf65
Fix #2257 pause/resume semantics for stdin
This makes it so that the stdin TTY-wrap stream gets ref'ed on
.resume() and unref'ed on .pause()
The semantics of the names "pause" and "resume" are a bit weird, but the
important thing is that this corrects an API change from 0.4 -> 0.6
which made it impossible to read from stdin multiple times, without
knowing when it might end up being closed. If no one has it open, this
lets the process die naturally.
LGTM'd by @ry
13 years ago
isaacs
db273818f6
s/NPM/npm/
http://npmjs.org/doc/faq.html#If-npm-is-an-acronym-why-is-it-never-capitalized
13 years ago
Igor Zinkovsky
99c9d19184
binding for uv_pipe_pending_instances
13 years ago
Ben Noordhuis
03eb41c2ec
net: don't emit 'close' event twice
Don't allow `socket.destroy()` to run twice. The self-destruct sequence itself
is idempotent but it makes the 'close' and 'error' events fire more than once,
which may confuse listeners.
Fixes #2223 .
13 years ago
Ryan Dahl
86528489ec
new cluster api
13 years ago
Ryan Dahl
4a8088a603
Socket.write should reset timeout timer.
Fixes #2002 .
13 years ago
Ben Noordhuis
9c11e8a1ca
net: implement Server.prototype.address() for pipes
13 years ago
Ryan Dahl
60818b957c
Add missing copyright headers
13 years ago
Maciej Małecki
7ee29d1d5b
net: `Server.listen`, `Server.close` and `Socket.connect` return `this`
Just a syntactic sugar for doing, for example:
var server = net.createServer(function (c) {
c.end('goodbye, cruel world!\r\n');
server.close().on('close', function () {
console.log('really, goodbye!');
});
}).listen(1337);
Fixes #1922 .
13 years ago
Ben Noordhuis
ac379b3be1
net: bring back .setNoDelay() and .setKeepAlive()
13 years ago
Ryan Dahl
6cc0c9e6a9
Remove superfluous nextTick during server binding
This breaks fork().send({}, server._handle) after server.listen() because
server._handle is not set.
13 years ago
koichik
d6191f593d
net: fix error handling in listen()
Fixes #1894 .
13 years ago
Ben Noordhuis
0b92fa0e93
net: fix connect queue bugs
This commit fixes two bugs in the handling of write requests when the connect()
call is still in progress.
1. The deferred write request's size was counted twice towards `.bytesWritten`.
2. The callback was not called. After connecting, `Socket.write()` was called
with three arguments (data, encoding, cb) but it ignored the third argument.
Coincidentally fixes test/simple/test-net-connect-buffer.js.
13 years ago
Ben Noordhuis
6df574b744
net: properly account multi-byte chars in .bytesWritten
13 years ago
Simen Brekken
4b0e36810a
net: register net.Server callback only once
Only register once for listening when passing a callback to Server.listen(),
this prevents servers recycled using close() from invoking the callback when
Server.listen() is called later.
13 years ago
Ryan Dahl
25ff181300
Revert some changes made in 12486a6
Some of the perf improvements from many-writes-fix branch were accidentally
undone in that commit. This puts them back in.
13 years ago
Ryan Dahl
87339a22b1
introduce node cluster
13 years ago
Ryan Dahl
be0bb2dc13
Remove net_legacy timers_legacy
13 years ago
Ryan Dahl
982b19dbd7
Adjust listenFD deprecation message. Remove test.
13 years ago
Ryan Dahl
12486a6437
Change API for sending handles
Does not support sending net.Server objects only raw TCPWrap objects.
13 years ago
Ryan Dahl
26c08a3f35
Do load balancing test in test-child-process-fork2.
13 years ago
Bert Belder
153629c99a
Some small optimizations
13 years ago
Ryan Dahl
29ec850478
Simplify arg parsing in String.write
13 years ago
Ben Noordhuis
1bb820a339
net: remove unconditional getpeername() call
Speeds up http_simple benchmark by about 1.0%
13 years ago
Bert Belder
ed65b7b375
Simplify writeReq handling in net_uv
13 years ago
Bert Belder
fcad5e35fd
Black hole tcp reads after destroy()
13 years ago
Colton Baker
87286cc737
Fixed a lot of jslint errors.
Fixes #1831
13 years ago
Ryan Dahl
fa2eaeafda
write-only streams should not shutdown
See
https://github.com/joyent/node/issues/1726#issuecomment-2207602
13 years ago
Ryan Dahl
6326b04b07
Fix test-regress-GH-819
Problem was exposed in 12798c6
.
13 years ago
Ryan Dahl
5cb1fd2e32
net.Socket(fd) should start readable and writable
13 years ago
Ryan Dahl
caaa59c559
Wrap uv_pipe_open, implement net.Stream(fd);
Fixes simple/test-child-process-ipc on unix.
13 years ago
Bert Belder
b5db0767d5
net_uv: fix 'set is undefined' error
13 years ago
Bert Belder
e20d0c1cd0
net-uv: correctly set socket.remoteAddress and -port
closes #1345
14 years ago
Ryan Dahl
e3413f08fd
net_uv: throw when people construct net.Socket(fd)
Easier to catch compatibility errors.
14 years ago
Ryan Dahl
c4454d2efc
net_uv: Don't error on ECONNRESET
Fixes #1571 .
14 years ago
Ryan Dahl
cf2e68d960
net_uv: handle read errors
14 years ago