# telephone_duplexer

> bi-direction event emitter over a stream

Latest version **0.1.0** (published 2013-09-18) · BSD license · 0 weekly downloads

## Install

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

## 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.1.0 |
| Published | 2013-09-18 |
| First published | 2013-07-19 |
| Weekly downloads | 0 |
| License | BSD |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Brandon Farmer |
| Maintainers | bthesorceror |
| Keywords | bi-directional, events |

## Links

- npm: https://www.npmjs.com/package/telephone_duplexer
- Repository: http://github.com/bthesorceror/telephone_duplexer
- Issues: https://github.com/bthesorceror/telephone_duplexer/issues
- npm.io page: https://npm.io/package/telephone_duplexer

## Dependencies (1)

- [uuid](https://npm.io/package/uuid.md) ~1.4.1

## Alternatives

- [async-exit-hook](https://npm.io/package/async-exit-hook.md) — 3.7M weekly downloads
- [evnty](https://npm.io/package/evnty.md) — 7.2K weekly downloads
- [eleventy-plugin-asciidoc](https://npm.io/package/eleventy-plugin-asciidoc.md) — 3.5K weekly downloads
- [@jswork/next-get2get](https://npm.io/package/@jswork/next-get2get.md) — 945 weekly downloads
- [@dashersw/axon](https://npm.io/package/@dashersw/axon.md) — 934 weekly downloads

## Recent versions

- 0.1.0 (latest) — 2013-09-18
- 0.0.9 — 2013-09-18
- 0.0.8 — 2013-08-19
- 0.0.7 — 2013-08-06
- 0.0.6 — 2013-08-05
- 0.0.5 — 2013-08-05
- 0.0.4 — 2013-07-25
- 0.0.3 — 2013-07-21
- 0.0.2 — 2013-07-20
- 0.0.1 — 2013-07-19

## README

Telephone Duplexer
==================

Bi-direction event emitter over a stream

[![Build Status](https://travis-ci.org/bthesorceror/telephone_duplexer.png?branch=master)](https://travis-ci.org/bthesorceror/telephone_duplexer)

Example
-------

```javascript

var Telephone = require('telephone_duplexer'),
    net = require('net');

var server = net.createServer(function(socket) {
  var tele = new Telephone(socket);

  tele.on('client', function(msg, reply) {
    console.log('SERVER: ' + msg);
    reply("Tyler Durden");
  });

  setInterval(function() {
    tele.emit('server', 'I AM YOUR SERVER LUKE!');
  }, 3000);
});

server.listen(5001);

var client = net.createConnection({host: 'localhost', port: 5001}, function() {
  var tele = new Telephone(client);

  tele.on('server', function(msg) {
    console.log('CLIENT: ' + msg);
  });

  setInterval(function() {
    tele.emit('client', 'USE THE FORCE', function(name) {
      console.log("CALLBACK: my name is " + name);
    });
  }, 3000);
});

```

Output
------

```
SERVER: USE THE FORCE
CLIENT: I AM YOUR SERVER LUKE!
CALLBACK: my name is Tyler Durden
SERVER: USE THE FORCE
CLIENT: I AM YOUR SERVER LUKE!
CALLBACK: my name is Tyler Durden
```

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