Skip to content

Commit

Permalink
doc: add link & simplify data event (net.Socket)
Browse files Browse the repository at this point in the history
PR-URL: #19487
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
  • Loading branch information
boneskull authored and targos committed Mar 27, 2018
1 parent 43f24c0 commit d47e5d0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions doc/api/net.md
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,7 @@ added: v0.1.90
* {Buffer}

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

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

Set the encoding for the socket as a [Readable Stream][]. See
[`stream.setEncoding()`][] for more information.
[`readable.setEncoding()`][] for more information.

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

0 comments on commit d47e5d0

Please sign in to comment.