pub async fn stage(
manager: Manager,
msg: ManagerMessage,
eff: Effects<ManagerMessage>,
) -> ManagerExpand description
The manager stage is responsible for managing the connections to the peers.
The semantics of the operations are as follows:
- AddPeer: add a peer to the manager unless that peer is already added
- RemovePeer: remove a peer from the manager, which will terminate a connection if currently connected
A peer can be added right after being removed even though the socket will be closed asynchronously.