Socket
Socket
Sign inDemoInstall

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.5 to 1.0.6

10

lib/index.js

@@ -11,6 +11,6 @@ var moment = require('moment')

this.timeout = this.options.timeout
}
var logInfo = function(tramaReq,tramaRes) {
logger.info(moment(new Date()).format('DD/MM/YYYY/HH:mm:ss.SSS') +' (REQUEST) ' +tramaReq);

@@ -22,3 +22,3 @@ logger.info(moment(new Date()).format('DD/MM/YYYY/HH:mm:ss.SSS') +' (RESPONSE)' +tramaRes);

var client = net.connect({host:this.ip,port:this.port}, () => {
client.write(trama+'\r\n');
client.write(trama+'\n');
})

@@ -28,3 +28,3 @@

client.on('data', function(data){
client.on('data', function(data) {
buffer = Buffer.concat([buffer, new Buffer(data, 'utf-8')]);

@@ -34,3 +34,3 @@ client.end();

client.on('end', function(data){
client.on('end', function(data) {
logInfo (trama,buffer.toString())

@@ -40,3 +40,3 @@ callback(null,buffer.toString())

client.on('error', function(err){
client.on('error', function(err) {
callback(err,null)

@@ -43,0 +43,0 @@ });

{
"name": "tcp-client",
"version": "1.0.5",
"version": "1.0.6",
"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