blob: 2e2ae07b2f159f727741e71bedd5e37333775ad9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
// An EventEmitter wrapper for socket.js writes
const EventEmitter = require('events');
function wwrap(){ // should be called with wwrap.call(socket)
let self = this;
self.on('write', (acc) => {
for (let w of acc) this.emit(w);
});
}
module.exports = wwrap;
|