Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
switch zmq -> zeromq, msgpack -> msgpack-lite
  • Loading branch information
fyears committed Feb 18, 2017
commit 4830898121823067e3a38fe809ba8edcf1e8c843
6 changes: 3 additions & 3 deletions lib/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.

var msgpack = require("msgpack"),
var msgpack = require("msgpack-lite"),
uuid = require("uuid");

//Serializes an event into an array of buffers that can be transmitted
Expand All @@ -39,7 +39,7 @@ function serialize(event) {
}

message.push(new Buffer(0));
message.push(msgpack.pack(payload));
message.push(msgpack.encode(payload));
return message;
}

Expand All @@ -51,7 +51,7 @@ function serialize(event) {
//return : Object
// The deserialized object
function deserialize(envelope, payload) {
var event = msgpack.unpack(arguments[arguments.length - 1]);
var event = msgpack.decode(arguments[arguments.length - 1]);

if(!(event instanceof Array) || event.length != 3) {
throw new Error("Expected array of size 3");
Expand Down
2 changes: 1 addition & 1 deletion lib/socket.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
// DEALINGS IN THE SOFTWARE.

var nodeUtil = require("util"),
zmq = require("zmq"),
zmq = require("zeromq"),
nodeEvents = require("events"),
events = require("./events"),
util = require("./util"),
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
"communication"
],
"dependencies": {
"msgpack": "1.0.2",
"msgpack-lite": "^0.1.26",
"underscore": "1.3.3",
"uuid": "^3.0.0",
"zmq": "2.x"
"zeromq": "^4.1.1"
},
"devDependencies": {
"nodeunit": "0.9.1",
Expand Down