var net=require('net');var host='192.168.0.201';function executeCommand(socket, command, args) { var json = {}; switch(command){ case "01": case "02": json.beaconid = args; json.state = command; result = JSON.stringify(json); console.log('server:'+result); socket.write('server:'+result); cs.write('client:'+result); break; }};clientList = [];function broadcast(message, client) { var cleanup = []; for(var i=0;i
Ref: