1.0.8 • Published 5 years ago

ipc-protocol v1.0.8

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

ipc-protocol

Provides simple interprocess communication, through TCP.

Installation

Using npm:

npm install ipc-protocol

In Node.js:

// Import the ipc-protocol and return an instance of the client/server
const ipcProtocol = require('ipc-protocol').getIpc(constants.clientPort, constants.serverPort, '127.0.0.1');

// A send example:
ipcProtocol.send({
    Command: 'command',
    Payload: null
}, (err) => {
    console.error(err);
});

// A listen example:
main.listen((a, head) => {
    console.log('Received: ' + a);

    // Sending a callback with the same headers
    main.send({
        Command: 'node-callback',
        Payload: null
    }, (err) => {
        console.error(err);
    }, head)
});

Note:

This solution integrates perfectly with the .NET Core solution IpcProtocol.Core

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago