Skip to content

Commit d47e5d0

Browse files
boneskulltargos
authored andcommitted
doc: add link & simplify data event (net.Socket)
PR-URL: #19487 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
1 parent 43f24c0 commit d47e5d0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/api/net.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -419,8 +419,7 @@ added: v0.1.90
419419
* {Buffer}
420420

421421
Emitted when data is received. The argument `data` will be a `Buffer` or
422-
`String`. Encoding of data is set by `socket.setEncoding()`.
423-
(See the [Readable Stream][] section for more information.)
422+
`String`. Encoding of data is set by [`socket.setEncoding()`][].
424423

425424
Note that the **data will be lost** if there is no listener when a `Socket`
426425
emits a `'data'` event.
@@ -746,7 +745,7 @@ added: v0.1.90
746745
* Returns: {net.Socket} The socket itself.
747746

748747
Set the encoding for the socket as a [Readable Stream][]. See
749-
[`stream.setEncoding()`][] for more information.
748+
[`readable.setEncoding()`][] for more information.
750749

751750
### socket.setKeepAlive([enable][, initialDelay])
752751
<!-- YAML
@@ -1117,9 +1116,10 @@ Returns true if input is a version 6 IP address, otherwise returns false.
11171116
[`socket.end()`]: #net_socket_end_data_encoding
11181117
[`socket.pause()`]: #net_socket_pause
11191118
[`socket.resume()`]: #net_socket_resume
1119+
[`socket.setEncoding()`]: #net_socket_setencoding_encoding
11201120
[`socket.setTimeout()`]: #net_socket_settimeout_timeout_callback
11211121
[`socket.setTimeout(timeout)`]: #net_socket_settimeout_timeout_callback
1122-
[`stream.setEncoding()`]: stream.html#stream_readable_setencoding_encoding
1122+
[`readable.setEncoding()`]: stream.html#stream_readable_setencoding_encoding
11231123
[IPC]: #net_ipc_support
11241124
[Identifying paths for IPC connections]: #net_identifying_paths_for_ipc_connections
11251125
[Readable Stream]: stream.html#stream_class_stream_readable

0 commit comments

Comments
 (0)