tcp-client
Advanced tools
Comparing version 1.1.6 to 1.1.7
@@ -8,5 +8,6 @@ var Client = require('./lib') | ||
module.exports = { | ||
createClient: createClient | ||
} | ||
@@ -20,14 +20,13 @@ var moment = require('moment') | ||
Client.prototype.request = function(trama, callback) { | ||
console.log('trama envio..') | ||
console.log(this.ip) | ||
console.log(this.port) | ||
var client = net.connect({host:this.ip,port:this.port}, () => { | ||
var tramaSend = trama + '\r\n' | ||
console.log( tramaSend) | ||
client.write(tramaSend); | ||
}) | ||
var buffer = new Buffer(0, 'utf-8'); | ||
var buffer = new Buffer('','utf-8'); | ||
client.on('data', function(data) { | ||
buffer = Buffer.concat([buffer, new Buffer(data, 'utf-8')]); | ||
@@ -34,0 +33,0 @@ client.end(); |
{ | ||
"name": "tcp-client", | ||
"version": "1.1.6", | ||
"version": "1.1.7", | ||
"description": "small client tcp", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4141
5
74