-
Notifications
You must be signed in to change notification settings - Fork 296
Closed
Description
I am reading the Net documentation for Node in order to create a socket server:
One of the first things I do is to try and understand the docs and code snippets. There is a special code snippet that caught my attention:
const server = net.createServer((c) => {
// 'connection' listener
console.log('client connected');
c.on('end', () => {
console.log('client disconnected');
});
c.write('hello\r\n');
c.pipe(c);
});
c.on
is for events, c.write
is documented, but after searching the entire documentation page I can't find any entry for c.pipe
.
If I get it right, c
is a net.Socket object.
So, from that example I expect this method to be documented under:
https://nodejs.org/api/net.html#net_class_net_socket
But that is not the case.
Am I missing something or is the documentation incomplete?
Metadata
Metadata
Assignees
Labels
No labels