Answer the question
In order to leave comments, you need to log in
Buffer object Node.JS?
Until all that is
var net = require("net");
var crc = require("crc");
var svr = net.createServer(function(socket){
console.log("Connected: "+socket.remoteAddress+":"+socket.remotePort);
socket.on("data", function(data){
console.log(data);
var result = crc.crc16modbus(data);
console.log(result);
});
socket.on("end", socket.end);
});
var svraddr = "185.20.225.164";
var svrport = 7654;
svr.listen(svrport,svraddr);
console.log("Server Created at "+svraddr+":"+svrport+"\n");
Answer the question
In order to leave comments, you need to log in
Representing binary data in nodejs: https://nodejs.org/api/buffer.html
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question