File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -548,19 +548,17 @@ added: v0.3.8
548548
549549* {integer}
550550
551+ This property shows the number of characters buffered for writing. The buffer
552+ may contain strings whose length after encoding is not yet known. So this number
553+ is only an approximation of the number of bytes in the buffer.
554+
551555` net.Socket ` has the property that ` socket.write() ` always works. This is to
552556help users get up and running quickly. The computer cannot always keep up
553557with the amount of data that is written to a socket. The network connection
554558simply might be too slow. Node.js will internally queue up the data written to a
555- socket and send it out over the wire when it is possible. (Internally it is
556- polling on the socket's file descriptor for being writable).
557-
558- The consequence of this internal buffering is that memory may grow. This
559- property shows the number of characters currently buffered to be written.
560- (Number of characters is approximately equal to the number of bytes to be
561- written, but the buffer may contain strings, and the strings are lazily
562- encoded, so the exact number of bytes is not known.)
559+ socket and send it out over the wire when it is possible.
563560
561+ The consequence of this internal buffering is that memory may grow.
564562Users who experience large or growing ` bufferSize ` should attempt to
565563"throttle" the data flows in their program with
566564[ ` socket.pause() ` ] [ ] and [ ` socket.resume() ` ] [ ] .
You can’t perform that action at this time.
0 commit comments