Trait ethcore_network::ConnectionFilter
source · [−]pub trait ConnectionFilter: Send + Sync {
fn connection_allowed(
&self,
own_id: &NodeId,
connecting_id: &NodeId,
direction: ConnectionDirection
) -> bool;
}
Expand description
Connection filter. Each connection is checked against connection_allowed
.
Required methods
fn connection_allowed(
&self,
own_id: &NodeId,
connecting_id: &NodeId,
direction: ConnectionDirection
) -> bool
fn connection_allowed(
&self,
own_id: &NodeId,
connecting_id: &NodeId,
direction: ConnectionDirection
) -> bool
Filter a connection. Returns true
if connection should be allowed. false
if rejected.