/// Removes a peer by the socket address. Returns `Some` (connect message) of the peer if it was
/// indeed connected or `None` if there was no connection with given socket address.
Removes a peer by the socket address. Returns `Some` (connect message) of the peer if it was
indeed connected or `None` if there was no connection with given socket address.
Removes a peer by the socket address . Returns ` Some ` ( connect message ) of the peer if it was indeed connected or ` None ` if there was no connection with given socket address .
pub(super) fn remove_peer_with_pubkey(&mut self, key: &PublicKey) -> Option<Verified<Connect>> {
        self.connections.remove(key);
        if let Some(c) = self.peers.remove(key) {
            Some(c)
        } else {
            None
        }
    }
pub ( super ) fn remove_peer_with_pubkey ( & mut self , key : & PublicKey ) -> Option < Verified < Connect > > { self . connections . remove ( key ) ; if let Some ( c ) = self . peers . remove ( key ) { Some ( c ) } else { None } }
Removes a peer by the socket address.
Removes a peer by the socket address .
&mut self
key
&PublicKey