Struct pea2pea::NodeConfig [−][src]
The node's configuration.
Fields
name: Option<String>
The name/identifier of the node.
note: if set to None
, the Node
will automatically be assigned a sequential, zero-based numeric identifier.
listener_ip: IpAddr
The IP address the node's connection listener should bind to.
desired_listening_port: Option<u16>
The desired listening port of the node.
allow_random_port: bool
Allow listening on a different port if desired_listening_port
is unavailable.
protocol_handler_queue_depth: usize
The depth of the queues passing connections to protocol handlers.
conn_read_buffer_size: usize
The size of a per-connection buffer for reading inbound messages.
conn_write_buffer_size: usize
The size of a per-connection buffer for writing outbound messages.
conn_inbound_queue_depth: usize
The depth of per-connection queues used to process inbound messages.
conn_outbound_queue_depth: usize
The depth of per-connection queues used to send outbound messages.
invalid_read_delay_secs: u64
The delay on the next read attempt from a connection that can't be read from.
fatal_io_errors: Vec<ErrorKind>
The list of IO errors considered fatal and causing the connection to be dropped.
max_connections: u16
The maximum number of active connections the node can maintain.
note: this number can very briefly be breached by 1 in case of inbound connection attempts. It can never be breached by outbound connection attempts, though.
max_handshake_time_ms: u64
The maximum time allowed for a connection to perform a handshake before it is rejected.
Trait Implementations
impl Clone for NodeConfig
[src]
fn clone(&self) -> NodeConfig
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for NodeConfig
[src]
impl Default for NodeConfig
[src]
Auto Trait Implementations
impl RefUnwindSafe for NodeConfig
[src]
impl Send for NodeConfig
[src]
impl Sync for NodeConfig
[src]
impl Unpin for NodeConfig
[src]
impl UnwindSafe for NodeConfig
[src]
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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.
pub 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>,