/// Modifies the status to Connected and increases the number of ingoing
/// connections by one
Modifies the status to Connected and increases the number of ingoing
connections by one
Modifies the status to Connected and increases the number of ingoing connections by one
pub(crate) fn connect_ingoing(&mut self, seen_address: Option<SocketAddr>) {
        match &mut self.connection_status {
            Connected { n_in, .. } => *n_in += 1,
            Disconnected { .. }
            | Banned { .. }
            | Dialing { .. }
            | Disconnecting { .. }
            | Unknown => {
                self.connection_status = Connected { n_in: 1, n_out: 0 };
                self.connection_direction = Some(ConnectionDirection::Incoming);
            }
        }
        if let Some(socket_addr) = seen_address {
            self.seen_addresses.insert(socket_addr);
        }
    }
pub ( crate ) fn connect_ingoing ( & mut self , seen_address : Option < SocketAddr > ) { match & mut self . connection_status { Connected { n_in , .. } => * n_in += 1 , Disconnected { .. } | Banned { .. } | Dialing { .. } | Disconnecting { .. } | Unknown => { self . connection_status = Connected { n_in : 1 , n_out : 0 } ; self . connection_direction = Some ( ConnectionDirection :: Incoming ) ; } } if let Some ( socket_addr ) = seen_address { self . seen_addresses . insert ( socket_addr ) ; } }
Modifies the status to Connected and increases the number of ingoing
connections by one
Modifies the status to Connected and increases the number of ingoing connections by one
&mut self
<not_specific>
seen_address
Option<SocketAddr>
<not_specific>