diff --git a/README.md b/README.md index f83afcd..4b38dad 100644 --- a/README.md +++ b/README.md @@ -145,8 +145,8 @@ tcp.bootstrap().then(function(nodes) { tcp.connect(remotePort, remoteHost); }); -tcp.on("established", function() { - console.log("Connection established"); +tcp.on("established", function(version) { + console.log("Connection established to", version.userAgent); tcp.on("message", function(command, payload) { console.log("Got new", command, "message"); diff --git a/lib/net/tcp.js b/lib/net/tcp.js index 7533e3b..ce02b07 100644 --- a/lib/net/tcp.js +++ b/lib/net/tcp.js @@ -18,8 +18,8 @@ * tcp.connect(remotePort, remoteHost); * }); * - * tcp.on("established", function() { - * console.log("Connection established"); + * tcp.on("established", function(version) { + * console.log("Connection established to", version.userAgent); * * tcp.on("message", function(command, payload) { * console.log("Got new", command, "message");