TargetProtocol enum

Supported network protocols for performing reachability probes.

Each protocol has different performance characteristics and requires different system permissions.

Inheritance
Available extensions

Values

tcp → const TargetProtocol

Transmission Control Protocol (TCP).

Behavior

Performs a full TCP 3-way handshake (SYN -> SYN-ACK -> ACK). If the connection is established, the target is considered "up".

Pros/Cons

  • Reliable; works through most firewalls on standard ports (80/443).
  • More overhead than ICMP (Ping) as it requires a stateful connection.
icmp → const TargetProtocol

Internet Control Message Protocol (ICMP).

Behavior

Sends an "Echo Request" (Ping) and waits for an "Echo Reply".

Pros/Cons

  • Extremely low overhead; the "purest" measure of network latency.
  • Often blocked by public firewalls or corporate proxies.
  • May require root or special capabilities on some Linux systems.
http → const TargetProtocol

Hypertext Transfer Protocol (HTTP/1.1 or HTTP/2).

Behavior

Performs a full HTTP/1.1 GET or HEAD request to the target URL. The target is considered "up" if it returns a 2xx (Success) or 3xx (Redirection) status code.

Use Case

Best for validating that a specific web service or API is actually functional, not just that its port is open.

https → const TargetProtocol

Secure Hypertext Transfer Protocol (HTTPS).

Behavior

Performs an encrypted request over TLS/SSL. The engine validates the certificate chain and expiration by default.

Pros/Cons

  • High confidence; validates that the end-to-end encrypted path is open.
  • Highest overhead; requires a full TLS handshake.

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Constants

values → const List<TargetProtocol>
A constant List of the values in this enum, in order of their declaration.