Comparing version 0.1.4 to 0.1.5
@@ -11,3 +11,2 @@ var net = require('net'); | ||
var id = utils.randomAscii(12); | ||
var trunk = {id, options}; | ||
super(); | ||
@@ -22,5 +21,5 @@ | ||
this.client = srv.connect(options, () => { | ||
trunk.socket = this.client; | ||
trunk.end = () => {this.client.destroy()}; | ||
consumer.connect(trunk); | ||
console.log('consumer:'+util.inspect(consumer)); | ||
this.trunk.socket = this.client; | ||
consumer.connect(); | ||
}) | ||
@@ -31,3 +30,3 @@ | ||
data = Buffer.concat([buf, data], buf.length + data.length); | ||
var leftover = await consumer.read({data, trunk, options}); | ||
var leftover = await consumer.read({data, trunk: this.trunk, options}); | ||
@@ -34,0 +33,0 @@ if(leftover && leftover.length) { |
@@ -14,5 +14,4 @@ var util = require('util'); | ||
setClient(client) { | ||
console.log('SET CLIENT'); | ||
this.client = client; | ||
set client(client) { | ||
this._client_ = client; | ||
@@ -28,8 +27,13 @@ client.on('error', (...args) => { | ||
connect(trunk) { | ||
console.log('UA CONNECT::'+trunk); | ||
trunk.ua = this; | ||
this.trunk = trunk; | ||
get client() { | ||
return this._client_; | ||
} | ||
connect() { | ||
console.log('UA CONNECT::'+this.trunk); | ||
// this.trunk.ua = this; | ||
// trunk.ua = this; | ||
// this.trunk = trunk; | ||
} | ||
rnd(len) { | ||
@@ -36,0 +40,0 @@ return utils.randomAscii(len); |
@@ -59,3 +59,3 @@ { | ||
"optionalDependencies": {}, | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"directories": { | ||
@@ -62,0 +62,0 @@ "lib": "lib" |
AI-detected possible typosquat
Supply chain riskAI has identified this package as a potential typosquat of a more popular package. This suggests that the package may be intentionally mimicking another package's name, description, or other metadata.
Found 1 instance in 1 package
53445
637
6