0.9.5 • Published 10 years ago

netev v0.9.5

Weekly downloads
32
License
-
Repository
-
Last release
10 years ago

netev - Node.js events over streams

netev allows you to wrap streams as event emitters, for both sending & recieving data. It overwrites the .emit function and sends them over the network, and it captures network data and triggers original .emit calls. It's very "low level" and you'll need to ensure that both streams are wrapped (and authed) before sending any events. Because the emitted data is serialized as JSON, only ints/strings/bools/arrays/objects will be transferred.

Install

npm install netev

Usage

var netev = require('netev', <debug=false>);

// Wrap a stream, returns an EventEmitter
var events = netev(stream);

// Bind to events as normal
events.on('incoming', function() {
    console.log(arguments);
});

// Send events as normal
events.emit('outgoing', {some: 'data'}, 'some more');
0.9.5

10 years ago

0.9.4

10 years ago

0.9.3

10 years ago

0.9.2

10 years ago

0.9.1

10 years ago

0.9.0

10 years ago