# myipc

> Light weight Local IPC with acknowledgement

Latest version **0.0.1** (published 2017-08-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install myipc
pnpm add myipc
yarn add myipc
bun add myipc
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2017-08-28 |
| First published | 2017-08-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Shambhu Lal Verma |
| Maintainers | shambhu |
| Keywords | IPC, Inter process communication |

## Links

- npm: https://www.npmjs.com/package/myipc
- Repository: https://github.com/vermaslal/myipc
- Issues: https://github.com/vermaslal/myipc/issues
- npm.io page: https://npm.io/package/myipc

## Recent versions

- 0.0.1 (latest) — 2017-08-28

## README

# myipc

## Light weight IPC on node js

myipc is simple and light weight IPC server and client with acknowledgement


# installing 

``` npm install --save myipc```

# server

```var logger = require('mylogger');
var ipcServer = require('myipc/server');
var server = new ipcServer();
server.createServer('/tmp/sham1.sock', function () {
    logger.info('server is listening on /tmp/sham1.sock');
    server.on('connect', function (socket) {
        logger.log('server is connected with a client')

        socket.on('error', function (err) {
            logger.error('got error: ', err);
        })
        socket.on('end', function () {
            logger.error('connection end');
        })

        setInterval(function () {
            logger.log('sending data to client')
            socket.send('hello ', function (st) {
                logger.log('data sent to client', st);
            });
        }, 1000)
//        socket.on('data', function (data, cb) {
//            logger.log('sending ack for received data :', data);
//            cb({s: "received:" + Date.now()});
//        });
    });
});
 ```
 
 # Client
 ```
var ipcClient = require('myipc/client');
var logger = require('mylogger');
var client = new ipcClient('/tmp/sham1.sock');
client.connect(function () {
    logger.info('client connected to /tmp/sham1.sock')
//    setInterval(function () {
//        client.send('hello ', function (st) {
//            logger.log('data sent to server. got response from server:', st);
//        });
//    }, 1000)
    client.on('data', function (data, cb) {
        logger.log('sendig ack for received data:', data);
        cb({s: "received by client"});
    })
}); ```

---
_Source: https://npm.io/package/myipc · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
