This PR introduces a ChainedNetwork utility (very similar to the utilities we already have for chaining DM handlers with ChainedHandler and for protocol handlers with ChainedExchangeHandler).
A chained network is simply a composition of multiple NetworkSend / NetworkReceive trait implementations, that covers the use cases where multiple networks need to operate simultaneously:
UDP + BLE for the Concurrent Provisioning
UDP + TCP (in future) for operating on both protocols
The PR also:
Comments thoughtfully the existing NetworkSend / NetworkReceive traits
Introduces a NetworkAddress::Btp enum variant, similar to the existing Udp and Tcp variants. (The BTP implementation is if course NOT part of this small PR, just the notion of a BTP network address.)
Moves the existingasync-io-based UDP protocol implementation to its own sub-module, network::udp, as the main network module grew too big, and the BTP protocol implementation aligns nicely this way, as it will live in network::btp, as a sibling of the UDP one
This PR introduces a
ChainedNetwork
utility (very similar to the utilities we already have for chaining DM handlers withChainedHandler
and for protocol handlers withChainedExchangeHandler
).A chained network is simply a composition of multiple
NetworkSend
/NetworkReceive
trait implementations, that covers the use cases where multiple networks need to operate simultaneously:The PR also:
NetworkSend
/NetworkReceive
traitsNetworkAddress::Btp
enum variant, similar to the existingUdp
andTcp
variants. (The BTP implementation is if course NOT part of this small PR, just the notion of a BTP network address.)async-io
-based UDP protocol implementation to its own sub-module,network::udp
, as the mainnetwork
module grew too big, and the BTP protocol implementation aligns nicely this way, as it will live innetwork::btp
, as a sibling of the UDP one