From 317741efa6ef92034315ddc5124fa9974e3761fa Mon Sep 17 00:00:00 2001 From: kobelb Date: Tue, 28 Jul 2020 16:57:31 -0700 Subject: [PATCH 1/3] doc: add net.Socket#timeout --- doc/api/net.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/api/net.md b/doc/api/net.md index 3bf9a68a8abf09..1eede088d7839d 100644 --- a/doc/api/net.md +++ b/doc/api/net.md @@ -914,6 +914,15 @@ If `timeout` is 0, then the existing idle timeout is disabled. The optional `callback` parameter will be added as a one-time listener for the [`'timeout'`][] event. +### `socket.timeout` + + +* {number} + +Gets the read-only socket timeout in milliseconds. + ### `socket.unref()` -* {number} +* {number|undefined} -Returns the read-only socket timeout in milliseconds. +The socket timeout in milliseconds as set by [`socket.setTimeout()`][]. +It is `undefined` if a timeout has not been set. ### `socket.unref()`