DVProtocolClient class

The client half.

fetch sends the handshake request with the given headers over the generated client's existing transport and returns the decoded body.

Constructors

DVProtocolClient({required int protocol, required Future<Map<String, Object?>> fetch(Map<String, String> headers)})

Properties

hashCode → int
The hash code for this object.
no setterinherited
headers → Map<String, String>
The headers every request carries.
no setter
protocol → int
The protocol version this build embeds.
final
protocolVersion → String
This build's protocol, as DVCrashContext.protocolVersion records it.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
state → DVLifecycleSignal<DVProtocolResult?>
The latest result, null until a handshake has answered. A signal, so a page can show what it means rather than discovering it through a failure; read-only, because the backend decides it.
no setter

Methods

handshake() → Future<DVProtocolResult>
Runs the handshake once. Calls that arrive while it is in flight wait on the same request, and a handshake that fails is forgotten so the next call tries again -- an offline launch must not be remembered as a verdict.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
observe(int status, Map<String, String> headers) → void
Takes what a later response says about the protocol: a 426 means the window has moved past this client since the handshake, and a result header is the backend's current decision.
toString() → String
A string representation of this object.
inherited

Operators

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