TransportMessage¶
Purpose¶
A message from/to one of the transport protocols.
Type¶
Reception:
Record with fields:
-
addr: TransportAddressSource or destination address
-
tprefs: Option<TransportPrefs>Transport preferences for outgoing messages
-
expiry: OptionExpiry time for outgoing messages
-
msg: P2PMessageV1Encapsulated message
Triggers:
Behaviour¶
When receiving a TransportMessage from one of the transport protocols
addr contains the source address,
tprefs and expiry are not set,
and msg contains the message received.
Upon reception, Transport forwards the contained P2PMessage to the Router.
When sending a TransportMessage via one of the transport prototocols,
addr contains the destination address,
tprefs is set to the transport prefences from either the contained EngineMessage,
the NodeIdentityRecord from the Network Identity Store,
or the defaults in the local configuration of the Transport engine,
expiry is set from the contained EngineMessage,
and msg contains the message to be sent.
Message flow¶
sequenceDiagram
%% --8<-- [start:sequence]
TransportProtocol -) Transport: TransportMessage
Transport -) Router: P2PMessage
Router -) Transport: P2PMessage
Transport -) TransportProtocol: TransportMessage
%% --8<-- [end:sequence]