1.0.8 • Published 4 years ago

ipc-protocol v1.0.8

Weekly downloads
1
License
MIT
Repository
github
Last release
4 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

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago