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.2 to 1.0.3

9

lib/index.js
var moment = require('moment')
var net = require('net')
var logger = require('../log')
var tcpClient = require('tcp-client')
var tcpRequest = tcpClient.createClient(config)
function Client(options) {

@@ -10,7 +12,8 @@ this.options = options || {}

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);
logger.info(moment(new Date()).format('DD/MM/YYYY/HH:mm:ss.SSS')+' (RESPONSE) '+tramaRes);
logger.info(moment(new Date()).format('DD/MM/YYYY/HH:mm:ss.SSS') +' (REQUEST) ' +tramaReq);
logger.info(moment(new Date()).format('DD/MM/YYYY/HH:mm:ss.SSS') +' (RESPONSE)' +tramaRes);
}

@@ -20,3 +23,3 @@

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

@@ -23,0 +26,0 @@

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