function getServers () {
  var interfaces = os.networkInterfaces()
  var result = []

  for (var key in interfaces) {
    var addresses = interfaces[key]
    for (var i = addresses.length; i--;) {
      var address = addresses[i]
      if (address.family === 'IPv4' && !address.internal) {
        var subnet = ip.subnet(address.address, address.netmask)
        var current = ip.toLong(subnet.firstAddress)
        var last = ip.toLong(subnet.lastAddress) - 1
        while (current++ < last) result.push(ip.fromLong(current))
      }
    }
  }

  return result
}
function getServers () {
  var interfaces = os.networkInterfaces()
  var result = []

  for (var key in interfaces) {
    var addresses = interfaces[key]
    for (var i = addresses.length; i--;) {
      var address = addresses[i]
      if (address.family === 'IPv4' && !address.internal) {
        var subnet = ip.subnet(address.address, address.netmask)
        var current = ip.toLong(subnet.firstAddress)
        var last = ip.toLong(subnet.lastAddress) - 1
        while (current++ < last) result.push(ip.fromLong(current))
      }
    }
  }

  return result
}
function getServers ( ) { var interfaces = os . networkInterfaces ( ) var result = [ ] for ( var key in interfaces ) { var addresses = interfaces [ key ] for ( var i = addresses . length ; i -- ; ) { var address = addresses [ i ] if ( address . family === 'IPv4' && ! address . internal ) { var subnet = ip . subnet ( address . address , address . netmask ) var current = ip . toLong ( subnet . firstAddress ) var last = ip . toLong ( subnet . lastAddress ) - 1 while ( current ++ < last ) result . push ( ip . fromLong ( current ) ) } } } return result }
Gets the current list of possible servers in the local networks.
Gets the current list of possible servers in the local networks .