From 7aa2125fae2408c245bed497ff883b262b1862aa Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 8 Jun 2016 16:31:54 -0700 Subject: [PATCH] doc: add argument information for socket.destroy() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/7238 Reviewed-By: Colin Ihrig Reviewed-By: Fedor Indutny Reviewed-By: Johan Bergström --- doc/api/net.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/api/net.md b/doc/api/net.md index df8712a94e..876cf97ccf 100644 --- a/doc/api/net.md +++ b/doc/api/net.md @@ -512,7 +512,7 @@ If `true` - [`socket.connect(options[, connectListener])`][`socket.connect(optio haven't yet finished. Will be set to `false` before emitting `connect` event and/or calling [`socket.connect(options[, connectListener])`][`socket.connect(options, connectListener)`]'s callback. -### socket.destroy() +### socket.destroy([exception]) @@ -520,6 +520,9 @@ added: v0.1.90 Ensures that no more I/O activity happens on this socket. Only necessary in case of errors (parse error or so). +If `exception` is specified, an [`'error'`][] event will be emitted and any +listeners for that event will receive `exception` as an argument. + ### socket.destroyed A Boolean value that indicates if the connection is destroyed or not. Once a