TunnelHttpTimeouts class

The time limits the Hub enforces on an HTTP tunnel, per consumer request. Duration.zero turns a limit off.

Annotations
  • @immutable

Constructors

TunnelHttpTimeouts({Duration responseHeader = const Duration(seconds: 60), Duration idle = const Duration(minutes: 5), Duration clientHeader = const Duration(seconds: 60), Duration? maxDuration})
Creates timeouts; the defaults are 60s / 5m / 60s / none.
const

Properties

clientHeader → Duration
From the first byte of a consumer's request head to its end (idle keep-alive time is not counted); on expiry the consumer gets 408.
final
hashCode → int
The hash code for this object.
no setterinherited
idle → Duration
The longest silence between response bytes once a response started; on expiry the connection closes.
final
isDefault → bool
Whether every field holds its default.
no setter
maxDuration → Duration?
A cap on a whole exchange, or null for none: 504 if no response byte was sent yet, otherwise a close.
final
responseHeader → Duration
From a request being fully sent to the target's response head being complete; on expiry the consumer gets 504 and the connection closes.
final
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
toJson() → Map<String, dynamic>
Encodes to JSON (milliseconds).
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

fromJson(Map<String, dynamic> d) → TunnelHttpTimeouts
Decodes from JSON; a missing field takes its default.
optFrom(Map<String, dynamic> d, String key) → TunnelHttpTimeouts?
Decodes the optional object at key, or null.