multicast-eventemitter
Advanced tools
Comparing version 0.10.2 to 0.10.4
@@ -152,10 +152,12 @@ // Copyright 2011 Thorcom Systems Ltd. All Rights Reserved. | ||
//console.log('emit', args); | ||
if (!this.seqByEvent[event]) this.seqByEvent[event] = 0; | ||
var hash; | ||
var message; | ||
if (options.overrides[event]) { | ||
hash = options.overrides[event]; | ||
message = new Buffer(JSON.stringify(args[0])); | ||
} else { | ||
hash = hasher.hash(event); | ||
message = new Buffer(JSON.stringify({ event: event, args: args, src: this.src, seq: this.seqByEvent[event]++ })); | ||
} | ||
if (!this.seqByEvent[event]) this.seqByEvent[event] = 0; | ||
var message = new Buffer(JSON.stringify({ event: event, args: args, src: this.src, seq: this.seqByEvent[event]++ })); | ||
//console.log("this.sender.send(" + message + ", " + 0 + ", " + message.length + ", " + hash.port + ", " + hash.address + ");"); | ||
@@ -162,0 +164,0 @@ this.sender.send(message, 0, message.length, hash.port, hash.address); |
{ "name" : "multicast-eventemitter" | ||
, "description" : "LAN wide eventemitter, using multicast." | ||
, "version" : "0.10.2" | ||
, "version" : "0.10.4" | ||
, "maintainers" : | ||
@@ -18,3 +18,3 @@ [ { "name": "Chris Dew" | ||
, "engines" : { | ||
"node" : ">=0.8.0 <0.11.0" | ||
"node" : "~0.8.0 ~0.10.0" | ||
} | ||
@@ -21,0 +21,0 @@ , "devDependencies" : { "vows" : ">=0.5.2" |
11325
266