Function spawn_loopback_middlewares

Source
pub async fn spawn_loopback_middlewares(
    ips: Vec<String>,
) -> VecDeque<(P2mApiDefaultStack<M2mLoopback>, O2mApiDefaultStack)>
Expand description

Spawns multiple loopback middleware instances with no pre-enrolled resources.

Creates a set of middleware instances that can communicate with each other through the loopback transport. Each middleware is identified by an IP address for routing purposes.

§Arguments

  • ips - Vector of IP addresses to assign to the middleware instances

§Returns

A queue of (P2M service, O2M service) tuples for each middleware instance.