doc: add link & simplify data event (net.Socket)
PR-URL: https://github.com/nodejs/node/pull/19487 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
This commit is contained in:
parent
59b5d77b92
commit
df0a37ac36
@ -419,8 +419,7 @@ added: v0.1.90
|
|||||||
* {Buffer}
|
* {Buffer}
|
||||||
|
|
||||||
Emitted when data is received. The argument `data` will be a `Buffer` or
|
Emitted when data is received. The argument `data` will be a `Buffer` or
|
||||||
`String`. Encoding of data is set by `socket.setEncoding()`.
|
`String`. Encoding of data is set by [`socket.setEncoding()`][].
|
||||||
(See the [Readable Stream][] section for more information.)
|
|
||||||
|
|
||||||
Note that the **data will be lost** if there is no listener when a `Socket`
|
Note that the **data will be lost** if there is no listener when a `Socket`
|
||||||
emits a `'data'` event.
|
emits a `'data'` event.
|
||||||
@ -746,7 +745,7 @@ added: v0.1.90
|
|||||||
* Returns: {net.Socket} The socket itself.
|
* Returns: {net.Socket} The socket itself.
|
||||||
|
|
||||||
Set the encoding for the socket as a [Readable Stream][]. See
|
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])
|
### socket.setKeepAlive([enable][, initialDelay])
|
||||||
<!-- YAML
|
<!-- YAML
|
||||||
@ -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.end()`]: #net_socket_end_data_encoding
|
||||||
[`socket.pause()`]: #net_socket_pause
|
[`socket.pause()`]: #net_socket_pause
|
||||||
[`socket.resume()`]: #net_socket_resume
|
[`socket.resume()`]: #net_socket_resume
|
||||||
|
[`socket.setEncoding()`]: #net_socket_setencoding_encoding
|
||||||
[`socket.setTimeout()`]: #net_socket_settimeout_timeout_callback
|
[`socket.setTimeout()`]: #net_socket_settimeout_timeout_callback
|
||||||
[`socket.setTimeout(timeout)`]: #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
|
[IPC]: #net_ipc_support
|
||||||
[Identifying paths for IPC connections]: #net_identifying_paths_for_ipc_connections
|
[Identifying paths for IPC connections]: #net_identifying_paths_for_ipc_connections
|
||||||
[Readable Stream]: stream.html#stream_class_stream_readable
|
[Readable Stream]: stream.html#stream_class_stream_readable
|
||||||
|
Loading…
x
Reference in New Issue
Block a user