net,dgram: return this from ref and unref methods
authorRoman Reiss <me@silverwind.io>
Fri, 22 May 2015 16:35:57 +0000 (18:35 +0200)
committerRoman Reiss <me@silverwind.io>
Sat, 23 May 2015 04:57:00 +0000 (06:57 +0200)
commit39dde3222e4733fc1b59c45e392d9ff1a88ae4cc
tree58561a0bbbbf02422b8b34d1b41e58fcb3b388b9
parent9da168b71fb729635ad71e839630480e815623d0
net,dgram: return this from ref and unref methods

Modifies the following methods to return the instance instead
of undefined, to allow for chaining these methods:

- net.Server.ref
- net.Server.unref
- net.Socket.ref
- net.Socket.unref
- dgram.Socket.ref
- dgram.Socket.unref

PR-URL: https://github.com/nodejs/io.js/pull/1768
Reviewed-By: Evan Lucas <evanlucas@me.com>
doc/api/dgram.markdown
doc/api/net.markdown
lib/dgram.js
lib/net.js
test/parallel/test-ref-unref-return.js [new file with mode: 0644]