reth_eth_wire

Trait DisconnectP2P

Source
pub trait DisconnectP2P {
    // Required methods
    fn start_disconnect(
        &mut self,
        reason: DisconnectReason,
    ) -> Result<(), P2PStreamError>;
    fn is_disconnecting(&self) -> bool;
}
Expand description

Gracefully disconnects the connection by sending a disconnect message and stop reading new messages.

Required Methods§

Source

fn start_disconnect( &mut self, reason: DisconnectReason, ) -> Result<(), P2PStreamError>

Starts to gracefully disconnect.

Source

fn is_disconnecting(&self) -> bool

Returns true if the connection is about to disconnect.

Implementors§