Skip to content

Commit 54f0234

Browse files
committed
Fix doc again
1 parent ee30267 commit 54f0234

File tree

4 files changed

+27
-42
lines changed

4 files changed

+27
-42
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ benchmark: all
4444
doc: doc/node.1 doc/api.html doc/index.html doc/changelog.html
4545

4646
## HACK to give the ronn-generated page a TOC
47-
doc/api.html: doc/api.markdown
47+
doc/api.html: doc/api.markdown doc/api_header.html doc/api_footer.html
4848
ronn -f --html doc/api.markdown \
4949
| sed "s/<h2>\(.*\)<\/h2>/<h2 id=\"\1\">\1<\/h2>/g" \
5050
| cat doc/api_header.html - doc/api_footer.html > doc/api.html

doc/api.markdown

+18-12
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Use `process.mixin()` to include modules into the global namespace.
9191
puts('The area of a circle of radius 4 is ' + area(4));
9292

9393

94-
## String Encodings and Buffers
94+
## Buffers
9595

9696
Pure Javascript is Unicode friendly but not nice to pure binary data. When
9797
dealing with TCP streams or the file system, it's necessary to handle octet
@@ -381,7 +381,7 @@ your program's flow. Especially for server programs that are designed to
381381
stay running forever, `uncaughtException` can be a useful safety mechanism.
382382

383383

384-
### Signal Events: 'SIGINT'
384+
### Signal Events
385385

386386
`function () {}`
387387

@@ -849,7 +849,7 @@ Example:
849849
grep = spawn('grep', ['ssh']);
850850

851851
sys.puts('Spawned child pid: ' + grep.pid);
852-
grep.stdin.close();
852+
grep.stdin.end();
853853

854854

855855
### child.stdin.write(data, encoding)
@@ -877,7 +877,7 @@ Example: A very elaborate way to run 'ps ax | grep ssh'
877877
if (code !== 0) {
878878
sys.puts('ps process exited with code ' + code);
879879
}
880-
grep.stdin.close();
880+
grep.stdin.end();
881881
});
882882

883883
grep.stdout.addListener('data', function (data) {
@@ -895,7 +895,7 @@ Example: A very elaborate way to run 'ps ax | grep ssh'
895895
});
896896

897897

898-
### child.stdin.close()
898+
### child.stdin.end()
899899

900900
Closes the child process's `stdin` stream. This often causes the child process to terminate.
901901

@@ -909,7 +909,7 @@ Example:
909909
sys.puts('child process exited with code ' + code);
910910
});
911911

912-
grep.stdin.close();
912+
grep.stdin.end();
913913

914914

915915
### child_process.exec(command, callback)
@@ -1359,6 +1359,8 @@ Begin accepting connections on the specified port and hostname. If the
13591359
hostname is omitted, the server will accept connections directed to any
13601360
address.
13611361

1362+
To listen to a unix socket, supply a filename instead of port and hostname.
1363+
13621364
This function is asynchronous. `listening` will be emitted when the server
13631365
is ready to accept connections.
13641366

@@ -1698,7 +1700,7 @@ A reference to the `http.Client` that this response belongs to.
16981700

16991701
## net.Server
17001702

1701-
This class can be used to create a TCP or UNIX server.
1703+
This class is used to create a TCP or UNIX server.
17021704

17031705
Here is an example of a echo server which listens for connections
17041706
on port 7000:
@@ -1719,6 +1721,11 @@ on port 7000:
17191721
});
17201722
server.listen(7000, 'localhost');
17211723

1724+
To listen on the socket `'/tmp/echo.sock'`, the last line would just be
1725+
changed to
1726+
1727+
server.listen('/tmp/echo.sock');
1728+
17221729
This is an EventEmitter with the following events:
17231730

17241731
### Event: 'listening'
@@ -1737,11 +1744,10 @@ Emitted when a new connection is made. `stream` is an instance of
17371744

17381745
### Event: 'close'
17391746

1740-
`function (errno) {}`
1747+
`function () {}`
1748+
1749+
Emitted when the server closes.
17411750

1742-
Emitted when the server closes. `errorno` is an integer which indicates
1743-
what, if any, error caused the server to close. If no error occurred
1744-
`errorno` will be 0.
17451751

17461752
### net.createServer(connectionListener)
17471753

@@ -2244,7 +2250,7 @@ The library is called `/repl.js` and it can be used like this:
22442250
net.createServer(function (c) {
22452251
sys.error('Connection!');
22462252
nconnections += 1;
2247-
c.close();
2253+
c.end();
22482254
}).listen(5000);
22492255
repl.start('simple tcp server> ');
22502256

doc/api_header.html

+8-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/manpage.xsl

-28
This file was deleted.

0 commit comments

Comments
 (0)