tcp-client
Advanced tools
Comparing version 1.1.8 to 1.1.9
@@ -10,4 +10,5 @@ var Client = require('./lib') | ||
module.exports = { | ||
createClient: createClient | ||
} |
@@ -10,3 +10,3 @@ var moment = require('moment') | ||
this.port = this.options.port | ||
this.timeout = this.options.timeout | ||
this.timeout = Number(this.options.timeout) | ||
} | ||
@@ -21,3 +21,3 @@ | ||
Client.prototype.request = function(trama, callback) { | ||
var client = net.connect({host:this.ip,port:this.port}, () => { | ||
@@ -47,3 +47,4 @@ var tramaSend = trama + '\r\n' | ||
client.setTimeout(this.timeout, function(msg) { | ||
client.end(); | ||
callback('El Servirdor No responde!',null) | ||
@@ -50,0 +51,0 @@ }) |
{ | ||
"name": "tcp-client", | ||
"version": "1.1.8", | ||
"version": "1.1.9", | ||
"description": "small client tcp", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
13427
6
73