tcp-client
Advanced tools
Comparing version 1.0.2 to 1.0.3
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", |
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
4152
72