diff --git a/doc/api/net.markdown b/doc/api/net.markdown index 899f5d734674e4..20e06d1635d50f 100644 --- a/doc/api/net.markdown +++ b/doc/api/net.markdown @@ -578,7 +578,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');