I want to ask I want to convert my binary data to hex before I will insert this to my table.
var net = require('net');
var server = net.createServer(function(socket){
socket.on('data',function(data){
var bindata= data.toString('binary');
//filter(bindata);
//if no error convert to hex.
var hexdata = bindata.toString('hex');
//insert hexdata here.
});
server.listen(3030,'127.0.0.1', function () {
console.log("server is listenining");
});
but the problem is that the binary data will be inserted.