-2
var comm = process.argv[2];
var client = new net.Socket();
client.connect(PORT, HOST,function() {
console.log('CONNECTED TO: ' + HOST + ':' + PORT);
client.write('global.comm \n',"binary");
});
我想發送變量comm到client.write(); 謝謝!nodejs如何發送變量到tcpsocket