Trait reth_eth_wire::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§