diff --git a/lib/core/ipc.js b/lib/core/ipc.js index efc3b9778..e522eca7e 100644 --- a/lib/core/ipc.js +++ b/lib/core/ipc.js @@ -28,6 +28,9 @@ class IPC { on(action, done) { ipc.server.on('message', function(data, socket) { + console.dir("received message"); + console.dir(action); + console.dir(data); if (data.action !== action) { return; } @@ -36,19 +39,29 @@ class IPC { } reply(client, action, data) { + console.dir("reply message"); + console.dir(action); + console.dir(data); ipc.server.emit(client, 'message', {action: action, message: data}); } once(action, cb) { ipc.of['embark'].once('message', function(msg) { + console.dir("once message"); + console.dir(action); + console.dir(msg); if (msg.action !== action) { return; } + console.dir('received'); cb(msg.message); }); } request(action, data) { + console.dir("request message"); + console.dir(action); + console.dir(data); ipc.of['embark'].emit('message', {action: action, message: data}); }