From 0edeeec3ec317bb8ed3bc9f6289eb9e7bfe0c61b Mon Sep 17 00:00:00 2001 From: Robert Nagy Date: Sun, 28 Jun 2020 14:44:38 +0200 Subject: [PATCH] net: doc deprecate bufferSize PR-URL: https://github.com/nodejs/node/pull/34088 Refs: https://github.com/nodejs/node/issues/34078 Reviewed-By: Luigi Pinca Reviewed-By: Anna Henningsen --- doc/api/deprecations.md | 15 +++++++++++++++ doc/api/net.md | 5 +++++ 2 files changed, 20 insertions(+) diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index 274c4cdfd26fb7..6875cc74345bb3 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -2751,6 +2751,19 @@ const moduleParents = Object.values(require.cache) .filter((m) => m.children.includes(module)); ``` + +### DEP0XXX: `socket.bufferSize` + + +Type: Documentation-only + +[`socket.bufferSize`][] is just an alias for [`writable.writableLength`][]. + [`--pending-deprecation`]: cli.html#cli_pending_deprecation [`--throw-deprecation`]: cli.html#cli_throw_deprecation [`Buffer.allocUnsafeSlow(size)`]: buffer.html#buffer_class_method_buffer_allocunsafeslow_size @@ -2824,6 +2837,7 @@ const moduleParents = Object.values(require.cache) [`script.createCachedData()`]: vm.html#vm_script_createcacheddata [`setInterval()`]: timers.html#timers_setinterval_callback_delay_args [`setTimeout()`]: timers.html#timers_settimeout_callback_delay_args +[`socket.bufferSize`]: net.html#net_socket_buffersize [`timeout.ref()`]: timers.html#timers_timeout_ref [`timeout.refresh()`]: timers.html#timers_timeout_refresh [`timeout.unref()`]: timers.html#timers_timeout_unref @@ -2860,6 +2874,7 @@ const moduleParents = Object.values(require.cache) [`util`]: util.html [`worker.exitedAfterDisconnect`]: cluster.html#cluster_worker_exitedafterdisconnect [`worker.terminate()`]: worker_threads.html#worker_threads_worker_terminate +[`writable.writableLength`]: stream.html#stream_writable_writablelength [`zlib.bytesWritten`]: zlib.html#zlib_zlib_byteswritten [Legacy URL API]: url.html#url_legacy_url_api [NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf diff --git a/doc/api/net.md b/doc/api/net.md index b9813aae885293..a07c34cee07835 100644 --- a/doc/api/net.md +++ b/doc/api/net.md @@ -529,8 +529,12 @@ socket as reported by the operating system: ### `socket.bufferSize` +> Stability: 0 - Deprecated: Use [`writable.writableLength`][] instead. + * {integer} This property shows the number of characters buffered for writing. The buffer @@ -1268,6 +1272,7 @@ Returns `true` if input is a version 6 IP address, otherwise returns `false`. [`socket.setEncoding()`]: #net_socket_setencoding_encoding [`socket.setTimeout()`]: #net_socket_settimeout_timeout_callback [`socket.setTimeout(timeout)`]: #net_socket_settimeout_timeout_callback +[`writable.writableLength`]: stream.html#stream_writable_writablelength [`writable.destroyed`]: stream.html#stream_writable_destroyed [`writable.destroy()`]: stream.html#stream_writable_destroy_error [`writable.end()`]: stream.html#stream_writable_end_chunk_encoding_callback