diff --git a/doc/api/net.markdown b/doc/api/net.markdown index 2f41a0dfabcca9..ecd4117f3441a2 100644 --- a/doc/api/net.markdown +++ b/doc/api/net.markdown @@ -583,7 +583,7 @@ Here is an example of a client of the previously described echo server: ```js const net = require('net'); -const client = net.connect({port: 8124}, () => { +const client = net.createConnection({port: 8124}, () => { //'connect' listener console.log('connected to server!'); client.write('world!\r\n');