File tree 1 file changed +6
-8
lines changed
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
548
548
549
549
* {integer}
550
550
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
+
551
555
` net.Socket ` has the property that ` socket.write() ` always works. This is to
552
556
help users get up and running quickly. The computer cannot always keep up
553
557
with the amount of data that is written to a socket. The network connection
554
558
simply 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.
563
560
561
+ The consequence of this internal buffering is that memory may grow.
564
562
Users who experience large or growing ` bufferSize ` should attempt to
565
563
"throttle" the data flows in their program with
566
564
[ ` socket.pause() ` ] [ ] and [ ` socket.resume() ` ] [ ] .
You can’t perform that action at this time.
0 commit comments