@@ -240,8 +240,8 @@ <h3 id="_events">Events</h3><div style="clear:left"></div>
240240< div class ="paragraph "> < p > Many objects in Node emit events: a TCP server emits an event each time
241241there is a connection, a child process emits an event when it exits. All
242242objects which emit events are are instances of < tt > node.EventEmitter</ tt > .</ p > </ div >
243- < div class ="paragraph "> < p > Events are represented by a snakecased string. Here are some examples:
244- < tt > "connection"</ tt > , < tt > "receive"</ tt > , < tt > "message_begin "</ tt > .</ p > </ div >
243+ < div class ="paragraph "> < p > Events are represented by a camel-cased string. Here are some examples:
244+ < tt > "connection"</ tt > , < tt > "receive"</ tt > , < tt > "messageBegin "</ tt > .</ p > </ div >
245245< div class ="paragraph "> < p > Functions can be then be attached to objects, to be executed when an event
246246is emitted. These functions are called < em > listeners</ em > .</ p > </ div >
247247< div class ="paragraph "> < p > Some asynchronous file operations return an < tt > EventEmitter</ tt > called a
@@ -588,31 +588,36 @@ <h4 id="_tt_node_childprocess_tt"><tt>node.ChildProcess</tt></h4>
588588< col width ="76% " />
589589< thead >
590590< tr >
591- < th align ="left " valign ="top "> Event </ th >
592- < th align ="left " valign ="top "> Parameters </ th >
591+ < th align ="left " valign ="top "> Event </ th >
592+ < th align ="left " valign ="top "> Parameters </ th >
593593< th align ="left " valign ="top "> Notes</ th >
594594</ tr >
595595</ thead >
596596< tbody >
597597< tr >
598598< td align ="left " valign ="top "> < p class ="table "> < tt > "output"</ tt > </ p > </ td >
599599< td align ="left " valign ="top "> < p class ="table "> < tt > data</ tt > </ p > </ td >
600- < td align ="left " valign ="top "> < p class ="table "> Each time the child process sends data to its < tt > stdout</ tt > , this event is
601- emitted. < tt > data</ tt > is a string.< br />
602- If the child process closes its < tt > stdout</ tt > stream (a common thing to do on
603- exit), this event will be emitted with < tt > data === null</ tt > .</ p > </ td >
600+ < td align ="left " valign ="top "> < p class ="table "> Each time the child process
601+ sends data to its < tt > stdout</ tt > , this event is
602+ emitted. < tt > data</ tt > is a string. + If the child
603+ process closes its < tt > stdout</ tt > stream (a common
604+ thing to do on exit), this event will be emitted
605+ with < tt > data === null</ tt > .</ p > </ td >
604606</ tr >
605607< tr >
606608< td align ="left " valign ="top "> < p class ="table "> < tt > "error"</ tt > </ p > </ td >
607609< td align ="left " valign ="top "> < p class ="table "> < tt > data</ tt > </ p > </ td >
608- < td align ="left " valign ="top "> < p class ="table "> Identical to the < tt > "output"</ tt > event except for < tt > stderr</ tt > instead of < tt > stdout</ tt > .</ p > </ td >
610+ < td align ="left " valign ="top "> < p class ="table "> Identical to the < tt > "output"</ tt > event except for
611+ < tt > stderr</ tt > instead of < tt > stdout</ tt > .</ p > </ td >
609612</ tr >
610613< tr >
611614< td align ="left " valign ="top "> < p class ="table "> < tt > "exit"</ tt > </ p > </ td >
612615< td align ="left " valign ="top "> < p class ="table "> < tt > code</ tt > </ p > </ td >
613- < td align ="left " valign ="top "> < p class ="table "> This event is emitted after the child process ends. < tt > code</ tt > is the final exit
614- code of the process. One can be assured that after this event is emitted
615- that the < tt > "output"</ tt > and < tt > "error"</ tt > callbacks will no longer be made.</ p > </ td >
616+ < td align ="left " valign ="top "> < p class ="table "> This event is emitted after the child process
617+ ends. < tt > code</ tt > is the final exit code of the
618+ process. One can be assured that after this
619+ event is emitted that the < tt > "output"</ tt > and
620+ < tt > "error"</ tt > callbacks will no longer be made.</ p > </ td >
616621</ tr >
617622</ tbody >
618623</ table >
@@ -999,9 +1004,7 @@ <h3 id="_http">HTTP</h3><div style="clear:left"></div>
9991004< div class ="paragraph "> < p > In order to support the full spectrum of possible HTTP applications, Node’s
10001005HTTP API is very low-level. It deals with connection handling and message
10011006parsing only. It parses a message into headers and body but it does not
1002- parse the actual headers or the body. That means, for example, that Node
1003- does not, and will never, provide API to access or manipulate Cookies or
1004- multi-part bodies. < em > This is left to the user.</ em > </ p > </ div >
1007+ parse the actual headers or the body.</ p > </ div >
10051008< h4 id ="_tt_http_server_tt "> < tt > http.Server</ tt > </ h4 >
10061009< div class ="tableblock ">
10071010< table rules ="all "
@@ -1014,32 +1017,35 @@ <h4 id="_tt_http_server_tt"><tt>http.Server</tt></h4>
10141017< thead >
10151018< tr >
10161019< th align ="left " valign ="top "> Event </ th >
1017- < th align ="left " valign ="top "> Parameters </ th >
1020+ < th align ="left " valign ="top "> Parameters </ th >
10181021< th align ="left " valign ="top "> Notes</ th >
10191022</ tr >
10201023</ thead >
10211024< tbody >
10221025< tr >
10231026< td align ="left " valign ="top "> < p class ="table "> < tt > "request"</ tt > </ p > </ td >
10241027< td align ="left " valign ="top "> < p class ="table "> < tt > request, response</ tt > </ p > </ td >
1025- < td align ="left " valign ="top "> < p class ="table "> < tt > request</ tt > is an instance of < tt > http.ServerRequest</ tt > < br />
1026- < tt > response</ tt > is an instance of < tt > http.ServerResponse</ tt > </ p > </ td >
1028+ < td align ="left " valign ="top "> < p class ="table "> < tt > request</ tt > is an instance of < tt > http.ServerRequest</ tt >
1029+ < br />
1030+ < tt > response</ tt > is an instance of < tt > http.ServerResponse</ tt > </ p > </ td >
10271031</ tr >
10281032< tr >
10291033< td align ="left " valign ="top "> < p class ="table "> < tt > "connection"</ tt > </ p > </ td >
10301034< td align ="left " valign ="top "> < p class ="table "> < tt > connection</ tt > </ p > </ td >
10311035< td align ="left " valign ="top "> < p class ="table "> When a new TCP connection is established.
1032- < tt > connection</ tt > is an object of type < tt > http.Connection</ tt > . Usually users will not
1033- want to access this event. The < tt > connection</ tt > can also be accessed at
1034- < tt > request.connection</ tt > .</ p > </ td >
1036+ < tt > connection</ tt > is an object of type
1037+ < tt > http.Connection</ tt > . Usually users
1038+ will not want to access this event.
1039+ The < tt > connection</ tt > can also be
1040+ accessed at < tt > request.connection</ tt > .</ p > </ td >
10351041</ tr >
10361042< tr >
10371043< td align ="left " valign ="top "> < p class ="table "> < tt > "close"</ tt > </ p > </ td >
10381044< td align ="left " valign ="top "> < p class ="table "> < tt > errorno</ tt > </ p > </ td >
10391045< td align ="left " valign ="top "> < p class ="table "> Emitted when the server closes. < tt > errorno</ tt >
1040- is an integer which indicates what, if any,
1041- error caused the server to close. If no
1042- error occured < tt > errorno</ tt > will be 0.</ p > </ td >
1046+ is an integer which indicates what, if any,
1047+ error caused the server to close. If no
1048+ error occured < tt > errorno</ tt > will be 0.</ p > </ td >
10431049</ tr >
10441050</ tbody >
10451051</ table >
@@ -1099,16 +1105,20 @@ <h4 id="_tt_http_serverrequest_tt"><tt>http.ServerRequest</tt></h4>
10991105< tr >
11001106< td align ="left " valign ="top "> < p class ="table "> < tt > "body"</ tt > </ p > </ td >
11011107< td align ="left " valign ="top "> < p class ="table "> < tt > chunk</ tt > </ p > </ td >
1102- < td align ="left " valign ="top "> < p class ="table "> Emitted when a piece of the message body is received. Example: A chunk of
1103- the body is given as the single argument. The transfer-encoding has been
1104- decoded. The body chunk is a String. The body encoding is set
1105- with < tt > request.setBodyEncoding()</ tt > .</ p > </ td >
1108+ < td align ="left " valign ="top "> < p class ="table "> Emitted when a piece of the
1109+ message body is received. Example: A chunk
1110+ of the body is given as the single
1111+ argument. The transfer-encoding has been
1112+ decoded. The body chunk is a String. The
1113+ body encoding is set with
1114+ < tt > request.setBodyEncoding()</ tt > .</ p > </ td >
11061115</ tr >
11071116< tr >
11081117< td align ="left " valign ="top "> < p class ="table "> < tt > "complete"</ tt > </ p > </ td >
1109- < td align ="left " valign ="top "> < p class ="table "> </ p > </ td >
1110- < td align ="left " valign ="top "> < p class ="table "> Emitted exactly once for each message. No arguments.
1111- After emitted no other events will be emitted on the request.</ p > </ td >
1118+ < td align ="left " valign ="top "> < p class ="table "> (none)</ p > </ td >
1119+ < td align ="left " valign ="top "> < p class ="table "> Emitted exactly once for each message.
1120+ No arguments. After emitted no other
1121+ events will be emitted on the request.</ p > </ td >
11121122</ tr >
11131123</ tbody >
11141124</ table >
@@ -1134,7 +1144,7 @@ <h4 id="_tt_http_serverrequest_tt"><tt>http.ServerRequest</tt></h4>
11341144< div class ="listingblock ">
11351145< div class ="content ">
11361146< pre > < tt > GET /status?name=ryan HTTP/1.1\r\n
1137- Accept: */* \r\n
1147+ Accept: text/plain \r\n
11381148\r\n</ tt > </ pre >
11391149</ div > </ div >
11401150< div class ="paragraph "> < p > Then < tt > request.uri</ tt > will be</ p > </ div >
@@ -1149,7 +1159,12 @@ <h4 id="_tt_http_serverrequest_tt"><tt>http.ServerRequest</tt></h4>
11491159< div class ="paragraph "> < p > In particular, note that < tt > request.uri.protocol</ tt > is
11501160< tt > undefined</ tt > . This is because there was no URI protocol given
11511161in the actual HTTP Request.</ p > </ div >
1152- < div class ="paragraph "> < p > < tt > request.uri.anchor</ tt > , < tt > request.uri.query</ tt > , < tt > request.uri.file</ tt > , < tt > request.uri.directory</ tt > , < tt > request.uri.path</ tt > , < tt > request.uri.relative</ tt > , < tt > request.uri.port</ tt > , < tt > request.uri.host</ tt > , < tt > request.uri.password</ tt > , < tt > request.uri.user</ tt > , < tt > request.uri.authority</ tt > , < tt > request.uri.protocol</ tt > , < tt > request.uri.params</ tt > , < tt > request.uri.toString()</ tt > , < tt > request.uri.source</ tt > </ p > </ div >
1162+ < div class ="paragraph "> < p > Here is what’s available: < tt > request.uri.anchor</ tt > , < tt > request.uri.query</ tt > ,
1163+ < tt > request.uri.file</ tt > , < tt > request.uri.directory</ tt > , < tt > request.uri.path</ tt > ,
1164+ < tt > request.uri.relative</ tt > , < tt > request.uri.port</ tt > , < tt > request.uri.host</ tt > ,
1165+ < tt > request.uri.password</ tt > , < tt > request.uri.user</ tt > , < tt > request.uri.authority</ tt > ,
1166+ < tt > request.uri.protocol</ tt > , < tt > request.uri.params</ tt > , < tt > request.uri.toString()</ tt > ,
1167+ < tt > request.uri.source</ tt > </ p > </ div >
11531168</ dd >
11541169< dt class ="hdlist1 ">
11551170< tt > request.headers</ tt >
@@ -2015,7 +2030,7 @@ <h2 id="_extension_api">Extension API</h2>
20152030< div id ="footer ">
20162031< div id ="footer-text ">
20172032Version 0.1.12< br />
2018- Last updated 2009-09-28 21:50:11 CEST
2033+ Last updated 2009-09-29 09:59:52 CEST
20192034</ div >
20202035</ div >
20212036</ body >
0 commit comments