TCPScanner.range constructor

TCPScanner.range(
  1. String host,
  2. int startPort,
  3. int endPort, {
  4. int timeout = 100,
  5. bool shuffle = false,
  6. int isolates = 1,
  7. Duration updateInterval = const Duration(seconds: 1),
})

Prepares scanner to scan range of ports from startPort to endPort

Implementation

TCPScanner.range(String host, int startPort, int endPort,
    {int timeout = 100, bool shuffle = false, int isolates = 1, Duration updateInterval = const Duration(seconds: 1)})
    : this.build(
          host,
          List.generate(max(startPort, endPort) + 1 - min(startPort, endPort), (i) => min(startPort, endPort) + i),
          timeout,
          shuffle,
          isolates,
          updateInterval);