How to use the node-ipc.of function in node-ipc

To help you get started, we’ve selected a few node-ipc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Mostafa-Samir / klyng / tests / specs / beacon / beacon-process.specs.js View on Github external
ipc.connectTo('klyng_beacon', function() {
                ipc.of.klyng_beacon.emit('PROBE:MSG', {});
                ipc.of.klyng_beacon.on('ALIVE:MSG', function() {
                    ipc.disconnect('klyng_beacon');
                    done();
                });
            });
        }, 500);
github alibaba / ice / tools / ice-scripts / lib / utils / iceworksClient.js View on Github external
ipc.connectToNet('iceworks', () => {
    ipc.of.iceworks.on('connect', () => {
      connected = true;
      console.log('iceworks ipc 链接成功');
    });
    ipc.of.iceworks.on('disconnect', () => {
      connected = false;
      ipc.log('disconnected from iceworks');
    });
  });
}
github techninja / cncserver / src / components / core / drawing / fillers / cncserver.drawing.fillers.util.js View on Github external
const send = (command, data = {}) => {
  const packet = { command, data };
  ipc.of[hostname].emit('spawner.message', packet);
};
github luminati-io / luminati-proxy / bin / upgrader.js View on Github external
const emit_message = (msg, data)=>ipc.of.lum_node_index &&
    ipc.of.lum_node_index.emit(msg, data);
github techninja / cncserver / runner / cncserver.runner.js View on Github external
function sendMessage(command, data) {
  if (!data) {
    data = {};
  }

  var packet = {
    command: command,
    data: data
  };

  ipc.of.cncserver.emit('app.message', packet);
}
github TheBrainFamily / cypress-app-watcher-preprocessor / appWatcher.js View on Github external
ipc.connectTo(cypressWatcherId, function() {
        ipc.of[cypressWatcherId].emit("message", "RESTART");
      });
    }
github luminati-io / luminati-proxy / bin / upgrader.js View on Github external
ipc.connectTo('lum_node_index', ()=>{
        ipc.of.lum_node_index.on('connect', ()=>{
            emit_message('upgrader_connected');
        });
        ipc.of.lum_node_index.on('stop', ()=>{
            logger.notice('Stopping upgrader...');
            E.shutdown();
        });
        ipc.of.lum_node_index.on('start_auto_upgrade', ()=>{
            E.start_auto_upgrade();
        });
        ipc.of.lum_node_index.on('upgrade', (opt={})=>{
            logger.notice('Upgrading proxy manager...');
            E.upgrade(e=>{
                if (!e)
                    logger.notice('Upgrade completed successfully');
                emit_message('upgrade_finished', {error: e, cli: opt.cli});
            });
github kuzzleio / kuzzle / lib / services / ipc.js View on Github external
ipc.connectToNet(this.serverName, this.host, this.port, function () {
        ipc.of[this.serverName].on('connect', function () {
          deferred.resolve('Connected to ', this.serverName);
        }.bind(this));
      }.bind(this));
  }
github SolidStateGroup / rio / rio-server / outputs / pi-output.js View on Github external
function(){
                ipc.log('## connected to main ##', ipc.config.delay);
                channel = ipc.of.main;
            }
        );
github jlongster / electron-with-server-example / find-open-socket.js View on Github external
ipc.connectTo(name, () => {
      ipc.of[name].on('error', () => {
        ipc.disconnect(name);
        resolve(false);
      });

      ipc.of[name].on('connect', () => {
        ipc.disconnect(name);
        resolve(true);
      });
    });
  });

node-ipc

A nodejs module for local and remote Inter Process Communication (IPC), Neural Networking, and able to facilitate machine learning.

MIT
Latest version published 2 years ago

Package Health Score

50 / 100
Full package analysis