This commit is contained in:
AJ ONeal 2016-10-12 13:11:21 -06:00
parent d4cd0bb5a6
commit 7e8f90a89f
1 changed files with 7 additions and 3 deletions

View File

@ -77,12 +77,14 @@ function run(copts) {
//localclients[cid].resume(); //localclients[cid].resume();
}); });
// 'data' // 'data'
/*
localclients[cid].on('data', function (chunk) { localclients[cid].on('data', function (chunk) {
//console.log("[<=] local '" + opts.service + "' sent to '" + cid + "' <= ", chunk.byteLength, "bytes"); //console.log("[<=] local '" + opts.service + "' sent to '" + cid + "' <= ", chunk.byteLength, "bytes");
//console.log(JSON.stringify(chunk.toString())); //console.log(JSON.stringify(chunk.toString()));
wstunneler.send(Packer.pack(opts, chunk), { binary: true }); wstunneler.send(Packer.pack(opts, chunk), { binary: true });
}); });
/* //*/
///*
localclients[cid].on('readable', function (size) { localclients[cid].on('readable', function (size) {
var chunk; var chunk;
@ -100,10 +102,12 @@ function run(copts) {
chunk = localclients[cid].read(size); chunk = localclients[cid].read(size);
//console.log("[<=] local '" + opts.service + "' sent to '" + cid + "' <= ", chunk.byteLength, "bytes"); //console.log("[<=] local '" + opts.service + "' sent to '" + cid + "' <= ", chunk.byteLength, "bytes");
//console.log(JSON.stringify(chunk.toString())); //console.log(JSON.stringify(chunk.toString()));
if (chunk) {
wstunneler.send(Packer.pack(opts, chunk), { binary: true }); wstunneler.send(Packer.pack(opts, chunk), { binary: true });
}
} while (chunk); } while (chunk);
}); });
*/ //*/
localclients[cid].on('error', function (err) { localclients[cid].on('error', function (err) {
handlers._onLocalError(cid, opts, err); handlers._onLocalError(cid, opts, err);
}); });