ScanResult class Null safety

Scan result contains data of prepared, current and finished scan.

Constructors

ScanResult({String? host, List<int> ports = const [], List<int> open = const [], List<int> closed = const [], List<int> scanned = const [], ScanStatuses status = ScanStatuses.unknown})
Main constructor
ScanResult.fromJson(String json)
Creation object from JSON

Properties

closed List<int>
Closed ports
read / write
elapsed int
Returns elapsed scan time in milliseconds. If scanning is still in progress then returns difference between scan start and current time. If the start time is undefined return -1
read / write
hashCode int
The hash code for this object.
read-onlyinherited
host String?
Host
read / write
open List<int>
Open ports
read / write
ports List<int>
All testing ports
read / write
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
scanned List<int>
Ports which was scanned. This field is modifies when scan is in progress.
read / write
status ScanStatuses
Returns current scanning status
read / write

Methods

addClosed(int port) → void
Add closed port
addOpen(int port) → void
Add open port
addPort(int port) → void
Add single port
addScanned(int port) → void
Add scanned port
fromJson(String json) → void
Deserialize from JSON
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serialize to JSON
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

keyClosed String
final
keyElapsed String
final
keyHost String
final
keyOpen String
final
keyPorts String
final
keyScanned String
final
keyStatus String
final