diff options
author | HUANG Wei <grubbyfans@gmail.com> | 2016-03-08 15:39:16 +0800 |
---|---|---|
committer | Evan Lucas <evanlucas@me.com> | 2016-03-18 11:04:02 -0500 |
commit | 545b8fd8d8276a8bd5415384d9cb4f4a3182be6e (patch) | |
tree | 7705dbb61e8de63272c599755bfa147f8f7c4641 /test | |
parent | 08085c49b6e49ecfffd638c6cd46f4de639ae4f4 (diff) | |
download | android-node-v8-545b8fd8d8276a8bd5415384d9cb4f4a3182be6e.tar.gz android-node-v8-545b8fd8d8276a8bd5415384d9cb4f4a3182be6e.tar.bz2 android-node-v8-545b8fd8d8276a8bd5415384d9cb4f4a3182be6e.zip |
net: emit host in lookup event
Previously, we emitted ip and addressType. This change includes the host
as the last argument to the lookup event.
PR-URL: https://github.com/nodejs/node/pull/5598
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/parallel/test-net-dns-lookup.js | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/test/parallel/test-net-dns-lookup.js b/test/parallel/test-net-dns-lookup.js index 2bcff9143c..097bdf8eca 100644 --- a/test/parallel/test-net-dns-lookup.js +++ b/test/parallel/test-net-dns-lookup.js @@ -10,12 +10,14 @@ var server = net.createServer(function(client) { }); server.listen(common.PORT, '127.0.0.1', function() { - net.connect(common.PORT, 'localhost').on('lookup', function(err, ip, type) { - assert.equal(err, null); - assert.equal(ip, '127.0.0.1'); - assert.equal(type, '4'); - ok = true; - }); + net.connect(common.PORT, 'localhost') + .on('lookup', function(err, ip, type, host) { + assert.equal(err, null); + assert.equal(ip, '127.0.0.1'); + assert.equal(type, '4'); + assert.equal(host, 'localhost'); + ok = true; + }); }); process.on('exit', function() { |