Ben Noordhuis
fa378ee4d8
net: defer DNS lookup error events to next tick
net.createConnection() creates a net.Socket object
and immediately calls net.Socket.connect() on it.
There are no event listeners registered yet so
defer the error event to the next tick.
Fixes #1202 .
14 years ago
Ben Noordhuis
79f064f565
net: properly export remoteAddress to user land
Fixes failing test:
test/simple/test-net-remote-address-port.js
14 years ago
Felix Geisendörfer
09ee29318f
Emit 'close' after all connections have closed
Fixes #1383
14 years ago
Alexander Uvarov
14b75a126f
Add Socket::bytesRead, Socket::bytesWritten
14 years ago
Ryan Dahl
ede1acc1ed
Revert "Remove 'connect' event from server side sockets"
Fixes #1276
This reverts commit f0a440d886
.
14 years ago
koichik
c60cdcda4e
Fix net.Socket.connect argument parsing
Fixes #1251 .
14 years ago
Ryan Dahl
20996dbc2b
Revert "Add support for file descriptor type detection."
This reverts commit 911cbd0cef
.
This patch is broken on Linux and I don't want to think about the
functionality during the Windows port. We can reconsider it after v0.6.
14 years ago
koichik
6c121edc60
Fix mismatch createConnection and Socket.connect
net.createConnection() is wrapper for net.Socket.connect(),
but There is mismatch between them.
net.createConnection(port, [host])
net.Socket.connect(port, [host], [callback])
Fixes #1208 .
14 years ago
Ryan Dahl
710f8e2acc
Add --use-uv command-line flag to use libuv backend
14 years ago
Felix Geisendörfer
f0a440d886
Remove 'connect' event from server side sockets
Sockets emitted by the 'connection' event are always connected, having
them emit the 'connect' event makes no sense. It only confused people,
as it's not clear if you have to listen to 'connect' or not.
That try..catch block was also very scary. It would silently swallow
exceptions in 'connect' listeners and destroy the socket. Makes no
sense.
Fixes #1047 .
14 years ago
Ryan Dahl
8417870f51
Don't emit error on ECONNRESET - just close
Fix #670
14 years ago
Brian White
ac1da4b407
Add remoteAddress and remotePort for client TCP connections
https://groups.google.com/d/topic/nodejs-dev/Asr87_YFSkg/discussion
14 years ago
Ryan Dahl
9ccf0e527f
Don't error on ENOTCONN from shutdown()
14 years ago
Ryan Dahl
d7a86ff05e
Fix GH-819. Drop out if connection destroyed before connect()
14 years ago
Daniel Ennis
911cbd0cef
Add support for file descriptor type detection.
setImplementationMethods checks the type of a socket and defines different
behavior based on the type, so auto detect it if type not implicitly
specified.
14 years ago
Ryan Dahl
55048cdf79
Update copyright headers
14 years ago
koichik
414fa4abae
Better type checks for fd in net.js
14 years ago
koichik
113b1e6e0c
Fix GH-746 process.stdin.destroy() breaks http server
14 years ago
Andreas Reich
5e91042fcb
Don't decrease server connection counter again if destroy() is called more than once
Test: Anders Conbere <aconbere@gmail.com>
Fix: Andreas Reich <andreas@reich.name>
Closes GH-431.
Closes GH-502.
14 years ago
Ryan Dahl
e9257b859d
New DTrace probes from CA team
14 years ago
Ryan Dahl
a48a075535
better debug messages in net and tls
14 years ago
Ryan Dahl
4733d0b1f0
http: handle aborts
14 years ago
Ryan Dahl
9f3a20c76d
net: Add hook for when writeQueue changes
14 years ago
Ryan Dahl
6ede26cb9c
Add socket.bufferSize
14 years ago
Ryan Dahl
bfb6a67d60
Another fix for process.assert
14 years ago
Ali Farhadi
c70dd70301
Adding callback parameter to Socket's setTimeout method.
14 years ago
Ryan Dahl
068b733583
Land Cantrill's DTrace patch
only works on solaris
14 years ago
Ryan Dahl
9e976abad9
lint
14 years ago
Ryan Dahl
b22b5e341b
listen/bind errors should close net.Server
14 years ago
Bert Belder
0eb4c2157d
Define winsock error numbers
14 years ago
Ryan Dahl
5f5201db2f
Fix test-net-connect-buffer
Change to end() behavior in 33c339 was breaking it. end() should wait for
connection before dumping. Changed test-net-connect-timeout to use destroy()
instead.
14 years ago
Ryan Dahl
5f795efd4e
net: Timeouts should work before DNS resolution
14 years ago
Ryan Dahl
33c33949b2
Add test for connection timeouts
Also make socket.end() destroy connection if still trying to connect.
Previously was ignoring.
14 years ago
Ryan Dahl
5a05992155
Lint
14 years ago
Ryan Dahl
b62152bc84
Rename net.Stream to net.Socket
14 years ago
Ryan Dahl
bc1d758408
net.js: Check that readWatcher exists before pause, resume
14 years ago
Ryan Dahl
2957382991
Implement new stream method, destroySoon
Still missing on fs.WriteStream
14 years ago
Ryan Dahl
e4dd5cd6fd
NODE_DEBUG uses strings instead of bitflags
14 years ago
Ryan Dahl
632da2a393
Add callback paramenter to socket.connect()
14 years ago
Ryan Dahl
c4161f32f5
Add callback to socket.write()
14 years ago
Ryan Dahl
c970968ee6
better option parsing for socket.write()
14 years ago
Ryan Dahl
92789b16e5
Fix global leaks
14 years ago
Ryan Dahl
e232f6e735
more lint
14 years ago
Ryan Dahl
ec1589875c
Stop watcher before calling .set() in Stream.prototype.resume
14 years ago
Ryan Dahl
a6f6532dfb
Fix test-securepair-server
14 years ago
Ryan Dahl
2320497992
Revert "Merge branch 'writev'"
This reverts commit cd9515efd9
, reversing
changes made to df46c8e698
.
Too slow. Needs more work.
14 years ago
Ryan Dahl
1f18648394
Fix typo
14 years ago
Ryan Dahl
2ba3c10d62
Only try to flush big buffers once
14 years ago
Ryan Dahl
849792e46b
Add todo about test-pipe.js and throwing on resume()
14 years ago
Ryan Dahl
544877d12e
Fix socket.end() problem on non-empty queue
14 years ago