{"bugs":{"url":"https://github.com/dominictarr/remote-events/issues"},"dist":{"shasum":"4a263db6d6808922d4b8dd9cd1e8d4cd468b5702","tarball":"https://registry.npmjs.org/remote-events/-/remote-events-1.1.4.tgz","integrity":"sha512-sWw949iM+usuq0+fIaOhzlRAhpCCd2W6J/0BjnlAd3PRFrh3v50wedK3/jl8Lxnq+UqjYaHm4wSHpG3od53y4g==","signatures":[{"sig":"MEYCIQDdOY8Vb0oesKrCJamLHafJuzw4stU5uvw/ulbrDky4MwIhAIGoQuw4kgEWmUMF9Ny1/wLLkmPPnyAoPsDECnLiZA3B","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"name":"remote-events","_from":".","author":{"url":"dominictarr.com","name":"Dominic Tarr","email":"dominic.tarr@gmail.com"},"readme":"# RemoteEvents\n\nconnect two EventEmitters through a stream!\n\n``` js\nvar RemoteEventEmitter = require('..')\nvar net = require('net')\n\nvar server = net.createServer(function (con) {\n  var ree = new RemoteEventEmitter()\n  con.pipe(ree.getStream()).pipe(con)\n\n  ree.on('ping', function (time) {\n    console.log('PING', time)\n    ree.emit('pong', Date.now())\n  })\n}).listen(2468, function () {\n\n  var con = net.connect(2468)\n  var ree = new RemoteEventEmitter()\n  con.pipe(ree.getStream()).pipe(con)\n\n  var time = Date.now()\n  ree.on('pong', function (_time) {\n    console.log('PONG', _time, _time - time)\n    ree.disconnect()\n    server.close()\n  })\n  ree.emit('ping', time)\n})\n\n```\n\n## options\n\nYou can pass in `opts.wrap` to `RemoteEventEmitter` to set the\nwrapper function that should be used by [`stream-serializer`][1]\n\n  [1]: https://github.com/dominictarr/stream-serializer\n","_npmUser":{"name":"dominictarr","email":"dominic.tarr@gmail.com"},"homepage":"http://github.com/dominictarr/remote-events","repository":{"url":"https://github.com/dominictarr/remote-events.git","type":"git"},"_npmVersion":"1.3.6","description":"a two ended EventEmitter connected through a Stream","directories":{},"maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"}],"dependencies":{"through":"~1.1.2","stream-serializer":"0.0.3"},"readmeFilename":"readme.markdown","devDependencies":{"assertions":"2"},"_id":"remote-events@1.1.4","version":"1.1.4"}