diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2012-01-24 02:38:25 +0400 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2012-01-24 03:11:45 +0400 |
commit | 46e86aa80348dd8e31ade16a3b19eeee6baee0de (patch) | |
tree | 0b78d4526bcf61365542b45ea65f0447d7e001ac /lib | |
parent | 986e61255736a74fad1d96cc928f049c93734e05 (diff) |
dgram: bring back setMulticastLoopback()
Diffstat (limited to 'lib')
-rw-r--r-- | lib/dgram.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/dgram.js b/lib/dgram.js index ee239558199..8c2ec6fcea6 100644 --- a/lib/dgram.js +++ b/lib/dgram.js @@ -248,7 +248,13 @@ Socket.prototype.setMulticastTTL = function(arg) { Socket.prototype.setMulticastLoopback = function(arg) { - throw new Error('not yet implemented'); + arg = arg ? 1 : 0; + + if (this._handle.setMulticastLoopback(arg)) { + throw errnoException(errno, 'setMulticastLoopback'); + } + + return arg; // 0.4 compatibility }; |