diff options
author | Roman Shtylman <shtylman@gmail.com> | 2011-10-12 21:55:15 +0400 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2012-01-21 06:21:51 +0400 |
commit | a38fd6056c2c6d4e2266a65fdefdbdc8dcbe4dee (patch) | |
tree | 25fd596fb5e3c51501038a8bca0e9a5cd24bbf10 /lib | |
parent | 08ab306afd0161aebde527a145c49cb848718df2 (diff) |
dgram: reintroduce addMembership() and dropMembership()
Removed during the early stages of node 0.5 refactoring to libuv.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/dgram.js | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/lib/dgram.js b/lib/dgram.js index 26e0a2a3e81..42473b40e77 100644 --- a/lib/dgram.js +++ b/lib/dgram.js @@ -243,16 +243,26 @@ Socket.prototype.setMulticastLoopback = function(arg) { Socket.prototype.addMembership = function(multicastAddress, - multicastInterface) { - // are we ever going to support this in libuv? - throw new Error('not yet implemented'); + interfaceAddress) { + this._healthCheck(); + + if (!multicastAddress) { + throw new Error('multicast address must be specified'); + } + + return this._handle.addMembership(multicastAddress, interfaceAddress); }; Socket.prototype.dropMembership = function(multicastAddress, - multicastInterface) { - // are we ever going to support this in libuv? - throw new Error('not yet implemented'); + interfaceAddress) { + this._healthCheck(); + + if (!multicastAddress) { + throw new Error('multicast address must be specified'); + } + + return this._handle.dropMembership(multicastAddress, interfaceAddress); }; |