[−][src]Function tcb::graph::middleware::middleware_thread::start
pub fn start(
local_id: usize,
peer_addresses: Vec<String>,
receive_channel: Receiver<ClientPeerMiddleware>,
client: Sender<ClientMessage>,
peer_channels: Vec<Sender<(Arc<Barrier>, Arc<Vec<u8>>)>>,
configuration: Arc<Configuration>
)
Starts the Middleware thread that receives messages from the Client to be broadcast, receives messages from other peers and handles the delivery of messages to the Client.
Arguments
local_id
- Local peer's globally unique id.
peer_addresses
- Addresses the middleware will connect to.
receive_channel
- Channel where the middleware will receive messages from the Client and Peers.
client
- Channel where the middleware will send delivered/stable messages to the Client.
peer_channels
- Channels to the Sender threads to send broadcast messages.
configuration
- Middleware's configuration file.