ZipGatewayUtils.js
function onMessage(msg, rinfo) {
            // if the message starts with the bytes "0x23, 0x02" (i.e. a Z/IP packet) then accept this as our gateway
            // TODO: consider checking the sequence number in this packet, to make sure it matches the packet we sent
            if (msg.length >= 15 && msg[0] === 0x23 && msg[1] === 0x02 && msg[14] === thisObject.findGatewaySequenceNumber && rinfo.family === "IPv4") {
                gatewayFound = true;
                resolve(rinfo.address);
            }
        }
function onMessage(msg, rinfo) {
            // if the message starts with the bytes "0x23, 0x02" (i.e. a Z/IP packet) then accept this as our gateway
            // TODO: consider checking the sequence number in this packet, to make sure it matches the packet we sent
            if (msg.length >= 15 && msg[0] === 0x23 && msg[1] === 0x02 && msg[14] === thisObject.findGatewaySequenceNumber && rinfo.family === "IPv4") {
                gatewayFound = true;
                resolve(rinfo.address);
            }
        }
function onMessage ( msg , rinfo ) { // if the message starts with the bytes "0x23, 0x02" (i.e. a Z/IP packet) then accept this as our gateway // TODO: consider checking the sequence number in this packet, to make sure it matches the packet we sent if ( msg . length >= 15 && msg [ 0 ] === 0x23 && msg [ 1 ] === 0x02 && msg [ 14 ] === thisObject . findGatewaySequenceNumber && rinfo . family === "IPv4" ) { gatewayFound = true ; resolve ( rinfo . address ) ; } }
do not let this socket's reference block node.js from exiting
do not let this socket s reference block node . js from exiting