Duplex Event Emitter
Turns a duplex streams into an event emitter.
var s = netconnect;var duplexEmitter = require'duplex-emitter';var emitter = duplexEmitters;
You can emit events. They will be serialized (to JSON) and piped to the stream.
emitteremit'event1' arg1 arg2; // Send event to the other side
You can listen for events from the peer:
// Got event from the peeremitteron'event2'//...