You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.\" disable justification (adjust text to left margin only)
@@ -38,7 +38,7 @@ Server running at http://127\.0\.0\.1:8000/
38
38
.fi
39
39
.RE
40
40
.SH "API"
41
-
Node supports 4 byte\-string encodings\.ASCII ("ascii"), UTF\-8 ("utf8") both use the string object, obviously\.Then two "raw binary" encodings \- one uses an array of integers ("raw") and the other uses a string ("raws")\.Neither raw encodings are perfect and their implementations are rather inefficient\.Hopefully the raw encoding situation will improve in the future\.
41
+
Node supports 3 string encodings\.UTF\-8 ("utf8"), ASCII ("ascii"), and Binary ("binary")\."ascii" and "binary" only look at the first 8 bits of the 16bit javascript string characters\.Both are relatively fast\(emuse them if you can\."utf8" is slower and should be avoided when possible\.
42
42
.sp
43
43
Unless otherwise noted, functions are all asynchronous and do not block execution\.
44
44
.sp
@@ -329,7 +329,7 @@ T}:T{
329
329
data
330
330
.sp
331
331
T}:T{
332
-
Made when stdin has received a chunk of data\. Depending on the encoding that stdin was opened with, data will be either an array of integers (raw encoding) or a string (ascii or utf8 encoding)\. This event will only be emited after node\.stdio\.open() has been called\.
332
+
Made when stdin has received a chunk of data\. Depending on the encoding that stdin was opened with, data will be a string\. This event will only be emited after node\.stdio\.open() has been called\.
333
333
.sp
334
334
T}
335
335
T{
@@ -558,7 +558,7 @@ Write data to the child process\(cqs
558
558
stdin\. The second argument is optional and specifies the encoding: possible values are
559
559
"utf8",
560
560
"ascii", and
561
-
"raw"\.
561
+
"binary"\.
562
562
.RE
563
563
.PP
564
564
child\.close()
@@ -946,7 +946,7 @@ T}:T{
946
946
chunk
947
947
.sp
948
948
T}:T{
949
-
Emitted when a piece of the message body is received\. Example: A chunk of the body is given as the single argument\. The transfer\-encoding has been decoded\. The body chunk is either a String in the case of UTF\-8 encoding or an array of numbers in the case of raw encoding\. The body encoding is set with request\.setBodyEncoding()\.
949
+
Emitted when a piece of the message body is received\. Example: A chunk of the body is given as the single argument\. The transfer\-encoding has been decoded\. The body chunk is a String\. The body encoding is set with request\.setBodyEncoding()\.
Emitted when a piece of the message body is received\. Example: A chunk of the body is given as the single argument\. The transfer\-encoding has been decoded\. The body chunk is either a String in the case of UTF\-8 encoding or an array of numbers in the case of raw encoding\. The body encoding is set with response\.setBodyEncoding()\.
1304
+
Emitted when a piece of the message body is received\. Example: A chunk of the body is given as the single argument\. The transfer\-encoding has been decoded\. The body chunk a String\. The body encoding is set with response\.setBodyEncoding()\.
Called when data is received on the connection\. Encoding of data is set by connection\.setEncoding()\. data will either be a string, in the case of utf8, or an array of integer in the case of raw encoding\.
1507
+
Called when data is received on the connection\.data will be a string\.Encoding of data is set by connection\.setEncoding()\.
1506
1508
.sp
1507
1509
T}
1508
1510
T{
@@ -1589,14 +1591,14 @@ Either
1589
1591
connection\.setEncoding(encoding)
1590
1592
.RS4
1591
1593
Sets the encoding (either
1592
-
"utf8"
1593
-
or
1594
-
"raw") for data that is received\.
1594
+
"ascii",
1595
+
"utf8", or
1596
+
"binary") for data that is received\.
1595
1597
.RE
1596
1598
.PP
1597
1599
connection\.send(data, encoding="ascii")
1598
1600
.RS4
1599
-
Sends data on the connection\. The data should be eithre an array of integers (for raw binary) or a string (for utf8 or ascii)\. The second parameter specifies the encoding in the case of a string\(emit defaults to ASCII because encoding to UTF8 is rather slow\.
1601
+
Sends data on the connection\. The second parameter specifies the encoding in the case of a string\(emit defaults to ASCII because encoding to UTF8 is rather slow\.
0 commit comments