Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tcp-client

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tcp-client - npm Package Compare versions

Comparing version 1.0.8 to 1.0.9

log/exceptions.log

11

index.js

@@ -6,6 +6,17 @@ var Client = require('./lib')

}
console.log('TCP-CONEXION')
var options ={}
options.ip="172.18.20.166"
options.port=9098
options.timeout=5000
//console.log(options)
cliente = new Client(options)
cliente.request('03100700000000000000000205201616:08:15.182 002', function(err,result){
if(err) console.log(err)
console.log(result)
})
module.exports = {
createClient: createClient
}

7

lib/index.js

@@ -20,4 +20,8 @@ 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);

@@ -41,3 +45,3 @@ })

});
/*
client.setTimeout(this.timeout, function(msg) {

@@ -47,2 +51,3 @@

})
*/
}

@@ -49,0 +54,0 @@

2

package.json
{
"name": "tcp-client",
"version": "1.0.8",
"version": "1.0.9",
"description": "small client tcp",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc