[−][src]Struct snarkos_network::context::context::Context
The network context for this node. All variables are public to allow server components to acquire read/write access.
Fields
local_address: RwLock<SocketAddr>
The ip address/socket of this node.
memory_pool_interval: u8
Frequency the server requests memory pool transactions.
min_peers: u16
Mininmum number of peers to connect to
max_peers: u16
Maximum number of peers to connect to
is_bootnode: bool
If enabled, node will not connect to bootnodes on startup.
bootnodes: Vec<String>
Hardcoded nodes and user-specified nodes this node should connect to on startup.
peer_book: RwLock<PeerBook>
Manages connected, gossiped, and disconnected peers
handshakes: RwLock<Handshakes>
Handshakes to make connected peers
connections: RwLock<Connections>
Connected peer channels for reading/writing messages
pings: RwLock<Pings>
Ping/pongs with connected peers
Implementations
impl Context
[src]
pub fn new(
local_address: SocketAddr,
memory_pool_interval: u8,
min_peers: u16,
max_peers: u16,
is_bootnode: bool,
bootnodes: Vec<String>
) -> Self
[src]
local_address: SocketAddr,
memory_pool_interval: u8,
min_peers: u16,
max_peers: u16,
is_bootnode: bool,
bootnodes: Vec<String>
) -> Self
Construct a new network Context
.
Auto Trait Implementations
impl !RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl !UnwindSafe for Context
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,