MagPipe class abstract interface

Pipe: processes data packets forwarded by the MagLink.

The application inherits this class and overrides MagPipe.processPacket to implement its own receiving logic (dedup by sn, fragment reassembly and delivery of the payload, docs/client.md section 4.2).

Implementers

Properties

hashCode → int
The hash code for this object.
no setterinherited
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
processPacket(Packet packet) → void
Handle one packet forwarded by the link: the default implementations answer "PONG" to heartbeats (echoing the payload with 'time' refreshed, docs/client.md section 6) and "COPY" to data packets (sn/index paired, docs/client.md section 4.2, section 9).
sendData(Uint8List payload, {required int sn, int index = 0, int count = 1}) → bool
Build a data packet (A=0, D=1, sn/index/count for the reliability layer) and send it through the link.
sendPacket(Magpie packet) → bool
Pack and send the datagram through the link: it is signed with the session secret when bound, and deferred while the handshake is still in progress.
toString() → String
A string representation of this object.
inherited

Operators

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