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