Skip to content

Commit e635723

Browse files
Gurin, Sebastianjasnell
Gurin, Sebastian
authored andcommitted
doc: add net socket write signature
PR-URL: #19967 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent d7b162c commit e635723

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

doc/api/net.md

+7
Original file line numberDiff line numberDiff line change
@@ -834,6 +834,9 @@ active socket in the event system. If the socket is already `unref`ed calling
834834
added: v0.1.90
835835
-->
836836

837+
* `data` {string|Buffer|Uint8Array}
838+
* `encoding` {string} Only used when data is `string`. **Default:** `utf8`.
839+
* `callback` {Function}
837840
* Returns: {boolean}
838841

839842
Sends data on the socket. The second parameter specifies the encoding in the
@@ -846,6 +849,9 @@ buffer. Returns `false` if all or part of the data was queued in user memory.
846849
The optional `callback` parameter will be executed when the data is finally
847850
written out - this may not be immediately.
848851

852+
See Writable stream [`write()`][stream_writable_write] method for more
853+
information.
854+
849855
## net.connect()
850856

851857
Aliases to
@@ -1149,5 +1155,6 @@ Returns `true` if input is a version 6 IP address, otherwise returns `false`.
11491155
[duplex stream]: stream.html#stream_class_stream_duplex
11501156
[half-closed]: https://tools.ietf.org/html/rfc1122
11511157
[socket(7)]: http://man7.org/linux/man-pages/man7/socket.7.html
1158+
[stream_writable_write]: stream.html#stream_writable_write_chunk_encoding_callback
11521159
[unspecified IPv4 address]: https://en.wikipedia.org/wiki/0.0.0.0
11531160
[unspecified IPv6 address]: https://en.wikipedia.org/wiki/IPv6_address#Unspecified_address

0 commit comments

Comments
 (0)