diff options
author | Gurin, Sebastian <sgurin@netsuite.com> | 2018-04-12 03:15:56 -0300 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2018-04-13 20:41:52 +0200 |
commit | 8e305890c9eb4488c7daf4600eca016b814b39bf (patch) | |
tree | e168a9301459d8a8cbdb37fe2e42102f5cc070f1 /doc | |
parent | 61e232b9b89a99e0b7edf647e694d90489ba945b (diff) | |
download | android-node-v8-8e305890c9eb4488c7daf4600eca016b814b39bf.tar.gz android-node-v8-8e305890c9eb4488c7daf4600eca016b814b39bf.tar.bz2 android-node-v8-8e305890c9eb4488c7daf4600eca016b814b39bf.zip |
doc: add net socket write signature
PR-URL: https://github.com/nodejs/node/pull/19967
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/net.md | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/api/net.md b/doc/api/net.md index 824e23bf9d..0575bb5f8f 100644 --- a/doc/api/net.md +++ b/doc/api/net.md @@ -834,6 +834,9 @@ active socket in the event system. If the socket is already `unref`ed calling added: v0.1.90 --> +* `data` {string|Buffer|Uint8Array} +* `encoding` {string} Only used when data is `string`. **Default:** `utf8`. +* `callback` {Function} * Returns: {boolean} 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. The optional `callback` parameter will be executed when the data is finally written out - this may not be immediately. +See Writable stream [`write()`][stream_writable_write] method for more +information. + ## net.connect() Aliases to @@ -1149,5 +1155,6 @@ Returns `true` if input is a version 6 IP address, otherwise returns `false`. [duplex stream]: stream.html#stream_class_stream_duplex [half-closed]: https://tools.ietf.org/html/rfc1122 [socket(7)]: http://man7.org/linux/man-pages/man7/socket.7.html +[stream_writable_write]: stream.html#stream_writable_write_chunk_encoding_callback [unspecified IPv4 address]: https://en.wikipedia.org/wiki/0.0.0.0 [unspecified IPv6 address]: https://en.wikipedia.org/wiki/IPv6_address#Unspecified_address |