FakeTerminalPipe class final

The host end of one device stream in the fake (brief M4-36 Scope: a stream endpoint that relays to an in-process host). The fake hands it to FakeTerminal.hostLink after the device's identify; the link plays the host service: it reads fromDevice (each element one Noise message of the device), answers with toDevice and ends the stream with close.

Constructors

FakeTerminalPipe({required String hostId, required String sessionId, required String sessionToken, required void toDevice(List<int> bytes), required void close(int code, String? reason)})
Creates the pipe of sessionId on hostId with the one-time sessionToken.

Properties

done → Future<void>
Completes when the device stream ended (either side closed it).
no setter
fromDevice → Stream<Uint8List>
The binary messages of the device, in order; done when the device stream ends.
no setter
hashCode → int
The hash code for this object.
no setterinherited
hostId → String
The host.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sessionId → String
The session.
final
sessionToken → String
The session token the device carries in Noise message 1.
final

Methods

close(int code, [String? reason]) → void
Closes the device stream with code and reason, as the relay does for the host.
deliverFromDevice(Uint8List bytes) → void
Hands one binary message of the device to the host; called by the stream endpoint.
endFromDevice() → void
Ends fromDevice and completes done; called by the stream endpoint when the device stream ended.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDevice(List<int> bytes) → void
Sends one binary message of the host to the device.
toString() → String
A string representation of this object.
inherited

Operators

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