pub fn retransmitter(
    sock: UdpSocket,
    exit: Arc<AtomicBool>,
    crdt: Arc<RwLock<Crdt>>,
    recycler: BlobRecycler,
    r: BlobReceiver,
) -> JoinHandle<()> {
    spawn(move || {
        trace!("retransmitter started");
        loop {
            if exit.load(Ordering::Relaxed) {
                break;
            }
            // TODO: handle this error
            let _ = retransmit(&crdt, &recycler, &r, &sock);
        }
        trace!("exiting retransmitter");
    })
}
/// Service to retransmit messages from the leader to layer 1 nodes.
/// See `crdt` for network layer definitions.
/// # Arguments
/// * `sock` - Socket to read from.  Read timeout is set to 1.
/// * `exit` - Boolean to signal system exit.
/// * `crdt` - This structure needs to be updated and populated by the accountant and via gossip.
/// * `recycler` - Blob recycler.
/// * `r` - Receive channel for blobs to be retransmitted to all the layer 1 nodes.
Service to retransmit messages from the leader to layer 1 nodes.
See `crdt` for network layer definitions.
Service to retransmit messages from the leader to layer 1 nodes . See ` crdt ` for network layer definitions .
pub fn retransmitter(
    sock: UdpSocket,
    exit: Arc<AtomicBool>,
    crdt: Arc<RwLock<Crdt>>,
    recycler: BlobRecycler,
    r: BlobReceiver,
) -> JoinHandle<()> {
    spawn(move || {
        trace!("retransmitter started");
        loop {
            if exit.load(Ordering::Relaxed) {
                break;
            }
            // TODO: handle this error
            let _ = retransmit(&crdt, &recycler, &r, &sock);
        }
        trace!("exiting retransmitter");
    })
}
pub fn retransmitter ( sock : UdpSocket , exit : Arc < AtomicBool > , crdt : Arc < RwLock < Crdt > > , recycler : BlobRecycler , r : BlobReceiver , ) -> JoinHandle < ( ) > { spawn ( move | | { trace ! ( " " ) ; loop { if exit . load ( Ordering :: Relaxed ) { break ; } // TODO: handle this error let _ = retransmit ( & crdt , & recycler , & r , & sock ) ; } trace ! ( " " ) ; } ) }
Service to retransmit messages from the leader to layer 1 nodes.
Service to retransmit messages from the leader to layer 1 nodes .
sock
UdpSocket
exit
Arc<AtomicBool>
crdt
Arc<RwLock<Crdt>>
recycler
BlobRecycler
r
BlobReceiver
sock
UdpSocket
exit
Arc<AtomicBool>
crdt
Arc<RwLock<Crdt>>
recycler
BlobRecycler
r
BlobReceiver