diff options
author | Timothy J Fontaine <tjfontaine@gmail.com> | 2012-07-12 21:26:04 -0400 |
---|---|---|
committer | Bert Belder <bertbelder@gmail.com> | 2012-07-23 18:31:30 +0200 |
commit | 2637b5c2610ca1f9d7889ea0d572f297b2bd5b2e (patch) | |
tree | 974cde38932b492feed7c896c6644019cdb652e5 /lib/dgram.js | |
parent | 19d43f852e3428fe231ce662f94b154ae51254e0 (diff) | |
download | android-node-v8-2637b5c2610ca1f9d7889ea0d572f297b2bd5b2e.tar.gz android-node-v8-2637b5c2610ca1f9d7889ea0d572f297b2bd5b2e.tar.bz2 android-node-v8-2637b5c2610ca1f9d7889ea0d572f297b2bd5b2e.zip |
ref/unref for net.Socket net.Server dgram.Socket
Diffstat (limited to 'lib/dgram.js')
-rw-r--r-- | lib/dgram.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/dgram.js b/lib/dgram.js index 7abd0c32cc..d05790ccef 100644 --- a/lib/dgram.js +++ b/lib/dgram.js @@ -351,6 +351,17 @@ function onMessage(handle, slab, start, len, rinfo) { } +Socket.prototype.ref = function() { + if (this._handle) + this._handle.ref(); +}; + + +Socket.prototype.unref = function() { + if (this._handle) + this._handle.unref(); +}; + // TODO share with net_uv and others function errnoException(errorno, syscall) { var e = new Error(syscall + ' ' + errorno); |