PortScannerService class abstract
Scans open port for a target Address or domain.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
connectToPort(
{required String address, required int port, required Duration timeout, required StreamController< ActiveHost> activeHostsController, int recursionCount = 0}) → Future<ActiveHost?> -
customDiscover(
String target, {List< int> portList = commonPorts, ProgressCallback? progressCallback, Duration timeout = const Duration(milliseconds: 2000), bool resultsInAddressAscendingOrder = true, bool async = false}) → Stream<ActiveHost> -
Scans ports only listed in
portList
for atarget
. Progress can be retrieved byprogressCallback
Tries connecting ports before untiltimeout
reached.resultsInAddressAscendingOrder
= false will return results faster but not in ascending order and withoutprogressCallback
. -
isOpen(
String target, int port, {Duration timeout = const Duration(milliseconds: 2000)}) → Future< ActiveHost?> -
Checks if the single
port
is open or not for thetarget
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
scanPortsForSingleDevice(
String target, {int startPort = defaultStartPort, int endPort = defaultEndPort, ProgressCallback? progressCallback, Duration timeout = const Duration(milliseconds: 2000), bool resultsInAddressAscendingOrder = true, bool async = false}) → Stream< ActiveHost> -
Scans port from
startPort
toendPort
oftarget
. Progress can be retrieved byprogressCallback
Tries connecting ports before untiltimeout
reached. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → PortScannerService
-
no setter
Constants
-
commonPorts
→ const List<
int> - defaultEndPort → const int
- defaultStartPort → const int