fn new_data(&self, conn_uuid: u128, bytes: Data) {
        // normally we'd translate, but here we'll jst convert
        let conn_id: usize = conn_uuid.try_into().unwrap();
        let vec_bytes: Vec<u8> = match Arc::try_unwrap(bytes) {
            Ok(v) => v,
            Err(v) => v.to_vec(),
        };
        let mutable = self.mutable.lock();
        // no peeking without first giving a name
        if mutable.names.contains_key(&conn_uuid) {
            log::debug!("coordinator sending to {}", conn_id);
            send_cmd(&self.net_sender, NetCmd::SendBytes(conn_id, vec_bytes));
        }
    }
// new data has arrived, we don't send to the network unless fully connected
new data has arrived, we don't send to the network unless fully connected
new data has arrived we don ' t send to the network unless fully connected
fn new_data(&self, conn_uuid: u128, bytes: Data) {
        // normally we'd translate, but here we'll jst convert
        let conn_id: usize = conn_uuid.try_into().unwrap();
        let vec_bytes: Vec<u8> = match Arc::try_unwrap(bytes) {
            Ok(v) => v,
            Err(v) => v.to_vec(),
        };
        let mutable = self.mutable.lock();
        // no peeking without first giving a name
        if mutable.names.contains_key(&conn_uuid) {
            log::debug!("coordinator sending to {}", conn_id);
            send_cmd(&self.net_sender, NetCmd::SendBytes(conn_id, vec_bytes));
        }
    }
fn new_data ( & self , conn_uuid : u128 , bytes : Data ) { // normally we'd translate, but here we'll jst convert let conn_id : usize = conn_uuid . try_into ( ) . unwrap ( ) ; let vec_bytes : Vec < u8 > = match Arc :: try_unwrap ( bytes ) { Ok ( v ) => v , Err ( v ) => v . to_vec ( ) , } ; let mutable = self . mutable . lock ( ) ; // no peeking without first giving a name if mutable . names . contains_key ( & conn_uuid ) { log :: debug ! ( " " conn_id ) ; send_cmd ( & self . net_sender , NetCmd :: SendBytes ( conn_id , vec_bytes ) ) ; } }
new data has arrived, we don't send to the network unless fully connected
new data has arrived we don ' t send to the network unless fully connected
&self
conn_uuid
u128
bytes
Data