TunnelOpenRequest class final

Client → Hub: open a tunnel that exposes targetHost:targetPort (reachable by nodeId, or the requesting client's own machine when nodeId is the @local sentinel) on a public Hub port. When publicPort is set the Hub validates it against its configured range; otherwise the Hub allocates a free port in range. Correlated by requestId.

Inheritance

Constructors

TunnelOpenRequest({required String requestId, required String nodeId, required int targetPort, String targetHost = 'localhost', int? publicPort})
Creates a tunnel-open request.
const

Properties

channelId int?
The channel this message pertains to, or null for connection-level messages (the envelope c field).
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
nodeId String
The exposer node id, or localNode for the requesting client's machine.
final
publicPort int?
A specific public port to request (validated against the Hub's range), or null to let the Hub allocate one in range.
final
requestId String
The correlation id echoed in the response.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
targetHost String
The internal host the exposer dials.
final
targetPort int
The internal TCP port the exposer dials.
final
type String
The stable type discriminator (the envelope t field).
no setteroverride

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
The message payload (the envelope d field), without the type or channel.
override
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

fromJson(int? channel, Map<String, dynamic> d) TunnelOpenRequest
Decodes a TunnelOpenRequest.

Constants

localNode → const String
The sentinel nodeId selecting the requesting client's own machine.
typeName → const String
The type discriminator.