TunnelHandle class

A handle to an open tunnel returned by ClientRuntime.openTunnel.

Constructors

TunnelHandle({required String tunnelId, required String nodeId, required String publicHost, required int publicPort, required int targetPort, bool secure = false, TunnelProtocol protocol = TunnelProtocol.tcp, TunnelCacheOptions? cache, TunnelHttpTimeouts? timeouts})
Creates a tunnel handle.
const

Properties

cache → TunnelCacheOptions?
The cache the Hub granted (sizes after its limits), or null — none was asked for, the Hub disables tunnel caching, or it predates it.
final
hashCode → int
The hash code for this object.
no setterinherited
nodeId → String
The exposer node id, or @local when exposing the client's own machine.
final
protocol → TunnelProtocol
The protocol the Hub applies — TunnelProtocol.tcp when an http request reached a Hub that predates HTTP tunnels.
final
publicHost → String
The host the Hub advertises for the public port (may be empty when the caller should substitute the Hub's own hostname).
final
publicPort → int
The public TCP port the Hub is listening on.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scheme → String?
The URL scheme a consumer uses: https/http for an HTTP tunnel (or any TLS one), otherwise null for plain TCP.
no setter
secure → bool
Whether the public port terminates TLS (HTTPS).
final
shortId → String
A short, display-only handle derived from tunnelId.
no setter
targetPort → int
The internal target port being exposed.
final
timeouts → TunnelHttpTimeouts?
The HTTP timeouts the Hub enforces, or null (plain TCP, or an older Hub).
final
tunnelId → String
The full tunnel id (use any unambiguous prefix to close it).
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
publicAddress(String hubHost) → String
The public address to print: scheme://host:port (or host:port for plain TCP), substituting hubHost when the Hub advertised none.
toString() → String
A string representation of this object.
inherited

Operators

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