summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2013-02-05 12:47:23 +0100
committerBen Noordhuis <info@bnoordhuis.nl>2013-02-05 12:50:48 +0100
commit5fe05464cb4b5bd1cc2e1be1056a75770a5a3553 (patch)
treeccc7e6a74b8d99ad8f26eabedc4ad4904d591c5d
parent9a488a667ccf17add7948cfbb931de60608e3e7c (diff)
downloadnode-5fe05464cb4b5bd1cc2e1be1056a75770a5a3553.tar.gz
doc: don't suggest to reuse net.Socket objects
Using Socket.prototype.connect() to reconnect an existing Socket object is not reliable. Users should just create a new Socket object. See #4698.
-rw-r--r--doc/api/net.markdown3
1 files changed, 1 insertions, 2 deletions
diff --git a/doc/api/net.markdown b/doc/api/net.markdown
index c5125e6ae..7f81c2603 100644
--- a/doc/api/net.markdown
+++ b/doc/api/net.markdown
@@ -277,8 +277,7 @@ then the socket will be opened as a TCP socket, if `host` is omitted,
opened as a unix socket to that path.
Normally this method is not needed, as `net.createConnection` opens the
-socket. Use this only if you are implementing a custom Socket or if a
-Socket is closed and you want to reuse it to connect to another server.
+socket. Use this only if you are implementing a custom Socket.
This function is asynchronous. When the ['connect'][] event is emitted the
socket is established. If there is a problem connecting, the `'connect'` event