# dk-socket-ipc

> Message-based communications over UNIX sockets

Latest version **1.0.3** (published 2017-06-21) · 0 weekly downloads

## Install

```sh
npm install dk-socket-ipc
pnpm add dk-socket-ipc
yarn add dk-socket-ipc
bun add dk-socket-ipc
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2017-06-21 |
| First published | 2017-06-14 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Denis Kuzmenchuk |
| Maintainers | dkuzmenchuk |
| Keywords | sockets, IPC |

## Links

- npm: https://www.npmjs.com/package/dk-socket-ipc
- Repository: https://github.com/dkuzmenchuk/dk-socket-ipc
- Homepage: https://github.com/dkuzmenchuk/dk-socket-ipc#readme
- Issues: https://github.com/dkuzmenchuk/dk-socket-ipc/issues
- npm.io page: https://npm.io/package/dk-socket-ipc

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.0.3 (latest) — 2017-06-21
- 1.0.2 — 2017-06-21
- 1.0.1 — 2017-06-14

## README

# Socket IPC

WebSocket-like communications over local UNIX sockets

## Installation

```
$ npm install dk-socket-ipc
```

## Creating a Message Server

```js
var ipc = require('dk-socket-ipc')

var server = new ipc.MessageServer('/tmp/socket-loc')

server.on('message', function(message) {
  console.log('got message:', message.data)
  server.send('back at you: ' + message.data)
})

server.on('connection', function(connection) {
  console.log('client connected')
})

server.start()
```

## Connecting To a Message Server

```js
var ipc = require('dk-socket-ipc')

var client = new ipc.MessageClient('/tmp/socket-loc')

client.on('connection', function(connection) {
  console.log('connected. sending greetings...')
  client.send('greetings')
})

client.on('message', function(message) {
  console.log('got message:', message.data)
})

client.start()
```

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